#news-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.32s ease;
  pointer-events: none;
}
#news-popup-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
#news-popup {
  position: relative;
  width: min(480px, calc(100vw - 32px));
  max-height: 92vh;
  overflow-y: auto;
  scrollbar-width: none;
  background: linear-gradient(155deg,
    rgba(255,255,255,0.075) 0%,
    rgba(168,85,247,0.10) 45%,
    rgba(232,121,249,0.06) 70%,
    rgba(255,255,255,0.042) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
  border-top-color: rgba(255,255,255,0.32);
  border-bottom-color: rgba(255,255,255,0.06);
  border-radius: 32px;
  box-shadow:
    0 40px 100px rgba(0,0,0,0.80),
    0 8px 32px rgba(168,85,247,0.18),
    inset 0 1px 0 rgba(255,255,255,0.24),
    inset 0 -1px 0 rgba(0,0,0,0.10);
  padding: 32px 28px 24px;
  animation: newsIn 0.38s cubic-bezier(0.34,1.56,0.64,1);
}
#news-popup::before {
  content: '';
  position: absolute;
  top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(168,85,247,0.75),
    rgba(255,255,255,0.55),
    rgba(232,121,249,0.65),
    transparent);
  pointer-events: none;
  border-radius: 0 0 50% 50%;
}
@keyframes newsIn {
  from { opacity:0; transform: scale(0.88) translateY(24px); }
  to   { opacity:1; transform: scale(1)    translateY(0);    }
}
.news-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}
.news-popup-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 100px;
  background: rgba(168,85,247,0.22);
  border: 1px solid rgba(168,85,247,0.42);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #c084fc;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.news-popup-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 6px rgba(168,85,247,0.8);
  animation: newsPulse 2s infinite;
}
@keyframes newsPulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.5; transform:scale(0.7); }
}
.news-popup-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s ease;
  margin-top: 2px;
}
.news-popup-close:hover { background: rgba(255,255,255,0.14); color: #fff; }
.news-popup-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0 0 4px;
  background: linear-gradient(135deg, #f5f5f7 0%, #c084fc 60%, #e879f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.news-popup-date {
  font-size: 12px;
  color: rgba(255,255,255,0.38);
  font-weight: 500;
  margin-bottom: 22px;
}
.news-feature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}
.news-feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(255,255,255,0.042);
  border: 1px solid rgba(255,255,255,0.082);
  border-top-color: rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 14px 15px;
  transition: background 0.18s;
}
.news-feature:hover { background: rgba(255,255,255,0.065); }
.news-feature-emoji {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(168,85,247,0.25), rgba(232,121,249,0.18));
  border: 1px solid rgba(168,85,247,0.28);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(168,85,247,0.15);
}
.news-feature-body { flex: 1; min-width: 0; }
.news-feature-title {
  font-size: 14px;
  font-weight: 700;
  color: #f5f5f7;
  margin: 0 0 3px;
  letter-spacing: -0.01em;
}
.news-feature-desc {
  font-size: 12.5px;
  color: rgba(255,255,255,0.58);
  line-height: 1.55;
  margin: 0 0 5px;
}
.news-feature-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(168,85,247,0.85);
  letter-spacing: 0.01em;
}
.news-feature-hint::before {
  content: '→';
  font-size: 10px;
}
.news-popup-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.news-dismiss-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(168,85,247,0.85) 0%, rgba(192,132,252,0.75) 100%);
  border: 1px solid rgba(168,85,247,0.55);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 20px rgba(168,85,247,0.30), inset 0 1px 0 rgba(255,255,255,0.22);
  transition: all 0.18s ease;
}
.news-dismiss-btn:hover {
  background: linear-gradient(135deg, rgba(168,85,247,1) 0%, rgba(192,132,252,0.9) 100%);
  box-shadow: 0 6px 28px rgba(168,85,247,0.45);
  transform: translateY(-1px);
}
.news-dismiss-btn:active { transform: scale(0.97); }

#news-scroll-hint {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0 2px;
  margin-bottom: -4px;
  background: linear-gradient(to bottom, transparent, rgba(10,8,22,0.72) 60%);
  color: rgba(192,132,252,0.85);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.25s ease;
  animation: scrollBounce 1.4s ease-in-out infinite;
}
#news-scroll-hint.hidden {
  opacity: 0;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(4px); }
}

.news-settings-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 6px rgba(168,85,247,0.9);
  display: inline-block;
  animation: newsPulse 2s infinite;
  margin-left: 2px;
  vertical-align: middle;
}

.news-tab-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.news-tab-item {
  background: rgba(255,255,255,0.042);
  border: 1px solid rgba(255,255,255,0.082);
  border-top-color: rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 14px 15px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.news-tab-emoji {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(168,85,247,0.22), rgba(232,121,249,0.14));
  border: 1px solid rgba(168,85,247,0.24);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.news-tab-title { font-size: 13px; font-weight: 700; color: #f5f5f7; margin:0 0 2px; }
.news-tab-desc  { font-size: 12px; color: rgba(255,255,255,0.55); line-height:1.5; margin:0 0 4px; }
.news-tab-hint  { font-size: 11px; font-weight:600; color: rgba(168,85,247,0.8); }
.news-tab-header {
  display: flex; align-items:center; justify-content:space-between;
  margin-bottom: 14px;
}
.news-tab-update-badge {
  display: inline-flex; align-items:center; gap:5px;
  padding: 3px 9px; border-radius:100px;
  background: rgba(168,85,247,0.18); border:1px solid rgba(168,85,247,0.35);
  font-size: 11px; font-weight:700; color:#c084fc; letter-spacing:0.04em;
}
/* ── News history accordion ── */
.news-acc-section { margin-bottom: 10px; }
.news-acc-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09);
  border-top-color: rgba(255,255,255,0.15); border-radius: 14px;
  padding: 11px 14px; cursor: pointer; transition: background 0.18s;
  font-family: inherit; color: #f5f5f7;
}
.news-acc-toggle:hover { background: rgba(255,255,255,0.07); }
.news-acc-toggle.is-open { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-color: transparent; }
.news-acc-toggle-left { display: flex; align-items: center; gap: 8px; }
.news-acc-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 100px; font-size: 10px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.news-acc-badge.new {
  background: rgba(168,85,247,0.22); border: 1px solid rgba(168,85,247,0.42); color: #c084fc;
}
.news-acc-badge.old {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); color: rgba(245,245,247,0.45);
}
.news-acc-date { font-size: 12px; font-weight: 600; }
.news-acc-chevron {
  width: 16px; height: 16px; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.4); transition: transform 0.22s ease; flex-shrink: 0;
}
.news-acc-toggle.is-open .news-acc-chevron { transform: rotate(180deg); }
.news-acc-body {
  background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.09);
  border-top: none; border-bottom-left-radius: 14px; border-bottom-right-radius: 14px;
  padding: 10px 10px 12px; display: none;
}
.news-acc-body.is-open { display: block; }
