/* ═══ „Was ist neu?“-Popup ═══════════════════════════════════════════════
   Aufbau: Kopf (fest) · Scrollbereich (Highlights groß, Rest als Liste) · Fuß (fest).
   Glas-Fläche, Rand und Schatten kommen aus liquid.css. Am Handy: Blatt von unten. */
#news-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
#news-popup-overlay.visible { opacity: 1; pointer-events: auto; }

#news-popup {
  --np-acc: rgb(var(--a-c084fc,192,132,252));
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(520px, 100%);
  max-height: min(86vh, 760px);
  overflow: hidden;
  padding: 0;
  color: #f5f5f7;
  text-align: left;
  transform: translateY(14px) scale(.96);
  opacity: 0;
  transition: transform .45s cubic-bezier(.32,1.26,.54,1), opacity .25s ease;
}
#news-popup-overlay.visible #news-popup { transform: none; opacity: 1; }
/* farbiger Schein oben hinter dem Kopf */
#news-popup::after {
  content: '';
  position: absolute;
  inset: -40% -20% auto;
  height: 300px;
  background:
    radial-gradient(closest-side at 30% 60%, rgba(var(--a-a855f7,168,85,247),0.30), transparent),
    radial-gradient(closest-side at 75% 50%, rgba(var(--a-e879f9,232,121,249),0.20), transparent);
  pointer-events: none;
  z-index: 0;
}
#news-popup > * { position: relative; z-index: 1; }

.np-grabber { display: none; }

/* ── Kopf ── */
.np-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 26px 24px 18px;
}
.np-hero {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 16px;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(145deg, rgb(var(--a-a855f7,168,85,247)) 0%, rgb(var(--a-d946ef,217,70,239)) 100%);
  box-shadow: 0 10px 26px rgba(var(--a-a855f7,168,85,247),0.23), inset 0 1px 0 rgba(255,255,255,0.35);
}
.np-hero svg { animation: npTwinkle 3.2s ease-in-out infinite; }
@keyframes npTwinkle {
  0%, 100% { transform: rotate(0) scale(1); }
  50%      { transform: rotate(-8deg) scale(1.08); }
}
.np-head-text { flex: 1; min-width: 0; }
.news-popup-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 100px;
  background: rgba(var(--a-a855f7,168,85,247),0.18);
  border: 1px solid rgba(var(--a-c084fc,192,132,252),0.35);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgb(var(--a-d8b4fe,216,180,254));
  margin-bottom: 8px;
}
.news-popup-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgb(var(--a-c084fc,192,132,252));
  box-shadow: 0 0 8px rgba(var(--a-c084fc,192,132,252),0.45);
  animation: newsPulse 2s infinite;
}
@keyframes newsPulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.5; transform:scale(0.7); }
}
.news-popup-title {
  font-size: 27px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0;
  background: linear-gradient(120deg, #fff 0%, rgb(var(--a-f0e4ff,240,228,255)) 45%, rgb(var(--a-d8b4fe,216,180,254)) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.np-sub {
  margin: 5px 0 0;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
}
.news-popup-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── Scrollbereich mit weichen Kanten ── */
.np-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 20px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
  --np-ft: 0px; --np-fb: 0px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--np-ft), #000 calc(100% - var(--np-fb)), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 var(--np-ft), #000 calc(100% - var(--np-fb)), transparent 100%);
}
.np-scroll.np-fade-top    { --np-ft: 22px; }
.np-scroll.np-fade-bottom { --np-fb: 36px; }

/* ── Punkte: kompakte Zeilen. Highlights oben farbig, Rest als „Außerdem neu“ ── */
.np-highlights, .np-list {
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}
.np-highlights {
  background: linear-gradient(160deg, rgba(var(--a-a855f7,168,85,247),0.20), rgba(var(--a-d946ef,217,70,239),0.07) 70%, rgba(255,255,255,0.02));
  border-color: rgba(var(--a-c084fc,192,132,252),0.28);
  border-top-color: rgba(var(--a-e9d5ff,233,213,255),0.38);
}
.np-highlights:empty { display: none; }
.np-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px 11px 12px;
}
.np-row + .np-row { border-top: 1px solid rgba(255,255,255,0.07); }
.np-icon {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  color: rgb(var(--a-e9d5ff,233,213,255));
  background: linear-gradient(145deg, rgba(var(--a-a855f7,168,85,247),0.30), rgba(var(--a-d946ef,217,70,239),0.16));
  border: 1px solid rgba(var(--a-c084fc,192,132,252),0.28);
}
.np-highlights .np-icon {
  color: #fff;
  background: linear-gradient(145deg, rgb(var(--a-a855f7,168,85,247)), rgb(var(--a-d946ef,217,70,239)));
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 4px 12px rgba(var(--a-a855f7,168,85,247),0.18);
}
.np-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.np-row-title { font-size: 14px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.np-row-desc { font-size: 12.5px; line-height: 1.45; color: rgba(255,255,255,0.62); }
.np-row-hint { font-size: 11px; font-weight: 600; color: rgb(var(--a-c4a5f5,196,165,245)); margin-top: 2px; }
.np-row-hint::before { content: '→ '; }

.np-more { margin-top: 16px; }
.np-more[hidden] { display: none; }
.np-label {
  margin: 0 4px 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.42);
}

.np-note {
  margin: 16px 8px 6px;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: rgba(255,255,255,0.38);
}
.np-note:empty { display: none; }

/* ── Fuß ── */
.news-popup-footer {
  display: flex;
  padding: 12px 20px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.news-dismiss-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 100px;
  background: linear-gradient(135deg, rgb(var(--a-a855f7,168,85,247)) 0%, rgb(var(--a-c084fc,192,132,252)) 100%);
  border: 1px solid rgba(var(--a-a855f7,168,85,247),0.55);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: -0.01em;
}
.news-dismiss-btn:active { transform: scale(0.98); }

/* ── Einblenden nacheinander ── */
.np-in { opacity: 0; transform: translateY(8px); }
#news-popup-overlay.visible .np-in {
  animation: npIn .45s cubic-bezier(.22,1,.36,1) forwards;
  animation-delay: calc(120ms + var(--i, 0) * 45ms);
}
@keyframes npIn { to { opacity: 1; transform: none; } }

/* ── Handy: Blatt von unten ── */
@media (max-width: 560px) {
  #news-popup-overlay { align-items: flex-end; padding: 0; }
  #news-popup-overlay #news-popup {
    width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    border-radius: 28px 28px 0 0 !important;
    border-bottom: 0 !important;
    transform: translateY(100%);
    opacity: 1;
    transition: transform .42s cubic-bezier(.32,.72,0,1);
  }
  #news-popup-overlay.visible #news-popup { transform: none; }
  .np-grabber {
    display: block;
    width: 38px; height: 5px;
    margin: 8px auto 0;
    border-radius: 3px;
    background: rgba(255,255,255,0.25);
  }
  .np-head { padding: 14px 18px 14px; gap: 12px; }
  .np-hero { width: 44px; height: 44px; border-radius: 14px; }
  .news-popup-title { font-size: 23px; }
  .np-scroll { padding: 2px 14px 8px; }
  .news-popup-footer { padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  #news-popup, #news-popup-overlay #news-popup { transition: opacity .2s ease !important; transform: none !important; }
  .np-in { opacity: 1; transform: none; }
  #news-popup-overlay.visible .np-in { animation: none; }
  .np-hero svg, .news-popup-badge::before { animation: none; }
}

.news-settings-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgb(var(--a-a855f7,168,85,247));
  box-shadow: 0 0 6px rgba(var(--a-a855f7,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(var(--a-a855f7,168,85,247),0.22), rgba(var(--a-e879f9,232,121,249),0.14));
  border: 1px solid rgba(var(--a-a855f7,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(var(--a-a855f7,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(var(--a-a855f7,168,85,247),0.18); border:1px solid rgba(var(--a-a855f7,168,85,247),0.35);
  font-size: 11px; font-weight:700; color:rgb(var(--a-c084fc,192,132,252)); 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(var(--a-a855f7,168,85,247),0.22); border: 1px solid rgba(var(--a-a855f7,168,85,247),0.42); color: rgb(var(--a-c084fc,192,132,252));
}
.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; }
