/* ════════════════════════════════════════════════════════════════════
   IOP NAVBAR — iop-nav.css
   Einzige Quelle für das Navbar-Styling. Alles ist auf .iopnav* gescoped.
   Regeln:
     - Keine Nav-Regeln mehr in iop-custom.css / iop-custom-v2.css / Seiten
     - Keine !important nötig (nur im Legacy-Block unten, bewusst)
     - Kein generisches "nav { }" (traf sonst auch Pagination & custom-nav)

   Stufen:
     > 1180px   Desktop, stufenlos skaliert (clamp)
     ≤ 1500px   Username im Button ausgeblendet (Avatar + Tokens bleiben)
     ≤ 1320px   Link-Icons ausgeblendet, News nur als Punkt
     ≤ 1180px   Mobile-Leiste: Burger | Logo | Avatar  (Drawer + Dropdown)
     ≤ 480px    Drawer vollbreit
════════════════════════════════════════════════════════════════════ */

/* ── GLOBALE VARIABLEN ──────────────────────────────────────────────
   Werden von vielen Seiten genutzt (var(--red), var(--iop-nav-h) …).
   Namen NICHT ändern. --nav-accent-* setzt das PVE/PVP-Farbtool.      */
:root {
  --iop-nav-h: 90px;
  --iop-nav-h-mobile: 64px;
  --red: #e63946;
  --red-dark: #c1121f;
  --red-glow: rgba(230,57,70,0.4);
  --orange: #f4752e;
  --gold: #ffd700;
  --bg: #080808; --bg2: #0d0d0d; --bg3: #161616;
  --border: rgba(230,57,70,0.25);
  --text: #f0f0f0; --muted: #777;
  --nav-accent-1: 230,57,70;
  --nav-accent-2: 244,117,46;
}

/* ── LEISTE ──────────────────────────────────────────────────────── */
.iopnav {
  /* Fluide Größen: wachsen/schrumpfen mit der Fensterbreite */
  --in-link-size: clamp(0.86rem, 0.42rem + 0.58vw, 1.1rem);
  --in-link-pad:  clamp(0.45rem, -0.6rem + 1vw, 0.75rem);
  --in-brand-size: clamp(1.25rem, 1.6vw, 2.82rem);   /* = bisheriger Inline-Wert */
  --in-sub-size: clamp(0.75rem, 0.35rem + 0.45vw, 1.07rem);
  --in-brand-gap: clamp(14px, -10px + 2vw, 40px);
  --in-side-pad: clamp(12px, 0.2rem + 0.9vw, 24px);

  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  height: var(--iop-nav-h);
  margin: 0;
  padding: 0;
  border: 0;
  background: #060404;
  box-shadow: 0 6px 32px 6px rgba(0,0,0,.85), 0 2px 10px rgba(0,0,0,.6);
  transform: none;
  font-family: 'Acme', system-ui, sans-serif;
}
/* Farbstrich unten (PVE/PVP-Tool färbt über --nav-accent-*) */
.iopnav::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(var(--nav-accent-1),.25) 8%, rgba(var(--nav-accent-1),1) 32%, rgba(var(--nav-accent-2),.95) 50%, rgba(var(--nav-accent-1),1) 68%, rgba(var(--nav-accent-1),.25) 92%, transparent 100%);
  box-shadow: 0 0 18px rgba(var(--nav-accent-1),.35);
  pointer-events: none;
}
.iopnav::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 38% 180% at 50% 50%, rgba(230,57,70,.05), transparent 65%);
  pointer-events: none;
}

/* Drei Spalten: links | Logo | rechts. Beide Seiten 1fr → Logo exakt mittig.
   Reicht der Platz nicht, bekommt die breitere Seite mehr, aber es gibt
   KEINE Überlappung mehr (Grid statt absoluter Positionierung). */
.iopnav-bar {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: var(--in-brand-gap);
  padding: 0 var(--in-side-pad);
  box-sizing: border-box;
}
.iopnav-side {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.iopnav-group { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── SPRACHE ─────────────────────────────────────────────────────── */
.iopnav-lang { position: relative; }
.iopnav-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 9px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(230,57,70,.3);
  border-radius: 6px;
  --c: #888;
  font: inherit; font-size: .85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .2s, color .2s;
}
.iopnav-chip:hover { border-color: rgba(230,57,70,.6); --c: #ccc; }
.iopnav-lang-menu {
  display: none;
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 160px; padding: 4px 0;
  background: #111;
  border: 1px solid rgba(230,57,70,.3);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.6);
  z-index: 10020;
}
.iopnav-lang.is-open .iopnav-lang-menu { display: block; animation: iopnavFade .18s ease-out; }
.iopnav-lang-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 14px;
  background: none; border: 0;
  --c: #ccc; font: inherit; font-size: 1rem; text-align: left;
  cursor: pointer;
}
.iopnav-lang-menu button:hover { background: rgba(230,57,70,.1); --c: var(--red); }

/* ── IOP NEWS ────────────────────────────────────────────────────── */
.iopnav-news {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 10px;
  background: rgba(244,117,46,.08);
  border: 1px solid rgba(244,117,46,.3);
  border-radius: 6px;
  --c: var(--orange);
  font-size: .8rem; letter-spacing: .03em;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, border-color .2s;
}
.iopnav-news:hover { background: rgba(244,117,46,.15); border-color: rgba(244,117,46,.6); text-decoration: none; }
.iopnav-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
  animation: iopnavPulse 1.8s ease-in-out infinite;
}
@keyframes iopnavPulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(244,117,46,.5); }
  50%      { opacity: .7; transform: scale(1.2); box-shadow: 0 0 0 4px rgba(244,117,46,0); }
}

/* ── HAUPTLINKS ──────────────────────────────────────────────────── */
.iopnav-links { display: flex; align-items: center; flex-shrink: 0; }
.iopnav-link {
  position: relative;
  display: flex; align-items: center; gap: .32em;
  padding: .35rem var(--in-link-pad);
  --c: rgba(200,200,200,.65);
  font-size: var(--in-link-size);
  font-weight: 600;
  letter-spacing: .06em;
  text-decoration: none;
  white-space: nowrap;
  transition: color .3s;
}
.iopnav-link:hover, .iopnav-link:focus { --c: rgba(225,225,225,.92); text-decoration: none; }
.iopnav-link i {
  font-size: .62em;
  color: rgba(180,180,180,.6);
  opacity: .7;
  transition: color .3s, opacity .3s;
}
.iopnav-link::after {
  content: '';
  position: absolute; bottom: 2px; left: 50%; right: 50%; height: 2px;
  background: var(--red);
  box-shadow: 0 0 5px rgba(230,57,70,.4);
  transition: left .32s, right .32s;
}
.iopnav-link:hover i, .iopnav-link.is-active i { opacity: 1; color: var(--red); }
.iopnav-link:hover::after, .iopnav-link.is-active::after { left: 8%; right: 8%; }

/* ── LOGO ────────────────────────────────────────────────────────── */
.iopnav-brand {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  text-decoration: none;
  white-space: nowrap;
}
.iopnav-brand:hover { text-decoration: none; }
.iopnav-brand::before, .iopnav-brand::after {
  content: '';
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 1px; height: 28px;
  background: linear-gradient(to bottom, transparent, rgba(230,57,70,.35), transparent);
}
.iopnav-brand::before { left: calc(var(--in-brand-gap) / -2); }
.iopnav-brand::after  { right: calc(var(--in-brand-gap) / -2); }
.iopnav-brand img {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -62%);
  width: 60px; height: 60px;
  object-fit: contain;
  opacity: .67;
  filter: drop-shadow(0 0 14px rgba(230,57,70,.6));
  pointer-events: none;
}
.iopnav-brand-text {
  position: relative;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: var(--in-brand-size);
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1;
  background: linear-gradient(135deg, #e63946, #f4752e);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; --c: transparent;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,1));
  transition: transform .3s, filter .3s;
}
.iopnav-brand:hover .iopnav-brand-text {
  transform: scale(1.04);
  filter: drop-shadow(0 0 12px rgba(230,57,70,.55)) drop-shadow(0 2px 8px rgba(0,0,0,1));
}
.iopnav-brand-sub {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  margin-top: 4px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: var(--in-sub-size);
  font-style: italic;
  letter-spacing: .28em;
  line-height: 1;
  --c: #ccc;
  text-shadow: 0 0 8px #000;
}
.iopnav-brand-sub::before, .iopnav-brand-sub::after {
  content: '';
  width: 22px; height: 1px;
  background: linear-gradient(270deg, transparent, rgba(210,210,210,.55));
}
.iopnav-brand-sub::after { transform: scaleX(-1); }

/* ── USER-BUTTON ─────────────────────────────────────────────────── */
.iopnav-auth { position: relative; }
.iopnav-user {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px 0 6px;
  background: rgba(230,57,70,.04);
  border: 1px solid rgba(230,57,70,.35);
  border-radius: 8px;
  --c: #ccc; font: inherit;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.iopnav-user:hover { border-color: rgba(230,57,70,.6); box-shadow: 0 0 14px rgba(230,57,70,.12); }
.iopnav-avatar {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--red);
}
.iopnav-name {
  max-width: 120px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .98rem; letter-spacing: .05em; --c: #eee;
}
.iopnav .iopnav-tokens {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  background: rgba(255,215,0,.08);
  border: 1px solid rgba(255,215,0,.28);
  border-radius: 4px;
  --c: var(--gold);
  font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  white-space: nowrap;
}
.iopnav .iopnav-tokens::after {
  content: '';
  position: absolute; top: 0; left: 0; width: 60%; height: 100%;
  background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,.7) 50%, transparent 80%);
  transform: translateX(-200%);
  animation: iopnavShimmer 3s ease-in-out infinite;   /* Takt wie früher */
  pointer-events: none;
  z-index: 2;
}
/* Bewegt per transform statt left: eine alte "left: … !important"-Regel
   kann die Animation so nicht mehr einfrieren. */
@keyframes iopnavShimmer { 0% { transform: translateX(-200%); } 62%, 100% { transform: translateX(270%); } }
.iopnav-chevron { font-size: .55rem; color: #666; transition: transform .2s; }
.iopnav-auth.is-open .iopnav-chevron { transform: rotate(180deg); }

.iopnav-login {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 18px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-radius: 8px;
  --c: #fff; font-size: .85rem; font-weight: 700;
  text-decoration: none;
  transition: opacity .2s;
}
.iopnav-login:hover { opacity: .85; text-decoration: none; }

/* ── USER-DROPDOWN ───────────────────────────────────────────────── */
.iopnav-dd {
  display: none;
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 250px;
  max-height: calc(100vh - var(--iop-nav-h) - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #0c0c0c;
  border: 1px solid rgba(230,57,70,.2);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.9);
  z-index: 10010;
  scrollbar-width: thin;
  scrollbar-color: rgba(230,57,70,.35) transparent;
}
.iopnav-auth.is-open .iopnav-dd { display: block; animation: iopnavFade .2s ease-out; }
@keyframes iopnavFade { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.iopnav-dd-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(to bottom, rgba(230,57,70,.08), transparent);
}
.iopnav-dd-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--red); }
.iopnav-dd-name { --c: #fff; font-size: .95rem; font-weight: 700; line-height: 1.1; }
.iopnav-dd-sub { margin-top: 3px; --c: var(--red); font-size: .72rem; font-style: italic; }
.iopnav-dd-section { padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.iopnav-dd-section:last-child { border-bottom: 0; }
.iopnav-dd-section:empty { display: none; }
.iopnav-dd-item {
  --c: #ccc; --ic: #555;
  display: flex; align-items: center; gap: 10px;
  width: 100%; box-sizing: border-box;
  padding: 8px 18px;
  background: none; border: 0;
  font: inherit; font-size: .84rem; text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.iopnav-dd-item:hover, .iopnav-dd-item:focus { background: rgba(255,255,255,.05); --c: #fff; text-decoration: none; }
.iopnav-dd-item i, .iopnav-dd-item img { width: 15px; flex: 0 0 15px; text-align: center; font-size: .85rem; color: var(--ic); object-fit: contain; }
/* ── Farbschema Dropdown ──────────────────────────────────────────
   Standard: Text grau, Icon dunkelgrau, Hover Text weiß / Icon hell.
   Shops (--red/--orange/--gold): Text + Icon farbig.
   IOP-Features (iopnav-ic-*): nur das Icon farbig, Text bleibt grau.  */
.iopnav-dd-item:hover i, .iopnav-dd-item:focus i { color: #aaa; }

.iopnav-dd-item--red    { --c: var(--red);  --ic: var(--red); }
.iopnav-dd-item--orange { --c: #ff8c00;     --ic: #ff8c00; }
.iopnav-dd-item--gold   { --c: var(--gold); --ic: var(--gold); }
.iopnav-dd-item--muted  { --c: #999; }
.iopnav-dd-item--logout { --c: #777; }
.iopnav-dd-item--logout:hover { --c: var(--red); --ic: var(--red); }

.iopnav-ic-gold  { --ic: var(--gold); }
.iopnav-ic-lila  { --ic: #a78bfa; }
.iopnav-ic-vote  { --ic: #f97316; }
.iopnav-ic-cyan  { --ic: #06b6d4; }
.iopnav-ic-green { --ic: #22c55e; }
.iopnav-ic-amber { --ic: #f59e0b; }
.iopnav-ic-red   { --ic: var(--red); }

/* Farbige Icons behalten beim Hover ihre Farbe */
.iopnav-dd-item[class*="--"]:hover i, .iopnav-dd-item[class*="iopnav-ic-"]:hover i,
.iopnav-dd-item[class*="--"]:focus i, .iopnav-dd-item[class*="iopnav-ic-"]:focus i { color: var(--ic); }

.iopnav .iopnav-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: .7rem; font-weight: 700;
}
.iopnav .iopnav-badge--red   { background: var(--red); --c: #fff; }
.iopnav .iopnav-badge--gold  { background: rgba(255,215,0,.15); border: 1px solid rgba(255,215,0,.4); --c: var(--gold); }
.iopnav .iopnav-badge--green { background: rgba(34,197,94,.12); --c: #22c55e; }
.iopnav .iopnav-badge--alert { background: rgba(230,57,70,.15); border: 1px solid rgba(230,57,70,.35); --c: var(--red); border-radius: 4px; font-size: .6rem; }

.iopnav-kick {
  display: none;
  margin: 4px 10px 8px; padding: 10px 14px;
  background: rgba(230,57,70,.08);
  border: 1px solid rgba(230,57,70,.25);
  border-radius: 8px;
  --c: #ccc; font-size: .78rem;
}
.iopnav-kick.is-open { display: block; }
.iopnav-kick-title { margin-bottom: 4px; --c: var(--red); font-weight: 600; }
.iopnav-kick-text { margin-bottom: 10px; --c: #888; font-size: .7rem; }
.iopnav-kick-actions { display: flex; gap: 8px; }
.iopnav-kick-actions form { display: inline; margin: 0; }
.iopnav-kick-actions button {
  padding: 5px 12px; border: 0; border-radius: 6px;
  font: inherit; font-size: .72rem; cursor: pointer;
}
.iopnav-kick-yes { background: var(--red); --c: #fff; }
.iopnav-kick-no  { background: rgba(255,255,255,.08); --c: #ccc; }

/* ── BURGER (nur mobil sichtbar) ─────────────────────────────────── */
.iopnav-burger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 40px; height: 40px; flex-shrink: 0;
  padding: 0;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(230,57,70,.25);
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.iopnav-burger:hover { background: rgba(230,57,70,.1); border-color: rgba(230,57,70,.5); }
.iopnav-burger span { display: block; width: 18px; height: 2px; background: #ccc; border-radius: 2px; transition: transform .3s, opacity .3s; }
.iopnav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.iopnav-burger.is-open span:nth-child(2) { opacity: 0; }
.iopnav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── DRAWER (Seiten-Navigation mobil) ────────────────────────────── */
.iopnav-backdrop {
  position: fixed; left: 0; right: 0; bottom: 0; top: var(--iop-nav-h);
  z-index: 9997;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.iopnav-drawer {
  position: fixed; left: 0; bottom: 0; top: var(--iop-nav-h);
  z-index: 9998;
  width: min(340px, 88vw);
  display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
  background: linear-gradient(180deg, #0b0707 0%, #060404 100%);
  border-right: 1px solid rgba(230,57,70,.25);
  box-shadow: 18px 0 40px rgba(0,0,0,.7);
  font-family: 'Acme', system-ui, sans-serif;
  transform: translateX(-102%);
  visibility: hidden;
  transition: transform .28s ease, visibility .28s;
}
.iopnav-drawer.is-open { transform: none; visibility: visible; }
.iopnav-drawer.is-open + .iopnav-backdrop { opacity: 1; visibility: visible; }

.iopnav-drawer-news {
  display: flex; align-items: center; gap: 12px;
  margin: 14px 14px 6px; padding: 12px 14px;
  background: rgba(244,117,46,.08);
  border: 1px solid rgba(244,117,46,.3);
  border-radius: 8px;
  --c: var(--orange); font-size: 1rem; text-decoration: none;
}
.iopnav-drawer-news:hover { background: rgba(244,117,46,.15); text-decoration: none; }
.iopnav-drawer-section { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.iopnav-drawer-label {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 22px 6px;
  --c: rgba(230,57,70,.8);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem; font-style: italic; letter-spacing: .12em;
}
.iopnav-drawer-label::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(230,57,70,.3), transparent); }
.iopnav-drawer-link {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 22px;
  --c: #bbb; font-size: 1.05rem; letter-spacing: .04em;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.iopnav-drawer-link i { width: 18px; text-align: center; font-size: .9rem; color: #555; transition: color .15s; }
.iopnav-drawer-link:hover, .iopnav-drawer-link:focus { background: rgba(255,255,255,.04); --c: #fff; text-decoration: none; }
.iopnav-drawer-link:hover i, .iopnav-drawer-link.is-active i { color: var(--red); }
.iopnav-drawer-link.is-active { --c: #fff; background: rgba(230,57,70,.07); }
.iopnav-drawer-link.is-active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; background: var(--red); border-radius: 0 2px 2px 0; }
.iopnav-drawer-langs { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 22px 14px; }
.iopnav-drawer-langs button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px;
  --c: #aaa; font: inherit; font-size: .85rem;
  cursor: pointer;
}
.iopnav-drawer-langs button.is-current { border-color: rgba(230,57,70,.5); --c: #fff; }
.iopnav-drawer-login { margin: 16px 18px; justify-content: center; height: 44px; }

/* ── SPARKY-BADGE (Klassen von Sparky-JS genutzt, nicht umbenennen) ─ */
.iop-sparky-nav { position: relative; }
.iop-sparky-badge {
  display: none;
  position: absolute; top: 50%; right: -8px;
  transform: translateY(-50%);
  min-width: 10px; height: 10px; padding: 0 3px;
  border-radius: 999px;
  background: #888;
  box-shadow: 0 0 0 2px rgba(0,0,0,.55);
  font: 700 10px/10px 'Acme', sans-serif;
  --c: #0a0a0a; color: #0a0a0a; text-align: center;
  animation: iop-sparky-pulse 1.8s ease-in-out infinite;
  pointer-events: none; user-select: none;
}
.iop-sparky-badge.is-visible { display: inline-block; }
.iop-sparky-badge[data-level="1"] { background: #22c55e; box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 8px rgba(34,197,94,.7); }
.iop-sparky-badge[data-level="2"] { background: #facc15; box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 8px rgba(250,204,21,.75); }
.iop-sparky-badge[data-level="3"] { background: #f97316; box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 10px rgba(249,115,22,.8); }
.iop-sparky-badge[data-level="4"] { background: #ef4444; box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 12px rgba(239,68,68,.85); }
.iop-sparky-badge.has-count { min-width: 16px; height: 16px; padding: 0 5px; font-size: 11px; line-height: 16px; right: -14px; }
@keyframes iop-sparky-pulse {
  0%, 100% { transform: translateY(-50%) scale(1); opacity: 1; }
  50%      { transform: translateY(-50%) scale(1.18); opacity: .78; }
}
.iopnav-drawer .iop-sparky-badge { position: static; transform: none; margin-left: auto; animation-name: iop-sparky-pulse-static; }
@keyframes iop-sparky-pulse-static {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.18); opacity: .78; }
}

/* ── TOKEN-MODAL + TOAST (unverändert übernommen) ────────────────── */
.iop-token-modal {
  display: none;
  position: fixed; inset: 0; z-index: 200000;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
  font-family: 'Acme', system-ui, sans-serif;
}
.iop-token-modal.is-open { display: flex; }
.iop-modal-box { background: #0d0d0d; border: 1px solid rgba(230,57,70,.25); border-radius: 14px; width: 90%; max-width: 440px; overflow: visible; box-shadow: 0 24px 80px rgba(0,0,0,.9); }
.iop-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.06); background: linear-gradient(to right, rgba(230,57,70,.08), transparent); color: #fff; font-size: .9rem; }
.iop-modal-head i { color: var(--gold); }
.iop-modal-close { background: none; border: none; color: #555; font-size: 1rem; cursor: pointer; transition: color .2s; padding: 0; }
.iop-modal-close:hover { color: var(--red); }
.iop-modal-body { padding: 18px; }
.iop-modal-hint { color: #666; font-size: .72rem; margin: 0 0 10px; }
.iop-modal-search { position: relative; }
.iop-modal-input { width: 100%; box-sizing: border-box; background: #111; border: 1px solid #222; border-radius: 8px; padding: 9px 12px; color: #fff; font-size: .82rem; font-family: inherit; outline: none; transition: border-color .2s; }
.iop-modal-input:focus { border-color: rgba(230,57,70,.5); }
.iop-search-results { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: #111; border: 1px solid #222; border-radius: 8px; max-height: 220px; overflow-y: auto; z-index: 300; }
.iop-search-results:empty { display: none; }
.iop-search-result { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,.04); transition: background .15s; }
.iop-search-result:hover { background: rgba(255,255,255,.04); }
.iop-search-result img { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--red); flex-shrink: 0; }
.iop-search-name { font-weight: 700; color: #fff; font-size: .78rem; }
.iop-search-sub { font-size: .67rem; color: #777; margin-top: 2px; }
.iop-search-empty { padding: 10px 14px; color: #555; font-size: .75rem; }
.iop-selected-user { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(230,57,70,.06); border: 1px solid rgba(230,57,70,.2); border-radius: 8px; margin-bottom: .5rem; }
.iop-selected-avatar { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--red); }
.iop-selected-name { font-size: .82rem; font-weight: 700; color: #fff; }
.iop-selected-sub { font-size: .7rem; color: #777; margin-top: 2px; }
.iop-modal-reset { margin-left: auto; background: none; border: none; color: #444; font-size: .9rem; cursor: pointer; transition: color .2s; }
.iop-modal-reset:hover { color: var(--red); }
.iop-modal-balance { font-size: .72rem; color: #888; margin: .75rem 0 4px; }
.iop-modal-balance span { color: var(--gold); font-weight: 700; }
.iop-modal-msgwrap { position: relative; margin-top: .5rem; }
.iop-modal-msgwrap textarea { resize: none; line-height: 1.5; padding-bottom: 24px; }
.iop-modal-count { position: absolute; bottom: 8px; right: 12px; font-size: .65rem; color: #555; }
.iop-modal-submit { width: 100%; margin-top: .75rem; padding: 10px; background: var(--red); color: #fff; border: none; border-radius: 8px; font-family: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; transition: opacity .2s; }
.iop-modal-submit:hover { opacity: .85; }
.iop-modal-status { margin-top: .5rem; font-size: .78rem; text-align: center; }
.iop-notify {
  position: fixed; top: calc(var(--iop-nav-h) + 10px); left: 50%; transform: translateX(-50%); z-index: 300000;
  display: inline-flex; align-items: center; gap: 10px;
  width: fit-content; max-width: min(400px, calc(100vw - 32px));
  padding: 10px 18px;
  background: #111; border: 1px solid rgba(34,197,94,.35); border-radius: 10px;
  color: #22c55e; font-family: 'Acme', sans-serif; font-size: .85rem; font-weight: 700;
  box-shadow: 0 8px 32px rgba(0,0,0,.7);
  animation: iopNotifyIn .3s ease-out;
}
.iop-notify-error { border-color: rgba(230,57,70,.4); color: var(--red); }
@keyframes iopNotifyIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%); } }

/* ── SCROLL-TO-TOP (mobil) ───────────────────────────────────────── */
.mob-scroll-top { display: none; }

/* ── FOKUS / BARRIEREFREIHEIT ────────────────────────────────────── */
.iopnav a:focus-visible, .iopnav button:focus-visible,
.iopnav-drawer a:focus-visible, .iopnav-drawer button:focus-visible {
  outline: 2px solid rgba(244,117,46,.8);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ════════════════════════════════════════════════════════════════════
   STUFEN
════════════════════════════════════════════════════════════════════ */
@media (max-width: 1500px) {
  .iopnav-name { display: none; }
  .iopnav-user { padding-right: 10px; }
}
@media (max-width: 1320px) {
  .iopnav-link i { display: none; }
  .iopnav-news-label { display: none; }
  .iopnav-news { width: 30px; padding: 0; justify-content: center; }
  .iopnav-brand-sub { letter-spacing: .2em; }
}

/* ── MOBILE-LEISTE ─────────────────────────────────────────────── */
@media (max-width: 1180px) {
  :root { --iop-nav-h: 64px; }
  .iopnav { --in-brand-size: clamp(1.15rem, 0.7rem + 1.6vw, 1.6rem); --in-side-pad: 12px; }
  .iopnav::before { display: none; }
  .iopnav-bar { grid-template-columns: 1fr auto 1fr; column-gap: 10px; }
  .iopnav-links, .iopnav-news, .iopnav-lang, .iopnav-brand-sub,
  .iopnav-brand::before, .iopnav-brand::after { display: none; }
  .iopnav-burger { display: flex; }
  .iopnav-side--end { justify-content: flex-end; }
  .iopnav-brand img { width: 40px; height: 40px; opacity: .5; transform: translate(-50%, -50%); }
  .iopnav-brand-text { letter-spacing: .08em; }
  .iopnav .iopnav-tokens { display: none; }
  .iopnav-chevron { display: none; }
  .iopnav-user { height: 40px; padding: 0 5px; }
  .iopnav-avatar { width: 30px; height: 30px; }
  .iopnav-login { height: 38px; padding: 0 14px; }
  .iopnav-dd { position: fixed; top: calc(var(--iop-nav-h) + 8px); right: 10px; left: auto; width: min(320px, calc(100vw - 20px)); }

  .mob-scroll-top {
    display: flex;
    position: fixed; bottom: 20px; left: 16px; z-index: 9990;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    background: rgba(6,4,4,.92);
    border: 1px solid rgba(230,57,70,.35);
    border-radius: 50%;
    color: var(--red); font-size: .85rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.6);
    cursor: pointer;
    opacity: 0; pointer-events: none;
    transition: opacity .3s;
  }
  .mob-scroll-top.visible { opacity: 1; pointer-events: auto; }
}
@media (max-width: 480px) {
  .iopnav-drawer { width: 100vw; border-right: 0; }
  .iopnav-brand-text { letter-spacing: .05em; }
  .iopnav-login span { display: none; }
  .iopnav-login { width: 38px; padding: 0; justify-content: center; }
}
@media (max-width: 340px) {
  .iopnav-brand-text { font-size: 1rem; letter-spacing: .02em; }
}

/* Alert-Leiste aktiv (GSA .nav-alert): Navbar rutscht 28px nach unten */
body.has-alert .iopnav { top: 28px; }
body.has-alert .iopnav-drawer, body.has-alert .iopnav-backdrop { top: calc(var(--iop-nav-h) + 28px); }

/* Keine Hover-Unterstreichung auf Touch-Geräten, die "hängen" bleibt */
@media (hover: none) {
  .iopnav-link:hover::after { left: 50%; right: 50%; }
  .iopnav-link.is-active::after { left: 8%; right: 8%; }
}
@media (prefers-reduced-motion: reduce) {
  .iopnav *, .iopnav *::before, .iopnav *::after,
  .iopnav-drawer, .iopnav-backdrop { animation: none !important; transition: none !important; }
}


/* ════════════════════════════════════════════════════════════════════
   SCHUTZSCHICHT gegen globale !important-Regeln
   iop-custom.css / iop-custom-v2.css enthalten seitenweite Regeln wie
     a { color: var(--orange) !important }
     p, span, div … { color: var(--text) !important }
     img[src] { opacity: 1 !important }
     nav, nav * { font-family: Acme !important }
     nav { height: 90px !important … }
   Diese dürfen dort bleiben (sie gelten für die ganze Seite).
   Trick: !important innerhalb eines @layer schlägt jedes !important
   außerhalb eines Layers – unabhängig von Selektor-Stärke.
   Farben NIE hier ändern, sondern oben über die Variable --c setzen.
════════════════════════════════════════════════════════════════════ */
@layer iopnav-guard {
  :is(.iopnav, .iopnav-drawer) :is(a, span, div, button, p, small, label) {
    color: var(--c, inherit) !important;
  }
  .iopnav {
    display: flex !important;
    align-items: stretch !important;
    height: var(--iop-nav-h) !important;
    padding: 0 !important;
    background: #060404 !important;
    overflow: visible !important;
  }
  .iopnav .iopnav-brand-text, .iopnav .iopnav-brand-sub, .iopnav-drawer .iopnav-drawer-label {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
  }
  .iopnav .iopnav-brand img { opacity: .67 !important; }
  .iopnav .iopnav-tokens { display: inline-flex !important; position: relative !important; overflow: hidden !important; }
  .iopnav .iopnav-tokens::after {
    content: '' !important; left: 0 !important; top: 0 !important; width: 60% !important;
    animation: iopnavShimmer 3s ease-in-out infinite !important;
  }
  @media (prefers-reduced-motion: reduce) {
    .iopnav .iopnav-tokens::after { animation: none !important; }
  }
  @media (max-width: 1320px) {
    .iopnav .iopnav-link i { display: none !important; }
  }
  @media (max-width: 1180px) {
    .iopnav .iopnav-chevron { display: none !important; }
    .iopnav .iopnav-brand img { opacity: .5 !important; }
    .iopnav .iopnav-tokens { display: none !important; }
  }
}

/* ════════════════════════════════════════════════════════════════════
   LEGACY — Chat-/Brain-Bubble mobil (war vorher im Nav-Blade)
════════════════════════════════════════════════════════════════════ */
@media (max-width: 1180px) {
  #brainBubbleBtn { width: 44px !important; height: 44px !important; bottom: 16px !important; right: 16px !important; }
  #brainBubbleBtn img { width: 28px !important; height: 28px !important; }
  #brainWindow { width: calc(100vw - 24px) !important; max-width: 100% !important; right: 12px !important; bottom: 70px !important; left: 12px !important; max-height: 70vh !important; }
}
