/* BEYONDV Portal - Seitengerüst (Overhaul 06.10.2026, wie der Launcher): schwebende Leiste oben mit gleitender
   Markierung, Konto-Menü rechts, Seite, große Fußzeile, Navigation unten am Handy. Die alte Seitenleiste ist weg. */

.app { position: relative; z-index: var(--z-app); }
.main {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  transition: padding-right var(--slow) var(--ease);
}
.page {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--s5) var(--s6) var(--s7);
}
.page.wide { max-width: none; }
.page.full { padding: 0; max-width: none; display: flex; flex-direction: column; }

/* ================================================================= Leiste oben */
.topnav {
  position: sticky; top: 0; z-index: 30;
  padding: 12px var(--s6) 0;
  pointer-events: none;
}
.tn-inner {
  pointer-events: auto;
  position: relative;
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: var(--s4);
  height: 60px; padding: 0 10px 0 14px;
  border-radius: var(--r-lg);
  background: rgba(14, 16, 15, 0.78);
  border: 1px solid var(--stroke2);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(16px) saturate(1.25);
  transition: background-color var(--slow) var(--ease), box-shadow var(--slow) var(--ease);
}
body.scrolled .tn-inner { background: rgba(14, 16, 15, 0.94); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
/* Lesefortschritt auf langen Seiten (lib/effects.js setzt --scroll-p) */
.tn-inner::after {
  content: ''; position: absolute; left: 18px; right: 18px; bottom: -1px; height: 2px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, var(--a2), var(--a));
  transform-origin: 0 50%; transform: scaleX(var(--scroll-p, 0));
  box-shadow: 0 0 10px rgba(var(--a-rgb), 0.55);
}
.tn-brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; color: var(--text); }
.tn-brand .mark { width: 34px; height: 34px; filter: drop-shadow(0 2px 8px rgba(var(--a-rgb), 0.35)); transition: transform 0.45s var(--spring); }
.tn-brand:hover .mark { transform: rotate(-10deg) scale(1.08); }
.tn-brand .word { display: flex; flex-direction: column; line-height: 1.05; }
.tn-brand .word b { font-size: 16px; font-weight: 600; letter-spacing: 0.2em; }
.tn-brand .word small { font-size: 10px; letter-spacing: 0.42em; color: var(--text-dim); }
.tn-brand:hover { color: var(--text); }

.tn-links { position: relative; display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.tn-link {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px;
  border-radius: var(--r-pill);
  color: var(--text-dim); font-size: 14.5px; white-space: nowrap;
  transition: color var(--normal) var(--ease), transform 0.3s var(--spring);
}
.tn-link .ic { --size: 18px; transition: transform 0.35s var(--spring), color var(--normal) var(--ease); }
.tn-link:hover { color: var(--text); }
.tn-link:hover .ic { transform: translateY(-1px) scale(1.12) rotate(-6deg); }
.tn-link.active { color: var(--on-a); }
.tn-link.active .ic { color: var(--on-a); }
.tn-link:active { transform: scale(0.96); }
/* Gleitende Markierung: eine leuchtende Pille wandert zum aktiven Eintrag (Shell#Topnav) */
.tn-ind {
  position: absolute; left: 0; top: 50%; height: 40px; width: 0; margin-top: -20px;
  border-radius: var(--r-pill); pointer-events: none; opacity: 0; z-index: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--a) 92%, white 8%), var(--a2));
  box-shadow: 0 6px 18px rgba(var(--a-rgb), 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.tn-ind[data-ready] { transition: transform 0.5s cubic-bezier(0.22, 1.25, 0.36, 1), width 0.35s var(--out), opacity var(--normal) var(--ease); }
.tn-ind.moving { animation: tn-stretch 0.5s var(--out); }
@keyframes tn-stretch { 40% { scale: 1.06 0.86; } }
.tn-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.tn-status {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
  border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke);
  color: var(--text); font-size: 13px; white-space: nowrap;
  transition: border-color var(--normal) var(--ease), background-color var(--normal) var(--ease);
}
.tn-status:hover { border-color: var(--stroke3); color: var(--text); }
.tn-status .dim { color: var(--text-dim); }
.mobile-only { display: none; }

/* Konto-Menü (Kopf + Name, aufklappend) */
.acct { position: relative; }
.acct-btn {
  display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 10px 0 5px;
  border-radius: var(--r-pill); border: 1px solid var(--stroke2); background: rgba(255, 255, 255, 0.03);
  color: var(--text); transition: border-color var(--normal) var(--ease), background-color var(--normal) var(--ease);
}
.acct-btn:hover, .acct-btn[aria-expanded='true'] { border-color: rgba(var(--a-rgb), 0.5); background: rgba(var(--a-rgb), 0.06); }
.acct-btn .head { border-radius: 50%; overflow: hidden; }
.acct-btn .who { display: flex; flex-direction: column; line-height: 1.1; text-align: left; max-width: 150px; }
.acct-btn .who b { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-btn .who span { font-size: 11px; color: var(--text-dim); }
.acct-btn .ic { --size: 16px; color: var(--text-dim); transition: transform var(--normal) var(--ease); }
.acct-btn[aria-expanded='true'] > .ic { transform: rotate(180deg); }
.acct-btn .badge { top: -3px; right: -3px; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 50;
  min-width: 250px; padding: 6px;
  border-radius: var(--r); background: var(--panel-a-strong); border: 1px solid var(--stroke2);
  box-shadow: var(--shadow-strong);
  animation: tn-drop 0.22s var(--out) both;
  transform-origin: 90% 0;
}
@keyframes tn-drop { from { opacity: 0; transform: translateY(-6px) scale(0.96); } }
.menu-pop .m-title { padding: 8px 12px 4px; font-size: 11px; letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--text-muted); }
.menu-pop a, .menu-pop button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 12px;
  border-radius: var(--r-sm); color: var(--text); font-size: 14.5px; text-align: left;
  transition: background-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.menu-pop a:hover, .menu-pop button:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.menu-pop a .ic, .menu-pop button .ic { --size: 18px; color: var(--a); }
.menu-pop .count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--a); color: var(--on-a); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.menu-pop hr { margin: 6px 4px; border-top-color: var(--stroke); }

/* Glocke */
.bell { position: relative; }
.bell > .btn { border-radius: 50%; }
.bell-panel {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: min(380px, calc(100vw - 24px));
  max-height: 70vh; overflow: auto;
  background: var(--panel-a-strong); border: 1px solid var(--stroke2); border-radius: var(--r);
  box-shadow: var(--shadow-strong);
  animation: tn-drop 0.22s var(--out) both;
  z-index: 50;
}
.notif {
  position: relative; display: flex; gap: var(--s3); align-items: flex-start;
  padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line);
  color: var(--text-dim); text-align: left; width: 100%;
  transition: background-color var(--fast) var(--ease);
}
.notif:hover { background: rgba(255, 255, 255, 0.04); }
.notif.unread { color: var(--text); }
.notif.unread::after { content: ''; position: absolute; right: 14px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(var(--a-rgb), 0.7); }
.notif .ic { color: var(--a); }
.notif .n-title { font-size: 14px; color: var(--text); padding-right: 16px; }
.notif .n-body { font-size: 13px; }
.notif .n-time { font-size: 12px; color: var(--text-muted); }
.bell.ring .btn .ic { animation: bv-bell 900ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; transform-origin: 50% 10%; }
.bell.ring .badge { animation: bv-pop 420ms var(--spring) both; }
@keyframes bv-bell {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); }
  60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); }
}
:root[data-motion='off'] .bell.ring .btn .ic { animation: none; }
@media (prefers-reduced-motion: reduce) { .bell.ring .btn .ic { animation: none; } }

/* ================================================================= Fußzeile */
.footer {
  margin-top: var(--s7);
  padding: 0 var(--s6) calc(var(--s5) + 76px);
}
.ft-inner {
  max-width: 1400px; margin: 0 auto;
  border-radius: var(--r-xl); border: 1px solid var(--stroke);
  background: linear-gradient(160deg, rgba(var(--a-rgb), 0.05), rgba(20, 23, 22, 0.75) 35%, rgba(14, 16, 15, 0.85));
  padding: var(--s6) var(--s6) var(--s5);
}
.ft-top { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.ft-brand { display: flex; flex-direction: column; gap: 12px; }
.ft-brand .tn-brand .mark { width: 42px; height: 42px; }
.ft-brand p { color: var(--text-dim); font-size: 14px; max-width: 34ch; margin: 0; }
.ft-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: var(--track-wide); color: var(--text-muted); font-weight: 500; margin-bottom: 10px; }
.ft-col a { display: flex; align-items: center; gap: 8px; min-height: 32px; color: var(--text-dim); font-size: 14.5px; transition: color var(--fast) var(--ease), transform var(--normal) var(--spring); }
.ft-col a:hover { color: var(--text); transform: translateX(3px); }
.ft-col a .ic { --size: 15px; color: var(--a); opacity: 0.8; }
.ft-bottom {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5);
  margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--stroke);
  font-size: 12.5px; color: var(--text-muted);
}
.footer .toggles { margin-left: auto; display: flex; gap: var(--s4); flex-wrap: wrap; }
.footer .toggle { min-height: 36px; font-size: 13px; color: var(--text-dim); }
@media (max-width: 1000px) { .ft-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ft-brand { grid-column: 1 / -1; } }

/* ================================================================= Handy */
.bottom-nav { display: none; }
@media (max-width: 1060px) {
  .tn-links { display: none; }
  .tn-right { margin-left: auto; }
}
@media (max-width: 900px) {
  .main { padding-bottom: 76px; }
  .topnav { padding: 8px var(--s3) 0; }
  .tn-inner { height: 56px; padding: 0 8px 0 10px; gap: var(--s2); }
  .tn-brand .word small { display: none; }
  .acct-btn .who { display: none; }
  .acct-btn { padding: 0 6px 0 4px; }
  .page { padding: var(--s4) var(--s4) var(--s6); }
  .footer { padding: 0 var(--s3) calc(var(--s4) + 84px); }
  .ft-inner { padding: var(--s5) var(--s4) var(--s4); border-radius: var(--r-lg); }
  .footer .toggles { margin-left: 0; }
  .bottom-nav {
    position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: calc(var(--z-dock) + 1);
    display: grid; grid-template-columns: repeat(5, 1fr);
    height: 64px; border-radius: var(--r-lg);
    background: rgba(14, 16, 15, 0.94); border: 1px solid var(--stroke2);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(14px);
  }
  .bottom-nav a, .bottom-nav button {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 11px; color: var(--text-dim); min-height: 56px;
  }
  .bottom-nav .ic { --size: 22px; color: var(--icon); transition: transform 0.35s var(--spring); }
  .bottom-nav .active { color: var(--text); }
  .bottom-nav .active .ic { color: var(--a); transform: translateY(-2px); }
  .bottom-nav .badge { top: 6px; right: calc(50% - 22px); }
  .bn-ink { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; pointer-events: none; }
  .bn-ink::after { content: ''; position: absolute; left: 6px; right: 6px; top: 6px; bottom: 6px; border-radius: var(--r); background: rgba(var(--a-rgb), 0.12); border: 1px solid rgba(var(--a-rgb), 0.28); }
  .bn-ink[data-ready] { transition: transform 420ms cubic-bezier(0.22, 1.2, 0.36, 1), width var(--normal) var(--ease), opacity var(--normal) var(--ease); }
  .dock-fab { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); right: var(--s4); height: 48px; }
  .dock-fab .lbl { display: none; }
  .dock-fab:not(.unread) { display: none; }
  .dock:not(.pinned) { right: 8px; left: 8px; width: auto; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); height: calc(100dvh - 170px); }
  .dock.pinned { top: 0; bottom: 0; width: 100vw; z-index: calc(var(--z-dock) + 2); }
  .toasts { top: auto; bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 480px) {
  .tn-right > a.btn.small:not(.primary) { display: none; }
  .tn-status .dim { display: none; }
}
.more-sheet {
  position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: var(--z-overlay);
  max-height: 80dvh; overflow: auto;
  border-radius: var(--r-xl);
  background: var(--panel-a-strong); border: 1px solid var(--stroke2);
  padding: var(--s4) var(--s3) calc(var(--s5) + env(safe-area-inset-bottom, 0px));
  animation: bv-sheet 320ms var(--spring) both;
}
.more-sheet .g-title { padding: 8px 12px 4px; font-size: 11px; letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--text-muted); }
.more-sheet .nav-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: var(--r-sm); color: var(--text); font-size: 15px; }
.more-sheet .nav-item:hover { background: rgba(255, 255, 255, 0.05); }
.more-sheet button.nav-item { width: 100%; text-align: left; }
.more-sheet .nav-item .ic { color: var(--a); }
.more-sheet .sb-group { margin-bottom: var(--s3); }
@keyframes bv-sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ================================================================= Seitenkopf
   Jede Seite bekommt ein Band mit einer unserer Szenen (Shell setzt --page-scene), Titel groß darüber */
.page-head {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s4);
  margin-bottom: var(--s5);
  min-height: 210px; padding: var(--s6) var(--s6) var(--s5);
  border-radius: var(--r-xl); border: 1px solid var(--stroke2);
  background: #0b0d0c;
  box-shadow: var(--shadow);
}
.page-head::before {
  content: ''; position: absolute; inset: -4px; z-index: -2;
  background: var(--page-scene, none) center 58% / cover no-repeat;
  filter: saturate(1.05);
  transform: scale(1.03);
  transition: transform 6s var(--out);
}
.page-head:hover::before { transform: scale(1.06); }
.page-head::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 9, 10, 0.92) 0%, rgba(8, 9, 10, 0.72) 45%, rgba(8, 9, 10, 0.25) 100%),
    linear-gradient(0deg, rgba(8, 9, 10, 0.75), transparent 60%);
}
.page-head .ph-text { flex: 1 1 340px; min-width: 0; }
.page-head h1 { font-size: clamp(30px, 4.2vw, 50px); text-transform: uppercase; letter-spacing: 0.05em; margin-top: var(--s2); text-shadow: 0 4px 24px rgba(0, 0, 0, 0.7); hyphens: auto; overflow-wrap: anywhere; } /* "NUTZUNGSBEDINGUNGEN" am Handy */
.page-head p { color: #cfcabd; max-width: 70ch; margin-top: var(--s2); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); }
.page-head .ph-actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
@media (max-width: 900px) { .page-head { min-height: 170px; padding: var(--s5) var(--s4) var(--s4); border-radius: var(--r-lg); } }
.section { margin-top: var(--s6); }
.section:first-child { margin-top: 0; }
.section-title { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s4); }
.section-title h2 { font-size: 15px; text-transform: uppercase; letter-spacing: var(--track-caps); white-space: nowrap; }
.section-title::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; box-shadow: 0 0 10px rgba(var(--a-rgb), 0.6); }
.section-title .line { flex: 1 1 auto; height: 1px; background: linear-gradient(90deg, var(--stroke2), transparent); }

/* Lichtlinie beim Seitenwechsel (lib/transitions.js) */
.route-bar {
  position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 95;
  pointer-events: none; opacity: 0;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, rgba(var(--a-rgb), 0), var(--a) 35%, #e6f7b8 85%, #ffffff);
  box-shadow: 0 0 12px rgba(var(--a-rgb), 0.7);
}

/* Live-Werte (ui.js#Ticker) */
.ticker { display: inline-block; }

/* ================================================================= Neustart-Countdown (RestartStrip)
   Unter der Leiste auf jeder Seite, solange die Mod einen Neustart oder Stopp ansagt. Farbe wie das Banner im Spiel
   (AnnouncementHud: 0xD65A44); der Balken schrumpft mit der Restzeit. */
.restart-strip {
  --rs: #e0644f;
  position: sticky; top: var(--topbar); z-index: 29;
  display: flex; align-items: center; gap: var(--s3);
  max-width: 1400px; width: calc(100% - 2 * var(--s6)); margin: 10px auto 0;
  padding: 10px var(--s5) 12px;
  border-radius: var(--r);
  background: linear-gradient(90deg, color-mix(in srgb, var(--rs) 24%, rgba(14, 16, 15, 0.96)), rgba(14, 16, 15, 0.96) 70%);
  border: 1px solid color-mix(in srgb, var(--rs) 45%, transparent);
  overflow: hidden;
  animation: bv-strip-in 420ms var(--ease) both;
}
.restart-strip.stop { --rs: var(--danger); }
.restart-strip.going { --rs: var(--warn); }
.restart-strip > .ic { color: var(--rs); flex: none; }
.restart-strip .spin { animation: bv-spin 2.6s linear infinite; }
.restart-strip .rs-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.restart-strip .rs-text b { font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: var(--track-caps); }
.restart-strip .rs-time { margin-left: auto; flex: none; font-size: 21px; line-height: 1; color: var(--rs); font-variant-numeric: tabular-nums; text-shadow: 0 0 14px color-mix(in srgb, var(--rs) 55%, transparent); }
.restart-strip.final .rs-time { animation: bv-blink 1s steps(1) infinite; }
.restart-strip .rs-bar {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 3px;
  background: var(--rs); box-shadow: 0 0 12px var(--rs);
  transform-origin: 0 50%; transform: scaleX(var(--p, 1)); transition: transform 250ms linear;
}
.restart-strip .rs-bar.indeterminate { width: 28%; transform: none; transition: none; animation: bv-strip-sweep 1.5s var(--ease-io) infinite; }
@keyframes bv-strip-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes bv-strip-sweep { from { transform: translateX(-110%); } to { transform: translateX(370%); } }
@media (max-width: 900px) {
  .restart-strip { width: calc(100% - 2 * var(--s3)); padding: 8px var(--s4) 10px; top: 70px; }
  .restart-strip .rs-text .dim { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .restart-strip, .restart-strip .spin, .restart-strip.final .rs-time, .restart-strip .rs-bar.indeterminate { animation: none; }
}
.more-sheet .nav-item { text-transform: none; letter-spacing: 0.01em; }
