/* CSS Reset & Custom Font */
@font-face {
  font-family: 'TWKLausanne';
  src: url('../fonts/TWKLausanne-350.ttf') format('truetype');
  font-weight: 350;
  font-style: normal;
}

@font-face {
  font-family: 'TWKLausanne';
  src: url('../fonts/TWKLausanne-350Italic.ttf') format('truetype');
  font-weight: 350;
  font-style: italic;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

:root {
  --vh: 1vh;
}

body {
  font-family: 'TWKLausanne', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #F2F2F2;
  color: #222222;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Exhibition Detail Page overrides */
body.exhibition-page {
  overflow-y: auto;
  height: auto;
  background: #FAFAFA;
  margin: 0;
  padding: 0;
}

body.exhibition-page .screen {
  padding-top: 0;
}

/* New Exhibition Container Design */
.exhibition-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #FAFAFA;
  margin: 0;
  padding: 0;
}

.exhibition-cover {
  width: 100%;
  height: auto;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  position: relative;
  top: 0;
}

.exhibition-cover img {
  width: 100%;
  height: auto;
  min-height: 214px;
  object-fit: cover;
  display: block;
  margin: 0;
  padding: 0;
}

.exhibition-content {
  flex: 1;
  padding: 0 clamp(8px, 1.5vw, 12px);
  padding-bottom: 200px;
}

.exh-title {
  font-size: 20px;
  font-weight: 350;
  color: #151515;
  line-height: 1.2;
  margin: 16px 0 12px;
}

.exh-artists {
  font-size: 16px;
  font-weight: 350;
  color: #656565;
  line-height: 1.2;
  margin: 0 0 12px;
}

.exh-date {
  font-size: 16px;
  font-weight: 350;
  color: #151515;
  line-height: 0.4;
  margin: 0 0 4px;
}

.exh-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 52px;
  border: 1px solid #151515;
  border-radius: 3px;
  background: transparent;
  text-decoration: none;
  margin-top: 20px;
  margin-bottom: 24px;
  padding: 0;
  gap: 0;
}

.exh-button-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  margin-left: 2px;
}

.exh-button-text {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 350;
  color: #151515;
  line-height: 1.2;
  margin-right: 50px;
}

.exh-description {
  width: 100%;
  text-align: justify;
}

.exh-description p {
  font-size: 16px;
  font-weight: 350;
  color: #222222;
  line-height: 1.25;
  margin: 0 0 16px;
}

/* Old Exhibition Shell Design (fallback) */
.exhibition-shell {
  width: 100%;
  padding: 0 clamp(8px, 3vw, 24px) 110px;
}

.exh-body p {
  font-size: 16px;
  font-weight: 350;
  color: #222222;
  line-height: 1.35;
  margin: 0 0 16px;
  padding: 0 clamp(8px, 1.5vw, 12px);
}

/* Screens Container */
.screens-container {
  position: relative;
  flex: 1;
  width: 100%;
  overflow: hidden;
}

/* Screen Container */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #F2F2F2;
  opacity: 0;
  transform: translateX(100%) translateZ(0);
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  -webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-out;
  pointer-events: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  will-change: transform, opacity;
  -webkit-transform: translateX(100%) translateZ(0);
}

.screen.exhibition-screen {
  padding-top: 0;
}

.screen.active {
  opacity: 1;
  transform: translateX(0) translateZ(0);
  -webkit-transform: translateX(0) translateZ(0);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
  pointer-events: all;
  z-index: 10;
}

/* iOS-Style Slide Transitions: Alte und neue Seite gleiten gleichzeitig */

/* Exit-Animationen: Alte Seite gleitet mit (keine opacity-Änderung) */
.screen.exit-left {
  transform: translateX(-30%) translateZ(0);
  -webkit-transform: translateX(-30%) translateZ(0);
  opacity: 1;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
  z-index: 9;
}

.screen.exit-right {
  transform: translateX(0) translateZ(0);
  -webkit-transform: translateX(0) translateZ(0);
  opacity: 1;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
  z-index: 9;
}

/* Eintritts-Animationen: Neue Seite schiebt sich drüber */
.screen.enter-right {
  transform: translateX(100%) translateZ(0);
  -webkit-transform: translateX(100%) translateZ(0);
  opacity: 1;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
  z-index: 10;
}

.screen.enter-right.active {
  transform: translateX(0) translateZ(0);
  -webkit-transform: translateX(0) translateZ(0);
  opacity: 1;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
}

.screen.enter-left {
  transform: translateX(-100%) translateZ(0);
  -webkit-transform: translateX(-100%) translateZ(0);
  opacity: 1;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
  z-index: 10;
}

.screen.enter-left.active {
  transform: translateX(0) translateZ(0);
  -webkit-transform: translateX(0) translateZ(0);
  opacity: 1;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
}

/* Header */
.app-shell {
  width: 100%;
  padding: 0 clamp(8px, 3vw, 24px); /* Responsive Padding: 8px min, 3vw fluid, 24px max */
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* Logo-Oberkante bündig mit Menü-Button */
  padding: 8px clamp(8px, 2vw, 16px) 12px;
  position: relative;
  z-index: 10;
  margin-bottom: 20px; /* mehr Abstand vor der Sektion */
}

.logo {
  font-size: 24px;
  font-weight: 350;
  color: #000;
  line-height: 1.05;
}

.burger-menu {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.burger-menu img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Section Title */
.section-title {
  font-size: 18px;
  font-weight: 350;
  color: #222222;
  padding: 0 clamp(8px, 2vw, 16px);
  margin: 8px 0 12px; /* zusätzlicher Abstand zum Logo-Bereich */
}

/* Image Slider */
.image-slider {
  position: relative;
  width: 100%;
  padding: 0 clamp(6px, 1.5vw, 12px);
  margin-bottom: 28px;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 27px;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 5;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}

.slider-arrow-left {
  left: 0;
}

.slider-arrow-right {
  right: 0;
}

.slider-arrow img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slider-container {
  width: 304px;
  height: 209px;
  margin: 0 auto;
  background: #D9D9D9;
  border-radius: 0;
  overflow: hidden;
  touch-action: pan-y; /* Erlaubt vertikales Scrollen, aber blockt horizontales für saubere Swipes */
  position: relative;
}

.slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.slider-item {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* Dot Indicators */
.slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c4c4c4;
}

.dot.active {
  background: #666;
}

.intro-text {
  font-size: 18px;
  line-height: 1.35;
  color: #222222;
  padding: 0 clamp(8px, 2vw, 16px) 24px;
}

/* Tab Navigation */
.tab-navigation {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 65px;
  background: #DFDFDF;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 12px 7px;
  z-index: 1000; /* Über alles */
  box-sizing: border-box;
}

.tab-button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  transition: opacity 0.2s;
}

.tab-button img {
  width: 29px;
  height: 29px;
  object-fit: contain;
}

.tab-button span {
  font-size: 14px;
  color: #222222;
  font-weight: 350;
  text-align: center;
}

/* Tab-Button deaktiviert (z.B. Scan wenn keine scanbaren Exponate vorhanden) */
.tab-button[data-disabled="true"] {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ====== SPRACHE / LANGUAGE TOGGLE ====== */

/* Elemente mit data-lang werden je nach html[lang] ein-/ausgeblendet */
html[lang="de"] [data-lang="en"] { display: none; }
html[lang="en"] [data-lang="de"] { display: none; }

.language-toggle-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.language-toggle-btn img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

/* ====== CAMERA SCREEN ====== */

.scan-title {
  font-size: 22px;
  font-weight: 350;
  color: #222222;
  text-align: center;
  line-height: 1.2;
  margin: 32px auto 24px;
  padding: 0 clamp(12px, 2vw, 16px);
  transform: translateY(5vh);
}

.camera-box {
  width: 312px;
  height: 369px;
  margin: 0 auto 16px;
  background: #D9D9D9;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(5vh);
}

#videoElement {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#canvasElement {
  display: none;
}

/* Artwork Info (unter dem Kamera-Kasten) */
.artwork-info {
  width: 312px;
  margin: 0 auto;
  text-align: center;
  min-height: 40px;
  transform: translateY(5vh);
}

.artwork-text {
  font-size: 14px;
  font-weight: 350;
  color: #222222;
  line-height: 1.6;
  white-space: pre-line; /* Erlaubt Zeilenumbrüche */
}

/* ====== NUMBER SCREEN ====== */

.number-screen {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 114px clamp(16px, 5vw, 32px) 100px;
  transform: translateY(-5vh);
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: pan-x pan-y;
}

body.display-browser .app-shell:has(.scan-title) {
  transform: translateY(-10vh);
}

body.display-browser .number-screen {
  transform: translateY(-18vh);
}

body.display-browser .lageplan-screen {
  transform: translateY(-10vh);
}

body.display-browser .exh-title,
body.display-browser .exh-artists,
body.display-browser .exh-date {
  display: none;
}

.number-results-heading {
  position: absolute;
  top: 10px;
  left: 0px;
  font-size: 16px;
  font-weight: 350;
  color: #8C8C8C;
  line-height: 25px;
  margin: 0;
  text-align: left;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.number-results-heading.visible {
  opacity: 1;
  pointer-events: auto;
}

.number-shell {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 0 clamp(8px, 2.5vw, 16px);
}

.number-heading {
  font-size: 22px;
  font-weight: 350;
  color: #222222;
  line-height: 1.1;
  margin: 0;
}

.number-results {
  width: 323px;
  height: 113px;
  padding: 0;
  position: relative;
  transform: translateY(5vh);
}

.number-state {
  width: 100%;
  height: 100%;
}

.number-state-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.number-state-found {
  display: flex;
  align-items: center;
  height: 100%;
}

.number-results::before,
.number-results::after {
  content: '';
  position: absolute;
  left: -3%;
  width: 106%;
  height: 1px;
  background: #C8C8C8;
}

.number-results::before {
  top: 0;
}

.number-results::after {
  bottom: 0;
}

.number-result-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 15px 0 21px;
  cursor: pointer;
  transition: opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.number-result-item:hover {
  opacity: 0.7;
}

.number-result-thumb {
  width: 105px;
  height: 77px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.number-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.number-result-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 4px;
  padding-top: 2px;
}

.number-result-artist,
.number-result-title {
  font-size: 18px;
  line-height: 25px;
  font-weight: 350;
  margin: 0;
}

.number-result-artist {
  color: #222222;
}

.number-result-title {
  color: #787878;
  font-style: italic;
}
.number-display {
  width: 287px;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0.18em;
  line-height: 0;
  text-align: center;
  margin-top: calc(60px + 5vh);
  transition: color 0.2s ease;
}

.number-display-empty {
  color: #343434;
}

.number-display-filled {
  color: #222222;
}

.number-pad {
  width: 216.2px; /* 188px * 1.15 */
  display: grid;
  grid-template-columns: repeat(3, 59.225px); /* 51.5px * 1.15 */
  grid-auto-rows: 57.914px; /* 50.36px * 1.15 */
  column-gap: 16.25px;
  row-gap: 16.25px;
  margin-top: 45px;
}

.number-key,
.number-action {
  width: 100%;
  height: 100%;
  border-radius: 11.5px; /* 10px * 1.15 */
  border: 1px solid #979797;
  background: #F2F2F2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34.5px; /* 30px * 1.15 */
  font-weight: 350;
  color: #000000;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.number-key:active,
.number-action:active {
  transform: scale(0.96);
}

.number-action[aria-disabled="true"] {
  cursor: default;
  opacity: 0.35;
}


.number-action img {
  width: 36.8px; /* 32px * 1.15 */
  height: 36.8px;
  object-fit: contain;
}

.number-action[data-action="delete"] img {
  width: 25.3px; /* 22px * 1.15 */
  height: 25.3px;
}

/* ====== ARTWORKS LIST SCREEN ====== */
.artworks-screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 6px 0 80px;
}

.artworks-search {
  /* Feature noch nicht implementiert, siehe README.md */
  display: none;
  width: calc(100% - 16px);
  height: 36px;
  background: #E6E6E6;
  border-radius: 3px;
  margin: 0 8px 17px;
  align-items: center;
  padding: 0 13px;
  gap: 11px;
  flex-shrink: 0;
}

.artworks-search-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: 0.6;
}

.artworks-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'TWKLausanne', sans-serif;
  font-size: 16px;
  font-weight: 350;
  color: #838383;
  outline: none;
}

.artworks-search-input::placeholder {
  color: #838383;
}

.artworks-list {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 8px 180px 8px;
  position: relative;
}

.artworks-loading {
  text-align: center;
  padding: 40px 20px;
  font-size: 16px;
  color: #888;
}

.artwork-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid #C8C8C8;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.artwork-item:last-child {
  border-bottom: none;
}

.artwork-thumb {
  width: 135px;
  height: 94px;
  flex-shrink: 0;
  border-radius: 0;
  overflow: hidden;
  background: #D9D9D9;
}

.artwork-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.artwork-list-info {
  flex: 1;
}

.artwork-list-artist {
  font-size: 16px;
  font-weight: 350;
  color: #222222;
  line-height: 1.3;
  margin: 0 0 4px 0;
  text-align: left;
}

.artwork-list-title {
  font-size: 14px;
  font-weight: 350;
  font-style: italic;
  color: #787878;
  line-height: 1.3;
  margin: 0;
  text-align: left;
}

/* ====== ARTWORK DETAIL SCREEN ====== */
.artwork-detail-screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #F2F2F2;
  padding: 0 0 120px;
  overflow-y: auto;
}

/* Back button – fixed so it stays visible while scrolling */
.artwork-detail-back-btn {
  position: fixed;
  left: 17px;
  top: 37px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 200;
  -webkit-tap-highlight-color: transparent;
}

.artwork-detail-back-btn img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

/* ---- Artwork Lightbox ---- */
.artwork-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(34, 34, 34, 0.96);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.artwork-lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.artwork-lightbox-close {
  position: absolute;
  right: 14px;
  top: 13px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 510;
  -webkit-tap-highlight-color: transparent;
}

.artwork-lightbox-close img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

.artwork-lightbox-panzoom {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  cursor: grab;
}

.artwork-lightbox-panzoom:active {
  cursor: grabbing;
}

.artwork-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  pointer-events: none;
}

.artwork-detail-container {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.artwork-detail-image {
  width: 100%;
  max-height: 260px;
  margin: 0 auto 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #F2F2F2;
}

.artwork-detail-image img {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  display: block;
  background-color: #F2F2F2;
}

.artwork-detail-artist {
  font-size: 18px;
  font-weight: 350;
  color: #222222;
  line-height: 25px;
  padding: 0 14px;
  margin: 0 0 4px;
}

.artwork-detail-title {
  font-size: 18px;
  font-weight: 350;
  color: #787878;
  line-height: 25px;
  padding: 0 14px;
  margin: 0 0 10px;
}

.artwork-detail-title-text {
  font-style: italic;
}

.artwork-detail-materials {
  font-size: 12px;
  font-weight: 350;
  color: #787878;
  line-height: 1.048;
  padding: 0 14px;
  margin: 0 0 24px;
  white-space: pre-wrap;
}

.artwork-detail-audio {
  width: calc(100% - 8px);
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.artwork-audio-player-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.artwork-detail-description {
  font-size: 16px;
  font-weight: 350;
  color: #000000;
  line-height: 20px;
  padding: 0 16px 180px;
  margin: 0;
  text-align: justify;
}

.artwork-detail-description p {
  margin: 0 0 16px 0;
}

.artwork-detail-description p:last-child {
  margin-bottom: 0;
}

/* ====== AUDIO PLAYER ====== */
.audio-player-container {
  width: calc(100% - 40px);
  height: 44px;
  background: #DFDFDF;
  border-radius: 4.4px;
  margin: 0 20px 26px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  gap: 13px;
  position: relative;
}

.audio-player-play-pause {
  width: 33px;
  height: 33px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.audio-player-play-pause:hover {
  opacity: 0.7;
}

.audio-player-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.audio-player-timeline-wrapper {
  flex: 1;
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
}

.audio-player-timeline {
  width: 100%;
  height: 4.4px;
  background: #C8C8C8;
  border-radius: 2.2px;
  position: relative;
  cursor: pointer;
}

.audio-player-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #787878;
  border-radius: 2.2px;
  width: 0%;
  transition: width 0.1s linear;
}

.audio-player-position-indicator {
  position: absolute;
  width: 4.84px;
  height: 4.84px;
  background: #4B4B4B;
  border-radius: 50%;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.audio-player-time {
  font-family: 'Inter', sans-serif;
  font-size: 13.2px;
  color: #4B4B4B;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 55px;
  text-align: right;
}

.audio-player-volume-btn {
  width: 31px;
  height: 31px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.audio-player-volume-btn:hover {
  opacity: 0.7;
}

.audio-player-volume-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.audio-player-volume-panel {
  position: absolute;
  bottom: 55px;
  right: 15px;
  width: 44px;
  height: 132px;
  background: #DFDFDF;
  border-radius: 8.8px;
  padding: 13px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.audio-player-volume-panel[hidden] {
  display: none;
}

.audio-player-volume-slider {
  -webkit-appearance: slider-vertical;
  width: 6.6px;
  height: 106px;
  background: #C8C8C8;
  border-radius: 3.3px;
  outline: none;
  cursor: pointer;
}

.audio-player-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15.4px;
  height: 15.4px;
  background: #4B4B4B;
  border-radius: 50%;
  cursor: pointer;
}

.audio-player-volume-slider::-moz-range-thumb {
  width: 15.4px;
  height: 15.4px;
  background: #4B4B4B;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* ====== LAGEPLAN SCREEN ====== */
.lageplan-screen {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  padding: 83px 5px 120px 6px;
}

.lageplan-screen img {
  width: 329px;
  height: 508px;
  display: block;
  object-fit: contain;
}

/* Responsive Adjustments */
@media (min-width: 480px) {
  .slider-container {
    width: 308px;
    height: 196px;
  }
  .tab-button span {
    font-size: 12px;
  }
}

@media (min-width: 768px) {
  /* Vergrößere Text um ~50% auf Tablets */
  .logo {
    font-size: 36px;
  }
  
  .section-title {
    font-size: 27px;
  }
  
  .exh-title {
    font-size: 33px;
  }
  
  .exh-artists {
    font-size: 27px;
  }
  
  .exh-date {
    font-size: 27px;
  }
  
  .exh-body p {
    font-size: 24px;
  }
  
  .intro-text {
    font-size: 27px;
  }
  
  .scan-title {
    font-size: 33px;
  }
  
  .artwork-text {
    font-size: 21px;
  }
  
  /* UI-Elemente größer */
  .tab-button span {
    font-size: 16px;
  }
  
  .tab-button img {
    width: 40px;
    height: 40px;
  }
  
  .slider-arrow {
    width: 32px;
    height: 32px;
  }
  
  .tab-navigation {
    height: 88px;
  }
  
  /* Content Größer */
  .screen {
    padding-top: 30px;
  }
  
  .header {
    padding: 32px clamp(12px, 3vw, 20px) 16px;
  }
  
  .slider-container {
    width: 340px;
    height: 227px;
  }
  
  .camera-box {
    width: 360px;
    height: 427px;
  }
  
  .burger-menu {
    width: 40px;
    height: 40px;
  }

  .lageplan-screen {
    max-width: 400px;
    padding: 96px 12px 140px;
  }

  .lageplan-screen img {
    width: 360px;
    height: 556px;
  }
}

/* ============================= */
/* LAGEPLAN/MAP SCREENS STYLES   */
/* ============================= */

/* Map Screen Wrapper - Flex Layout */
.map-screen-wrapper {
  display: flex;
  flex-direction: column;
  position: relative;
  height: calc(100vh - 65px);
  height: -webkit-fill-available;
  height: calc(var(--vh, 1vh) * 100 - 65px);
  width: 100%;
  overflow: hidden;
}

.map-content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 16px 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Map Overview Container */
.map-overview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.map-building-title {
  font-family: 'TWKLausanne', sans-serif;
  font-size: 22px;
  font-weight: 350;
  text-align: center;
  margin: 0;
  padding: 8px 0;
  color: #222222;
}

.map-oktogon-title {
  font-size: 20px;
}

.map-thumbnail {
  width: 100%;
  max-width: 170px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.map-thumbnail:active {
  transform: scale(0.98);
}

.map-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* Map Detail Screens (Floor Plans) */
.map-detail-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: -12px;
}

.map-detail-title {
  font-family: 'TWKLausanne', sans-serif;
  font-size: 20px;
  font-weight: 350;
  text-align: center;
  margin: 0;
  padding: 12px 0;
  color: #222222;
}

.map-plan-image {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 45vh;
  max-height: 68vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  margin-top: 0;
}

.map-plan-image img {
  width: 90%;
  height: 90%;
  max-height: 68vh;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 0.075s ease-out;
}

.map-plan-image img.panzoom-ready {
  opacity: 1;
}

/* ---- Map Artwork Markers ---- */

/* Invisible overlay stretched over the whole Panzoom element.
   pointer-events: none so the base overlay div itself doesn't block panning. */
.map-marker-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

/* Individual marker button – 30 px circle, visually centred on its coordinate */
.map-marker {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #E6E6E6;
  border: 1.5px solid #222222;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  cursor: pointer;
  /* Centre the element on its percentage coordinate */
  transform: translate(-50%, -50%);
  transform-origin: center center;
  font-family: 'TWKLausanne', sans-serif;
  font-size: 18px;
  font-weight: 350;
  color: #222222;
  line-height: 1;
  padding: 0;
  /* Smooth LOD transition for cluster dots */
  transition: width 0.2s ease, height 0.2s ease, font-size 0.2s ease;
  /* Sit above the image */
  z-index: 10;
  /* No tap highlight on mobile */
  -webkit-tap-highlight-color: transparent;
}

/* Collapsed cluster dot – small, no label */
.map-marker.cluster-dot {
  width: 12px;
  height: 12px;
  font-size: 0;
  border-width: 1px;
}

/* Cluster dot after zooming past LOD threshold */
.map-marker.cluster-dot.expanded {
  width: 36px;
  height: 36px;
  font-size: 16px;
}

/* Tab Bar Container */
.map-tabs-container {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  background: #F2F2F2;
}

.map-tabs-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px solid #000000;
  border-radius: 3px;
  pointer-events: none;
  z-index: 3;
}

/* Active Tab Indicator (Beweglicher Hintergrund) */
.map-tab-active {
  position: absolute;
  height: 50px;
  background: #D9D9D9;
  border-radius: 3px;
  z-index: 2;
  transition: left 0.3s ease, width 0.3s ease;
  pointer-events: none;
}

/* Active Indicator Positions - Hauptgebäude (4 Tabs) */
.map-tabs-container:not(.map-oktogon-tabs) .map-tab-active[data-floor="eg"] {
  left: 0;
  width: 72px;
}

.map-tabs-container:not(.map-oktogon-tabs) .map-tab-active[data-floor="1og"] {
  left: 73px;
  width: 82px;
}

.map-tabs-container:not(.map-oktogon-tabs) .map-tab-active[data-floor="2og"] {
  left: 156px;
  width: 75px;
}

.map-tabs-container:not(.map-oktogon-tabs) .map-tab-active[data-floor="oktogon"] {
  left: 228px;
  width: 92px;
}

/* Active Indicator Positions - Oktogon (3 Tabs) */
.map-oktogon-tabs .map-tab-active[data-floor="1og"] {
  left: 0;
  width: 96px;
}

.map-oktogon-tabs .map-tab-active[data-floor="2og"] {
  left: 96px;
  width: 93px;
}

.map-oktogon-tabs .map-tab-active[data-floor="hauptgebaeude"] {
  left: 189px;
  width: 131px;
}

/* Tab Buttons */
.map-tab {
  font-family: 'TWKLausanne', sans-serif;
  font-size: 18px;
  font-weight: 350;
  color: #222222;
  background: transparent;
  border: none;
  cursor: pointer;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 3;
  position: relative;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}

/* Tab Widths - Hauptgebäude (4 Tabs) */
.map-tabs-container:not(.map-oktogon-tabs) .map-tab[data-floor="eg"] {
  width: 72px;
}

.map-tabs-container:not(.map-oktogon-tabs) .map-tab[data-floor="1og"] {
  width: 80px;
}

.map-tabs-container:not(.map-oktogon-tabs) .map-tab[data-floor="2og"] {
  width: 73px;
}

.map-tabs-container:not(.map-oktogon-tabs) .map-tab[data-floor="oktogon"] {
  width: 86px;
}

/* Tab Widths - Oktogon (3 Tabs) */
.map-oktogon-tabs .map-tab[data-floor="1og"] {
  width: 96px;
}

.map-oktogon-tabs .map-tab[data-floor="2og"] {
  width: 91px;
}

.map-oktogon-tabs .map-tab[data-floor="hauptgebaeude"] {
  width: 137px;
}

/* Tab Dividers */
.map-tab-divider {
  width: 1px;
  height: 50px;
  background: #000000;
  z-index: 3;
  flex-shrink: 0;
}

/* Overview Screen - All tabs clickable */
.map-overview-container .map-tab {
  opacity: 1;
}

.map-overview-container .map-tab:active {
  opacity: 0.7;
}

/* ========== MAP ZOOM & ARTWORK MARKERS ========== */

/* Map Plan Container with Panzoom */
.map-plan-image {
  position: relative;
  touch-action: none;
  cursor: grab;
}

.map-plan-image:active {
  cursor: grabbing;
}

/* SVG Overlay for Artwork Markers */
.artwork-markers-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Individual Artwork Marker (Full Display) */
.artwork-marker {
  cursor: pointer;
  pointer-events: all;
  transition: transform 0.2s ease, opacity 0.3s ease;
}

.artwork-marker circle {
  fill: #D9D9D9;
  stroke: #000000;
  stroke-width: 1px;
}

.artwork-marker text {
  font-family: 'TWKLausanne', sans-serif;
  font-size: 20px;
  font-weight: 350;
  fill: #222222;
  text-anchor: middle;
  dominant-baseline: middle;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.artwork-marker:hover circle {
  fill: #C0C0C0;
}

.artwork-marker:active {
  transform: scale(0.95);
}

/* Cluster Marker (Small Display) */
.artwork-marker-small {
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.artwork-marker-small circle {
  fill: #D9D9D9;
  stroke: #000000;
  stroke-width: 1px;
}

/* Level of Detail Control */
.lod-full {
  opacity: 0;
  pointer-events: none;
}

.lod-small {
  opacity: 1;
}

/* When zoomed in (scale >= 1.5) */
.map-zoomed .lod-full {
  opacity: 1;
  pointer-events: all;
}

.map-zoomed .lod-small {
  opacity: 0;
}
