/* EMG Guide — Tesla-Like Immersive UX
   Full-screen 3D viewer with floating glass controls
   Font: Roboto Flex (self-hosted) | Accent: #00D4FF | Background: Pure Black */

/* Self-hosted Roboto Flex (DSGVO-konform, kein Google Fonts CDN) */
@font-face {
  font-family: 'Roboto Flex';
  font-style: normal;
  font-weight: 100 1000;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/roboto-flex-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Roboto Flex';
  font-style: normal;
  font-weight: 100 1000;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/roboto-flex-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* JetBrains Mono for technical data (electrode coords, muscle IDs, stats)
   Variable font, latin only (40KB) */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Screen-reader only: visible to crawlers & assistive tech, hidden visually */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip-to-content link (visible only on focus for keyboard users) */
.skip-link {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  background: var(--cyan, #00D4FF);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  z-index: 9999;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
}

:root {
  /* Brand — Cyan (primary) + Teal-deep (medical accent) */
  --cyan: #00D4FF;
  --cyan-soft: #6FE4FF;
  --cyan-dim: rgba(0, 212, 255, 0.12);
  --cyan-glow: rgba(0, 212, 255, 0.25);
  --teal-deep: #00A896;
  --green: #00e676;
  --amber: #ffb300;

  /* Surface */
  --black: #000000;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.10);
  --glass-strong: rgba(8, 10, 14, 0.75);

  /* Text */
  --text: #FFFFFF;
  --text-dim: #999999;
  --text-muted: #8a8a8a;  /* WCAG AA @12px: 5.74:1 contrast on #000 */

  /* Typography System */
  --font: 'Roboto Flex', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  --font-display: 'Roboto Flex', -apple-system, sans-serif;

  /* 3-tier Elevation — premium depth */
  --shadow-sm: 0 0 0 1px rgba(255,255,255,0.04), 0 1px 0 rgba(0,212,255,0.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.5), 0 0 1px rgba(0,212,255,0.1);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.06);
  --glow-cyan: 0 0 40px rgba(0,212,255,0.15);
  --glow-cyan-sm: 0 0 12px rgba(0,212,255,0.2);

  /* Motion */
  --ease-precision: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--black);
  color: var(--text);
  overscroll-behavior: contain;
  overflow: hidden;
}

/* Doc pages (Impressum, Datenschutz, Danke) — allow natural scrolling */
body.doc-page,
html:has(body.doc-page) {
  height: auto;
  min-height: 100%;
  overflow: auto;
  overscroll-behavior: auto;
}

/* ============================================================
   ATMOSPHERE — subtle depth layers over the 3D canvas
   (SVG noise + scanning line for "diagnostic monitor" feel)
   ============================================================ */

/* Noise texture: SVG feTurbulence inline (zero network request) */
.viewer-fullscreen::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='256' height='256'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 256px 256px;
  mix-blend-mode: overlay;
}

/* Scanning line — slow horizontal sweep, diagnostic monitor aesthetic */
.viewer-fullscreen::after {
  content: '';
  position: absolute;
  top: 0; left: -50%;
  width: 200%;
  height: 1px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 40%,
    rgba(0, 212, 255, 0.4) 50%,
    transparent 60%,
    transparent 100%
  );
  animation: scan-sweep 8s linear infinite;
  opacity: 0.6;
}

@keyframes scan-sweep {
  0%   { transform: translateX(-25%); }
  100% { transform: translateX(25%); }
}

/* Disable atmosphere for reduced-motion users */
@media (prefers-reduced-motion: reduce) {
  .viewer-fullscreen::after { animation: none; opacity: 0; }
}

/* ============================================================
   WELCOME OVERLAY (First Visit)
   ============================================================ */

.welcome-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0, 212, 255, 0.04) 0%, transparent 55%),
    rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: welcomeFadeIn 0.5s var(--ease-precision);
}

/* Welcome scanning line — medical monitor aesthetic */
.welcome-overlay::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan) 50%, transparent);
  opacity: 0.4;
  animation: welcome-pulse 3s ease-in-out infinite;
}
@keyframes welcome-pulse {
  0%, 100% { opacity: 0.15; transform: scaleX(0.6); }
  50%      { opacity: 0.5;  transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .welcome-overlay::before { animation: none; opacity: 0.3; }
}

.welcome-overlay.fade-out {
  animation: welcomeFadeOut 0.4s ease forwards;
}

@keyframes welcomeFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes welcomeFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.welcome-card {
  max-width: 480px;
  width: 90%;
  padding: 52px 44px 44px;
  background: linear-gradient(180deg, rgba(14, 16, 22, 0.92) 0%, rgba(8, 10, 14, 0.96) 100%);
  border: 1px solid var(--glass-border);
  text-align: center;
  box-shadow: var(--shadow-lg), var(--glow-cyan);
  position: relative;
}

/* Diagnostic corner marks — subtle "instrument frame" aesthetic */
.welcome-card::before,
.welcome-card::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  border-color: var(--cyan);
  border-style: solid;
  opacity: 0.5;
}
.welcome-card::before {
  top: 8px; left: 8px;
  border-width: 1px 0 0 1px;
}
.welcome-card::after {
  bottom: 8px; right: 8px;
  border-width: 0 1px 1px 0;
}

/* Kompakte Variante: nur Headline + CTA, keine Step-Liste */
.welcome-card-compact { padding: 44px 36px 36px; max-width: 420px; }
.welcome-card-compact .welcome-subtitle { margin-bottom: 28px; }

.welcome-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 28px;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--teal-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow-cyan-sm);
  position: relative;
}

.welcome-icon::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  animation: welcome-ring 2.5s ease-in-out infinite;
}

@keyframes welcome-ring {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-icon::after { animation: none; opacity: 0.3; }
}

.welcome-icon i {
  font-size: 26px;
  color: #000;
}

.welcome-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  font-stretch: 90%;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.1;
}

.welcome-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  margin-bottom: 32px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 500;
}

/* Welcome steps (action-oriented onboarding) */
.welcome-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  margin-bottom: 36px;
}

.welcome-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

.welcome-step-num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cyan);
  color: #000;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.welcome-cta {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(180deg, var(--cyan) 0%, var(--cyan-soft) 100%);
  border: none;
  color: #000;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--ease-precision);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: var(--glow-cyan-sm);
  position: relative;
  overflow: hidden;
}

.welcome-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s var(--ease-precision);
}

.welcome-cta:hover {
  box-shadow: var(--glow-cyan);
  transform: translateY(-1px);
}

.welcome-cta:hover::before { transform: translateX(100%); }

.welcome-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.welcome-source {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 14px;
  opacity: 0.75;
  line-height: 1.5;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}
.welcome-source-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--accent);
  text-decoration: none;
  font-size: 10.5px;
}
.welcome-source-link:hover { text-decoration: underline; }

/* ============================================================
   COACH MARKS — Guided First Moment (one-time per browser)
   ============================================================ */
.coach-mark {
  position: fixed;
  width: 300px;
  max-width: calc(100vw - 32px);
  padding: 16px 18px;
  background: rgba(8, 10, 14, 0.96);
  border: 1px solid rgba(0, 212, 255, 0.4);
  color: var(--text);
  font-family: var(--font);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 212, 255, 0.15);
  z-index: 1000;
  backdrop-filter: blur(14px);
  animation: coach-fade-in 0.28s ease-out;
}
@keyframes coach-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.coach-step {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.coach-text {
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 14px;
  color: var(--text);
}
.coach-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.coach-skip {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 2px;
  font-family: inherit;
}
.coach-skip:hover { color: var(--text-dim); }
.coach-next {
  background: var(--cyan);
  border: none;
  color: #000;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.02em;
}
.coach-next:hover { background: var(--cyan-soft); }
.coach-skip:focus-visible,
.coach-next:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
@media (max-width: 700px) {
  .coach-mark {
    left: 16px !important;
    right: 16px;
    width: auto;
    bottom: 20px;
    top: auto !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .coach-mark { animation: none; }
}

@media (max-width: 700px) {
  .welcome-card {
    padding: 36px 24px;
  }

  .welcome-title {
    font-size: 26px;
  }
}

/* ============================================================
   FULL-SCREEN VIEWER
   ============================================================ */

.viewer-fullscreen {
  position: fixed;
  inset: 0;
  background: var(--black);
  overflow: hidden;
}

#renderCanvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* Loading Skeleton */
.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.98);
  z-index: 50;
}

.loading-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* Diagnostic frame — corners + animated scan line + EKG pulse */
.loading-frame {
  position: relative;
  width: 240px;
  height: 120px;
  padding: 16px;
}

.loading-frame-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid var(--cyan);
  opacity: 0.6;
}
.loading-frame-corner--tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.loading-frame-corner--tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.loading-frame-corner--bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.loading-frame-corner--br { bottom: 0; right: 0; border-left: none; border-top: none; }

/* Horizontal scanning line sweeping top-down */
.loading-pulse-line {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan) 50%, transparent);
  opacity: 0.7;
  animation: loading-scan 2.4s var(--ease-smooth) infinite;
}

@keyframes loading-scan {
  0%   { transform: translateY(0); opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.8; }
  100% { transform: translateY(84px); opacity: 0; }
}

/* EKG heartbeat — slow pulse */
.loading-ekg {
  position: absolute;
  inset: 16px;
  display: flex;
  align-items: center;
  color: var(--cyan);
  opacity: 0.5;
}
.loading-ekg svg {
  width: 100%;
  height: 60%;
}
.loading-ekg polyline {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: ekg-draw 2.4s var(--ease-smooth) infinite;
}

@keyframes ekg-draw {
  0%   { stroke-dashoffset: 400; opacity: 0; }
  20%  { opacity: 1; }
  80%  { stroke-dashoffset: -400; opacity: 1; }
  100% { stroke-dashoffset: -400; opacity: 0; }
}

/* Status meta — monospaced readout */
.loading-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.loading-meta-label {
  color: var(--text-muted);
  font-weight: 500;
}

.loading-meta-value {
  color: var(--cyan);
  font-weight: 600;
}

.loading-meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: loading-dot-pulse 1.2s ease-in-out infinite;
}

.loading-meta-percent {
  color: var(--cyan);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 3ch;
  text-align: right;
}

/* Indeterminate-Zustand bis erster Progress-Event feuert (Cache-Hits / Babylon-Draco-Quirk) */
.loading-meta-percent.loading-pulse {
  letter-spacing: 0.15em;
  animation: loading-percent-pulse 1.4s ease-in-out infinite;
}

@keyframes loading-dot-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50%      { opacity: 1;   transform: scale(1.1); box-shadow: 0 0 8px var(--cyan); }
}
@keyframes loading-percent-pulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .loading-pulse-line,
  .loading-ekg polyline,
  .loading-meta-dot,
  .loading-meta-percent.loading-pulse { animation: none; }
}

@media (max-width: 700px) {
  .loading-frame { width: 200px; height: 100px; }
}

/* ============================================================
   FLOATING TOP BAR
   ============================================================ */

.float-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  z-index: 20;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.logo-mark {
  width: 28px;
  height: 28px;
  background: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-mark i { font-size: 16px; color: #000; }

.logo-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Search */
.search-box {
  position: relative;
  flex: 1;
  max-width: 420px;
}

.search-input {
  width: 100%;
  height: 36px;
  padding: 0 14px 0 36px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.search-input:focus {
  border-color: var(--cyan);
  background: rgba(0, 212, 255, 0.06);
}

.search-input::placeholder { color: var(--text-muted); }

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  max-height: 300px;
  overflow-y: auto;
  z-index: 200;
  display: none;
}

.search-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s;
}

.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--cyan-dim); }

.search-name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.search-german {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.search-no-result {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Top Stats */
.top-stats {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.stat {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.stat strong {
  color: var(--cyan);
  font-weight: 600;
  font-size: 13px;
}

/* ============================================================
   NAV TOGGLE BUTTON (in top bar)
   ============================================================ */

.nav-toggle {
  width: 44px;
  height: 44px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.nav-toggle:hover {
  background: var(--glass-hover);
  color: var(--text);
  border-color: var(--cyan);
}

.nav-toggle.active {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ============================================================
   ANATOMY NAVIGATOR
   ============================================================ */

.anatomy-nav {
  position: absolute;
  top: 56px;
  left: 0;
  width: 320px;
  max-height: calc(100dvh - 80px);
  background: var(--glass-strong);
  border-right: 1px solid var(--glass-border);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  z-index: 18;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(-20px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease-precision), transform 0.3s var(--ease-precision);
  box-shadow: var(--shadow-md);
}

/* Side accent — signals "navigation rail" */
.anatomy-nav::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--cyan) 30%, var(--cyan) 70%, transparent);
  opacity: 0.2;
}

.anatomy-nav.visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* Nav Header */
.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.nav-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.nav-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.nav-close {
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.nav-close:hover { color: var(--text); }

/* Nav Body (scrollable) */
.nav-body {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.nav-body::-webkit-scrollbar { width: 3px; }
.nav-body::-webkit-scrollbar-track { background: transparent; }
.nav-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); }

/* Category Group */
.nav-category {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.nav-category:last-child { border-bottom: none; }

.nav-cat-header {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  gap: 10px;
  text-align: left;
  position: relative;
}

.nav-cat-header::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 2px;
  height: 0;
  background: var(--cyan);
  transform: translateY(-50%);
  transition: height 0.2s var(--ease-precision);
}

.nav-category.open .nav-cat-header::before { height: 16px; }

.nav-cat-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.nav-cat-chevron {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.nav-category.open .nav-cat-chevron {
  transform: rotate(90deg);
}

.nav-cat-name {
  flex: 1;
}

.nav-cat-stats {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.nav-cat-count {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.04);
  letter-spacing: 0.05em;
}

.nav-cat-seniam {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--green);
  padding: 2px 6px;
  background: rgba(0, 230, 118, 0.08);
  letter-spacing: 0.05em;
}

/* Muscle List (inside category) */
.nav-muscle-list {
  display: none;
  padding: 0 0 4px;
}

.nav-category.open .nav-muscle-list {
  display: block;
}

.nav-muscle-group {
  padding: 0 8px;
}

.nav-muscle-row {
  display: flex;
  align-items: center;
  padding: 6px 8px 6px 28px;
  cursor: pointer;
  transition: background 0.12s;
  gap: 6px;
}

.nav-muscle-row:hover {
  background: rgba(0, 212, 255, 0.06);
}

.nav-muscle-row.active {
  background: rgba(0, 212, 255, 0.1);
  border-left: 2px solid var(--cyan);
  padding-left: 26px;
}

.nav-muscle-name {
  flex: 1;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-muscle-row:hover .nav-muscle-name { color: var(--text); }
.nav-muscle-row.active .nav-muscle-name { color: var(--cyan); font-weight: 500; }

.nav-seniam-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.nav-adapted-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  opacity: 0.7;
  flex-shrink: 0;
}

.nav-side-tag {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 1px 4px;
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

/* ============================================================
   FLOATING FILTER CHIPS
   ============================================================ */

.float-chips {
  position: absolute;
  top: 58px;
  left: 24px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  z-index: 15;
  max-width: 600px;
  transition: left 0.3s ease;
}

.chip {
  min-height: 44px;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.2s var(--ease-precision);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.chip:hover {
  background: var(--glass-hover);
  color: var(--text);
  border-color: rgba(0, 212, 255, 0.2);
}

.chip.active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #000;
  font-weight: 700;
  box-shadow: var(--glow-cyan-sm);
}

/* When nav is open on desktop, shift chips right.
   Nav width (320px) + 8px gap = 328px. */
.float-chips.nav-open {
  left: 328px;
  transition: left 0.3s ease;
}

/* Mobile: horizontal scroll */
@media (max-width: 700px) {
  .float-chips {
    top: 48px;
    left: 0;
    right: 0;
    max-width: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 6px 12px;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 100%);
  }
  .float-chips::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; font-size: 11px; min-height: 36px; padding: 8px 12px; }

  /* Nav → full-width overlay on mobile, below chips */
  .anatomy-nav {
    width: 100%;
    max-height: 55vh;
    top: 100px;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(8, 8, 12, 0.95);
  }

  .float-chips.nav-open {
    left: 0;
  }
}

/* ============================================================
   FLOATING CAMERA CONTROLS
   ============================================================ */

.float-cam {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
  z-index: 15;
}

.cam-btn {
  min-height: 44px;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.2s var(--ease-precision);
  box-shadow: var(--shadow-sm);
}

.cam-btn:hover {
  background: var(--glass-hover);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: var(--shadow-sm), var(--glow-cyan-sm);
}

.cam-reset {
  padding: 0 10px;
  border-color: rgba(0, 212, 255, 0.2);
  color: var(--cyan);
}

.cam-reset i {
  font-size: 14px;
}

/* ============================================================
   BOOKMARK FAB & PANEL
   ============================================================ */

.bookmark-fab {
  position: absolute;
  bottom: 72px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  transition: all 0.2s var(--ease-precision);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.bookmark-fab:hover {
  background: var(--glass-hover);
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: var(--shadow-sm), var(--glow-cyan-sm);
  transform: translateY(-1px);
}

.bookmark-fab i { font-size: 20px; }

.bookmark-fab-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  background: var(--cyan);
  color: #000;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: var(--glow-cyan-sm);
  letter-spacing: 0.02em;
}

.bookmark-panel {
  position: absolute;
  bottom: 124px;
  right: 24px;
  width: 300px;
  max-height: 400px;
  background: rgba(8, 8, 12, 0.92);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.bookmark-panel.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.bookmark-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.bookmark-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.bookmark-panel-close {
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bookmark-panel-close:hover { color: var(--text); }

.bookmark-panel-body {
  overflow-y: auto;
  flex: 1;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.bookmark-empty {
  padding: 20px 16px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

.bookmark-limit {
  padding: 8px 16px;
  font-size: 11px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.bookmark-limit a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
}

.bookmark-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.12s;
  gap: 8px;
}

.bookmark-item:hover { background: rgba(0, 212, 255, 0.06); }

.bookmark-item-info { flex: 1; min-width: 0; }

.bookmark-item-name {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bookmark-item-sub {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.bookmark-item-remove {
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s;
}

@media (hover: none) { .bookmark-item-remove { opacity: 1; } }
.bookmark-item:hover .bookmark-item-remove { opacity: 1; }
.bookmark-item-remove:hover { color: #ff6b6b; }

/* Info Panel: Bookmark Button */
.info-header-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.info-header-row .info-muscle-name {
  flex: 1;
  padding-right: 0;
}

.bookmark-btn {
  width: 32px;
  height: 32px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  margin-top: 4px;
}

.bookmark-btn:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.bookmark-btn.active {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
}

@media (max-width: 700px) {
  .bookmark-fab {
    bottom: 64px;
    right: 12px;
    width: 40px;
    height: 40px;
  }
  .bookmark-fab i { font-size: 18px; }

  .bookmark-panel {
    bottom: 112px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: 50vh;
  }
}

/* ============================================================
   SENSOR FAB
   ============================================================ */

.sensor-fab {
  position: absolute;
  bottom: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--glass);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: var(--cyan);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

.sensor-fab i { font-size: 20px; }

.sensor-fab {
  box-shadow: var(--shadow-sm);
}

.sensor-fab:hover {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  box-shadow: var(--shadow-sm), var(--glow-cyan-sm);
  transform: translateY(-1px);
}

.sensor-fab.active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #000;
}

/* Desktop: beschrifteter Button in der Top-Bar für bessere Discoverability */
.sensor-top-btn {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--glass);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: var(--cyan);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}
.sensor-top-btn i { font-size: 15px; }
.sensor-top-btn:hover {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan-sm);
}
.sensor-top-btn.active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #000;
}
.sensor-top-btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
@media (min-width: 900px) {
  .sensor-top-btn { display: inline-flex; }
  /* Auf Desktop den kleinen FAB ausblenden, Top-Button übernimmt */
  .sensor-fab { display: none; }
}

.sensor-fab:disabled {
  opacity: 0.4;
  cursor: wait;
}

/* ============================================================
   LANGUAGE FAB (bottom-left)
   ============================================================ */

.lang-fab {
  position: absolute;
  bottom: 20px;
  left: 24px;
  width: 44px;
  height: 44px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lang-flag-text {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.lang-fab { box-shadow: var(--shadow-sm); }

.lang-fab:hover {
  background: var(--glass-hover);
  border-color: var(--cyan);
  box-shadow: var(--shadow-sm), var(--glow-cyan-sm);
  transform: translateY(-1px);
}

/* ============================================================
   CANVAS HINT
   ============================================================ */

.canvas-hint {
  position: absolute;
  bottom: 62px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  opacity: 1;
  transition: opacity 1s ease;
}

.canvas-hint.faded { opacity: 0; }

/* ============================================================
   TRUST BADGE
   ============================================================ */

.trust-badge {
  position: absolute;
  bottom: 64px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(0, 230, 118, 0.06);
  border: 1px solid rgba(0, 230, 118, 0.18);
  z-index: 10;
  opacity: 0.7;
  transition: opacity 0.3s, box-shadow 0.3s;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

.trust-badge:hover {
  opacity: 1;
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.15);
}


/* ============================================================
   PERSISTENT CTA RIBBON (nach 5. Klick sichtbar, dezent)
   ============================================================ */
.cta-ribbon {
  position: absolute;
  top: 58px;
  right: 24px;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: var(--cyan);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  z-index: 14;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.15s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cta-ribbon.visible {
  display: inline-flex;
  opacity: 1;
  transform: translateY(0);
}
.cta-ribbon:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: var(--cyan);
}
.cta-ribbon i { font-size: 13px; }

@media (max-width: 700px) {
  .cta-ribbon {
    top: auto;
    bottom: 68px;
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(4px);
    font-size: 10px;
    padding: 5px 10px;
  }
  .cta-ribbon.visible { transform: translateX(-50%) translateY(0); }
  body.info-open .cta-ribbon,
  body.email-banner-open .cta-ribbon { display: none; }
}

.trust-badge-icon {
  color: var(--green);
  font-size: 13px;
  flex-shrink: 0;
}

.trust-badge-text {
  font-size: 10px;
  color: rgba(0, 230, 118, 0.8);
  font-weight: 500;
  white-space: nowrap;
}

/* ============================================================
   ONBOARDING TOAST
   ============================================================ */

.onboarding-toast {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 25;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  max-width: 500px;
}

.onboarding-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.onboarding-toast.fade-out {
  opacity: 0;
  transform: translateX(-50%) translateY(-10px);
}

.onboarding-toast-icon {
  color: var(--cyan);
  font-size: 16px;
  flex-shrink: 0;
}

.onboarding-toast-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}

.onboarding-toast-close {
  width: 44px;
  height: 44px;
  margin: -12px -12px -12px 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s;
}

.onboarding-toast-close:hover { color: var(--text); }

@media (max-width: 700px) {
  .onboarding-toast {
    left: 12px;
    right: 12px;
    bottom: 60px;
    transform: translateX(0) translateY(10px);
    max-width: none;
  }
  .onboarding-toast.visible {
    transform: translateX(0) translateY(0);
  }
  .onboarding-toast.fade-out {
    transform: translateX(0) translateY(-10px);
  }
}

@media (max-width: 700px) {
  .trust-badge {
    bottom: 56px;
    top: auto;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    padding: 3px 8px;
  }
  .trust-badge-icon { display: none; }
  .trust-badge-text { font-size: 9px; }
}

/* ============================================================
   FLOATING INFO PANEL (Glass Card)
   ============================================================ */

.info-glass {
  position: absolute;
  top: 60px;
  right: 24px;
  width: 380px;
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  padding: 28px 24px 24px;
  z-index: 20;
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease-precision), transform 0.3s var(--ease-precision);
  box-shadow: var(--shadow-lg);
}

.info-glass.visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* Top accent line — signals "this is a diagnostic readout" */
.info-glass::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan) 50%, transparent);
  opacity: 0.6;
}

.info-glass::-webkit-scrollbar { width: 3px; }
.info-glass::-webkit-scrollbar-track { background: transparent; }
.info-glass::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); }

.info-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

.info-close:hover, .info-close:active {
  background: var(--glass-hover);
  color: var(--text);
}

/* Mobile Backdrop für Bottom-Sheet (tippen zum Schließen) */
.info-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 19;
  -webkit-tap-highlight-color: transparent;
}
.info-backdrop.visible { display: block; }

/* Info Panel Content (filled by JS) */
.info-content { display: flex; flex-direction: column; gap: 16px; }

.info-muscle-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  font-stretch: 90%;
  color: var(--text);
  line-height: 1.05;
  letter-spacing: -0.02em;
  padding-right: 48px;
  text-transform: none;
}

/* Muscle ID in mono — subtle, tech-feel */
.info-muscle-id {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.info-german {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}

.info-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

/* Museum-label style: micro-caps, wide tracking, tight padding */
.badge {
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.badge-seniam {
  background: rgba(0, 230, 118, 0.1);
  color: var(--green);
  border: 1px solid rgba(0, 230, 118, 0.2);
  cursor: help;
}

.badge-adapted {
  background: rgba(255, 179, 0, 0.08);
  color: var(--amber);
  border: 1px solid rgba(255, 179, 0, 0.22);
  cursor: help;
}

.badge-seniam a,
.badge-adapted a {
  color: inherit;
  text-decoration: none;
}

.badge-seniam a:hover,
.badge-adapted a:hover {
  text-decoration: underline;
}

.badge-category {
  background: var(--glass);
  color: var(--text-dim);
  border: 1px solid var(--glass-border);
}

.badge-side {
  background: var(--glass);
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
}

.info-divider {
  height: 1px;
  background: var(--glass-border);
}

.info-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cyan);
  margin-bottom: 6px;
}

.info-section-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

/* ========= Editorial Primary Block (code-block feel) ========= */
.info-primary-block {
  margin: 4px 0 4px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.05) 0%, rgba(0, 212, 255, 0.015) 100%);
  border: 1px solid rgba(0, 212, 255, 0.18);
  position: relative;
}

.info-primary-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--cyan) 0%, var(--teal-deep) 100%);
}

.info-primary-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.info-primary-marker {
  color: var(--cyan-soft);
  opacity: 0.6;
}

/* Body font (not mono) for readability — the electrode text is prose,
   not code. The "code-block" chrome (left rail, mono label, monospaced meta
   key below) signals structured data without forcing mono on the prose. */
.info-primary-code {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  font-weight: 400;
}

.info-primary-code-line {
  color: rgba(255, 255, 255, 0.95);
}

.info-primary-code-meta {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(0, 212, 255, 0.15);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
  font-weight: 400;
}

.info-code-key {
  color: var(--cyan);
  font-weight: 500;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-right: 8px;
  opacity: 0.8;
}

.info-anatomy-key {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal-deep);
  margin-right: 6px;
  min-width: 48px;
}

/* Secondary sections — less emphasized */
.info-secondary .info-section-label {
  color: var(--text-dim);
  opacity: 0.85;
}

.info-secondary .info-section-text {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}

/* Source citation block — below electrode, before progressive-disclosure */
.info-citation {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--amber);
  font-size: 11px;
  line-height: 1.4;
  font-family: var(--font-mono);
}
.info-citation--seniam {
  border-left-color: rgba(0, 230, 118, 0.45);
}
.info-citation--adapted {
  border-left-color: rgba(255, 179, 0, 0.45);
}
.info-citation-label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 9px;
  flex-shrink: 0;
}
.info-citation-link,
.info-citation-short {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 11px;
}
.info-citation-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Progressive disclosure: Anatomy/Function/Test hidden by default */
.info-details {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
}
.info-details-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  list-style: none;
  padding: 4px 0;
  transition: color 0.15s;
}
.info-details-toggle::-webkit-details-marker { display: none; }
.info-details-toggle:hover { color: var(--cyan); }
.info-details-toggle i {
  font-size: 14px;
  transition: transform 0.2s;
}
.info-details[open] .info-details-toggle i { transform: rotate(180deg); }

.sensor-dots {
  display: flex;
  gap: 14px;
}

.sensor-dot {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
}

.sensor-dot-circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.info-cta {
  margin-top: 4px;
}

.info-cta-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.info-cta-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--cyan);
  border: none;
  color: #000;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.info-cta-btn:hover { opacity: 0.85; text-decoration: none; }

.info-cta-link {
  display: block;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
  text-decoration: none;
}

.info-cta-link:hover { color: var(--cyan); }

/* ============================================================
   MOBILE: Bottom Sheet
   ============================================================ */

@media (max-width: 700px) {
  .float-top {
    height: 48px;
    padding: 0 12px;
    gap: 8px;
  }

  .logo-title { font-size: 14px; }
  .top-stats { display: none; }

  .search-box { max-width: none; }
  .search-input { height: 44px; font-size: 16px; }

  .float-cam {
    bottom: 16px;
    gap: 2px;
  }

  .cam-btn {
    min-height: 44px;
    padding: 0 12px;
    font-size: 10px;
  }

  .sensor-fab {
    bottom: 16px;
    right: 12px;
    width: 40px;
    height: 40px;
  }

  .sensor-fab i { font-size: 18px; }

  .lang-fab {
    bottom: 16px;
    left: 12px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .canvas-hint {
    bottom: 54px;
    font-size: 10px;
  }

  /* ========== Info Panel → Bottom Sheet (Mobile-Compact) ========== */
  .info-glass {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 55vh;
    transform: translateY(100%);
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 24px 18px 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .info-glass.visible {
    transform: translateY(0);
  }

  /* Drag-Handle (replaces desktop top-accent-line) — prominent visual cue */
  .info-glass::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    opacity: 1;
    /* override desktop gradient */
    background-image: none;
    height: 4px;
  }

  /* Close-Button kompakt oben rechts, unter Drag-Handle-Area */
  .info-glass .info-close {
    top: 20px;
    right: 8px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  /* Tighter internal spacing — mobile feels cluttered otherwise */
  .info-content { gap: 10px; }

  /* Header: compact name, drop mono ID on mobile (too technical for primary view) */
  .info-muscle-name {
    font-size: 22px;
    line-height: 1.1;
    padding-right: 44px;
    letter-spacing: -0.015em;
  }
  .info-muscle-id { display: none; }
  .info-german {
    font-size: 12px;
    margin-top: 2px;
    line-height: 1.3;
  }

  /* Badges kleiner, weniger prominent */
  .badge {
    padding: 2px 7px;
    font-size: 8.5px;
  }

  /* Primary block: quieter on mobile — less chrome, keep the left rail as hint */
  .info-primary-block {
    padding: 10px 12px;
    background: rgba(0, 212, 255, 0.04);
  }
  .info-primary-block::before { width: 2px; }
  .info-primary-label {
    font-size: 9px;
    margin-bottom: 6px;
    letter-spacing: 0.12em;
  }
  .info-primary-code { font-size: 13px; line-height: 1.45; }
  .info-primary-code-meta {
    margin-top: 6px;
    padding-top: 6px;
    font-size: 10px;
  }

  /* Secondary sections tighter */
  .info-secondary .info-section-label { font-size: 9px; margin-bottom: 4px; }
  .info-secondary .info-section-text { font-size: 12px; line-height: 1.5; }
  .info-anatomy-key { min-width: 40px; font-size: 8px; }

  /* Details toggle tighter */
  .info-details { margin-top: 4px; padding-top: 8px; }
  .info-details-toggle { font-size: 11px; padding: 2px 0; }

  /* CTA tighter */
  .info-cta { margin-top: 4px; }
  .info-cta-label { font-size: 10px; margin-bottom: 6px; }
  .info-cta-btn { padding: 10px; font-size: 12px; }
  .info-cta-link { font-size: 10px; }

  /* When info panel is open: hide bottom controls to avoid overlap */
  body.info-open .float-cam { display: none; }
  body.info-open .sensor-fab { display: none; }
  body.info-open .lang-fab { display: none; }
  body.info-open .canvas-hint { display: none; }
  body.info-open .trust-badge { display: none; }
  /* Keep bookmark FAB visible but move above bottom sheet */
  body.info-open .bookmark-fab {
    bottom: calc(55vh + 12px);
    z-index: 22;
    transition: bottom 0.3s ease;
  }
}

/* Tablet: Info-Panel als schmale Glasleiste */
@media (min-width: 701px) and (max-width: 1100px) {
  .info-glass {
    width: 320px;
  }

  .float-chips {
    max-width: 400px;
  }
}

/* ============================================================
   FOOTER (minimal)
   ============================================================ */

.footer-minimal {
  position: fixed;
  bottom: 0;
  left: 0;
  display: flex;
  gap: 16px;
  padding: 8px 16px;
  z-index: 5;
  opacity: 0.45;
  transition: opacity 0.3s;
}

.footer-minimal:hover { opacity: 0.85; }

.footer-minimal a,
.footer-minimal span {
  font-size: 10px;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-minimal a:hover { color: var(--cyan); }

.footer-disclaimer {
  font-style: italic;
  opacity: 0.6;
}

/* Mobile: Footer kompakt — nur Impressum/Datenschutz (DSGVO/§5 TMG Pflicht)
   pointer-events: none am Container, damit Touch durch zur 3D-Canvas geht;
   nur die Links selbst sind klickbar. */
@media (max-width: 700px) {
  .footer-minimal {
    bottom: 0;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    padding: 2px 8px;
    padding-bottom: max(2px, env(safe-area-inset-bottom, 0));
    gap: 12px;
    font-size: 10px;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.6));
  }
  .footer-minimal a { pointer-events: auto; font-size: 10px; padding: 2px 4px; }
  /* Mobile-Hide Attribute: Non-Legal Links + Disclaimer ausblenden
     (data-mobile-hide ist stabiler als URL-basierte Selektoren) */
  .footer-minimal [data-mobile-hide] { display: none; }
  /* Wenn Info-Panel offen: Footer ausblenden (Bottom-Sheet braucht Platz) */
  body.info-open .footer-minimal { display: none; }
  /* Wenn Email-Banner sichtbar: Footer nach OBEN über den Banner shiften,
     damit Impressum/Datenschutz immer sichtbar & klickbar bleiben */
  body.email-banner-open .footer-minimal {
    bottom: auto;
    top: 52px;
    background: transparent;
    padding: 2px 8px;
  }
}

/* ============================================================
   EMAIL CAPTURE BANNER
   ============================================================ */

.email-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(8, 8, 12, 0.95);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 16px 24px;
  z-index: 30;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.email-banner.visible {
  transform: translateY(0);
  opacity: 1;
}

.email-banner-content {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.email-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.email-banner-text strong {
  font-size: 14px;
  color: var(--text);
  font-weight: 700;
}

.email-banner-text span {
  font-size: 12px;
  color: var(--text-dim);
}

.email-banner-form {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.email-banner-input {
  width: 220px;
  height: 38px;
  padding: 0 12px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.email-banner-input:focus {
  border-color: var(--cyan);
}

.email-banner-input::placeholder {
  color: var(--text-muted);
}

.email-banner-btn {
  height: 38px;
  padding: 0 20px;
  background: var(--cyan);
  border: none;
  color: #000;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.email-banner-btn:hover {
  opacity: 0.85;
}

.email-banner-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.email-banner-close {
  width: 36px;
  height: 36px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.email-banner-close:hover, .email-banner-close:active {
  background: var(--glass-hover);
  color: var(--text);
}

.email-banner-legal {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
}
.email-banner-legal input[type="checkbox"],
.exit-intent-legal input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--cyan);
}

.email-banner-legal a {
  color: var(--text-dim);
  text-decoration: underline;
}

.email-source-note {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 6px;
  opacity: 0.7;
  line-height: 1.5;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.email-feedback {
  font-size: 12px;
  text-align: center;
  margin-top: 8px;
  padding: 8px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.email-feedback.success {
  color: var(--green);
  background: rgba(0, 230, 118, 0.06);
}

.email-feedback.error {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.06);
}

@media (max-width: 700px) {
  .email-banner {
    padding: 14px 16px;
  }

  .email-banner-content {
    flex-wrap: wrap;
    gap: 12px;
  }

  .email-banner-text {
    flex-basis: calc(100% - 40px);
  }

  .email-banner-form {
    width: 100%;
  }

  .email-banner-input {
    flex: 1;
    width: auto;
  }

  .email-banner-close {
    position: absolute;
    top: 12px;
    right: 12px;
  }

  .email-banner {
    position: relative;
  }
}

/* ============================================================
   EXIT-INTENT OVERLAY
   ============================================================ */

.exit-intent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 110;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.exit-intent-overlay.visible {
  opacity: 1;
}

.exit-intent-card {
  position: relative;
  max-width: 420px;
  width: 90%;
  padding: 40px 36px;
  background: rgba(12, 12, 16, 0.95);
  border: 1px solid var(--glass-border);
  text-align: center;
}

.exit-intent-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s;
}

.exit-intent-close:hover, .exit-intent-close:active {
  background: var(--glass-hover);
  color: var(--text);
}

.exit-intent-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  background: var(--cyan-dim);
  border: 1px solid rgba(0, 212, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.exit-intent-icon i {
  font-size: 22px;
  color: var(--cyan);
}

.exit-intent-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.exit-intent-text {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 24px;
}

.exit-intent-form {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.exit-intent-input {
  flex: 1;
  height: 42px;
  padding: 0 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.exit-intent-input:focus { border-color: var(--cyan); }
.exit-intent-input::placeholder { color: var(--text-muted); }

.exit-intent-btn {
  height: 42px;
  padding: 0 20px;
  background: var(--cyan);
  border: none;
  color: #000;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.exit-intent-btn:hover { opacity: 0.85; }
.exit-intent-btn:disabled { opacity: 0.5; cursor: wait; }

.exit-intent-legal {
  font-size: 10px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.exit-intent-legal a {
  color: var(--text-dim);
  text-decoration: underline;
}

/* ============================================================
   ONBOARDING TOOLTIPS (First Visit)
   ============================================================ */

/* Floating Tooltip Labels neben Controls */
.tooltip-label {
  position: absolute;
  padding: 6px 12px;
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  z-index: 25;
  opacity: 0;
  transform: translateY(4px);
  animation: tooltipPulseIn 0.5s ease forwards;
  animation-delay: var(--delay, 0s);
}

.tooltip-label.fade-out {
  animation: tooltipFadeOut 0.4s ease forwards;
}

@keyframes tooltipPulseIn {
  0% { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes tooltipFadeOut {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-4px); }
}

/* Pulse ring on FABs during onboarding */
.pulse-ring {
  position: absolute;
  inset: -4px;
  border: 2px solid var(--cyan);
  opacity: 0;
  animation: pulseRing 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulseRing {
  0%, 100% { opacity: 0; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.15); }
}

/* ============================================================
   GUIDED ONBOARDING — Progressive UI Reveal
   ============================================================ */

/* During onboarding: hide secondary UI for clean first impression */
body.onboarding-active .float-chips,
body.onboarding-active .bookmark-fab,
body.onboarding-active .sensor-fab,
body.onboarding-active .float-cam,
body.onboarding-active .trust-badge,
body.onboarding-active .canvas-hint {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

/* After first interaction: fade everything in */
body.ui-revealed .float-chips,
body.ui-revealed .bookmark-fab,
body.ui-revealed .sensor-fab,
body.ui-revealed .float-cam,
body.ui-revealed .trust-badge,
body.ui-revealed .canvas-hint {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.6s ease 0.3s;
}

/* Guide tooltip: floating prompt to click the glowing muscle */
.guide-tooltip {
  position: fixed;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  padding: 12px 24px;
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.3);
  backdrop-filter: blur(12px);
  color: var(--cyan);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 30;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-tooltip.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.guide-tooltip i {
  font-size: 18px;
  animation: guidePointerBounce 1.5s ease-in-out infinite;
}

@keyframes guidePointerBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Aha celebration: subtle pulse on info panel after first click */
.info-glass.aha-celebrate {
  animation: ahaPulse 0.8s ease;
}

@keyframes ahaPulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4); }
  50% { box-shadow: 0 0 20px 4px rgba(0, 212, 255, 0.15); }
  100% { box-shadow: none; }
}

@media (max-width: 700px) {
  .guide-tooltip {
    bottom: 20%;
    font-size: 14px;
    padding: 10px 18px;
  }
}

/* ============================================================
   STATISCHE SEITEN (Impressum, Datenschutz, Danke)
   ============================================================ */

.page-center {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  gap: 20px;
}

.check-icon {
  font-size: 64px;
  animation: pop 0.4s ease-out;
}

@keyframes pop {
  0%   { transform: scale(0.5); opacity: 0; }
  70%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.page-center h1 { font-size: 28px; font-weight: 700; }
.page-center p  { font-size: 15px; color: var(--text-dim); max-width: 400px; line-height: 1.6; }
.page-center a  { color: var(--cyan); text-decoration: none; font-weight: 600; }

.static-page {
  max-width: 760px;
  margin: 40px auto;
  padding: 40px 24px;
}

.static-page h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--cyan);
}

.static-page h2 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}

.static-page p, .static-page li {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 8px;
}

.static-page a { color: var(--cyan); }
.static-page ul { padding-left: 20px; }

/* ============================================================
   ACCESSIBILITY: Focus States
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
/* Remove default outline for mouse clicks */
:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================================
   ACCESSIBILITY: Reduced Motion
   Universal catch-all: kills all CSS animations/transitions for users
   who prefer reduced motion. This covers welcomeFadeIn/Out and any other
   purely-fade animations that don't need a specific visual fallback.
   Individual reduced-motion blocks above exist where we want a *different*
   static state (e.g. show at opacity 0.3 instead of final 1.0 position).
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   PERFORMANCE: Mobile Blur Reduction
   backdrop-filter ist GPU-teuer — reduzieren auf Mobile für FPS
   ============================================================ */
@media (max-width: 700px) {
  .info-glass,
  .anatomy-nav,
  .welcome-overlay,
  .exit-intent-overlay,
  .bookmark-panel,
  .onboarding-toast,
  .guide-tooltip {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .sensor-fab,
  .bookmark-fab,
  .lang-fab,
  .cam-btn {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
