@charset "UTF-8";
/* e-vein · 3D-Viewer (viewer.html). Die Zeichenfläche füllt das ganze Fenster (viewer.js); Kopfleiste und Bedienleiste
   liegen darüber, im Graphit der Startseite (Kopf, Hero, Fuß). Die Modellfläche bleibt hellgrau (#d8d8d8, Szene in
   viewer.js), passend zum Dialog der Startseite. Im Dialog (Klasse „eingebettet“) entfällt die Kopfleiste. */

@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/inter-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;
}

:root {
  --dk-bg: #0d1315;        /* Graphit wie style.css */
  --dk-line: #1d2a2f;
  --dk-line-2: #2a3b42;
  --dk-line-3: #3e535c;
  --dk-ink: #eaf0ef;
  --dk-ink-2: #b3c0c3;
  --dk-ink-3: #849aa0;
  --dk-red-hi: #e8573f;
  --red: #c0392b;
  --red-dark: #a93226;
  --viewer-bg: #d8d8d8;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas, "SFMono-Regular", Menlo, monospace;
  --bar: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden;
  background: var(--viewer-bg); color: var(--dk-ink-2);
  font: 400 1rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
img, svg { display: block; max-width: 100%; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--dk-red-hi); outline-offset: 3px; border-radius: 2px; }

#viewer-container { position: fixed; inset: 0; }
#viewer-container canvas { display: block; touch-action: none; }
#viewer-container canvas:focus-visible { outline-offset: -4px; } /* füllt das Fenster: Rahmen nach innen */

/* ---------- Kopfleiste (nur bei direktem Aufruf) ---------- */
.vbar {
  position: fixed; inset: 0 0 auto; z-index: 2; height: var(--bar);
  display: flex; align-items: center; gap: 20px; padding: 0 clamp(16px, 4vw, 40px);
  background: var(--dk-bg); border-bottom: 1px solid var(--dk-line);
}
.eingebettet .vbar { display: none; }
.vbar__logo { flex: none; }
.vbar__logo img { height: 26px; width: auto; }
.vbar__title {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 600 .74rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dk-ink-3);
  padding-left: 20px; border-left: 1px solid var(--dk-line-2);
}
.vbar__back {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 0;
  color: var(--dk-ink-2); text-decoration: none; font-size: .93rem; font-weight: 500;
}
.vbar__back:hover { color: var(--dk-ink); }
.vbar__back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 480px) {
  .vbar { gap: 12px; }
  .vbar__title { padding-left: 12px; letter-spacing: .08em; }
  /* schmal: nur der Pfeil, damit der Titel ganz bleibt; der Text bleibt für Screenreader */
  .vbar__back span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .vbar__back { padding: 10px 4px; }
  .vbar__back svg { width: 20px; height: 20px; }
}

/* ---------- Ladeanzeige ---------- */
#loader {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1;
  display: grid; justify-items: center; gap: 14px; padding: 18px 22px;
  color: #33434a; text-align: center; font: 600 .78rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase;
}
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid rgba(14, 23, 26, .14); border-top-color: var(--red);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* ohne JavaScript: Hinweis statt Ladeanzeige (viewer.html blendet Ladeanzeige und Bedienleiste per <noscript> aus) */
.noscript {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1;
  width: max-content; max-width: calc(100% - 32px); padding: 18px 22px;
  color: #33434a; text-align: center; font: 600 .78rem/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase;
}

/* ---------- Bedienleiste ---------- */
#controls {
  position: fixed; left: 50%; bottom: 16px; z-index: 2; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 24px);
  display: flex; align-items: center; gap: 14px;
  padding: 8px 16px 8px 8px;
  background: var(--dk-bg); border: 1px solid var(--dk-line-2); border-radius: 2px;
}
.control-button {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  background: var(--red); color: #fff; border: 1px solid var(--red); border-radius: 2px;
  cursor: pointer; transition: background-color .2s, border-color .2s;
}
.control-button:hover { background: var(--red-dark); border-color: var(--red-dark); }
.control-button:active { transform: translateY(1px); }
.control-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* breiter: links unten, damit die Leiste das mittig stehende Modell nicht verdeckt */
@media (min-width: 600px) {
  #controls { left: 16px; transform: none; max-width: calc(100% - 32px); }
}
.hint { font: 500 .74rem/1.4 var(--mono); letter-spacing: .04em; color: var(--dk-ink-2); }
.hint__touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .hint__mouse { display: none; }
  .hint__touch { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 3s; }
  .control-button { transition: none; }
}
