@font-face {
  font-family: 'ABC Dinamo Diatype Variable';
  src: url('../fonts/ABCDiatypeVariableEdu.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
}

:root {
  --bg: #ffffff;
  --text: #000000;
  --text-secondary: #666666;
  --border: #e5e5e5;
  --accent: #66E17C;
  --header-height: 64px;
  --footer-height: 52px;
  --font: 'ABC Dinamo Diatype Variable', Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::selection {
  background: transparent;
  color: var(--accent);
}

::-moz-selection {
  background: transparent;
  color: var(--accent);
}

html {
  height: 100%;
  overflow: hidden;
  /* Verhindert das Gummiband-Scrollen in iOS Safari. */
  overscroll-behavior: none;
}

body {
  font-family: var(--font);
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  /* 100dvh entspricht der tatsächlich sichtbaren Höhe (ohne Safari-Leiste).
     100vh bleibt als Fallback für ältere Browser. */
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ====================
   HEADER
   ==================== */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 2.5rem;
  flex-shrink: 0;
  /* Über der Bouncy-Karte halten, damit die Navigation immer klickbar ist. */
  position: relative;
  z-index: 10;
}

.header-nav {
  display: flex;
  gap: 0;
}

/* Menü-Wrapper: auf Desktop nur die normale Haupt-Navigation,
   auf schmalen Handys der Kreis-Toggle mit ausklappbarem Panel. */
.nav-menu {
  display: flex;
}

.menu-toggle {
  display: none;
}

.header-nav .pill:not(:first-child) {
  margin-left: -2px;
}

.pill {
  font-family: var(--font);
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  border: 2px solid var(--text);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
  outline: none;
}

.pill:hover {
  background: var(--text);
  color: var(--bg);
}

.pill:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.pill.active {
  background: var(--text);
  color: var(--bg);
}

/* ====================
   MAIN CONTENT
   ==================== */
main {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
}

.view.active {
  display: flex;
}

/* ====================
   BOUNCY VIEW
   ==================== */
#bouncyView.active {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* Sichtbare Viewport-Höhe statt Layout-Viewport (iOS Safari). */
  height: 100vh;
  height: 100dvh;
  z-index: 5;
  pointer-events: none;
}

.bouncy-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.bouncy-project {
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(220px, 28vw, 340px);
  transition: width 0.3s ease;
  cursor: grab;
  user-select: none;
  pointer-events: auto;
  touch-action: none;
}

.bouncy-project.is-dragging {
  cursor: grabbing;
}

.bouncy-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  background-color: var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.bouncy-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--text);
  pointer-events: none;
}

/* ====================
   INDEX VIEW
   ==================== */
.index-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: 100%;
}

.index-titles {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  justify-content: flex-start;
  padding: 0 2.5rem;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.index-titles::-webkit-scrollbar {
  display: none;
}

.index-title-item {
  display: flex;
  align-items: flex-end;
  padding: clamp(20px, 3vh, 30px) 0;
  border-bottom: 2px solid var(--text);
  cursor: pointer;
  scroll-snap-align: end;
  scroll-snap-stop: always;
  animation: scroll-reveal linear both;
  animation-timeline: view();
  transition: padding-left 0.3s ease, background 0.3s ease;
}

.index-title-item:first-child {
  border-top: 2px solid var(--text);
}

.index-title-item:hover,
.index-title-item:focus-visible {
  padding-left: 1.5rem;
}

.index-title-item h3 {
  font-size: clamp(1.5rem, 3.2vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: opacity 0.3s ease, color 0.2s ease;
}

.index-title-item:hover h3 {
  color: var(--accent);
}

.index-preview {
  position: relative;
  padding: 0 2.5rem;
}

.index-preview-img {
  position: absolute;
  top: 0;
  left: 0;
  right: 2.5rem;
  bottom: 0;
  transition: background-color 0.4s ease;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ====================
   ABOUT VIEW
   ==================== */
.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* minmax(0, 1fr) statt 1fr: verhindert, dass der lange Text die Zeile
     über die Viewport-Höhe hinaus wachsen lässt (sonst wird das 3D-Modell
     unten abgeschnitten). */
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  height: 100%;
}

.about-photo {
  position: relative;
  overflow: hidden;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--text);
  margin-left: 2.5rem;
  margin-right: 1.25rem;
}

.about-photo-poster,
.about-photo model-viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.about-photo-poster {
  /* Höhengebunden und horizontal zentriert: die Figur hat damit exakt
     dieselbe Größe wie im 3D-Viewer (der ebenfalls über die Höhe rahmt). */
  inset: auto;
  top: 0;
  left: 50%;
  width: auto;
  max-width: none;
  height: 100%;
  transform: translateX(-50%);
}

.about-photo model-viewer {
  --progress-bar-color: transparent;
  background: transparent;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.about-photo.has-3d.model-ready model-viewer {
  opacity: 1;
}

.about-photo.model-ready .about-photo-poster {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.about-photo.model-failed .about-photo-poster {
  opacity: 1;
}

.about-text {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0 2.5rem 0 1.25rem;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.about-text-inner {
  margin-top: auto;
}

.about-text h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.about-text p {
  font-size: 1.375rem;
  line-height: 1.4;
  color: var(--text);
  max-width: 36rem;
}

/* ====================
   CONTACT VIEW
   ==================== */
.contact-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* min-height statt height: Bei zu wenig Höhe (z. B. Handy im Querformat)
     wächst der Container mit dem Inhalt und die Ansicht scrollt, statt dass
     die oberste Zeile hinter dem Header abgeschnitten wird. */
  min-height: 100%;
  padding: 0 2.5rem;
  width: 100%;
}

/* Block statt Flex: Der Container kann so mit dem Inhalt wachsen und die
   Ansicht selbst scrollt, wenn die Höhe nicht reicht. */
#contactView.active {
  display: block;
  overflow-y: auto;
}

.contact-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: clamp(20px, 3vh, 30px) 0;
  border-bottom: 2px solid var(--text);
}

.contact-item:first-child {
  border-top: 2px solid var(--text);
}

.contact-label {
  font-size: clamp(1.5rem, 3.2vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.contact-value {
  font-size: clamp(1.5rem, 3.2vw, 2.8rem);
  letter-spacing: -0.02em;
  color: var(--text);
}

.contact-value a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-value a:hover {
  color: var(--accent);
}

/* ====================
   FOOTER
   ==================== */
footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 2rem 2.5rem;
  /* Platz für den Home-Indicator (nur mit viewport-fit=cover relevant). */
  padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  flex-shrink: 0;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-link {
  font-size: 0.75rem;
  color: var(--text);
  cursor: pointer;
  text-align: right;
  transition: color 0.2s ease;
  user-select: none;
}

.footer-link:hover {
  color: var(--accent);
}

.footer-sound {
  font: inherit;
  font-size: 0.75rem;
  color: var(--text);
  background: none;
  border: 0;
  padding: 0;
  appearance: none;
  text-align: left;
  transition: color 0.2s ease;
}

.footer-sound:hover {
  color: var(--accent);
}

.footer-sound[aria-pressed="false"] .sound-state {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.footer-counter {
  font-size: 0.75rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: left;
  user-select: none;
}

/* ====================
   LIGHTBOX
   ==================== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  z-index: 1000;
  display: none;
  flex-direction: column;
}

.lightbox.open {
  display: flex;
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 2.5rem;
  padding-top: calc(2rem + env(safe-area-inset-top));
  flex-shrink: 0;
}

.lightbox-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* Text lightbox (imprint, privacy) */
.text-lightbox-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 2.5rem 3rem;
  padding-bottom: calc(3rem + env(safe-area-inset-bottom));
}

.text-lightbox-content h2 {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.text-lightbox-content h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.text-lightbox-content p,
.text-lightbox-content li {
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.text-lightbox-content .text-lightbox-meta {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.text-lightbox-content ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1rem;
}

.text-lightbox-content li {
  position: relative;
  padding-left: 1.15rem;
}

.text-lightbox-content li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--text-secondary);
}

.text-lightbox-content a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}


/* Project lightbox: slider */
.slider-container {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 2rem 2.5rem;
  gap: 1rem;
  position: relative;
}

.slider-viewport {
  flex: 1;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}

.slider-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  pointer-events: none;
}

.slider-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slider-slide-inner {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.slider-slide-inner::after {
  content: attr(data-slide);
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  pointer-events: none;
}

/* Fotos und Videos: füllen den Rahmen vollständig aus */
.slider-slide-inner img,
.slider-slide-inner video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Hochformat: vollständig sichtbar, zentriert auf schwarzem Grund */
.slider-slide-inner.is-portrait img,
.slider-slide-inner.is-portrait video {
  object-fit: contain;
}

/* Der alte Titel-Overlay liegt sonst unlesbar über den Fotos. */
.slider-slide-inner::after {
  content: none;
}

.slider-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.6);
  pointer-events: none;
}

/* Standortanzeige: ein Punkt pro Bild, aktueller Punkt gefüllt.
   Gestaltung analog zu den Pills (runde Form, 2px Kontur). */
.slider-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 5;
  pointer-events: none;
}

.slider-dots[hidden] {
  display: none;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  border: 2px solid #ffffff;
  background: transparent;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.55));
  transition: background 0.2s ease;
}

.slider-dot.active {
  background: #ffffff;
}

/* Project info panel */
.project-info {
  display: none;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
  height: auto;
  padding: 2rem 2.5rem;
  width: 100%;
}

.project-info.open {
  display: flex;
}

.project-info h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.project-info-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 2rem;
}

.project-info-meta .meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 2px solid var(--text);
}

.project-info-meta .meta-row:first-child {
  border-top: 2px solid var(--text);
}

.meta-row .meta-label {
  font-size: 1.375rem;
  font-weight: 500;
}

.meta-row .meta-value {
  font-size: 1.375rem;
  color: var(--text);
  text-align: right;
  max-width: 60%;
}

.meta-row .meta-value a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.meta-row .meta-value a:hover {
  color: var(--accent);
}

.project-info .project-description {
  font-size: 1.375rem;
  line-height: 1.4;
  color: var(--text);
  column-count: 2;
  column-gap: 2rem;
}

/* ====================
   RESPONSIVE
   ==================== */
@media (max-width: 768px) {
  :root {
    --header-height: 56px;
    --footer-height: 48px;
  }

  header {
    padding: 1.25rem 1.75rem;
    padding-top: calc(1.25rem + env(safe-area-inset-top));
  }

  footer {
    padding: 1.25rem 1.75rem;
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
  }

  .pill {
    font-size: 0.875rem;
    padding: 0.3rem 0.75rem;
  }

  /* Index: single column */
  .index-container {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }

  .index-preview {
    display: none;
  }

  .index-titles {
    padding: 0 1.75rem;
  }

  /* Liste unten ausrichten wie im Kontakt-View: Der Auto-Margin schiebt sie
     bei freiem Platz nach unten, bei Platzmangel bleibt sie normal scrollbar. */
  .index-titles::before {
    content: '';
    flex: 0 0 auto;
    margin-top: auto;
  }

  .index-title-item h3 {
    font-size: clamp(1.25rem, 5vw, 2rem);
  }

  /* Contact */
  .contact-container {
    padding: 0 1.75rem;
  }

  /* Lightbox */
  .lightbox-header {
    padding: 1.25rem 1.75rem;
    padding-top: calc(1.25rem + env(safe-area-inset-top));
  }

  .text-lightbox-content {
    padding: 0 1.75rem;
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  }

  .project-info {
    padding: 1.25rem 1.75rem;
  }

  .meta-row .meta-label,
  .meta-row .meta-value {
    font-size: 1rem;
  }

  .meta-row .meta-value {
    max-width: 62%;
  }

  .project-info .project-description {
    font-size: 1rem;
    column-count: 1;
  }

  #projectLightbox .project-info {
    padding-top: 5.5rem;
  }

  .slider-container {
    padding: 1.25rem 1.75rem;
    gap: 0;
  }

  /* Bouncy */
  .bouncy-project {
    width: clamp(160px, 50vw, 240px);
  }
}

/* Auf schmalen Handys ersetzt ein Kreis-Menü die Haupt-Navigation:
   Bouncy/Index bleiben oben rechts, Projekte/Profil/Kontakt klappen
   rechts neben dem Kreis aus. */
@media (max-width: 420px) {
  .nav-menu {
    position: relative;
    align-items: flex-start;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 2px solid var(--text);
    border-radius: 50%;
    background: var(--text);
    color: var(--bg);
    cursor: pointer;
    transition: transform 0.275s ease;
    outline: none;
  }

  .menu-toggle:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
  }

  .menu-toggle[aria-expanded="true"] {
    transform: rotate(180deg);
  }

  .menu-arrow {
    display: block;
    width: 14px;
    height: 14px;
  }

  #mainNav {
    position: absolute;
    top: 0;
    left: 100%;
    z-index: 11;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-8px);
    transition: opacity 0.198s ease, transform 0.198s ease, visibility 0s linear 0.198s;
  }

  .nav-menu.open #mainNav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    transition: opacity 0.198s ease, transform 0.198s ease, visibility 0s linear 0s;
  }

  #mainNav .pill {
    text-align: left;
    opacity: 0;
    transform: translateX(-8px);
    transition: background 0.2s ease, color 0.2s ease, opacity 0.198s ease, transform 0.198s ease;
  }

  /* Aktiver Menüpunkt und Hover bleiben schwarz gefüllt (sonst wäre der
     aktive Button weiß auf weiß). */
  #mainNav .pill:hover,
  #mainNav .pill.active {
    background: var(--text);
    color: var(--bg);
  }

  #mainNav .pill:not(:first-child) {
    margin-left: 0;
    margin-top: -2px;
  }

  .nav-menu.open #mainNav .pill {
    opacity: 1;
    transform: translateX(0);
  }

  .nav-menu.open #mainNav .pill:nth-child(2) {
    transition-delay: 0.044s;
  }

  .nav-menu.open #mainNav .pill:nth-child(3) {
    transition-delay: 0.088s;
  }
}

@media (max-width: 960px) {
  #aboutView.active {
    overflow-y: auto;
  }

  .about-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    min-height: 100%;
    height: auto;
  }

  .about-photo {
    min-height: 50vh;
    margin: 0 1.75rem;
  }

  .about-text {
    justify-content: flex-start;
    padding: 1.5rem 1.75rem 0 1.75rem;
    /* Auf Mobile scrollt die ganze Ansicht, nicht die Textspalte. */
    overflow: visible;
    min-height: auto;
  }

  .about-text-inner {
    margin-top: 0;
    padding-bottom: 1.5rem;
  }

  .about-text h2 {
    margin-bottom: 0.75rem;
  }
}

/* Project lightbox: overlay header & fullscreen */
#projectLightbox {
}

#projectLightbox .lightbox-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
}

#projectLightbox .pill {
  border-color: #000000;
  color: #000000;
  background: #ffffff;
}

#projectLightbox .pill:hover {
  background: #000000;
  color: #ffffff;
}

#projectLightbox .slider-container {
  padding: 0;
}

#projectLightbox .slider-viewport {
  border-radius: 0;
  /* Horizontale Wischgesten gehören dem Slider, vertikal bleibt dem Browser. */
  touch-action: pan-y;
}

#projectLightbox .slider-slide {
  border-radius: 0;
}

#projectLightbox .slider-slide-inner {
  border-radius: 0;
  /* Verhindert Bild-Markierung und Ziehen bei langem Drücken. */
  user-select: none;
  -webkit-user-select: none;
}

#projectLightbox .slider-slide-inner img {
  -webkit-user-drag: none;
}

/* Der Header liegt absolut über dem Inhalt – Platz für Titel schaffen. */
#projectLightbox .project-info {
  padding-top: 7.5rem;
}

/* Mobile: Bilder nicht mehr füllend zuschneiden, sondern komplett zeigen.
   Der entstehende Rand ist schwarz (Hintergrund von Slide und Container). */
@media (max-width: 768px) {
  #projectLightbox .slider-container {
    background: #000000;
  }

  #projectLightbox .slider-slide-inner img,
  #projectLightbox .slider-slide-inner video {
    object-fit: contain;
  }

  .slider-dots {
    bottom: calc(1.5rem + env(safe-area-inset-bottom));
  }
}

/* ====================
   ANIMATIONS
   ==================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scroll-reveal {
  entry  0%  { opacity: 0; }
  entry 85%  { opacity: 0; }
  entry 100% { opacity: 1; }
  exit   0%  { opacity: 1; }
  exit  15%  { opacity: 0; }
  exit 100%  { opacity: 0; }
}

.lightbox.open {
  animation: fadeIn 0.25s ease;
}

/* ====================
   CUSTOM CURSOR
   ==================== */
*, *::before, *::after { cursor: none !important; }

@media (pointer: coarse) {
  *, *::before, *::after { cursor: auto !important; }
}

.cc-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 9999;
  display: none;
  will-change: transform;
}

@media (pointer: fine) {
  .cc-dot { display: block; }
}

.cc-arrow {
  position: fixed;
  top: 0;
  left: 0;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  font-family: 'ABC Dinamo Diatype Variable', Arial, sans-serif;
  opacity: 0;
  transition: opacity 0.1s ease;
  pointer-events: none;
  z-index: 10000;
  will-change: transform;
}

@media (pointer: coarse) {
  .cc-arrow { display: none; }
}

.cc-rotate {
  position: fixed;
  top: 0;
  left: 0;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  z-index: 10000;
  will-change: transform;
}

@media (pointer: coarse) {
  .cc-rotate { display: none; }
}

.cc-rotate svg {
  display: block;
  /* Optisch zentrieren: Die Pfeilspitze oben rechts verschiebt den
     Schwerpunkt der sichtbaren Fläche nach rechts – daher leicht
     nach links und oben rücken. */
  transform: translate(-1.5px, -0.5px);
}

/* Doppelpfeil: erscheint nur über tatsächlich scrollbaren Bereichen. */
.cc-scroll {
  position: fixed;
  top: 0;
  left: 0;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  z-index: 10000;
  will-change: transform;
}

@media (pointer: coarse) {
  .cc-scroll { display: none; }
}

.cc-scroll.is-visible {
  opacity: 1;
}

/* Pfeile aus der Diatype (↑↓) – SVG bleibt als Fallback im DOM. */
.cc-scroll-glyph {
  display: none;
  flex-direction: column;
  align-items: center;
  font-family: var(--font);
  font-size: 18px;
  font-weight: 500;
  line-height: 0.85;
}

.cc-scroll.is-glyph .cc-scroll-glyph {
  display: flex;
}

.cc-scroll.is-glyph .cc-scroll-svg {
  display: none;
}

.cc-scroll svg {
  display: block;
}

/* Dreh-Hinweis nur, wenn das 3D-Modell wirklich geladen ist. */
body:has(.about-photo.model-ready:hover) .cc-rotate {
  opacity: 1;
}

body:has(.bouncy-thumb:hover) .cc-dot,
body:has(.index-preview-img:hover) .cc-dot,
body:has(.slider-slide-inner:hover) .cc-dot,
body:has(.about-photo:hover) .cc-dot,
body:has(.lightbox-header:hover) .cc-dot {
  mix-blend-mode: normal;
  background: #000;
}

body:has(.lightbox-header .pill:hover) .cc-dot {
  mix-blend-mode: difference;
  background: #fff;
}
