/* ==========================================================================
   WOLFIES — HOME SWEET HOME | BẢNG MÀU VŨ TRỤ TÍM THẠCH ANH & ÁNH LỤA STARLIGHT
   ========================================================================== */

@font-face {
  font-family: "TAN Pearl";
  src:
    url("assets/fonts/TAN-PEARL-VN.woff") format("woff"),
    url("assets/fonts/TAN-PEARL-VN.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-deep: #0b011a;
  --bg-mid: #1a0638;
  --bg-horizon: #3d1369;
  --bg-card: rgba(30, 8, 62, 0.62);
  --bg-card-soft: rgba(48, 14, 96, 0.5);
  --border-soft: rgba(214, 162, 255, 0.24);
  --border-warm: rgba(248, 206, 255, 0.54);

  --text-main: #fdf8ff;
  --text-muted: #e5d0f9;
  --text-dim: #b694dc;

  --amber: #eab8ff;
  --amber-soft: #fcebff;
  --coral: #f5a8df;
  --violet: #a855f7;
  --indigo: #7e22ce;
  --sky: #d8b4fe;
  --mint: #bce8dc;

  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-lg: 0 22px 52px rgba(7, 1, 18, 0.68), 0 0 32px rgba(122, 60, 203, 0.14);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
}

/* Ảnh nền dải lụa tím vũ trụ cố định theo khung nhìn trên cả Web & Điện thoại (không bị kéo giãn khi cuộn) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: var(--bg-deep) url("assets/web-bg.jpg") center center / cover no-repeat;
}

.home-bg-fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#appShell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

.print-only {
  display: none;
}

#fxCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 90;
}

/* ==================== TRANG ĐẦU TIÊN: WELCOME GATE (2 CỘT ĐỐI XỨNG) ==================== */
.welcome-gate {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 26px 28px 22px;
  background: transparent;
}

.welcome-topbar {
  width: 100%;
  max-width: 1160px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.welcome-project-pill {
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2px 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  font-size: clamp(0.84rem, 1.35vw, 1.05rem);
  line-height: 1.4;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--text-main);
  text-shadow: 0 0 22px rgba(226, 184, 255, 0.32);
}

.welcome-split {
  width: 100%;
  max-width: 1100px;
  margin: auto 0;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 26px;
  align-items: stretch;
  animation: fadeIn 0.32s ease;
}

.welcome-panel {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  padding: 36px 38px;
  box-shadow: var(--shadow-lg);
}

.panel-corner-star {
  display: none !important;
}

.welcome-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--amber);
  opacity: 0.92;
}

/* --- Cột trái: Hero & Poster NOCTURNE mở rộng --- */
.welcome-hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 28px 26px;
  text-align: left;
}

.welcome-hero-title {
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  font-size: clamp(1.68rem, 2.45vw, 2.28rem);
  line-height: 1.32;
  white-space: nowrap;
  color: var(--text-main);
  text-shadow: 0 0 28px rgba(223, 190, 247, 0.3);
  margin: 0 0 8px;
}

@media (max-width: 420px) {
  .welcome-hero-title {
    white-space: normal;
    font-size: 1.85rem;
  }
}

.welcome-hero-desc {
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.welcome-hero-media {
  position: relative;
  width: 100%;
  aspect-ratio: 819 / 1024;
  border-radius: 16px;
  overflow: hidden;
  background: #140e28;
  border: 1px solid rgba(235, 214, 252, 0.32);
  box-shadow: 0 16px 38px rgba(10, 5, 24, 0.62);
}

.welcome-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Cột phải: Form Đăng ký / Đăng nhập --- */
.welcome-auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.welcome-auth-head {
  margin-bottom: 20px;
}

.welcome-auth-title {
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  font-size: clamp(1.42rem, 2.05vw, 1.78rem);
  line-height: 1.38;
  color: var(--text-main);
  margin: 8px 0 6px;
}

.welcome-auth-sub {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.req-star {
  color: var(--coral);
}

.welcome-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.welcome-form .field label {
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.welcome-form input[type="text"],
.welcome-form input[type="password"] {
  font-size: 0.86rem;
  padding: 11px 14px;
  border-radius: 11px;
}

.welcome-form input::placeholder {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.welcome-form .eula-check-field {
  border-radius: 11px;
  padding: 11px 14px;
  background: rgba(22, 5, 48, 0.52);
}

.welcome-auth-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.welcome-auth-actions .welcome-btn {
  width: 100%;
  padding: 13px 18px;
  font-size: 0.92rem;
  border-radius: 11px;
}

.welcome-btn-main {
  order: 1;
}

.welcome-auth-divider {
  order: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-dim);
  font-size: 0.76rem;
  margin: 2px 0;
}

.welcome-auth-divider::before,
.welcome-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(226, 208, 250, 0.16);
}

.welcome-btn-secondary {
  order: 3;
  background: rgba(44, 12, 90, 0.48);
  color: var(--text-main);
  border: 1px solid var(--border-soft);
  font-weight: 800;
}

.welcome-btn-secondary:hover:not(:disabled) {
  background: rgba(74, 22, 140, 0.62);
  border-color: var(--border-warm);
  transform: translateY(-1px);
}

.welcome-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 3px 10px;
  font-size: 0.62rem;
  font-weight: 300;
  line-height: 1.35;
  color: var(--text-dim);
  opacity: 0.72;
  text-align: center;
  padding-top: 6px;
}

@media (max-width: 920px) {
  .welcome-gate {
    padding: 20px 16px 20px;
  }
  .welcome-split {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .welcome-panel {
    padding: 28px 22px;
  }
  .welcome-hero-media {
    min-height: 195px;
  }
}

/* ==================== TOPBAR (TRÁI = MAIN TABS • PHẢI = SÓI LỚN VIEW + COIN + ACC) ==================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 20px;
  background: rgba(16, 3, 38, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 8px 26px rgba(6, 1, 16, 0.45);
  flex-wrap: nowrap;
}

.brand-accent {
  color: var(--amber-soft);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.account-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 132px;
  height: 34px;
  flex-shrink: 0;
  box-sizing: border-box;
  background: rgba(74, 22, 140, 0.45);
  border: 1px solid var(--border-soft);
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-main);
}

.account-pill #topAccountName {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.account-btn:hover {
  background: rgba(114, 90, 172, 0.58);
  border-color: var(--amber-soft);
  transform: translateY(-1px);
}

.top-avatar-wolf {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(182, 148, 236, 0.35);
  border: 1px solid var(--border-warm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.top-avatar-img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--amber-soft);
}

.caret-icon {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 0.7rem;
  opacity: 0.75;
}

.mobile-sidebar-toggle {
  display: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #ffffff;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-toggle-svg {
  width: 22px;
  height: 22px;
  display: block;
  filter: drop-shadow(0 0 8px rgba(208, 146, 255, 0.65));
}

.mobile-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(12, 8, 28, 0.62);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: flex-start;
}

.mobile-sidebar-drawer {
  width: min(286px, 84vw);
  height: 100%;
  background: linear-gradient(180deg, rgba(16, 3, 38, 0.97) 0%, rgba(38, 10, 76, 0.97) 100%);
  border-right: 1px solid var(--border-warm);
  box-shadow: 18px 0 44px rgba(6, 1, 18, 0.78);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  animation: slideInSidebarLeft 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideInSidebarLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.mobile-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 2px;
}

.mobile-sidebar-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-soft);
  color: #ffffff;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-sidebar-nav .tab-btn {
  width: 100%;
  justify-content: flex-start;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.86rem;
  gap: 8px;
}

.mobile-sidebar-nav .tab-btn .count-pill {
  margin-left: auto;
}

.mobile-sidebar-divider {
  height: 1px;
  background: rgba(226, 208, 250, 0.16);
  margin: 4px 0;
}

.mobile-bigwolf-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 16px;
  font-size: 0.86rem;
}

@media (max-width: 900px) {
  .topbar {
    padding: 8px 14px;
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .topbar {
    flex-wrap: nowrap;
    padding: 7px 12px;
    gap: 8px;
    justify-content: space-between;
  }

  .mobile-sidebar-toggle {
    display: inline-flex;
  }

  .main-tabs-scroller {
    display: none !important;
  }

  .topbar-actions {
    margin-left: auto;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .profile-bigwolf-btn {
    display: none !important;
  }

  .topbar-actions .wallet-pill {
    padding: 4px 9px;
    font-size: 0.74rem;
    gap: 4px;
  }

  .topbar-actions .wallet-pill .moon-coin-gold-svg {
    width: 15px;
    height: 15px;
    vertical-align: middle;
  }

  .topbar-actions .account-pill {
    width: 112px;
    height: 29px;
    padding: 3px 8px 3px 4px;
    font-size: 0.73rem;
    gap: 5px;
  }

  .topbar-actions .top-avatar-wolf,
  .topbar-actions .top-avatar-img {
    width: 21px;
    height: 21px;
    font-size: 0.72rem;
  }

  .topbar-actions #topAccountName {
    max-width: none;
  }
}

/* --- MODAL HỒ SƠ TÀI KHOẢN --- */
.modal-box.profile-modal-box {
  max-width: 480px;
  max-height: 92vh;
  padding: 18px 22px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(216, 180, 254, 0.34) transparent;
}

.modal-box.profile-modal-box::-webkit-scrollbar {
  width: 5px;
}

.modal-box.profile-modal-box::-webkit-scrollbar-track {
  background: transparent;
  margin: 14px 0;
}

.modal-box.profile-modal-box::-webkit-scrollbar-thumb {
  background: rgba(216, 180, 254, 0.34);
  border-radius: 999px;
}

.profile-bigwolf-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  font-size: 0.9rem;
}

.change-pass-panel {
  width: 100%;
  background: rgba(22, 5, 48, 0.72);
  border: 1px solid rgba(226, 208, 250, 0.28);
  border-radius: 15px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  animation: fadeIn 0.2s ease;
}

.change-pass-panel .field label {
  font-size: 0.78rem;
  margin-bottom: 4px;
}

.change-pass-panel input[type="password"],
.change-pass-panel input[type="text"] {
  font-size: 0.82rem;
  padding: 9px 12px;
}

.change-pass-panel input::placeholder {
  font-size: 0.76rem;
}

.change-pass-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
}

.profile-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 4px 0 12px;
}

.profile-avatar-frame {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(235, 208, 255, 0.34), rgba(148, 118, 204, 0.42));
  border: 3px solid var(--amber-soft);
  box-shadow: 0 8px 25px rgba(218, 184, 248, 0.28);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-fallback {
  font-size: 3rem;
}

.profile-name {
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  margin-top: 2px;
}

.avatar-upload-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.profile-inline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  line-height: 1.2;
}

.profile-thin-svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  display: block;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.profile-stat-card {
  background: rgba(44, 12, 90, 0.58);
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.p-stat-icon {
  height: 21px;
  font-size: 1.12rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.p-stat-icon .moon-coin-gold-svg {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

.p-stat-val {
  font-size: 0.92rem;
  line-height: 1.2;
  font-weight: 900;
  color: var(--amber-soft);
  white-space: nowrap;
}

.p-stat-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 700;
}

.btn-logout-danger {
  width: 100%;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(225, 112, 152, 0.18);
  border: 1px solid rgba(238, 152, 184, 0.48);
  color: #fce7f3;
  font-weight: 800;
  font-size: 0.94rem;
}

.btn-logout-danger:hover {
  background: rgba(225, 112, 152, 0.32);
  color: #fff;
}

.wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(223, 190, 247, 0.16);
  border: 1px solid var(--border-warm);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--amber-soft);
}

.streak-divider {
  opacity: 0.45;
  margin: 0 2px;
}

.top-streak {
  font-size: 0.84rem;
  font-weight: 900;
  color: #f3c6e8;
}

.wallet-unit {
  font-size: 0.84rem;
  font-weight: 700;
  opacity: 0.9;
}

.buff-pill {
  background: linear-gradient(135deg, #c084fc, #e879f9);
  color: #fff;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 4px;
}

/* ==================== BUTTONS ==================== */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

button:active {
  transform: scale(0.97);
}

button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: linear-gradient(180deg, #fffcff 0%, #f8e2ff 56%, #ecbffc 100%);
  color: #240744;
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 26px rgba(192, 120, 255, 0.34), inset 0 1px 0 #ffffff;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #ffffff 0%, #fbecff 58%, #f2d0fd 100%);
  box-shadow: 0 12px 30px rgba(216, 150, 255, 0.48), inset 0 1px 0 #ffffff;
}

.btn-accent {
  background: linear-gradient(135deg, #a855f7 0%, #7e22ce 55%, #5b189a 100%);
  color: #ffffff;
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(244, 208, 255, 0.42);
  box-shadow: 0 8px 24px rgba(126, 34, 206, 0.42);
}

.btn-accent:hover:not(:disabled) {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #b96df9 0%, #9333ea 55%, #6b21a8 100%);
  box-shadow: 0 12px 28px rgba(147, 51, 234, 0.54);
}

.btn-idol {
  background: linear-gradient(135deg, #fffaff 0%, #f6d8ff 52%, #e0abfc 100%);
  color: #240744;
  font-weight: 900;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 22px rgba(208, 136, 255, 0.38);
}

.btn-idol:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(232, 202, 255, 0.46);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-main);
  border: 1px solid var(--border-soft);
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 999px;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(226, 204, 250, 0.18);
  border-color: rgba(240, 220, 255, 0.45);
}

.btn-sm {
  font-size: 0.82rem;
  padding: 7px 14px;
}

.btn-lg {
  font-size: 1.05rem;
  padding: 14px 26px;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-soft);
  color: #fff;
  font-size: 1rem;
}

/* ==================== MAIN TABS (GÓC TRÊN CÙNG BÊN TRÁI • CỐ ĐỊNH 1 HÀNG NGANG) ==================== */
.main-tabs-scroller {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.main-tabs {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 2px;
  padding: 2px 0;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.main-tabs::-webkit-scrollbar {
  display: none;
}

.tabs-scroll-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(92, 30, 168, 0.58);
  border: 1px solid var(--border-warm);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(15, 10, 32, 0.36);
  user-select: none;
}

.tabs-scroll-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #fdfaff 0%, #eedcf9 100%);
  color: #2b1d4a;
  border-color: rgba(255, 255, 255, 0.9);
  transform: scale(1.06);
}

.tabs-scroll-btn:disabled {
  opacity: 0.3;
  cursor: default;
  box-shadow: none;
}

.tab-btn {
  position: relative;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 6px 9px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  white-space: nowrap;
}

.tab-home-icon,
.tab-wish-icon,
.tab-paw-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  display: inline-block;
  transform: translateY(-0.5px);
}

.tab-btn:hover:not(.active):not(.is-locked-tab) {
  background: rgba(92, 30, 168, 0.36);
  color: #ffffff;
  border-color: rgba(238, 218, 255, 0.25);
}

.tab-coming-soon {
  font-style: italic;
  font-weight: 300;
  font-size: 0.72rem;
  opacity: 0.86;
}

.tab-btn.tab-btn-coming-soon {
  font-weight: 300;
  font-style: italic;
  opacity: 0.82;
  letter-spacing: 0.01em;
}

.tab-btn.is-locked-tab:not(.admin-previewable) {
  opacity: 0.66;
  cursor: not-allowed;
}

.tab-btn.active {
  background: linear-gradient(180deg, #fffcff 0%, #f5dcff 100%);
  color: #240744;
  font-weight: 800;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 22px rgba(196, 126, 255, 0.36);
}

.notify-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f5d0fe;
  box-shadow: 0 0 10px #e879f9;
}

.count-pill {
  background: rgba(255, 255, 255, 0.16);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.74rem;
}

.tab-btn.active .count-pill {
  background: rgba(43, 29, 74, 0.14);
  color: #2b1d4a;
}

/* ==================== LAYOUT & CARDS ==================== */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 22px 28px;
  flex: 1 0 auto;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.28s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

/* Khung đơn gọn gàng + sao ✦ góc trên phải */
.framed-panel {
  position: relative;
  border-radius: 22px;
  padding: 24px 26px;
}

.muted {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.home-composer-wrap {
  max-width: 820px;
  margin: 0 auto;
}

/* ==================== TRANG CHỦ: HOME SWEET HOME LANDING ==================== */
.home-landing-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.home-landing-hero {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 20px;
  align-items: stretch;
}

.home-landing-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 12px 10px 12px 4px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  text-shadow: 0 2px 10px rgba(8, 1, 22, 0.85);
}

.home-landing-title {
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  font-size: clamp(1.56rem, 2.15vw, 2.05rem);
  line-height: 1.34;
  color: #ffffff;
  text-shadow: 0 0 32px rgba(226, 174, 255, 0.38);
  margin: 0 0 4px;
}

.home-landing-desc {
  margin: 0;
  font-size: 0.91rem;
  line-height: 1.66;
  color: var(--text-muted);
}

.home-landing-desc strong {
  color: #ffffff;
  font-weight: 800;
}

.home-landing-media {
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: clamp(360px, 50vh, 468px);
  background: rgba(26, 7, 56, 0.28);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.home-hero-photo-slot {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: clamp(360px, 50vh, 468px);
  border-radius: 0;
  overflow: hidden;
  border: none;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(122, 60, 203, 0.08) 0%,
    rgba(24, 6, 52, 0.08) 100%
  );
  display: grid;
  place-items: center;
}

.home-landing-media.has-hero-image {
  min-height: 0;
  align-items: center;
}

.home-hero-photo-slot.has-image {
  border: none;
  aspect-ratio: 16 / 10;
  height: auto;
  min-height: 0;
}

.home-hero-photo-slot.admin-empty-clickable {
  cursor: pointer;
}

.home-hero-photo-slot.admin-empty-clickable:hover {
  border-color: rgba(248, 206, 255, 0.72);
}

.home-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.home-hero-admin-tools {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.home-hero-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(24, 6, 52, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(238, 196, 255, 0.56);
  color: #fdf8ff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.home-hero-admin-btn:hover {
  background: rgba(110, 44, 190, 0.88);
  border-color: #ffffff;
  transform: translateY(-1px);
}

.home-hero-admin-btn.danger {
  background: rgba(68, 14, 46, 0.84);
  border-color: rgba(244, 154, 192, 0.62);
  color: #ffe4ef;
}

.home-hero-admin-btn.danger:hover {
  background: rgba(168, 36, 92, 0.88);
  border-color: #ffd1e6;
}

.home-hero-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  color: var(--text-dim);
}

.home-placeholder-svg {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 0 14px rgba(208, 146, 255, 0.42));
}

.home-placeholder-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* --- Dải thẻ kính mờ chuyển Tab bên dưới (thu gọn để nhường không gian cho khung ảnh) + nút đẩy trái/phải --- */
.home-cards-carousel {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
}

.home-cards-track {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 14px;
  overflow-x: auto;
  padding: 5px 2px 2px;
  background: transparent;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.home-cards-track::-webkit-scrollbar {
  display: none;
}

.home-nav-card {
  position: relative;
  flex: 0 0 calc((100% - 28px) / 3);
  min-height: 94px;
  padding: 13px 14px 11px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(26, 7, 56, 0.28);
  background-clip: padding-box;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  text-shadow: 0 1px 5px rgba(8, 1, 20, 0.78);
  border: 1.3px solid rgba(226, 188, 255, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 255, 0.36),
    inset 0 -1px 0 rgba(196, 140, 255, 0.22);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  scroll-snap-align: start;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.home-nav-card:hover {
  transform: translateY(-3px);
  background: linear-gradient(
    180deg,
    rgba(112, 56, 188, 0.52) 0%,
    rgba(54, 18, 108, 0.66) 100%
  );
  border-color: rgba(250, 220, 255, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 255, 0.58),
    inset 0 0 20px rgba(206, 142, 255, 0.26);
}

.home-nav-card.is-coming-soon-card .home-card-title {
  font-style: italic;
  font-weight: 500;
  opacity: 0.9;
}

.home-card-icon-wrap {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-card-svg {
  width: 34px;
  height: 34px;
  display: block;
  filter: drop-shadow(0 0 10px rgba(198, 134, 255, 0.48));
  transition: transform 0.22s ease, filter 0.22s ease;
}

.home-nav-card:hover .home-card-svg {
  transform: scale(1.07);
  filter: drop-shadow(0 0 14px rgba(236, 188, 255, 0.72));
}

.home-card-bottom {
  position: relative;
  width: 100%;
  min-height: 22px;
  padding: 0 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-card-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.home-card-arrow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(212, 168, 255, 0.16);
  border: 1px solid rgba(238, 206, 255, 0.3);
  color: rgba(252, 240, 255, 0.92);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.home-nav-card:hover .home-card-arrow {
  background: rgba(238, 198, 255, 0.32);
  border-color: rgba(255, 236, 255, 0.72);
  transform: translateY(-50%) translateX(2px);
}

.home-carousel-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(68, 24, 128, 0.62);
  backdrop-filter: blur(12px);
  border: 1.2px solid var(--border-warm);
  color: #ffffff;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(8, 2, 22, 0.55);
  user-select: none;
}

.home-carousel-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #fffcff 0%, #f4dcff 100%);
  color: #240744;
  border-color: #ffffff;
  transform: scale(1.06);
}

.home-carousel-btn:disabled {
  opacity: 0.28;
  cursor: default;
  box-shadow: none;
}

@media (max-width: 920px) {
  .home-landing-hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-landing-copy {
    padding: 22px 20px;
  }

  .home-landing-media {
    min-height: 280px;
  }

  .home-landing-media.has-hero-image {
    min-height: 0;
  }

  .home-hero-photo-slot {
    min-height: 252px;
  }

  .home-hero-photo-slot.has-image {
    min-height: 0;
  }

  .home-hero-admin-tools {
    right: 8px;
    bottom: 8px;
    gap: 5px;
  }

  .home-hero-admin-btn {
    padding: 5px 10px;
    font-size: 0.7rem;
    gap: 4px;
  }

  .home-nav-card {
    flex: 0 0 calc((100% - 20px) / 3);
  }

  .home-cards-track {
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 16px 12px 48px;
  }

  .home-landing-copy {
    padding: 6px 4px;
    gap: 8px;
  }

  .home-landing-title {
    font-size: 1.32rem;
    line-height: 1.3;
  }

  .home-landing-desc {
    font-size: 0.84rem;
    line-height: 1.62;
  }

  .home-cards-carousel {
    gap: 6px;
  }

  .home-cards-track {
    gap: 8px;
    padding: 4px 1px 2px;
  }

  .home-carousel-btn {
    width: 26px;
    height: 26px;
    font-size: 0.96rem;
  }

  .home-nav-card {
    flex: 0 0 calc((100% - 16px) / 3);
    min-height: 102px;
    padding: 10px 6px 8px;
    border-radius: 14px;
    gap: 6px;
    align-items: center;
    justify-content: space-between;
  }

  .home-card-icon-wrap {
    width: 26px;
    height: 26px;
    margin: 0 auto;
  }

  .home-card-svg {
    width: 24px;
    height: 24px;
  }

  .home-card-bottom {
    flex: 1;
    width: 100%;
    min-height: 0;
    padding: 0 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
  }

  .home-card-title {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.69rem;
    line-height: 1.22;
  }

  .home-card-arrow {
    position: static;
    transform: none;
    margin: 0 auto;
    width: 18px;
    height: 18px;
    font-size: 0.76rem;
    flex-shrink: 0;
  }

  .home-nav-card:hover .home-card-arrow {
    transform: translateX(1px);
  }
}

.pet-layout-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 22px;
  align-items: start;
}

.pet-side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 960px) {
  .pet-layout-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== STAGE & WOLFIE DIORAMA ==================== */
.stage-card {
  padding: 20px 18px 18px;
}

.stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 4px;
  flex-wrap: wrap;
}

.level-chip {
  display: inline-block;
  background: rgba(188, 156, 236, 0.22);
  color: var(--amber-soft);
  border: 1px solid var(--border-warm);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 13px;
  border-radius: 999px;
}

.stage-status-caption {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
  text-align: right;
}

.stage-diorama-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-pet-dock {
  margin: -14px auto 0;
  position: relative;
  z-index: 6;
  min-width: 0;
  padding: 6px 16px;
  border-radius: 10px;
  font-size: 0.76rem;
}

.btn-pet-dock:hover:not(:disabled) {
  transform: translateY(-2px);
}

.cabin-diorama {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid rgba(235, 214, 252, 0.34);
  background: #14082c;
  box-shadow: 0 14px 36px rgba(10, 4, 26, 0.52), inset 0 0 24px rgba(14, 8, 32, 0.35);
}

.pet-scene-artwork {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: 28% 87%;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pet-scene-artwork.happy-jump {
  animation: petArtworkPop 0.48s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes petArtworkPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.032) translateY(-3px); }
  100% { transform: scale(1); }
}

.wolf-hitbox-btn {
  position: absolute;
  left: 17.5%;
  top: 71%;
  width: 21%;
  height: 27.5%;
  padding: 0;
  border: none;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  z-index: 4;
}

.wolf-hitbox-btn:hover {
  background: radial-gradient(circle, rgba(255, 240, 255, 0.12) 0%, transparent 72%);
}

.scene-svg {
  display: block;
  width: 100%;
  height: auto;
}

.speech-bubble {
  position: absolute;
  top: 12px;
  left: 14px;
  max-width: 58%;
  background: rgba(34, 9, 72, 0.86);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(238, 216, 255, 0.48);
  color: #faf5ff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 12px 12px 12px 4px;
  z-index: 4;
  box-shadow: 0 8px 20px rgba(12, 7, 28, 0.35);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.floating-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.float-item {
  position: absolute;
  font-size: 1.35rem;
  font-weight: 800;
  animation: floatUp 1.3s ease-out forwards;
}

@keyframes floatUp {
  0% { opacity: 1; transform: translate(-50%, 0) scale(0.8); }
  100% { opacity: 0; transform: translate(-50%, -75px) scale(1.25); }
}

/* --- Hoạt ảnh Bé Sói SVG --- */
.wolf-character {
  animation: wolfBreathe 3.2s ease-in-out infinite;
}

@keyframes wolfBreathe {
  0%, 100% { transform: translate(280px, 255px) scale(1); }
  50% { transform: translate(280px, 252px) scale(1.02); }
}

.wolf-character.happy-jump {
  animation: wolfJump 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes wolfJump {
  0% { transform: translate(280px, 255px) scale(1); }
  45% { transform: translate(280px, 224px) scale(1.08); }
  100% { transform: translate(280px, 255px) scale(1); }
}

.wolf-tail {
  transform-box: fill-box;
  transform-origin: bottom left;
  animation: wagTail 1.4s ease-in-out infinite alternate;
}

@keyframes wagTail {
  0% { transform: translate(36px, 22px) rotate(-8deg); }
  100% { transform: translate(36px, 22px) rotate(14deg); }
}

.ear-left {
  transform-origin: -25px -20px;
  animation: earTwitch 4.5s ease-in-out infinite;
}

@keyframes earTwitch {
  0%, 88%, 100% { transform: rotate(0deg); }
  93% { transform: rotate(-8deg); }
}

.wolf-eyes {
  transform-origin: 0px -2px;
  animation: eyeBlink 5s infinite;
}

@keyframes eyeBlink {
  0%, 94%, 100% { transform: scaleY(1); }
  97% { transform: scaleY(0.12); }
}

/* --- Hiệu ứng nâng cấp Ngôi Nhà theo từng Level --- */
.string-lights .bulb {
  fill: #334155;
  transition: fill 0.4s ease, filter 0.4s ease;
}

.chimney-smoke {
  opacity: 0.25;
  transition: opacity 0.5s ease;
}

.manor-house-group,
.estate-courtyard,
.council-yard-sign {
  display: none;
}

/* Lv.2: Thắp sáng dây đèn hiên nhà 1 tầng */
.cabin-diorama.level-2 .bulb.b1 {
  fill: #fde047;
  filter: drop-shadow(0 0 6px #fde047);
}
.cabin-diorama.level-2 .bulb.b2 {
  fill: #fb7185;
  filter: drop-shadow(0 0 6px #fb7185);
}
.cabin-diorama.level-2 .bulb.b3 {
  fill: #38bdf8;
  filter: drop-shadow(0 0 6px #38bdf8);
}

/* Lv.3+: Chuyển từ nhà 1 tầng sang Nhà gỗ 2 tầng sáng đèn + Bộ lông ánh trăng */
.cabin-diorama.level-3 .cabin-structure,
.cabin-diorama.level-4 .cabin-structure,
.cabin-diorama.level-5 .cabin-structure,
.cabin-diorama.level-3 .chimney-smoke,
.cabin-diorama.level-4 .chimney-smoke,
.cabin-diorama.level-5 .chimney-smoke {
  display: none;
}
.cabin-diorama.level-3 .manor-house-group,
.cabin-diorama.level-4 .manor-house-group,
.cabin-diorama.level-5 .manor-house-group {
  display: block;
}
.cabin-diorama.level-3 .manor-win-glow,
.cabin-diorama.level-4 .manor-win-glow,
.cabin-diorama.level-5 .manor-win-glow {
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.65));
}
.cabin-diorama.level-3 .wolf-fur-fill,
.cabin-diorama.level-4 .wolf-fur-fill,
.cabin-diorama.level-5 .wolf-fur-fill {
  fill: url(#wolfFurLv3);
}
.cabin-diorama.level-3 .wolf-aura {
  opacity: 0.4;
}

/* Lv.4 & Lv.5: Mở thêm khuôn viên Trang Viên rực sáng ánh đèn hai bên sân */
.cabin-diorama.level-4 .estate-courtyard,
.cabin-diorama.level-5 .estate-courtyard {
  display: block;
}
.cabin-diorama.level-4 .wolf-aura {
  opacity: 0.52;
}

/* Lv.5: Leader of the Pack — Giống Lv.4 + Biển gỗ hình ngôi nhà "Home Sweet Home" ngoài sân + Áo choàng & Vương miện + Hào quang + Mưa sao băng */
.cabin-diorama.level-5 .council-yard-sign {
  display: block;
}
.cabin-diorama.level-5 .wolf-aura {
  opacity: 0.9;
}

.shooting-stars {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cabin-diorama.level-5 .shooting-stars {
  display: block;
}

.shooting-stars span {
  position: absolute;
  top: 20px;
  left: 65%;
  width: 90px;
  height: 2px;
  background: linear-gradient(90deg, #fff, transparent);
  transform: rotate(-32deg);
  animation: shootStar 3.2s linear infinite;
  opacity: 0;
}
.shooting-stars span:nth-child(2) {
  left: 38%;
  animation-delay: 1.1s;
}
.shooting-stars span:nth-child(3) {
  left: 82%;
  animation-delay: 2.2s;
}

@keyframes shootStar {
  0% { opacity: 0; transform: translate(0, 0) rotate(-32deg); }
  12% { opacity: 1; }
  45%, 100% { opacity: 0; transform: translate(-180px, 110px) rotate(-32deg); }
}

/* ==================== KPI PROGRESS & WARDROBE (KHUNG RIÊNG BIỆT) ==================== */
.kpi-card,
.wardrobe-card {
  padding: 18px 22px;
}

.kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.progress-track {
  height: 11px;
  background: rgba(22, 5, 48, 0.72);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(226, 208, 250, 0.16);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7e22ce 0%, #c084fc 54%, #fed6ff 100%);
  box-shadow: 0 0 16px rgba(208, 136, 255, 0.55);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.milestones-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

@media (max-width: 680px) {
  .milestones-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .milestones-row .ms-item:last-child {
    grid-column: 1 / -1;
  }
}

.ms-item {
  font-size: 0.68rem;
  line-height: 1.25;
  min-height: 62px;
  padding: 8px 5px;
  border-radius: 11px;
  background: rgba(30, 8, 64, 0.54);
  border: 1px solid rgba(226, 208, 250, 0.15);
  text-align: center;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  box-sizing: border-box;
  overflow: hidden;
}

.ms-lv-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.63rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0.94;
}

.ms-lv-ico {
  font-size: 0.58rem;
  line-height: 1;
  flex-shrink: 0;
}

.ms-lv-title {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.24;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.ms-item.reached {
  background: rgba(174, 142, 226, 0.24);
  border-color: rgba(235, 210, 255, 0.52);
  color: var(--amber-soft);
}

.ms-item.admin-clickable {
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ms-item.admin-clickable:hover {
  transform: translateY(-1px);
  border-color: #f6eaff;
}

.ms-item.active-preview {
  background: linear-gradient(135deg, rgba(235, 208, 255, 0.34), rgba(154, 120, 214, 0.38));
  border-color: #f8efff;
  color: #ffffff;
  box-shadow: 0 0 0 1.5px rgba(242, 224, 255, 0.45);
}

.wardrobe-head {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.wardrobe-sub-hint {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.45;
}

.wardrobe-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 520px) {
  .wardrobe-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
}

.acc-thumb-img {
  height: 46px;
  width: auto;
  max-width: 84px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 5px 10px rgba(10, 3, 24, 0.52));
  transition: transform 0.18s ease, filter 0.18s ease;
  pointer-events: none;
}

.acc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  padding: 12px 10px;
  border-radius: 14px;
  background: rgba(44, 12, 90, 0.52);
  color: var(--text-main);
  border: 1px solid var(--border-soft);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

@media (max-width: 520px) {
  .acc-btn {
    min-height: 66px;
    padding: 10px 8px;
    border-radius: 12px;
  }

  .acc-thumb-img {
    height: 38px;
    max-width: 66px;
  }
}

.acc-btn:hover:not(.locked):not(.active) {
  background: rgba(104, 36, 184, 0.55);
  border-color: rgba(240, 220, 255, 0.45);
}

.acc-btn.active {
  background: linear-gradient(135deg, rgba(235, 208, 255, 0.32), rgba(158, 124, 216, 0.42));
  border-color: #f8efff;
  color: #ffffff;
  box-shadow: 0 0 0 1.6px rgba(244, 226, 255, 0.48), 0 8px 18px rgba(168, 85, 247, 0.25);
}

.acc-btn.active .acc-thumb-img {
  transform: scale(1.06);
  filter: drop-shadow(0 0 10px rgba(250, 232, 255, 0.42)) drop-shadow(0 5px 10px rgba(10, 3, 24, 0.45));
}

.acc-btn.locked {
  opacity: 0.34;
  filter: grayscale(0.35);
  cursor: not-allowed;
}

/* ==================== WISH COMPOSER ==================== */
.composer-head {
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(226, 208, 250, 0.14);
}

.composer-lead-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.18rem;
  line-height: 1.45;
  color: var(--text-main);
  margin: 0;
  padding-right: 18px;
}

.prompt-box {
  margin: 0;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(148, 118, 204, 0.22), rgba(226, 178, 222, 0.16));
  border: 1px dashed rgba(226, 208, 250, 0.45);
}

.prompt-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.prompt-tag {
  font-size: 0.78rem;
  font-weight: 800;
  color: #e9d5ff;
}

.prompt-actions {
  display: flex;
  gap: 8px;
}

.link-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.link-btn.accent {
  background: rgba(223, 190, 247, 0.24);
  color: var(--amber-soft);
}

.prompt-quote {
  font-size: 0.9rem;
  font-style: italic;
  color: #faf7ff;
}

.wish-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* --- KHU VỰC TÀI KHOẢN THÀNH VIÊN --- */
.account-card-box {
  background: rgba(34, 9, 72, 0.65);
  border: 1px solid rgba(226, 208, 250, 0.28);
  border-radius: 16px;
  padding: 14px;
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

@media (max-width: 640px) {
  .auth-mode-tabs {
    grid-template-columns: 1fr;
  }
}

.auth-mode-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 800;
}

.auth-mode-btn.active {
  background: rgba(223, 190, 247, 0.22);
  color: var(--amber-soft);
  border-color: var(--amber);
}

.auth-error {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(218, 92, 138, 0.2);
  border: 1px solid rgba(244, 142, 178, 0.52);
  color: #fce7f3;
  font-size: 0.82rem;
  font-weight: 800;
}

.auth-actions-row {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-subnote {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.logged-profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logged-name {
  font-size: 1rem;
  color: var(--amber-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.username-tag {
  font-size: 0.78rem;
  background: rgba(168, 139, 235, 0.28);
  color: #ede4fc;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 800;
}

.logged-stats {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 700;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr;
  gap: 10px;
}

.privacy-hint {
  font-size: 0.77rem;
  color: var(--text-muted);
  background: rgba(22, 5, 48, 0.52);
  border: 1px solid var(--border-soft);
  padding: 9px 13px;
  border-radius: 10px;
  margin-top: -2px;
}

@media (max-width: 680px) {
  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr;
  }
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #f3ecfc;
}

.gift-section-label {
  margin-bottom: 10px !important;
}

.label-split {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.char-count {
  font-size: 0.78rem;
  color: var(--text-dim);
}

input[type="text"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="email"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  background: rgba(22, 5, 48, 0.68);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 11px 14px;
  color: #fff;
  color-scheme: dark;
  font-family: inherit;
  font-size: 0.94rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #e9d5ff;
  box-shadow: 0 0 0 3px rgba(216, 180, 254, 0.16);
}

/* --- Dải Carousel Chọn Món Quà Vòm Tím (3 thẻ máy tính • 2 thẻ điện thoại) --- */
.gift-carousel {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
}

.gift-carousel-track {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 18px;
  overflow-x: auto;
  padding: 6px 4px 4px;
  background: transparent;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gift-carousel-track::-webkit-scrollbar {
  display: none;
}

.gift-carousel-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(68, 24, 128, 0.65);
  backdrop-filter: blur(12px);
  border: 1.2px solid var(--border-warm);
  color: #ffffff;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1;
  user-select: none;
  margin-bottom: 34px;
}

.gift-carousel-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #fffcff 0%, #f4dcff 100%);
  color: #240744;
  border-color: #ffffff;
  transform: scale(1.06);
}

.gift-carousel-btn:disabled {
  opacity: 0.26;
  cursor: default;
}

.gift-option {
  flex: 0 0 calc((100% - 36px) / 3);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-main);
  text-align: left;
  scroll-snap-align: start;
  transition: transform 0.2s ease;
}

.gift-option:hover {
  transform: translateY(-2px);
  background: transparent;
}

.gift-capsule-arch {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 13 / 14;
  padding: 6px;
  border-radius: 44px;
  background: linear-gradient(
    180deg,
    rgba(112, 50, 190, 0.76) 0%,
    rgba(44, 14, 92, 0.88) 100%
  );
  border: 1.5px solid rgba(222, 178, 255, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 255, 0.36),
    inset 0 -1px 0 rgba(188, 128, 255, 0.22);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.gift-option:hover .gift-capsule-arch {
  border-color: rgba(244, 214, 255, 0.84);
}

.gift-option.selected .gift-capsule-arch {
  border: 2px solid #fcf4ff;
  background: linear-gradient(
    180deg,
    rgba(146, 70, 232, 0.88) 0%,
    rgba(64, 20, 128, 0.94) 100%
  );
  box-shadow:
    0 0 0 2px rgba(226, 166, 255, 0.42),
    inset 0 1px 0 #ffffff,
    inset 0 0 16px rgba(238, 190, 255, 0.36);
}

.gift-capsule-img-wrap {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 38px;
  overflow: hidden;
  background: #1c073a;
}

.gift-capsule-img-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 28%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(22, 5, 48, 0) 0%, rgba(22, 5, 48, 0.36) 100%);
}

.gift-capsule-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}

.gift-option:hover .gift-capsule-img {
  transform: scale(1.04);
}

.gift-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 0 2px;
}

.gift-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  flex: 1 1 auto;
  min-width: 0;
}

.gift-select-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(250, 240, 255, 0.9);
  color: #240744;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.1;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.gift-option.selected .gift-select-pill {
  background: linear-gradient(180deg, #ffffff 0%, #f3d6ff 100%);
  color: #1f053c;
  box-shadow: 0 2px 10px rgba(216, 152, 255, 0.42);
}

@media (max-width: 680px) {
  .gift-carousel {
    gap: 6px;
  }

  .gift-carousel-track {
    gap: 10px;
    padding: 5px 3px 3px;
  }

  .gift-carousel-btn {
    width: 26px;
    height: 26px;
    font-size: 0.98rem;
    margin-bottom: 46px;
  }

  .gift-option {
    flex: 0 0 calc((100% - 10px) / 2);
    gap: 8px;
    padding: 0;
  }

  .gift-capsule-arch {
    padding: 5px;
    border-radius: 30px;
  }

  .gift-capsule-img-wrap {
    border-radius: 25px;
  }

  .gift-card-meta {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
  }

  .gift-title {
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.25;
    width: 100%;
    text-align: center;
  }

  .gift-select-pill {
    padding: 4px 11px;
    font-size: 0.7rem;
  }
}

.custom-gift-row {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.custom-gift-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(44, 12, 90, 0.56);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.custom-gift-pill-btn:hover {
  background: rgba(92, 30, 168, 0.62);
  color: #ffffff;
  border-color: var(--border-warm);
}

.custom-gift-pill-btn.selected {
  background: linear-gradient(135deg, rgba(235, 208, 255, 0.34), rgba(164, 132, 220, 0.42));
  border-color: #f6ebff;
  color: #ffffff;
  box-shadow: 0 0 0 1.5px rgba(238, 216, 255, 0.28);
}

.custom-gift-cost-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(188, 156, 236, 0.16);
  border: 1px solid var(--border-warm);
  color: var(--amber-soft);
  font-size: 0.76rem;
  font-weight: 800;
}

.custom-gift-box {
  margin-top: 10px;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(34, 9, 72, 0.78);
  border: 1px solid rgba(235, 210, 255, 0.45);
  animation: fadeIn 0.2s ease;
}

.custom-gift-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--amber-soft);
  margin-bottom: 9px;
}

.cost-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(223, 190, 247, 0.22);
  border: 1px solid rgba(238, 216, 255, 0.5);
  color: var(--amber-soft);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
}

.inline-coin-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#btnDownloadPass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.2;
}

#btnViewLatestPass.latest-pass-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 22px;
  padding: 11px 18px;
  line-height: 1.25;
}

.latest-pass-main-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.2;
}

.download-thin-icon,
.pass-thin-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  display: block;
}

.latest-pass-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.latest-pass-meta {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(253, 244, 255, 0.86);
  text-align: center;
  line-height: 1.3;
}

.custom-gift-inputs {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
}

.custom-emoji-input {
  text-align: center;
  font-size: 1.35rem !important;
  padding: 8px !important;
}

.custom-emoji-picks {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: var(--text-dim);
}

.gift-icon-chip {
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.gift-icon-chip:hover {
  background: rgba(251, 191, 36, 0.25);
}

.gift-emoji {
  font-size: 1.65rem;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gift-icon-wrap {
  width: 42px;
  height: 42px;
  padding: 5px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gift-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.inline-gift-icon {
  width: 20px;
  height: 20px;
  padding: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  object-fit: contain;
  vertical-align: -4px;
  margin-right: 3px;
  display: inline-block;
}

.float-gift-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.92));
}

.gift-desc {
  font-size: 0.73rem;
  color: var(--text-muted);
  display: block;
}

.quick-emojis {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.emoji-chip {
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.emoji-chip:hover {
  background: rgba(255, 255, 255, 0.2);
}

.composer-card .btn-submit {
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 0.94rem;
}

.btn-submit {
  width: 100%;
  font-size: 1rem;
  padding: 14px;
}

/* ==================== TAB 2: RELAX (3 Ô VUÔNG TỔNG QUAN + CHI TIẾT MINIGAMES) ==================== */
.relax-hub {
  animation: fadeIn 0.25s ease;
}

.relax-hub-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 16px;
}

.relax-coin-hint-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(64, 20, 124, 0.45);
  border: 1px solid var(--border-warm);
  color: var(--amber-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.relax-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 980px) {
  .relax-hub-grid {
    grid-template-columns: 1fr;
  }
}

.relax-hub-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.relax-hub-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-warm);
  box-shadow: 0 22px 48px rgba(14, 9, 32, 0.56);
}

.relax-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.relax-card-index {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

.relax-orbit-pill {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(50, 14, 100, 0.62);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
}

.relax-card-visual {
  position: relative;
  height: 218px;
  border-radius: 16px;
  border: 1px solid rgba(226, 208, 250, 0.2);
  background: radial-gradient(
    circle at 50% 48%,
    rgba(168, 136, 236, 0.26) 0%,
    rgba(34, 9, 72, 0.55) 54%,
    rgba(14, 3, 34, 0.78) 100%
  );
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 18px;
}

.relax-stage-star-tr {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 0.92rem;
  color: rgba(238, 218, 255, 0.72);
  pointer-events: none;
}

.relax-stage-stars-bl {
  position: absolute;
  bottom: 11px;
  left: 14px;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  color: rgba(226, 208, 250, 0.58);
  pointer-events: none;
}

.relax-mini-deck {
  --deck-scale: 0.62;
}

.relax-mini-wheel-wrap {
  position: relative;
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 10px 26px rgba(18, 11, 40, 0.55));
  animation: floatMiniWheel 3.6s ease-in-out infinite;
}

#relaxMiniWheelCanvas {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(196, 162, 248, 0.36);
}

.relax-mini-wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.12rem;
  color: #f8eeff;
  z-index: 3;
  filter: drop-shadow(0 2px 6px rgba(20, 12, 42, 0.8));
}

.relax-quiz-orb {
  width: 138px;
  height: 138px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 34% 28%, rgba(146, 98, 226, 0.68) 0%, rgba(68, 30, 128, 0.88) 58%, rgba(28, 10, 62, 0.96) 100%);
  border: 2px solid rgba(246, 232, 255, 0.72);
  box-shadow:
    0 14px 32px rgba(14, 8, 32, 0.52),
    0 0 34px rgba(196, 162, 248, 0.42);
  animation: floatMiniWheel 3.4s ease-in-out infinite;
}

.relax-quiz-wolf-img {
  height: 102px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(16, 6, 38, 0.48));
  pointer-events: none;
  user-select: none;
}

@keyframes floatMiniWheel {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.relax-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.relax-card-title {
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  font-size: 1.22rem;
  color: #ffffff;
  margin-bottom: 0;
  line-height: 1.36;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.relax-title-icon {
  font-family: "Nunito", sans-serif;
  font-style: normal;
  font-weight: 400;
  display: inline-block;
  line-height: 1;
}

.relax-card-desc {
  font-size: 0.88rem;
  line-height: 1.52;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.relax-card-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 18px;
  line-height: 1.45;
}

.relax-card-btn {
  margin-top: auto;
  width: 100%;
  justify-content: center;
  padding: 11px 18px;
  font-size: 0.9rem;
}

.relax-stage-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.relax-stage-title {
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  font-size: clamp(1.48rem, 2.2vw, 1.92rem);
  line-height: 1.34;
  color: #ffffff;
}

.games-subnav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.subgame-btn {
  background: rgba(74, 57, 118, 0.48);
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
}

.subgame-btn:hover:not(.active) {
  background: rgba(92, 30, 168, 0.6);
  color: #ffffff;
}

.subgame-btn.active {
  background: linear-gradient(180deg, #fdfaff 0%, #eedcf9 100%);
  color: #2b1d4a;
  border-color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 18px rgba(216, 182, 246, 0.3);
}

.game-panel {
  display: none;
}

.game-panel.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

.badge-glow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(168, 139, 235, 0.24);
  color: #f3e8ff;
  border: 1px solid rgba(232, 212, 252, 0.42);
  margin-bottom: 10px;
}

/* --- GACHA & BINDER --- */
.gacha-layout,
.wheel-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 22px;
}

@media (max-width: 920px) {
  .gacha-layout,
  .wheel-layout {
    grid-template-columns: 1fr;
  }
}

.gacha-machine-card {
  text-align: center;
}

.gacha-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.gacha-tier-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid rgba(226, 208, 250, 0.28);
  background: rgba(30, 8, 64, 0.52);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(242, 232, 255, 0.9);
}

.gacha-secret-head {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: rgba(242, 232, 255, 0.9);
}

.capsule-stage {
  height: 278px;
  display: grid;
  place-items: center;
  margin: 0 0 18px;
  border-radius: 18px;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(162, 120, 240, 0.26) 0%,
    rgba(36, 24, 72, 0.62) 60%,
    rgba(14, 3, 34, 0.84) 100%
  );
  border: 1px solid rgba(226, 208, 250, 0.18);
  perspective: 960px;
  overflow: hidden;
}

.mystery-deck-wrap {
  position: relative;
  width: 220px;
  height: 248px;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  transform: scale(var(--deck-scale, 0.85)) rotateX(var(--deck-rx, 0deg)) rotateY(var(--deck-ry, 0deg));
  transition: transform 0.22s ease-out;
}

.mystery-back-card,
.mystery-holo-card {
  width: 156px;
  height: 222px;
  border-radius: 16px;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.035) 0px,
      rgba(255, 255, 255, 0.035) 1.5px,
      transparent 1.5px,
      transparent 7px
    ),
    radial-gradient(circle at 22% 14%, rgba(254, 214, 255, 0.36) 0%, transparent 48%),
    radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.28) 0%, transparent 58%),
    linear-gradient(160deg, #6320aa 0%, #390f6c 48%, #180438 100%);
  border: 1.6px solid rgba(244, 198, 255, 0.72);
  overflow: hidden;
}

.mystery-back-card {
  position: absolute;
  z-index: 1;
  opacity: 0.86;
  filter: brightness(0.86);
  box-shadow: 0 14px 30px rgba(10, 6, 26, 0.52);
  pointer-events: none;
  animation: floatBackSecretCard 4.4s ease-in-out infinite;
}

.mystery-holo-card {
  position: relative;
  z-index: 2;
  box-shadow:
    -10px 18px 36px rgba(10, 6, 26, 0.68),
    0 0 38px rgba(168, 124, 244, 0.34);
  animation: floatFrontSecretCard 4.4s ease-in-out infinite;
}

.mystery-holo-card.shaking {
  animation: cardUnlockShake 0.58s ease-in-out;
}

.mystery-card-sheen {
  position: absolute;
  inset: -60%;
  z-index: 3;
  background: linear-gradient(
    115deg,
    transparent 36%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(246, 228, 255, 0.34) 50%,
    rgba(202, 170, 254, 0.18) 55%,
    transparent 64%
  );
  transform: translateX(-75%) rotate(12deg);
  animation: mysterySheenSweep 4.2s ease-in-out infinite;
  pointer-events: none;
}

.mystery-card-inner {
  position: absolute;
  inset: 9px;
  z-index: 2;
  border-radius: 11px;
  border: 1px solid rgba(228, 206, 252, 0.32);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mystery-star-svg {
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px rgba(216, 180, 254, 0.68));
  animation: secretStarPulse 2.8s ease-in-out infinite alternate;
}

.mystery-card-tag {
  position: absolute;
  bottom: 13px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: rgba(248, 240, 255, 0.92);
}

@keyframes floatFrontSecretCard {
  0%, 100% {
    transform: translate3d(0, 2px, 12px) rotate(9deg) rotateY(-4deg) rotateX(2deg);
  }
  50% {
    transform: translate3d(-4px, -9px, 22px) rotate(11.8deg) rotateY(6deg) rotateX(-3deg);
  }
}

@keyframes floatBackSecretCard {
  0%, 100% {
    transform: translate3d(10px, 4px, 0) rotate(-13.5deg);
  }
  50% {
    transform: translate3d(16px, -4px, 0) rotate(-17.5deg);
  }
}

@keyframes secretStarPulse {
  0% {
    transform: scale(0.95);
    filter: drop-shadow(0 0 8px rgba(216, 180, 254, 0.48));
  }
  100% {
    transform: scale(1.06);
    filter: drop-shadow(0 0 16px rgba(238, 214, 255, 0.88));
  }
}

@keyframes mysterySheenSweep {
  0%, 18% { transform: translateX(-78%) rotate(12deg); }
  68%, 100% { transform: translateX(78%) rotate(12deg); }
}

@keyframes cardUnlockShake {
  0%, 100% { transform: rotate(9deg) scale(1); }
  25% { transform: rotate(-4deg) scale(1.08); }
  50% { transform: rotateY(26deg) rotate(16deg) scale(1.14); }
  75% { transform: rotate(2deg) scale(1.08); }
}

.gacha-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pity-note {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.binder-card {
  display: flex;
  flex-direction: column;
}

.binder-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.binder-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.binder-credit-note {
  margin-top: auto;
  padding-top: 12px;
  font-size: 0.72rem;
  font-weight: 300;
  font-style: italic;
  color: rgba(224, 210, 245, 0.72);
  text-align: center;
  letter-spacing: 0.02em;
}

@media (max-width: 720px) {
  .binder-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.binder-slot {
  aspect-ratio: 3 / 4.2;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1.5px dashed rgba(232, 212, 252, 0.24);
  background: rgba(34, 9, 72, 0.56);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.binder-slot.owned {
  cursor: pointer;
  border-style: solid;
  border-color: rgba(242, 226, 255, 0.52);
}

.binder-slot.owned:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 24px rgba(14, 8, 30, 0.48);
}

.binder-slot.rarity-SSR.owned {
  border-color: #f6e4ff;
  box-shadow: 0 0 18px rgba(235, 198, 255, 0.42);
}

.slot-rarity {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(22, 5, 48, 0.8);
  color: #fff;
  position: relative;
  z-index: 2;
}

.slot-thumb,
.slot-thumb-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  z-index: 0;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.binder-slot.has-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 3, 34, 0.34) 0%, transparent 32%);
  z-index: 1;
  pointer-events: none;
}

.slot-art {
  font-size: 1.9rem;
  text-align: center;
  position: relative;
  z-index: 2;
}

.slot-name {
  font-size: 0.74rem;
  font-weight: 800;
  text-align: center;
  color: #fff;
  position: relative;
  z-index: 2;
}

/* --- 3D HOLOGRAM PHOTOCARD TRONG MODAL: ẢNH BÊN TRÁI + THÔNG TIN BÊN PHẢI --- */
.gacha-cards-stage {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 18px 0;
  max-height: 66vh;
  overflow-y: auto;
  padding: 4px 6px;
}

.gacha-cards-stage::-webkit-scrollbar {
  width: 6px;
}

.gacha-cards-stage::-webkit-scrollbar-thumb {
  background: rgba(216, 192, 248, 0.35);
  border-radius: 999px;
}

.gacha-showcase-row {
  display: flex;
  align-items: stretch;
  gap: 22px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(30, 8, 64, 0.72);
  border: 1px solid rgba(226, 208, 250, 0.26);
  perspective: 950px;
  text-align: left;
}

.gacha-showcase-row.rarity-row-SSR {
  border-color: rgba(244, 222, 255, 0.65);
  box-shadow: 0 0 28px rgba(226, 192, 250, 0.22);
}

.holo-card {
  width: 225px;
  height: 320px;
  flex-shrink: 0;
  border-radius: 18px;
  padding: 0;
  position: relative;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 14px 32px rgba(12, 7, 28, 0.5);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.08s ease-out;
  user-select: none;
}

.gacha-cards-stage.multi-pull .holo-card {
  width: 175px;
  height: 250px;
}

.holo-card.rarity-SSR {
  border-color: #fbf2ff;
  box-shadow: 0 0 30px rgba(232, 196, 255, 0.65);
}

.holo-card.rarity-SR {
  border-color: #e9d5ff;
  box-shadow: 0 0 22px rgba(192, 132, 252, 0.45);
}

.holo-glare {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.68), transparent 55%),
    linear-gradient(125deg, rgba(244, 168, 228, 0.24), rgba(196, 181, 253, 0.24), rgba(255, 240, 255, 0.24));
  mix-blend-mode: overlay;
}

.holo-photo,
.holo-photo-canvas {
  position: absolute;
  inset: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  object-fit: cover;
  object-position: center 16%;
  border-radius: 13px;
  z-index: 1;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.gacha-drm-shield {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

#game-gacha,
#gachaModal {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.gacha-side-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 13px;
}

.gacha-rarity-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gacha-field-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.rarity-pill {
  font-weight: 900;
  font-size: 0.92rem;
  padding: 4px 14px;
  border-radius: 999px;
  letter-spacing: 0.06em;
}

.rarity-pill.r-SSR {
  background: linear-gradient(135deg, #fdf8ff, #e6c6f8);
  color: #2b1d4a;
  box-shadow: 0 0 16px rgba(232, 198, 252, 0.55);
}

.rarity-pill.r-SR {
  background: linear-gradient(135deg, #d8b4fe, #9b7ed1);
  color: #261942;
  box-shadow: 0 0 14px rgba(182, 146, 238, 0.45);
}

.rarity-pill.r-R {
  background: linear-gradient(135deg, #987bc7, #6d539e);
  color: #ffffff;
}

.new-pull-tag {
  background: rgba(188, 232, 220, 0.18);
  border: 1px solid rgba(188, 232, 220, 0.52);
  color: #d1fae5;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}

.gacha-bst-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(226, 208, 250, 0.2);
  border-radius: 13px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gacha-bst-main {
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--text-main);
}

.gacha-bst-main strong {
  color: var(--amber-soft);
}

.gacha-bst-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.gacha-life-box {
  background: linear-gradient(135deg, rgba(168, 139, 235, 0.18), rgba(235, 196, 250, 0.12));
  border: 1px solid rgba(238, 216, 255, 0.36);
  border-radius: 15px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gacha-life-title {
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--amber-soft);
}

.gacha-life-quote {
  font-size: 0.92rem;
  line-height: 1.55;
  font-style: italic;
  color: var(--text-main);
}

.gacha-life-source {
  font-size: 0.8rem;
  font-style: italic;
  font-weight: 300;
  color: #e2d4f8;
  text-align: right;
}

@media (max-width: 620px) {
  .gacha-showcase-row {
    flex-direction: column;
    align-items: center;
  }
  .holo-card,
  .gacha-cards-stage.multi-pull .holo-card {
    width: 205px;
    height: 290px;
  }
  .gacha-side-info {
    width: 100%;
  }
}

/* --- LUCKY WHEEL & GỢI Ý MÓN ĂN / SỐ MAY MẮN --- */
.wheel-card,
.fortune-card {
  text-align: center;
}

.wheel-wrapper {
  position: relative;
  width: min(372px, 100%);
  aspect-ratio: 1 / 1;
  margin: 18px auto;
}

.wheel-pointer {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.8rem;
  color: #f8eeff;
  filter: drop-shadow(0 3px 8px rgba(20, 12, 42, 0.75));
  z-index: 4;
}

#wheelCanvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 34px rgba(182, 146, 238, 0.35);
}

.wheel-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.fortune-paper {
  margin: 20px 0 6px;
  padding: 28px 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(164, 134, 224, 0.2), rgba(92, 72, 148, 0.28));
  border: 1px solid rgba(238, 216, 255, 0.38);
  min-height: 245px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.fortune-icon {
  font-size: 2.6rem;
}

.wheel-meal-headline {
  font-size: 1.12rem;
  line-height: 1.5;
  color: var(--text-main);
}

.wheel-meal-highlight {
  display: inline-block;
  font-size: 1.38rem;
  font-weight: 900;
  color: var(--amber-soft);
  margin-left: 4px;
}

.wheel-meal-highlight.is-fasting {
  color: #f5c2e0;
  text-shadow: 0 0 14px rgba(232, 152, 204, 0.55);
}

.wheel-lucky-num {
  background: rgba(38, 28, 70, 0.78);
  border: 1.5px solid rgba(240, 218, 255, 0.65);
  color: #faf5ff;
  font-size: 1.08rem;
  font-weight: 900;
  padding: 8px 22px;
  border-radius: 999px;
  box-shadow: 0 0 20px rgba(218, 184, 248, 0.24);
}

.wheel-lucky-num strong {
  font-size: 1.32rem;
  color: var(--amber-soft);
  letter-spacing: 0.06em;
}

.wheel-coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(152, 122, 206, 0.26);
  border: 1.5px solid rgba(226, 204, 250, 0.52);
  color: #f5eeff;
  font-size: 1.02rem;
  font-weight: 800;
  padding: 7px 20px;
  border-radius: 999px;
}

.wheel-coin-pill strong {
  color: var(--amber-soft);
  font-size: 1.15rem;
}

.fortune-meta {
  font-size: 0.86rem;
  color: #e9d5ff;
  font-weight: 800;
}

/* --- SPEED QUIZ (HIỂU NHAU ĐẬM SÂU 2 KHUNG ĐỐI XỨNG) --- */
.quiz-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.quiz-page-title {
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  font-size: clamp(1.55rem, 2.35vw, 1.98rem);
  line-height: 1.34;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.quiz-bolt-svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: #f3e8ff;
}

.quiz-page-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.sub-ring-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: transparent;
  display: inline-block;
  flex-shrink: 0;
}

.quiz-header-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(44, 12, 90, 0.56);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.quiz-single-wrap {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.quiz-split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: stretch;
}

.quiz-stage-panel,
.quiz-rules-panel {
  display: flex;
  flex-direction: column;
  padding: 24px 26px;
}

.quiz-intro-view,
.quiz-play-view {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.quiz-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.quiz-ready-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(64, 20, 124, 0.48);
  border: 1px solid var(--border-warm);
  color: #f3e8ff;
  font-size: 0.78rem;
  font-weight: 700;
}

.quiz-q-counter {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 700;
}

.quiz-arena-box {
  flex: 1;
  min-height: 315px;
  border-radius: 18px;
  border: 1px solid rgba(226, 208, 250, 0.18);
  background: radial-gradient(
    circle at 50% 42%,
    rgba(164, 126, 240, 0.24) 0%,
    rgba(30, 8, 64, 0.56) 54%,
    rgba(14, 3, 34, 0.82) 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px;
  margin-bottom: 18px;
}

.quiz-8s-ring {
  width: 138px;
  height: 138px;
  border-radius: 50%;
  border: 2px solid rgba(224, 196, 252, 0.52);
  background: radial-gradient(circle at 38% 32%, rgba(164, 126, 240, 0.34), rgba(38, 26, 74, 0.65));
  box-shadow:
    0 0 38px rgba(176, 136, 248, 0.32),
    inset 0 0 24px rgba(218, 188, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.quiz-8s-label {
  display: inline-flex;
  align-items: baseline;
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  line-height: 1;
  transform: translateY(0.08em);
}

.quiz-8s-num {
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  font-size: 3.1rem;
  line-height: 1;
  color: #ffffff;
}

.quiz-8s-unit {
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  font-size: 2.15rem;
  line-height: 1;
  color: #ffffff;
  margin-left: 3px;
}

.quiz-arena-title {
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  font-size: 1.36rem;
  line-height: 1.36;
  color: #ffffff;
  margin-bottom: 6px;
}

.quiz-arena-sub {
  font-size: 0.94rem;
  color: var(--text-muted);
  max-width: 440px;
  line-height: 1.5;
}

.quiz-full-btn {
  width: 100%;
  justify-content: center;
  padding: 13px 20px;
  font-size: 0.94rem;
  margin-top: auto;
}

.quiz-btn-bolt {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.quiz-play-arena {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Khung phải: Luật chơi & Phần thưởng */
.quiz-rules-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.quiz-rules-title {
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  font-size: 1.48rem;
  color: #ffffff;
  line-height: 1.34;
  margin-bottom: 8px;
}

.quiz-rules-sub {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.48;
}

.quiz-rules-divider {
  height: 1px;
  background: rgba(226, 208, 250, 0.14);
  margin: 18px 0 16px;
}

.quiz-reward-heading {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.94rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
}

.quiz-paw-icon {
  width: 15px;
  height: 15px;
  color: #f3e8ff;
}

.quiz-reward-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.quiz-reward-tile {
  border-radius: 14px;
  border: 1px solid rgba(226, 208, 250, 0.18);
  background: rgba(22, 5, 48, 0.56);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.quiz-reward-tile.earned {
  border-color: var(--amber-soft);
  background: rgba(124, 94, 194, 0.34);
  box-shadow: 0 0 18px rgba(216, 182, 248, 0.24);
}

.quiz-reward-ratio {
  font-size: 1.02rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
}

.quiz-reward-coin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
}

.moon-coin-gold-svg {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: -3.5px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.72));
  animation: goldCoinGlow 2.2s ease-in-out infinite alternate;
}

.btn-primary .moon-coin-gold-svg {
  animation: none;
  filter: drop-shadow(0 1px 3px rgba(146, 64, 14, 0.48));
}

.moon-coin-gold-svg .coin-sparkle {
  transform-origin: 19.2px 6px;
  animation: goldCoinSparkle 1.6s ease-in-out infinite alternate;
}

@keyframes goldCoinGlow {
  0% {
    filter: drop-shadow(0 0 4px rgba(250, 204, 21, 0.52));
  }
  100% {
    filter: drop-shadow(0 0 9px rgba(254, 240, 138, 0.95));
  }
}

@keyframes goldCoinSparkle {
  0% {
    opacity: 0.55;
    transform: scale(0.75);
  }
  100% {
    opacity: 1;
    transform: scale(1.18);
  }
}

.quiz-daily-box {
  border-radius: 14px;
  border: 1px solid rgba(226, 208, 250, 0.18);
  background: rgba(22, 5, 48, 0.52);
  padding: 16px 16px;
  margin-bottom: 16px;
}

.quiz-daily-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.quiz-daily-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.quiz-mini-bolt {
  width: 13px;
  height: 13px;
  color: var(--amber-soft);
}

.quiz-daily-val {
  font-size: 0.8rem;
  font-weight: 900;
  color: #ffffff;
}

.quiz-daily-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(20, 14, 42, 0.82);
  overflow: hidden;
  margin-bottom: 8px;
}

.quiz-daily-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #a78bfa, #e4cbf5);
  transition: width 0.3s ease;
}

.quiz-daily-note {
  font-size: 0.74rem;
  color: var(--text-dim);
}

.quiz-cheer-box {
  margin-top: auto;
  border-radius: 14px;
  border: 1px solid rgba(226, 208, 250, 0.18);
  background: radial-gradient(
    circle at 50% 0%,
    rgba(164, 126, 240, 0.28) 0%,
    rgba(30, 21, 60, 0.72) 80%
  );
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 1.02rem;
  color: #f6eeff;
}

.quiz-cheer-star {
  width: 18px;
  height: 18px;
  color: #d8b4fe;
  flex-shrink: 0;
}

.quiz-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.streak-chip {
  font-size: 0.84rem;
  font-weight: 800;
  color: #f3c6e8;
}

.timer-chip {
  font-size: 0.9rem;
  font-weight: 900;
  color: #e9d5ff;
}

.timer-track {
  height: 8px;
  background: rgba(22, 5, 48, 0.78);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}

.timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #a78bfa, #e2bbf8, #f5d0fe);
  transition: width 0.25s linear;
}

.quiz-question {
  font-size: 1.16rem;
  margin-bottom: 16px;
}

.quiz-options {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.quiz-opt-btn {
  text-align: left;
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(58, 17, 114, 0.56);
  border: 1.5px solid var(--border-soft);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.quiz-opt-btn:hover:not(:disabled) {
  border-color: var(--amber-soft);
  background: rgba(112, 88, 172, 0.56);
}

.quiz-opt-btn.correct {
  background: rgba(134, 214, 190, 0.24);
  border-color: #99e2ca;
}

.quiz-opt-btn.wrong {
  background: rgba(225, 112, 152, 0.26);
  border-color: #f49ac0;
}

.quiz-feedback {
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  text-align: center;
  margin-bottom: 6px;
}

.quiz-feedback.is-wrong {
  background: rgba(225, 112, 152, 0.22);
  border: 1px solid rgba(244, 154, 192, 0.55);
  color: #ffe4ef;
  font-weight: 300;
}

.quiz-result-ring .quiz-score-fraction {
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-style: normal !important;
  font-weight: 400 !important;
  font-synthesis: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  line-height: 1;
  transform: translateY(0.08em);
}

.quiz-result-ring .quiz-score-num,
.quiz-result-ring .quiz-score-slash,
.quiz-result-ring .quiz-score-den {
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-style: normal !important;
  font-weight: 400 !important;
  font-synthesis: none;
  font-size: 2.38rem;
  line-height: 1;
  color: #ffffff;
}

.quiz-result-ring .quiz-score-slash {
  color: rgba(255, 255, 255, 0.88);
}

.quiz-result-ring.is-won {
  border-color: rgba(253, 224, 71, 0.72);
  box-shadow:
    0 0 42px rgba(250, 204, 21, 0.36),
    inset 0 0 26px rgba(254, 240, 138, 0.22);
}

.quiz-result-ring.is-failed {
  border-color: rgba(244, 154, 192, 0.52);
  box-shadow:
    0 0 32px rgba(225, 112, 152, 0.24),
    inset 0 0 22px rgba(244, 154, 192, 0.16);
}

.quiz-result-message {
  font-size: 1.06rem;
  font-weight: 600;
  color: #f8f2ff;
  max-width: 490px;
  line-height: 1.56;
  text-align: center;
}

.quiz-result-message.is-failed-msg {
  font-weight: 300;
  letter-spacing: 0.01em;
}

.quiz-daily-done {
  margin-top: auto;
  text-align: center;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(176, 144, 228, 0.22);
  border: 1px solid rgba(232, 208, 252, 0.45);
  color: var(--amber-soft);
  font-weight: 800;
  font-size: 0.86rem;
}

/* ==================== TAB 3: BIG HUG FROM WOLFIES (TƯỜNG LỜI CHÚC CHÍNH) ==================== */
.wall-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.wall-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  background: rgba(82, 64, 128, 0.48);
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}

.filter-pill.active {
  background: linear-gradient(180deg, #fdfaff 0%, #eedcf9 100%);
  color: #2b1d4a;
  border-color: #ffffff;
}

.wall-search-sort {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.wall-search-sort select {
  width: 195px;
}

.wish-wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  align-content: start;
  min-height: clamp(340px, 58vh, 620px);
}

.wish-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.wish-card.unlocked-mine {
  border: 1.5px solid var(--border-warm);
  background: linear-gradient(155deg, rgba(84, 34, 152, 0.68), rgba(40, 12, 86, 0.78));
  box-shadow: 0 10px 28px rgba(196, 126, 255, 0.2);
}

.wish-card.deleted-wish-card {
  border: 1px solid rgba(252, 165, 165, 0.38);
  background: linear-gradient(160deg, rgba(52, 14, 78, 0.76), rgba(26, 6, 48, 0.84));
}

.deleted-wish-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(252, 165, 165, 0.42);
  white-space: nowrap;
}

.deleted-wish-content-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(16, 3, 34, 0.56);
  border: 1px solid rgba(226, 188, 255, 0.22);
}

.deleted-wish-label {
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--amber-soft);
  margin-bottom: 6px;
}

.deleted-wish-body {
  margin: 0;
  color: #ffffff;
}

.deleted-wish-empty {
  margin: 0;
  font-style: italic;
  color: var(--text-dim);
}

.deleted-wish-timestamps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(226, 188, 255, 0.16);
  font-size: 0.8rem;
}

.deleted-time-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.deleted-time-key {
  color: var(--text-muted);
}

.deleted-time-val {
  color: #ffffff;
  font-weight: 700;
}

.deleted-time-row.is-deleted-at .deleted-time-val {
  color: #fecaca;
}

/* --- THANH QUẢN TRỊ VIÊN (ADMIN) & NÚT XÓA LỜI CHÚC --- */
#adminHomeBar {
  background: rgba(26, 7, 56, 0.28);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.home-admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.home-fx-toggle-btn {
  border-radius: 999px;
  background: rgba(30, 8, 64, 0.62);
  border: 1px solid rgba(226, 198, 255, 0.34);
  color: var(--text-muted);
  font-weight: 700;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.home-fx-toggle-btn:hover {
  border-color: rgba(248, 224, 255, 0.68);
  color: #ffffff;
}

.home-fx-toggle-btn.is-fx-on {
  background: linear-gradient(135deg, rgba(235, 208, 255, 0.32), rgba(154, 114, 224, 0.44));
  border-color: #f8efff;
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(244, 226, 255, 0.34), 0 6px 16px rgba(148, 72, 232, 0.28);
}

.admin-panel-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(58, 17, 114, 0.86), rgba(104, 36, 184, 0.56));
  border: 1.5px solid rgba(238, 216, 255, 0.52);
  box-shadow: 0 10px 28px rgba(14, 8, 30, 0.35);
  flex-wrap: wrap;
}

.admin-bar-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.admin-panel-bar .admin-bar-info p {
  font-size: 0.7rem;
  font-style: italic;
  line-height: 1.42;
  opacity: 0.88;
}

.admin-panel-bar button {
  padding: 8px 15px;
  font-size: 0.82rem;
}

@media (max-width: 768px) {
  .admin-panel-bar {
    padding: 10px 12px;
    gap: 8px;
    margin-bottom: 10px;
    border-radius: 14px;
  }

  .admin-panel-bar .admin-bar-info {
    gap: 4px;
  }

  .admin-panel-bar .admin-badge-pill {
    font-size: 0.66rem;
    padding: 3px 9px;
    line-height: 1.25;
  }

  .admin-panel-bar .admin-bar-info p {
    font-size: 0.64rem;
    line-height: 1.35;
  }

  .admin-panel-bar .admin-bar-btns {
    gap: 6px;
  }

  .admin-panel-bar button {
    padding: 6px 12px;
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .admin-panel-bar .btn-accent {
    box-shadow: 0 4px 12px rgba(126, 34, 206, 0.34);
  }

  #wallToolbar {
    padding: 8px 10px;
    gap: 6px;
    margin-bottom: 10px;
    border-radius: 14px;
  }

  #wallToolbar .wall-filters {
    gap: 5px;
  }

  #wallToolbar .filter-pill {
    padding: 4px 9px;
    font-size: 0.7rem;
    line-height: 1.25;
  }

  #wallToolbar .wall-search-sort select {
    width: auto;
    min-width: 128px;
    padding: 4px 10px;
    font-size: 0.72rem;
    border-radius: 999px;
  }
}

.admin-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 900;
  color: #2b1d4a;
  background: linear-gradient(135deg, #fdf8ff, #e6c6f8);
  padding: 4px 12px;
  border-radius: 999px;
}

.wish-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-admin-delete {
  background: rgba(225, 112, 152, 0.2);
  border: 1px solid rgba(240, 154, 188, 0.52);
  color: #fce7f3;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 999px;
}

.btn-admin-delete:hover {
  background: rgba(225, 112, 152, 0.38);
  color: #ffffff;
}

.btn-admin-delete.confirming {
  background: #be185d;
  border-color: #fbcfe8;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(219, 39, 119, 0.65);
}

.btn-admin-ban {
  background: rgba(136, 38, 76, 0.42);
  border: 1px solid rgba(244, 142, 178, 0.58);
  color: #fbcfe8;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 999px;
}

.btn-admin-ban:hover {
  background: rgba(168, 42, 90, 0.65);
  color: #ffffff;
}

.btn-admin-ban.confirming {
  background: #9d174d;
  border-color: #fae8ff;
  color: #fae8ff;
  box-shadow: 0 0 16px rgba(219, 39, 119, 0.72);
}

.wish-card:hover {
  transform: translateY(-3px);
  border-color: rgba(240, 220, 255, 0.48);
}

.wish-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.wish-author {
  font-weight: 800;
  font-size: 1rem;
  color: var(--amber-soft);
}

.wish-author.anon {
  color: var(--text-muted);
  font-weight: 700;
}

.wish-meta {
  font-size: 0.76rem;
  color: var(--text-dim);
}

.wish-gift-tag {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(226, 204, 250, 0.14);
  border: 1px solid rgba(235, 214, 252, 0.24);
  color: #f5ebff;
  max-width: 175px;
  text-align: right;
}

.wish-body {
  font-size: 0.94rem;
  color: var(--text-main);
  white-space: pre-wrap;
}

.wish-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid rgba(226, 208, 250, 0.14);
}

.wish-reactions-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.react-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  border: 1px solid rgba(226, 208, 250, 0.2);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
}

.react-btn.react-heart:hover {
  background: rgba(235, 162, 208, 0.24);
  border-color: rgba(244, 186, 224, 0.55);
  color: #fce7f3;
}

.react-btn.react-heart.active {
  background: rgba(218, 114, 178, 0.36);
  border-color: rgba(248, 200, 232, 0.82);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(228, 142, 198, 0.35);
}

.react-btn.react-smile:hover {
  background: rgba(216, 180, 254, 0.24);
  border-color: rgba(233, 213, 255, 0.55);
  color: #f5e8ff;
}

.react-btn.react-smile.active {
  background: rgba(186, 148, 236, 0.36);
  border-color: rgba(243, 226, 255, 0.82);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(216, 180, 254, 0.32);
}

.btn-reopen-pass {
  background: rgba(223, 190, 247, 0.22);
  color: var(--amber-soft);
  border: 1px solid rgba(238, 216, 255, 0.48);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

/* ==================== MODALS ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 1, 22, 0.82);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 70;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 680px;
  background: linear-gradient(165deg, rgba(50, 14, 98, 0.97) 0%, rgba(20, 4, 46, 0.98) 100%);
  border: 1.5px solid var(--border-warm);
  border-radius: 26px;
  padding: 26px;
  text-align: center;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(196, 164, 242, 0.16);
}

.gacha-modal-box {
  max-width: 780px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.canvas-preview-wrap {
  margin: 16px 0;
}

#passCanvas {
  width: 100%;
  max-width: 580px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.welcome-bigwolf-entry {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed rgba(196, 181, 253, 0.22);
  text-align: center;
}

input::-ms-reveal,
input::-ms-clear {
  display: none;
}

.pass-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.pass-input-wrap input {
  padding-right: 40px !important;
}

.btn-pass-eye {
  position: absolute;
  right: 7px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.btn-pass-eye:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.btn-pass-eye.is-showing {
  color: var(--amber-soft);
}

.btn-pass-eye svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

/* ==================== CHẾ ĐỘ "SÓI LỚN VIEW": BẦU TRỜI SAO LUNG LINH & SAO BĂNG ==================== */
.bigwolf-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background:
    radial-gradient(ellipse at 25% 22%, rgba(168, 139, 235, 0.28), transparent 52%),
    radial-gradient(ellipse at 72% 32%, rgba(216, 180, 254, 0.22), transparent 48%),
    radial-gradient(circle at 86% 14%, rgba(246, 226, 255, 0.24), transparent 28%),
    linear-gradient(180deg, #130d29 0%, #1f1740 44%, #332660 80%, #1b1436 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bigwolf-topbar {
  position: relative;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 20px;
  background: rgba(14, 3, 34, 0.68);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(232, 212, 252, 0.16);
  flex-wrap: nowrap;
}

.bigwolf-topbar-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
}

.bigwolf-close-top {
  flex-shrink: 0;
  margin-left: auto;
  white-space: nowrap;
}

.idol-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.12rem;
  flex-wrap: wrap;
}

.idol-brand-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bigwolf-music-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sky-music-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(168, 118, 245, 0.24);
  border: 1px solid rgba(238, 206, 255, 0.48);
  color: #fdf8ff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.sky-music-btn:hover {
  background: rgba(186, 136, 252, 0.4);
  border-color: #ffffff;
}

.sky-music-btn.is-muted {
  background: rgba(36, 18, 68, 0.66);
  border-color: rgba(216, 190, 248, 0.28);
  color: var(--text-dim);
}

.sky-music-btn.sky-music-next {
  padding: 6px 9px;
}

.idol-tag {
  font-size: 0.78rem;
  background: rgba(196, 166, 242, 0.22);
  color: var(--amber-soft);
  border: 1px solid rgba(235, 214, 252, 0.35);
  padding: 4px 12px;
  border-radius: 999px;
}

.idol-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .bigwolf-overlay .bigwolf-topbar {
    padding: 5px 8px;
    gap: 4px;
    flex-direction: column;
  }

  .bigwolf-overlay .bigwolf-topbar-main {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .bigwolf-overlay .bigwolf-close-top {
    position: absolute;
    top: 5px;
    right: 8px;
    padding: 3px 7px;
    font-size: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 999px;
    gap: 2px;
  }

  .bigwolf-overlay .idol-brand {
    width: 100%;
    font-size: 0.72rem;
    gap: 4px;
  }

  .bigwolf-overlay .idol-brand-head {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 5px;
    padding-right: 104px;
  }

  .bigwolf-overlay .bigwolf-music-bar {
    gap: 3px;
  }

  .bigwolf-overlay .idol-controls .sky-music-btn {
    padding: 3px 6px;
    font-size: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
    gap: 2.5px;
  }

  .bigwolf-overlay .idol-controls .sky-music-btn.sky-music-next {
    padding: 3px 5px;
  }

  .bigwolf-overlay .idol-tag {
    font-size: 0.54rem;
    font-weight: 300;
    padding: 1.5px 6px;
    line-height: 1.25;
  }

  .bigwolf-overlay .idol-controls {
    width: 100%;
    gap: 4px;
    flex-wrap: wrap;
  }

  .bigwolf-overlay .idol-controls button {
    padding: 3px 6px;
    font-size: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 999px;
    gap: 2px;
    white-space: nowrap;
  }

  .bigwolf-overlay .sky-hint-caption {
    font-size: 0.56rem;
    font-weight: 300;
    line-height: 1.3;
    padding: 3px 10px;
    bottom: 5px;
    max-width: 95%;
    border-radius: 12px;
  }
}

.starry-sky-stage {
  position: relative;
  flex: 1;
  width: 100%;
  overflow: hidden;
}

/* Dải Ngân Hà mờ ảo vắt ngang bầu trời */
.sky-nebula {
  position: absolute;
  inset: -15%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 65% 18% at 50% 38%, rgba(216, 180, 254, 0.18), rgba(192, 132, 252, 0.12) 50%, transparent 80%),
    radial-gradient(ellipse 40% 14% at 32% 28%, rgba(244, 182, 228, 0.14), transparent 75%);
  transform: rotate(-16deg);
  animation: nebulaFloat 9s ease-in-out infinite alternate;
}

@keyframes nebulaFloat {
  0% { opacity: 0.72; transform: rotate(-16deg) scale(1); }
  100% { opacity: 1; transform: rotate(-14deg) scale(1.05); }
}

/* Vầng trăng sáng trên cao */
.sky-moon-wrap {
  position: absolute;
  top: 6%;
  right: 8%;
  pointer-events: none;
  z-index: 1;
}

.sky-moon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f7ebff 58%, #e2c2f8 100%);
  box-shadow:
    0 0 28px rgba(248, 236, 255, 0.88),
    0 0 75px rgba(226, 194, 248, 0.44),
    0 0 130px rgba(196, 181, 253, 0.26);
}

.ambient-stars-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.tiny-star {
  position: absolute;
  border-radius: 50%;
  animation: twinkleTiny 2.8s ease-in-out infinite alternate;
}

.ambient-five-star {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 4px #ffffff) drop-shadow(0 0 9px var(--amb-glow, #f3e4fc));
  animation: twinkleAmbientFiveStar 2.5s ease-in-out infinite alternate;
}

.ambient-five-star-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

@keyframes twinkleTiny {
  0% { opacity: 0.18; transform: scale(0.7); }
  100% { opacity: 1; transform: scale(1.35); }
}

@keyframes twinkleAmbientFiveStar {
  0% {
    opacity: 0.32;
    transform: rotate(var(--amb-rot, 0deg)) scale(0.76);
  }
  100% {
    opacity: 1;
    transform: rotate(var(--amb-rot, 0deg)) scale(1.22);
  }
}

/* Các vệt sao băng bay ngang bầu trời */
.sky-meteors-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.meteor {
  position: absolute;
  width: 155px;
  height: 2px;
  background: linear-gradient(90deg, #ffffff 0%, rgba(245, 224, 255, 0.88) 24%, rgba(196, 181, 253, 0.38) 62%, transparent 100%);
  border-radius: 999px;
  filter: drop-shadow(0 0 6px #ffffff);
  opacity: 0;
  transform: rotate(-28deg);
}

.meteor::before {
  content: "";
  position: absolute;
  left: -2px;
  top: -2.5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 12px 3px #f3d8ff;
}

.meteor.m1 { top: 8%; left: 78%; animation: meteorFly 5.8s ease-in infinite 0.6s; }
.meteor.m2 { top: 16%; left: 46%; width: 125px; animation: meteorFly 7.4s ease-in infinite 2.4s; }
.meteor.m3 { top: 6%; left: 92%; width: 180px; animation: meteorFly 8.6s ease-in infinite 4.1s; }
.meteor.m4 { top: 24%; left: 64%; width: 135px; animation: meteorFly 6.8s ease-in infinite 5.5s; }
.meteor.m5 { top: 12%; left: 30%; width: 115px; animation: meteorFly 9.5s ease-in infinite 1.5s; }
.meteor.m6 { top: 28%; left: 86%; width: 160px; animation: meteorFly 10.8s ease-in infinite 7.2s; }

@keyframes meteorFly {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(-28deg) scaleX(0.4);
  }
  4% {
    opacity: 1;
    transform: translate(-45px, 24px) rotate(-28deg) scaleX(1);
  }
  20% {
    opacity: 0;
    transform: translate(-380px, 202px) rotate(-28deg) scaleX(0.75);
  }
  100% {
    opacity: 0;
    transform: translate(-380px, 202px) rotate(-28deg) scaleX(0.75);
  }
}

/* ==================== BIG HUG FROM WOLFIES: BẦU TRỜI SAO TRÀN TOÀN TRANG & BÉ SÓI NGẮM SAO ==================== */
body.bighug-fullbleed-active #appShell {
  position: relative;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

body.bighug-fullbleed-active #appShell:has(#adminWallBar:not(.hidden)) {
  height: auto;
  overflow: visible;
}

body.bighug-fullbleed-active .container {
  max-width: none;
  width: 100%;
  padding: 0;
  margin: 0;
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.bighug-fullbleed-active #tab-wall.active {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  animation: none;
}

body.bighug-fullbleed-active #adminWallBar {
  max-width: 1200px;
  width: calc(100% - 32px);
  margin: 12px auto;
}

.bighug-sky-wrap {
  width: 100%;
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.bighug-sky-stage {
  position: relative;
  flex: 1 1 0%;
  width: 100%;
  min-height: 0;
  margin: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
  overflow: hidden;
  background: #180f38;
  user-select: none;
}

body.bighug-fullbleed-active #appShell:has(#adminWallBar:not(.hidden)) .bighug-sky-stage {
  min-height: calc(100dvh - 150px);
}

body.bighug-fullbleed-active .site-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  z-index: 6;
  background: transparent;
  border-top: none;
  color: rgba(235, 222, 255, 0.72);
}

@media (max-width: 768px) {
  body.bighug-fullbleed-active .site-footer {
    position: static;
    flex-shrink: 0;
    width: 100%;
    padding: 7px 10px 9px;
    font-size: 0.55rem;
    line-height: 1.38;
    background: rgba(15, 4, 36, 0.96);
    border-top: 1px solid rgba(226, 208, 250, 0.18);
    color: rgba(235, 222, 255, 0.78);
    opacity: 1;
  }
}

.bighug-sky-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  z-index: 1;
}

.bighug-moon-sprite {
  position: absolute;
  top: clamp(14px, 3.2vh, 40px);
  left: clamp(18px, 6.5vw, 128px);
  width: clamp(118px, 23vh, 196px);
  height: auto;
  pointer-events: none;
  z-index: 2;
}

.bighug-meadow-layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 30%;
  min-height: 155px;
  max-height: 265px;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  z-index: 3;
}

.bighug-wolf-sprite {
  position: absolute;
  left: 48.5%;
  bottom: 12.5%;
  transform: translateX(-50%);
  height: clamp(118px, 22.5vh, 184px);
  width: auto;
  pointer-events: none;
  z-index: 4;
}

@media (max-width: 680px) {
  .bighug-sky-stage {
    min-height: 0;
  }

  body.bighug-fullbleed-active #appShell:has(#adminWallBar:not(.hidden)) .bighug-sky-stage {
    min-height: calc(100dvh - 195px);
  }

  .bighug-moon-sprite {
    top: 12px;
    left: 10px;
    width: clamp(108px, 19vh, 150px);
  }

  .bighug-meadow-layer {
    height: 29%;
    min-height: 145px;
  }

  .bighug-wolf-sprite {
    left: 50%;
    bottom: 11%;
    height: clamp(108px, 19vh, 148px);
  }
}

.bighug-sky-top-pills {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bighug-star-count-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(20, 5, 44, 0.68);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 192, 255, 0.34);
  font-size: 0.74rem;
  font-weight: 400;
  color: #ebd0ff;
}

.bighug-star-count-pill strong {
  color: #ffffff;
  font-weight: 800;
}

.bighug-random-star-btn {
  padding: 5px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(235, 208, 255, 0.32), rgba(148, 92, 228, 0.48));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(248, 224, 255, 0.62);
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.bighug-random-star-btn:hover {
  transform: translateY(-1px);
  border-color: #ffffff;
  box-shadow: 0 0 16px rgba(232, 192, 255, 0.45);
}

@media (max-width: 680px) {
  .bighug-sky-top-pills {
    top: 10px;
    right: 10px;
    justify-content: flex-end;
  }

  .bighug-random-star-btn {
    font-size: 0.68rem;
    padding: 4px 10px;
  }
}

.wish-stars-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
}

.wish-star-btn {
  position: absolute;
  transform: translate(-50%, -50%) scale(var(--star-scale, 1));
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  /* Hào quang tỏa trực tiếp theo cánh sao — KHÔNG có vòng tròn sáng bao ngoài */
  filter:
    drop-shadow(0 0 3px #ffffff)
    drop-shadow(0 0 8px var(--star-glow, #fde68a))
    drop-shadow(0 0 15px var(--star-glow-outer, rgba(253, 224, 71, 0.68)));
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), filter 0.22s ease;
}

.five-point-star-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
  transform: rotate(var(--star-tilt, 0deg));
  animation: pulseFiveStar var(--star-dur, 2.5s) ease-in-out infinite alternate;
  animation-delay: var(--twinkle-delay, 0s);
}

.five-point-star-svg .star-rays-main {
  transform-origin: 32px 32px;
  animation: starRayShimmer var(--ray-dur, 2.0s) ease-in-out infinite alternate;
  animation-delay: var(--twinkle-delay, 0s);
}

.five-point-star-svg .star-rays-diag {
  transform-origin: 32px 32px;
  animation: starDiagRayShimmer var(--ray-dur, 2.0s) ease-in-out infinite alternate-reverse;
  animation-delay: var(--twinkle-delay, 0s);
}

@keyframes starDiagRayShimmer {
  0% {
    opacity: 0.18;
    transform: rotate(45deg) scale(0.56);
  }
  100% {
    opacity: 0.78;
    transform: rotate(45deg) scale(1.06);
  }
}

.wish-star-btn:hover {
  transform: translate(-50%, -50%) scale(1.36);
  z-index: 8;
  filter:
    drop-shadow(0 0 5px #ffffff)
    drop-shadow(0 0 12px #fef08a)
    drop-shadow(0 0 24px rgba(254, 240, 138, 0.96));
}

.wish-star-btn.active {
  transform: translate(-50%, -50%) scale(1.42);
  z-index: 9;
  filter:
    drop-shadow(0 0 6px #ffffff)
    drop-shadow(0 0 14px #fef08a)
    drop-shadow(0 0 28px rgba(254, 240, 138, 1));
}

.wish-star-label {
  position: absolute;
  top: 96%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(22, 5, 48, 0.92);
  border: 1px solid rgba(238, 216, 255, 0.52);
  color: #faf5ff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  box-shadow: 0 4px 14px rgba(12, 7, 28, 0.5);
}

.wish-star-btn:hover .wish-star-label,
.wish-star-btn.active .wish-star-label {
  opacity: 1;
}

@keyframes pulseFiveStar {
  0% {
    transform: rotate(var(--star-tilt, 0deg)) scale(0.92);
    filter: brightness(0.95);
  }
  100% {
    transform: rotate(var(--star-tilt, 0deg)) scale(1.08);
    filter: brightness(1.22);
  }
}

@keyframes starRayShimmer {
  0% {
    opacity: 0.25;
    transform: scale(0.72);
  }
  100% {
    opacity: 0.95;
    transform: scale(1.12);
  }
}

@keyframes starTipSparkle {
  0% {
    opacity: 0.15;
    transform: scale(0.55) rotate(-12deg);
  }
  100% {
    opacity: 1;
    transform: scale(1.25) rotate(12deg);
  }
}

/* Hộp thư ánh sao mở ra khi ấn vào ngôi sao:
   - Mặc định: Nhỏ gọn ở góc dưới bên phải, độ rộng cố định (330px), KHÔNG che mất Bé Sói
   - Khi bấm Mở rộng (.is-expanded): Phóng to ra chính giữa màn hình (được phép che Bé Sói) */
.star-wish-popup {
  position: absolute;
  right: 68px;
  bottom: 26px;
  top: auto;
  left: auto;
  transform: none;
  width: 330px;
  min-width: 330px;
  max-width: 330px;
  max-height: calc(100% - 76px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, rgba(34, 10, 74, 0.92), rgba(18, 5, 42, 0.95));
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1.25px solid rgba(242, 216, 255, 0.54);
  border-radius: 16px;
  padding: 11px 13px;
  z-index: 15;
  box-shadow: 0 16px 38px rgba(8, 2, 22, 0.76), 0 0 24px rgba(216, 174, 255, 0.18);
  animation: fadeIn 0.18s ease;
  transition: width 0.2s ease, padding 0.2s ease, border-radius 0.2s ease;
}

.star-wish-popup.is-expanded {
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(92vw, 520px);
  min-width: min(92vw, 520px);
  max-width: min(92vw, 520px);
  max-height: calc(100% - 32px);
  padding: 18px 20px;
  border-radius: 20px;
  z-index: 22;
  box-shadow: 0 26px 64px rgba(6, 1, 18, 0.86), 0 0 38px rgba(216, 174, 255, 0.28);
}

.star-wish-popup:not(.is-expanded) .popup-close {
  top: 9px;
  right: 10px;
  width: 24px;
  height: 24px;
  font-size: 0.74rem;
}

.star-wish-popup:not(.is-expanded) .star-popup-header {
  gap: 7px;
  padding-right: 26px;
}

.star-wish-popup:not(.is-expanded) .star-gift-pill {
  font-size: 0.68rem;
  padding: 2px 8px;
}

.star-wish-popup:not(.is-expanded) .star-index-label {
  font-size: 0.68rem;
}

.star-wish-popup:not(.is-expanded) .star-popup-msg {
  margin: 7px 0 6px;
  font-size: 0.83rem;
  line-height: 1.48;
  overflow: hidden;
}

.star-wish-popup:not(.is-expanded) .star-popup-msg.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.star-wish-popup.is-expanded .star-popup-msg {
  margin: 12px 0 10px;
  font-size: 0.96rem;
  line-height: 1.62;
  max-height: 42vh;
  overflow-y: auto;
}

.star-popup-media-hint {
  margin: 2px 0 4px;
  font-size: 0.72rem;
  color: #e9d5ff;
  opacity: 0.9;
}

.btn-star-popup-expand {
  align-self: flex-start;
  margin: 0 0 7px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(216, 180, 254, 0.16);
  border: 1px solid rgba(233, 213, 255, 0.38);
  color: #f3e8ff;
  font-size: 0.71rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn-star-popup-expand:hover {
  background: rgba(216, 180, 254, 0.28);
  border-color: #ffffff;
  color: #ffffff;
}

.star-wish-popup:not(.is-expanded) .star-popup-meta {
  padding: 5px 9px;
  font-size: 0.7rem;
  border-radius: 8px;
}

.star-popup-footer-bar {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(226, 198, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.star-wish-popup:not(.is-expanded) .star-popup-left-actions button {
  padding: 3px 8px;
  font-size: 0.68rem;
}

.star-wish-popup:not(.is-expanded) .wish-reactions-group .react-btn {
  padding: 3px 7px;
  font-size: 0.7rem;
}

.star-wish-popup:not(.is-expanded) .star-popup-step-btns button {
  padding: 3px 7px;
  font-size: 0.68rem;
}

@media (max-width: 900px) {
  .star-wish-popup:not(.is-expanded) {
    right: 64px;
    bottom: 22px;
    width: 280px;
    min-width: 280px;
    max-width: 280px;
  }
}

@media (max-width: 680px) {
  .bighug-wolf-sprite {
    transition: left 0.22s ease;
  }

  #starrySkyStage:has(#starWishPopup:not(.hidden):not(.is-expanded)) .bighug-wolf-sprite {
    left: 20%;
  }

  .star-wish-popup:not(.is-expanded) {
    right: 12px;
    bottom: 64px;
    width: 232px;
    min-width: 232px;
    max-width: 232px;
    padding: 9px 11px;
  }
}

.star-popup-left-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.star-popup-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.star-popup-step-btns {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.star-popup-step-btns button {
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 0.74rem;
}

/* Lưới nhiều ô gọn gàng + Mở rộng / Thu gọn cho @admin */
.admin-wish-flat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

@media (max-width: 1024px) {
  .admin-wish-flat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .admin-wish-flat-grid {
    grid-template-columns: 1fr;
  }
}

.admin-wish-flat-grid .wish-card {
  padding: 14px 16px;
  border-radius: 16px;
}

.wish-body.is-collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-admin-expand-wish {
  margin-top: 6px;
  padding: 0;
  background: transparent;
  border: none;
  color: #e9d5ff;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.btn-admin-expand-wish:hover {
  color: #ffffff;
}

/* ==================== NÚT NHẠC NỀN TOÀN WEB NỔI GÓC DƯỚI PHẢI ==================== */
.global-bgm-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 94;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  background: rgba(24, 6, 54, 0.76);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(236, 204, 255, 0.5);
  color: #fdf8ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(7, 1, 20, 0.58), 0 0 14px rgba(192, 132, 252, 0.26);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.global-bgm-fab:hover {
  transform: translateY(-2px);
  border-color: #ffffff;
  box-shadow: 0 10px 26px rgba(7, 1, 20, 0.68), 0 0 20px rgba(226, 184, 255, 0.45);
}

.global-bgm-fab.is-muted {
  opacity: 0.72;
  border-color: rgba(214, 178, 245, 0.32);
}

.bgm-thin-note-svg {
  width: 20px;
  height: 20px;
  display: block;
}

@media (max-width: 768px) {
  .global-bgm-fab {
    right: 12px;
    bottom: 54px;
    width: 36px;
    height: 36px;
  }

  .bgm-thin-note-svg {
    width: 17px;
    height: 17px;
  }
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.star-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-right: 32px;
  flex-shrink: 0;
}

.star-gift-pill {
  background: rgba(223, 190, 247, 0.22);
  border: 1px solid rgba(238, 216, 255, 0.48);
  color: var(--amber-soft);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 3px 11px;
  border-radius: 999px;
}

.star-index-label {
  font-size: 0.74rem;
  color: var(--text-dim);
  font-weight: 400;
}

.star-popup-msg {
  margin: 12px 0;
  font-size: 0.96rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.6;
  color: #ffffff;
  white-space: pre-wrap;
  overflow-y: auto;
  flex: 1 1 auto;
}

.star-popup-meta {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 7px 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  flex-shrink: 0;
}

.star-author-line strong {
  color: var(--amber-soft);
  font-weight: 300;
}

.star-time-line strong {
  color: #ddd6fe;
  font-weight: 300;
}

.star-popup-nav {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.star-popup-nav button {
  padding: 4px 11px;
  font-size: 0.73rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.35;
  border-radius: 999px;
}

/* Chú sói ngắm sao ở đồi dưới */
.stony-hill-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 34%;
  min-height: 190px;
  max-height: 290px;
  pointer-events: none;
  z-index: 3;
}

.gazing-wolf {
  animation: bigWolfBreathe 4s ease-in-out infinite;
}

@keyframes bigWolfBreathe {
  0%, 100% { transform: translate(720px, 214px) scale(1); }
  50% { transform: translate(720px, 212px) scale(1.015); }
}

.gazing-tail {
  transform-box: fill-box;
  transform-origin: right bottom;
  animation: bigTailSway 3s ease-in-out infinite alternate;
}

@keyframes bigTailSway {
  0% { transform: rotate(-4deg); }
  100% { transform: rotate(7deg); }
}

.sky-hint-caption {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-size: 0.82rem;
  color: rgba(246, 238, 255, 0.88);
  background: rgba(16, 4, 38, 0.72);
  border: 1px solid rgba(226, 208, 250, 0.22);
  padding: 5px 16px;
  border-radius: 999px;
  text-align: center;
  max-width: 92%;
  pointer-events: none;
}

/* ==================== TOAST ==================== */
.toast-container {
  position: fixed;
  bottom: 70px;
  right: 18px;
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: linear-gradient(145deg, rgba(68, 20, 128, 0.96), rgba(28, 7, 62, 0.96));
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-warm);
  color: #fff;
  padding: 12px 18px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.22s ease;
}

/* ==================== CHÂN TRANG (FOOTER) ==================== */
.site-footer {
  margin-top: auto;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 3px 10px;
  text-align: center;
  padding: 8px 16px 10px;
  font-size: 0.62rem;
  font-weight: 300;
  line-height: 1.35;
  color: var(--text-dim);
  opacity: 0.7;
  border-top: 1px solid rgba(226, 208, 250, 0.08);
  letter-spacing: 0.15px;
}

/* ==================== EULA, PRIVACY POLICY, DELETE ACCOUNT & UGC MODERATION ==================== */
.eula-check-field {
  background: rgba(30, 8, 64, 0.58);
  border: 1px solid rgba(226, 208, 250, 0.28);
  border-radius: 14px;
  padding: 9px 12px;
}

.eula-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--text-muted);
  font-weight: 600;
}

.eula-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #d8b4fe;
  flex-shrink: 0;
  cursor: pointer;
}

.inline-policy-btn {
  background: transparent;
  color: var(--amber-soft);
  font-size: inherit;
  font-weight: 800;
  text-decoration: underline;
  padding: 0;
}

.inline-policy-btn:hover {
  color: #ffffff;
}

.footer-policy-links {
  margin-top: 0;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.62rem;
  font-weight: 300;
}

.profile-policy-links {
  margin-top: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.74rem;
  font-weight: 300;
}

.footer-policy-links a {
  color: var(--text-dim);
  font-weight: 300;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 0.75px;
}

.profile-policy-links a {
  color: var(--text-muted);
  font-weight: 300;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.footer-policy-links a:hover,
.profile-policy-links a:hover {
  color: #ffffff;
}

.modal-ext-link {
  color: var(--amber-soft);
  text-decoration: underline;
  font-weight: 600;
}

.modal-ext-link:hover {
  color: #ffffff;
}

.delete-account-wrap {
  width: 100%;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px dashed rgba(240, 152, 188, 0.3);
}

.btn-delete-account-outline {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(136, 38, 76, 0.24);
  border: 1px dashed rgba(244, 154, 188, 0.52);
  color: #fbcfe8;
  font-weight: 800;
  font-size: 0.84rem;
}

.btn-delete-account-outline:hover {
  background: rgba(168, 42, 90, 0.4);
  border-style: solid;
  color: #ffffff;
}

.delete-acc-panel {
  margin-top: 10px;
  width: 100%;
  background: rgba(44, 20, 48, 0.88);
  border: 1px solid rgba(240, 142, 180, 0.55);
  border-radius: 14px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  animation: fadeIn 0.2s ease;
}

.delete-acc-panel .field label {
  font-size: 0.78rem;
  color: #fce7f3;
  margin-bottom: 4px;
}

.delete-acc-panel input[type="password"],
.delete-acc-panel input[type="text"] {
  font-size: 0.82rem;
  padding: 9px 12px;
  border-color: rgba(240, 142, 180, 0.45);
}

.delete-acc-warning {
  font-size: 0.77rem;
  line-height: 1.48;
  color: #fce7f3;
  background: rgba(218, 92, 138, 0.16);
  padding: 8px 10px;
  border-radius: 10px;
}

.btn-confirm-delete-acc {
  background: linear-gradient(135deg, #db2777, #9d174d);
  color: #ffffff;
  font-weight: 800;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(251, 207, 232, 0.5);
}

.btn-confirm-delete-acc:hover {
  filter: brightness(1.1);
}

/* --- Tab Riêng @admin: Quản lý Xóa lẻ User & Làm mới Web (#tab-admin-users) --- */
.admin-users-directory-card {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-users-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-page-search-row {
  flex: 1 1 280px;
  max-width: 420px;
}

.admin-page-pin-card {
  margin-top: 14px;
  max-width: 620px;
}

.admin-single-pin-card {
  max-width: 620px;
}

.admin-member-list-page {
  max-height: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
}

@media (max-width: 820px) {
  .admin-member-list-page {
    grid-template-columns: 1fr;
  }

  .admin-page-search-row {
    max-width: none;
    width: 100%;
  }
}

.admin-user-reset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-reset-badge {
  font-size: 0.74rem;
  font-weight: 800;
  color: #f3e8ff;
  background: rgba(192, 132, 252, 0.2);
  border: 1px solid rgba(233, 213, 255, 0.36);
  padding: 3px 10px;
  border-radius: 999px;
}

.admin-member-count-badge {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--amber-soft);
}

.admin-member-search-row input[type="text"] {
  width: 100%;
  font-size: 0.8rem;
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(14, 3, 34, 0.72);
  border: 1px solid rgba(226, 208, 250, 0.26);
}

.admin-member-list {
  max-height: 168px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(216, 180, 254, 0.34) transparent;
}

.admin-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(226, 208, 250, 0.16);
}

.admin-member-info {
  min-width: 0;
  font-size: 0.77rem;
  line-height: 1.35;
  color: #faf5ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-member-info .admin-member-uname {
  color: #fde68a;
  font-weight: 700;
  margin-left: 4px;
}

.admin-member-info .admin-member-sub {
  color: var(--text-dim);
  font-size: 0.71rem;
  margin-left: 6px;
}

.btn-admin-row-del {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffe4e6;
  background: rgba(225, 29, 72, 0.22);
  border: 1px solid rgba(251, 113, 133, 0.45);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.btn-admin-row-del:hover {
  background: rgba(225, 29, 72, 0.38);
  border-color: #fecdd3;
}

.admin-member-empty {
  padding: 10px 8px;
  text-align: center;
  font-size: 0.76rem;
  font-style: italic;
  color: var(--text-dim);
}

.admin-reset-divider {
  height: 1px;
  background: rgba(226, 208, 250, 0.16);
  margin: 2px 0;
}

.btn-admin-web-reset {
  width: auto;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 12px;
  font-size: 0.81rem;
  font-weight: 800;
  color: #ffe4e6;
  background: linear-gradient(135deg, rgba(190, 18, 60, 0.42), rgba(136, 19, 55, 0.52));
  border: 1px solid rgba(251, 113, 133, 0.62);
  cursor: pointer;
  transition: filter 0.18s ease, border-color 0.18s ease;
}

.btn-admin-web-reset:hover {
  filter: brightness(1.12);
  border-color: #fecdd3;
}

.admin-reset-pin-panel {
  margin-top: 2px;
}

.eula-modal-box {
  max-width: 580px;
}

.eula-modal-body {
  text-align: left;
  background: rgba(22, 5, 48, 0.72);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.58;
  max-height: 52vh;
  overflow-y: auto;
}

.eula-modal-body ul {
  padding-left: 18px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-user-report {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(226, 208, 250, 0.24);
  color: var(--text-muted);
  font-size: 0.73rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.btn-user-report:hover {
  background: rgba(223, 190, 247, 0.22);
  border-color: rgba(238, 216, 255, 0.55);
  color: var(--amber-soft);
}

.admin-report-alert {
  margin-top: 10px;
  padding: 8px 11px;
  border-radius: 11px;
  background: rgba(192, 132, 252, 0.18);
  border: 1px solid rgba(235, 210, 255, 0.55);
  font-size: 0.77rem;
  color: #f5e8ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-admin-dismiss-report {
  background: rgba(188, 232, 220, 0.2);
  border: 1px solid rgba(188, 232, 220, 0.52);
  color: #d1fae5;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
}

.btn-admin-dismiss-report:hover {
  background: rgba(188, 232, 220, 0.36);
  color: #ffffff;
}

.report-wish-excerpt {
  text-align: left;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-main);
  background: rgba(22, 5, 48, 0.78);
  border-left: 3px solid var(--amber);
  padding: 9px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  max-height: 84px;
  overflow-y: auto;
}

.report-wish-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.report-reason-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border-radius: 11px;
  background: rgba(44, 12, 90, 0.58);
  border: 1px solid rgba(226, 208, 250, 0.22);
  font-size: 0.82rem;
  color: var(--text-main);
  cursor: pointer;
}

.report-reason-opt input[type="radio"] {
  accent-color: #d8b4fe;
  flex-shrink: 0;
}

/* ==================== ĐÍNH KÈM ẢNH THƯ TAY & FILE VOICE TRONG LỜI CHÚC ==================== */
.wish-media-attach-box {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.wish-media-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.composer-media-btns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 520px) {
  .composer-media-btns {
    grid-template-columns: 1fr;
  }
}

.btn-media-attach {
  background: rgba(44, 12, 90, 0.56);
  border: 1px solid var(--border-soft);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.media-thin-icon {
  width: 16px;
  height: 16px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.btn-sub-limit {
  font-size: 0.7rem;
  font-weight: 300;
  font-style: italic;
  opacity: 0.88;
  margin-left: 2px;
}

.btn-media-attach:hover {
  background: rgba(114, 90, 172, 0.58);
  border-color: var(--amber-soft);
  color: #ffffff;
}

.btn-media-attach.record-btn {
  background: rgba(44, 12, 90, 0.56);
  border-color: var(--border-soft);
  color: #ffffff;
}

.btn-media-attach.record-btn:hover {
  background: rgba(114, 90, 172, 0.58);
  border-color: var(--amber-soft);
  color: #ffffff;
}

.wish-media-rule {
  font-size: 0.73rem;
  color: var(--text-dim);
}

.voice-record-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(124, 42, 86, 0.45);
  border: 1px solid rgba(244, 168, 210, 0.6);
  font-size: 0.82rem;
  color: #fce7f3;
}

.rec-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rec-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f472b6;
  box-shadow: 0 0 10px #f472b6;
  animation: pulseRecDot 1s ease-in-out infinite alternate;
}

@keyframes pulseRecDot {
  from { opacity: 0.35; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1.2); }
}

.voice-rec-actions {
  display: flex;
  gap: 6px;
}

.wish-media-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(34, 9, 72, 0.82);
  border: 1px solid rgba(235, 210, 255, 0.45);
  flex-wrap: wrap;
}

.wish-media-preview-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.wish-preview-thumb {
  width: 54px;
  height: 54px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid rgba(238, 216, 255, 0.5);
  flex-shrink: 0;
}

.wish-preview-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.wish-preview-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--amber-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wish-preview-size {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.btn-remove-media {
  background: rgba(225, 112, 152, 0.22);
  border: 1px solid rgba(240, 154, 188, 0.5);
  color: #fce7f3;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 999px;
  flex-shrink: 0;
}

.btn-remove-media:hover {
  background: rgba(225, 112, 152, 0.38);
  color: #ffffff;
}

/* Hiển thị Ảnh thư tay & Voice trên Tường Lời Chúc & Sói Lớn View */
.wish-card-media,
.star-popup-media {
  margin-top: 12px;
}

.wish-attached-img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 13px;
  border: 1px solid rgba(238, 216, 255, 0.38);
  cursor: zoom-in;
  display: block;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.wish-attached-img:hover {
  border-color: var(--amber-soft);
  transform: scale(1.01);
}

.star-popup-media .wish-attached-img {
  max-height: 210px;
  object-fit: contain;
  background: rgba(14, 3, 34, 0.65);
}

.wish-voice-box {
  background: linear-gradient(135deg, rgba(74, 22, 140, 0.58), rgba(110, 40, 192, 0.42));
  border: 1px solid rgba(226, 208, 250, 0.38);
  border-radius: 13px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wish-voice-label {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--amber-soft);
}

.wish-audio-player {
  width: 100%;
  height: 36px;
  border-radius: 999px;
}

#mediaLightboxModal {
  z-index: 88;
}

/* ==================== MODAL CĂN CHỈNH VÙNG LẤY ẢNH (AVATAR & TRANG CHỦ) ==================== */
#imageCropModal.image-crop-backdrop {
  z-index: 95;
  padding: 14px;
}

.image-crop-box {
  max-width: 610px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-height: 94vh;
  overflow-y: auto;
}

.image-crop-title {
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  font-size: 1.24rem;
  line-height: 1.35;
  color: #ffffff;
  margin: 2px 0 4px;
}

.image-crop-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.45;
}

.image-crop-stage-wrap {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #0d021f;
  border: 1.5px solid rgba(232, 198, 255, 0.42);
  box-shadow: inset 0 0 28px rgba(8, 2, 20, 0.85);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#imageCropCanvas {
  display: block;
  width: 100%;
  height: auto;
  cursor: grab;
  touch-action: none;
}

#imageCropCanvas.is-dragging {
  cursor: grabbing;
}

.image-crop-zoom-row {
  width: 100%;
  margin-top: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.crop-zoom-step-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(84, 38, 148, 0.56);
  border: 1px solid rgba(235, 206, 255, 0.42);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
}

.crop-zoom-step-btn:hover {
  background: rgba(126, 62, 208, 0.78);
  border-color: #ffffff;
}

.crop-zoom-slider {
  flex: 1 1 auto;
  min-width: 80px;
  height: 6px;
  accent-color: #e9d5ff;
  cursor: pointer;
  padding: 0;
  border: none;
  background: rgba(226, 198, 255, 0.24);
  border-radius: 999px;
}

.crop-zoom-readout {
  min-width: 44px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--amber-soft);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.crop-reset-btn {
  flex-shrink: 0;
  padding: 6px 11px;
  font-size: 0.76rem;
}

.image-crop-actions {
  width: 100%;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(226, 208, 250, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.image-crop-confirm-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

@media (max-width: 560px) {
  .image-crop-box {
    padding: 16px 14px;
  }

  .image-crop-title {
    font-size: 1.06rem;
  }

  .image-crop-hint {
    font-size: 0.74rem;
    margin-bottom: 10px;
  }

  .image-crop-zoom-row {
    gap: 6px;
  }

  .crop-zoom-step-btn {
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
  }

  .crop-reset-btn {
    padding: 5px 9px;
    font-size: 0.72rem;
  }

  .image-crop-actions {
    gap: 8px;
  }

  .image-crop-actions button {
    padding: 7px 12px;
    font-size: 0.78rem;
  }
}

.media-lightbox-box {
  max-width: min(92vw, 760px);
  padding: 16px;
  background: rgba(22, 5, 48, 0.96);
}

.media-lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 14px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* ==================== TAB NEWS: LƯỚI 2 CỘT, ĐỊNH DẠNG B/I/U & DẢI ẢNH KIỂU THREADS ==================== */
.tab-news-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: -2px;
}

.news-page-head {
  text-align: center;
  margin: 4px auto 22px;
  max-width: 680px;
}

.news-section-heading {
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  font-size: clamp(1.5rem, 2.3vw, 1.95rem);
  line-height: 1.35;
  color: #ffffff;
  margin: 0 0 6px;
  text-shadow: 0 0 28px rgba(226, 174, 255, 0.35);
}

.news-section-sub {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Quy chuẩn Font Tiêu đề TAN Pearl (cho phép Bold / Italic / Underline theo vùng chọn) */
.news-rich-title {
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-weight: 400;
  font-style: normal;
  font-synthesis: weight style;
  color: #ffffff;
  line-height: 1.44;
}

.news-rich-title b,
.news-rich-title strong {
  font-weight: 800;
  text-shadow: 0 0 0.6px currentColor;
}

.news-rich-title i,
.news-rich-title em {
  font-style: italic;
}

.news-rich-title u {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

/* Quy chuẩn Nội dung nét mảnh, cỡ chữ nhỏ gọn tương đương 10–11pt (~13.8px) */
.news-rich-body {
  font-family: "Nunito", sans-serif;
  font-size: 0.86rem;
  font-weight: 300;
  font-style: normal;
  line-height: 1.68;
  color: rgba(246, 238, 255, 0.92);
  word-break: break-word;
}

.news-rich-body b,
.news-rich-body strong {
  font-weight: 700;
  color: #ffffff;
}

.news-rich-body i,
.news-rich-body em {
  font-style: italic;
}

.news-rich-body u {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* Lưới 2 cột trên Desktop, 1 cột trên Điện thoại */
.news-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 860px) {
  .news-posts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.news-grid-empty {
  grid-column: 1 / -1;
}

.news-card {
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.22s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-warm);
  box-shadow: 0 16px 36px rgba(10, 4, 28, 0.48);
}

.news-card.is-scheduled-post {
  border-style: dashed;
  border-color: rgba(238, 216, 255, 0.65);
  background: linear-gradient(145deg, rgba(64, 20, 124, 0.72), rgba(110, 40, 192, 0.42));
}

.news-card-title {
  margin: 0;
  font-size: 1.08rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-meta,
.news-detail-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--text-dim);
}

.news-edited-tag {
  font-size: 0.72rem;
  font-style: italic;
  font-weight: 300;
  color: rgba(232, 208, 252, 0.78);
}

.news-card-excerpt {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-read-more-row {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.news-read-more-link {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--amber-soft);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.news-card:hover .news-read-more-link {
  color: #ffffff;
}

/* Dải ảnh trượt ngang kiểu Threads (tối đa 5 ảnh) */
.news-threads-gallery {
  position: relative;
  width: 100%;
  margin-top: 2px;
}

.news-threads-track {
  display: flex;
  align-items: center;
  gap: 9px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  padding: 2px 1px 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.news-threads-track::-webkit-scrollbar {
  display: none;
}

/* Ngoài thẻ Grid 2 cột: khóa chiều cao đồng nhất 232px để 2 cột luôn thẳng hàng, tỷ lệ ảnh chuẩn Threads */
.news-threads-track.is-card-strip {
  height: 232px;
}

.news-threads-item {
  position: relative;
  flex: 0 0 auto;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(236, 210, 255, 0.28);
  background: rgba(16, 4, 38, 0.72);
  scroll-snap-align: start;
}

.news-threads-track.is-card-strip .news-threads-item {
  height: 224px;
}

/* 1 ảnh đơn trên thẻ Grid: khung chuẩn Threads không méo ảnh */
.news-threads-track.is-card-strip.is-single .news-threads-item {
  width: 100%;
}

.news-threads-track.is-card-strip.is-single .news-threads-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 2–5 ảnh trượt ngang kiểu Threads: từng thẻ ảnh dọc/tự nhiên xếp cạnh nhau hé ảnh kế tiếp */
.news-threads-track.is-card-strip.is-multi .news-threads-img {
  height: 100%;
  width: auto;
  min-width: 146px;
  max-width: 280px;
  object-fit: cover;
  display: block;
}

/* Trong cửa sổ đọc chi tiết: hiển thị ảnh kiểu Threads rộng thoáng, bấm phóng to Lightbox */
.news-threads-track.is-detail-strip.is-single .news-threads-item {
  max-width: 100%;
  height: auto;
}

.news-threads-track.is-detail-strip.is-single .news-threads-img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 430px;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
}

.news-threads-track.is-detail-strip.is-multi {
  height: 326px;
}

.news-threads-track.is-detail-strip.is-multi .news-threads-item {
  height: 318px;
}

.news-threads-track.is-detail-strip.is-multi .news-threads-img {
  height: 100%;
  width: auto;
  min-width: 185px;
  max-width: 420px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.news-threads-count-pill {
  position: absolute;
  top: 8px;
  right: 9px;
  z-index: 3;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(14, 4, 32, 0.76);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(238, 214, 255, 0.36);
  color: #f8f0ff;
  font-size: 0.68rem;
  font-weight: 700;
  pointer-events: none;
}

.news-strip-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  background: rgba(20, 6, 46, 0.82);
  border: 1px solid rgba(238, 210, 255, 0.52);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.88;
  transition: background 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.news-strip-nav-btn:hover {
  background: rgba(114, 46, 198, 0.92);
  opacity: 1;
}

.news-strip-nav-btn.prev {
  left: 7px;
}

.news-strip-nav-btn.next {
  right: 7px;
}

.news-card-admin-bar,
.news-detail-admin-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 9px;
  border-top: 1px solid rgba(226, 208, 250, 0.15);
}

/* Modal Đọc chi tiết bài viết NEWS */
.modal-box.news-detail-modal-box {
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  text-align: left;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(216, 180, 254, 0.34) transparent;
}

.news-detail-title {
  margin: 4px 28px 0 0;
  font-size: clamp(1.22rem, 2vw, 1.5rem);
}

.news-detail-body {
  margin-top: 2px;
  font-size: 0.88rem;
  line-height: 1.74;
}

.news-detail-gallery-wrap {
  margin-top: 6px;
}

/* Modal Soạn thảo / Chỉnh sửa bài NEWS của Admin */
.modal-box.news-composer-modal-box {
  max-width: 640px;
  max-height: 92vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(216, 180, 254, 0.34) transparent;
}

.news-modal-heading {
  margin-bottom: 12px;
}

.news-field-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.news-field-top label {
  margin-bottom: 0 !important;
}

.news-rich-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.news-fmt-btn {
  width: 30px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  background: rgba(54, 18, 108, 0.65);
  border: 1px solid rgba(226, 200, 252, 0.36);
  color: #f5eaff;
  font-family: Georgia, serif;
  font-size: 0.84rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.news-fmt-btn:hover {
  background: rgba(114, 52, 198, 0.75);
  border-color: #ffffff;
}

.news-fmt-btn.active {
  background: linear-gradient(180deg, #fdfaff 0%, #ead2fc 100%);
  color: #260c4c;
  border-color: #ffffff;
  box-shadow: 0 2px 10px rgba(216, 180, 254, 0.35);
}

.news-rich-input {
  width: 100%;
  border-radius: 13px;
  background: rgba(20, 5, 46, 0.76);
  border: 1px solid rgba(226, 208, 250, 0.28);
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.news-rich-input:focus {
  border-color: var(--amber-soft);
  box-shadow: 0 0 0 3px rgba(216, 180, 254, 0.18);
}

.news-rich-input:empty::before {
  content: attr(data-placeholder);
  color: rgba(208, 190, 236, 0.46);
  font-family: "Nunito", sans-serif;
  font-size: 0.84rem;
  font-weight: 400;
  font-style: normal;
  pointer-events: none;
}

.news-rich-title-editor {
  min-height: 46px;
  font-size: 1.06rem;
  white-space: pre-wrap;
}

.news-rich-body-editor {
  min-height: 150px;
  max-height: 290px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.news-word-count-row {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.74rem;
}

.news-editor-tip {
  color: var(--text-dim);
  font-weight: 300;
}

.news-editor-tip code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: #f3e8ff;
  font-size: 0.7rem;
}

.news-word-counter {
  font-weight: 700;
  color: var(--amber-soft);
  font-variant-numeric: tabular-nums;
}

.news-word-counter.is-over-limit {
  color: #fda4af;
}

.news-upload-preview-list {
  margin-top: 9px;
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 4px 2px 6px;
}

.news-upload-thumb-item {
  position: relative;
  flex: 0 0 auto;
  width: 92px;
  height: 118px;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid rgba(236, 210, 255, 0.45);
  background: rgba(18, 5, 42, 0.86);
}

.news-upload-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-upload-thumb-size {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  padding: 2px 5px;
  border-radius: 6px;
  background: rgba(10, 2, 24, 0.78);
  color: #f5eaff;
  font-size: 0.63rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-upload-thumb-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  background: rgba(180, 28, 86, 0.9);
  border: 1px solid rgba(255, 220, 236, 0.75);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 640px) {
  .news-card {
    padding: 16px 15px;
  }

  .news-threads-track.is-card-strip {
    height: 204px;
  }

  .news-threads-track.is-card-strip .news-threads-item {
    height: 196px;
  }

  .news-threads-track.is-detail-strip.is-multi {
    height: 256px;
  }

  .news-threads-track.is-detail-strip.is-multi .news-threads-item {
    height: 248px;
  }

  .modal-box.news-detail-modal-box {
    padding: 18px 16px;
  }
}

/* ==================== TAB 4: CHARITY & TAB 5: HỘI THẢO KHOA HỌC CÔNG NGHỆ ==================== */
.charity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

@media (max-width: 920px) {
  .charity-grid {
    grid-template-columns: 1fr;
  }
}

.charity-col-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 360px;
}

.charity-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(226, 208, 250, 0.2);
}

.charity-col-head h2 {
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  font-size: 1.24rem;
  line-height: 1.36;
  color: var(--amber-soft);
}

.charity-posts-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.charity-post-item {
  background: rgba(44, 12, 90, 0.64);
  border: 1px solid rgba(226, 208, 250, 0.24);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.charity-post-item.is-scheduled-post {
  border-style: dashed;
  border-color: rgba(238, 216, 255, 0.65);
  background: linear-gradient(145deg, rgba(64, 20, 124, 0.72), rgba(110, 40, 192, 0.42));
}

.charity-post-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.charity-post-title {
  font-size: 1.04rem;
  font-weight: 800;
  color: #ffffff;
}

.charity-post-time {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 600;
}

.scheduled-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #2b1d4a;
  background: #eed8fb;
  padding: 2px 9px;
  border-radius: 999px;
}

.charity-post-body {
  font-size: 0.93rem;
  line-height: 1.62;
  color: var(--text-main);
  white-space: pre-wrap;
}

.charity-admin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid rgba(226, 208, 250, 0.14);
}

.btn-admin-edit {
  background: rgba(182, 152, 236, 0.22);
  border: 1px solid rgba(226, 204, 250, 0.45);
  color: #f3e8ff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 999px;
}

.btn-admin-edit:hover {
  background: rgba(196, 168, 244, 0.38);
  color: #ffffff;
}

.charity-schedule-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 560px) {
  .charity-schedule-options {
    grid-template-columns: 1fr;
  }
}

.charity-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  background: rgba(34, 9, 72, 0.45);
  border: 1px dashed rgba(226, 208, 250, 0.24);
  border-radius: 14px;
}

/* --- TAB 5: HỘI THẢO KHOA HỌC CÔNG NGHỆ --- */
.admin-bar-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.seminar-reg-card {
  max-width: 760px;
  margin: 0 auto 22px;
}

.seminar-reg-head {
  text-align: center;
  margin-bottom: 20px;
}

.seminar-reg-head h2 {
  font-family: "TAN Pearl", "Playfair Display", Georgia, serif !important;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  font-size: 1.3rem;
  line-height: 1.36;
  color: var(--amber-soft);
  letter-spacing: 0.02em;
}

.seminar-reg-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.seminar-public-note {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--amber-soft);
}

.seminar-my-status {
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(188, 232, 220, 0.16);
  border: 1px solid rgba(188, 232, 220, 0.48);
  color: #dcfce7;
  font-size: 0.86rem;
  line-height: 1.55;
}

.seminar-admin-list-card {
  margin-top: 18px;
}

.seminar-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 12px;
}

.seminar-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.seminar-table th,
.seminar-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(226, 208, 250, 0.18);
  vertical-align: middle;
}

.seminar-table th {
  color: var(--amber-soft);
  font-weight: 800;
  background: rgba(34, 9, 72, 0.65);
  white-space: nowrap;
}

.seminar-table td a {
  color: #e2d4f8;
  text-decoration: underline;
  word-break: break-all;
}

.seminar-table td a:hover {
  color: #ffffff;
}

/* ==================== BẢN IN PDF LƯU BÚT ==================== */
@media print {
  body {
    background: #ffffff !important;
    color: #111827 !important;
  }
  body::before,
  .welcome-gate, #appShell, .topbar, .main-tabs, .container, .site-footer, .modal-backdrop, .bigwolf-overlay, #fxCanvas, #homeBgFxCanvas, #btnGlobalBgmToggle, .toast-container {
    display: none !important;
  }
  .print-only {
    display: block !important;
    padding: 24px;
  }
  .print-header {
    text-align: center;
    margin-bottom: 24px;
    border-bottom: 2px solid #111827;
    padding-bottom: 12px;
  }
  .print-wish-item {
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 14px;
    page-break-inside: avoid;
  }
}

/* ==================== TỐI ƯU ĐIỆN THOẠI (IOS SAFARI / ANDROID CHROME) ==================== */
@media (max-width: 768px) {
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="url"],
  input[type="search"],
  input[type="datetime-local"],
  textarea,
  select {
    font-size: 16px !important;
  }

  .welcome-footer,
  .site-footer,
  body.bighug-fullbleed-active .site-footer {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
}
