html,
body {
  width: 100%; /* avoid 100vw causing horizontal overflow on mobile */
  height: 100vh;
  margin: 0;
  padding: 0;
  font-family: "Anybody", sans-serif;
  font-weight: 700;
  background: #f1d0df;
  box-sizing: border-box;
  overflow-x: hidden; /* guard against accidental right overflow */
}

/* Preloader overlay */
.preloader {
  position: fixed;
  inset: 0;
  background: #e7aac5;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483647; /* above all overlays */
  transition: opacity 300ms ease, visibility 300ms ease;
}
.preloader img {
  width: clamp(120px, 20vw, 200px);
  height: auto;
}
.preloader--fadeout {
  opacity: 0;
  visibility: hidden;
}

/* Responsive CSS variables for timetable left columns (day + time) */
:root {
  --timetable-left-cols-width: calc(2em + 2em);
  --timetable-header-height: 5em;
  --now-bar-height: 0.3em;
  --now-dot-size: 0.85em;
  --now-dot-nudge: 0.08em; /* fine-tune vertical alignment of dot */
}
@media (max-width: 820px) {
  :root { --timetable-left-cols-width: calc(1.8em + 1.2em); }
}
@media (max-width: 480px) {
  :root { --timetable-left-cols-width: calc(2.2em + 1.5em); }
}
@media (max-width: 400px) {
  :root { --timetable-left-cols-width: calc(2.5em + 1.8em); }
}

/* Fixed white background behind day + time columns */
.timetable-left-fixed-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--timetable-left-cols-width);
  height: 100vh;
  background: #fff;
  z-index: 0;
  pointer-events: none;
}

@media (max-width: 480px) {
  .timetable-left-fixed-bg {
    width: calc(var(--timetable-left-cols-width) - 0.08em);
  }
}

.timetable-bg .header {
  font-weight: bold;
  background: #f1d0df;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.timetable-fg .block {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  /* padding: 0 6px 0 2px; */
  margin: 0;
  background: #e4ffad;
  border: 0.13em solid #000;
  box-sizing: border-box;
}

/* Starred state: slightly darker to stand out */
.timetable-fg .block.starred:not(.block-modal):not(.block-modal-animating) {
  filter: saturate(1.5) brightness(0.9);
  border-width: 0.28em; /* thicker border for starred grid blocks */
  border-color: #000000;
}
.timetable-fg .block.block--workshop.starred:not(.block-modal):not(.block-modal-animating) {
  filter: saturate(1.5) brightness(0.9);
  border-width: 0.28em; /* thicker border for starred grid blocks */
  border-color: #000000;
}

/* Big background star overlay for starred items (fills the block) */
.timetable-fg .block.starred:not(.block-modal):not(.block-modal-animating)::after {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%; /* fill container */
  background-size: 100% 100%; /* fill container */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 17.27L18.18 21l-1.64-7.03L22 9.239l-7.19-.61L12 2 9.19 8.629 2 9.239l5.46 4.731L5.82 21z' fill='%23000000' fill-opacity='0.1'/></svg>");
  pointer-events: none;
  z-index: 0;
}
.timetable-fg .block.block--workshop.starred:not(.block-modal):not(.block-modal-animating)::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 17.27L18.18 21l-1.64-7.03L22 9.239l-7.19-.61L12 2 9.19 8.629 2 9.239l5.46 4.731L5.82 21z' fill='%23000000' fill-opacity='0.12'/></svg>");
}

/* Ensure inner content stays above the background star */
.timetable-fg .block.starred:not(.block-modal):not(.block-modal-animating) > .block-inner {
  position: relative;
  z-index: 1;
  background: transparent; /* let star show through */
}

/* Star background also in modal when item is starred */
.block.block-modal.starred::after {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 70% 70%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 17.27L18.18 21l-1.64-7.03L22 9.239l-7.19-.61L12 2 9.19 8.629 2 9.239l5.46 4.731L5.82 21z' fill='%23000000' fill-opacity='0.06'/></svg>");
  pointer-events: none;
  z-index: 0;
}
.block.block-modal.block--workshop.starred::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 17.27L18.18 21l-1.64-7.03L22 9.239l-7.19-.61L12 2 9.19 8.629 2 9.239l5.46 4.731L5.82 21z' fill='%23000000' fill-opacity='0.08'/></svg>");
}
/* Ensure modal content sits above the star */
.block.block-modal.starred > * { position: relative; z-index: 1; }

/* Apply same saturation/darkening to starred popup background */
.block.block-modal.starred {
  filter: saturate(1.5) brightness(0.9);
}

/* Workshop variant uses festival pink */
.timetable-fg .block.block--workshop {
  background: #e7aac5;
}
/* Ensure inner container matches workshop color inside grid cards */
.timetable-fg .block.block--workshop .block-inner {
  background: #e7aac5;
}

.block-inner {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Anybody", sans-serif;
  font-weight: 700;
  color: #000;
  background: transparent;
  padding: 0.125em 0.375em 0.125em 0.125em;
}

.timetable-wrapper {
  width: 100vw;
  height: 100vh;
  min-width: 0;
  min-height: 0;
  max-width: 100vw;
  max-height: 100vh;
  position: relative;
  margin: 0;
  padding: calc(var(--timetable-header-height) + env(safe-area-inset-top)) 0 0 0; /* keep content below fixed overlay header */
  padding: calc(var(--timetable-header-height) + constant(safe-area-inset-top)) 0 0 0; /* iOS < 12 fallback */
  box-sizing: border-box;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 1; /* above fixed left bg */
}

.timetable-bg,
.timetable-fg {
  width: 100vw;
  min-width: 0;
  max-width: 100vw;
  box-sizing: border-box;
  grid-template-columns: minmax(70px, 120px) repeat(4, minmax(0, 1fr));
}

.timetable-bg {
  display: grid;
  grid-template-columns: 2em 2em repeat(4, 1fr);
  grid-auto-rows: 2.5em;
  border-collapse: collapse;
  z-index: 1;
  /* column-gap entfernt */
  /* Let body background show through stage grid */
  background: transparent;
  position: relative;
}

.timetable-fg {
  display: grid;
  grid-template-columns: 2em 2em repeat(4, 1fr);
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2;
  /* gap entfernt */
  /* column-gap entfernt */
}

.timetable-bg .cell,
.timetable-fg .block {
  font-size: 1rem;
}

.timetable-bg .cell {
  border-left: none !important;
  border-right: none !important;
  border-bottom: 0.08em solid #000;
  /* padding entfernt */
  box-sizing: border-box;
}
.timetable-bg .cell.header {
  position: -webkit-sticky;
  border-top: 1px solid #f1d0df;
  border-right: 1px solid #f1d0df;
  border-bottom: 1px solid #f1d0df;
  border-left: 1px solid #f1d0df;
  position: sticky;
  top: 0;
  background: #f1d0df;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1;
}

/* When overlay header is active, hide original sticky headers to prevent duplication */
.has-overlay-header .timetable-bg .cell.header {
  display: none;
}

/* Stage grid cells inherit body background (no extra overlay) */
.timetable-bg .cell:not(.header):not(.time-label):not(.day-label) {
  background: transparent;
}
/* Linke Border nur für die erste Stage-Spalte (grid-column: 3) */
.timetable-bg .cell[style*="grid-column: 3"] {
  border-left: 0.25em solid #000;
}
/* Linke Border für alle Stage-Spalten (ab grid-column: 3) */
.timetable-bg .cell[style*="grid-column: 3"],
.timetable-bg .cell[style*="grid-column: 4"],
.timetable-bg .cell[style*="grid-column: 5"],
.timetable-bg .cell[style*="grid-column: 6"] {
  border-left: 0.25em solid #000;
}
.timetable-bg .header {
  font-weight: bold;
  background: #f1d0df;
}
.timetable-fg .block {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: auto;
  margin: 0;
  max-width: calc(100% - 0.5em);
  margin-left: 0.15em;
  margin-right: auto;
  /* Align blocks close to the hour line; leave space at bottom */
  max-height: calc(100% - 0.3em);
  margin-top: -0.2em;
  position: relative;
  overflow: hidden;
}
.block-inner {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Anybody", sans-serif;
  font-weight: 700;
  color: #000;
  background: #e4ffad;
  padding: 0.125em;
}
@keyframes placeholder-pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}
.block.placeholder {
  opacity: 1;
  background: rgba(40, 40, 40, 0.28) !important;
  border-radius: 0.05em;
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.18);
  pointer-events: none;
  transition: background 0.2s;
  animation: placeholder-pulse 2.5s infinite ease-in-out;
}
/* Roter Balken für aktuelle Zeit */
.now-bar {
  background: #dc005f;
  opacity: 0.75;
  height: var(--now-bar-height);
  width: 100%;
  z-index: 100;
  position: relative;
}

/* Now-Dot (roter Punkt) */
.now-dot {
  position: relative;
  left: -0.375em;
  width: var(--now-dot-size);
  height: var(--now-dot-size);
  background: #dc005f;
  border-radius: 50%;
  box-shadow: 0 0 0.25em 0.0625em rgba(0, 0, 0, 0.15);
  z-index: 101;
  opacity: 1;
  mix-blend-mode: normal;
  transform: translateY(calc((var(--now-bar-height) - var(--now-dot-size)) / 2 + var(--now-dot-nudge) - 1px));
}

.cell.day-label {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-weight: bold;
  writing-mode: vertical-lr;
  text-align: center;
  font-size: 1em;
  letter-spacing: 0.05em;
  min-width: 2em;
  max-width: 2em;
  padding: 1em 0 0.5em;
  background: #fff;
  border-right: 0.25em solid #000;
  border-bottom: 0.08em solid #000;
  justify-content: flex-start;
}

.timetable-bg .cell.day-label {
  border-bottom: 0.15em solid #000;
}
.timetable-bg .cell.day-label:last-of-type {
  border-bottom: none;
}

.cell.time-label {
  writing-mode: vertical-lr;
  text-align: center;
  font-weight: bold;
  font-size: 1em;
  letter-spacing: 0.05em;
  min-width: 2em;
  max-width: 2em;
  padding: 0;
  background: none;
  border-right: 0.25em solid #000;
  border-bottom: 0.08em solid #000;
}

.hour-line {
  border-top: 0.16em solid #000;
  height: 0;
  margin: 0;
  padding: 0;
  grid-column: 2 / span 5;
}

.hour-line-thin {
  border-top: 0.08em solid #000 !important;
}

.timetable-bg .cell,
.timetable-bg .cell.time-label {
  border-top: none !important;
  border-bottom: none !important;
}

.timetable-bg .cell.time-label {
  border-right: none !important;
  margin-top: 0.25em;
}

.block-inner:only-child:empty,
.block-inner:only-child:after {
  display: none;
}

.block.placeholder {
  opacity: 0;
  pointer-events: none;
}

.day-separator {
  border-top: 0.16em solid #000;
  height: 0;
  margin: 0;
  padding: 0;
  grid-column: 1;
}

.timetable-bg .cell.header {
  border-bottom: none !important;
}

.day-label-inner {
  z-index: 9;
  position: sticky;
  top: calc(var(--timetable-header-height) + 0.8em);
  width: fit-content;
  padding-left: 0.25em;
  font-weight: 750;
  background: none;
  text-align: center;
  font-stretch: 135%;
  font-variation-settings: "wdth" 135, "wght" 750;
}

.artist-modal-countdown {
  font-size: 0.95em;
  font-weight: 500;
  color: #333;
  margin-top: 0.3em;
  margin-bottom: 0.2em;
  letter-spacing: 0.01em;
  opacity: 0.85;
}

/* Block animating to modal */
.block.block-modal-animating {
  transition: all 0.35s cubic-bezier(0.19, 1.29, 0.7, 1.04);
  background: #e4ffad !important;
  z-index: 99999 !important;
}
.block.block-modal {
  pointer-events: auto !important;
  cursor: auto !important;
  background: #e4ffad !important;
  border: 0.13em solid #000; /* match grid block border */
  box-shadow: 0 32px 96px 0 rgba(0, 0, 0, 0.55),
    0 12px 48px 0 rgba(0, 0, 0, 0.22), 0 4px 16px 0 rgba(0, 0, 0, 0.12) !important;
  border-radius: 0 !important;
  font-family: "Anybody", sans-serif;
  font-weight: 700;
  padding: 2.5em 3em 2em 3em;
  z-index: 99999 !important;
  aspect-ratio: 2 / 1.3;
  min-height: calc(0.5 * min(90vw, 400px)); /* 2:1 aspect ratio fallback */
  height: auto;
  max-height: none;
  font-size: 18px;
}

/* Allow overriding modal background via inline style when workshop */
.block.block-modal.block--workshop {
  background: #e7aac5 !important;
}
.block.block-modal h2 {
  margin: 0.1em 0 0.15em 0;
  font-size: 2em;
  color: #000;
  text-align: center;
  font-stretch: 88%;
  font-variation-settings: "wdth" 88;
}
.block.block-modal .artist-modal-stage {
  font-size: 1.1em;
  margin-top: 0.7em;
  margin-bottom: 0.5em;
  color: #333;
  font-weight: 600;
}
.block.block-modal .artist-modal-timeinfo {
  font-size: 1.2em;
  margin-bottom: 0.1em;
  color: #000;
  font-weight: 700;
}
.block.block-modal .artist-modal-bracket {
  font-size: 1em;
  margin-top: 0em;
  margin-bottom: 0.8em;
  font-weight: 500;
  text-align: center;
}

/* Slightly increase bracketed content inside the artist popup */
.block.block-modal .artist-modal-bracket .artist-brackets {
  font-size: 0.95em;
  font-weight: 600;
}

/* Heavier description text specifically for stage popups */
.block.block-modal.stage-modal .artist-modal-bracket .artist-brackets {
  font-weight: 700;
}

/* Larger description font for stage popups */
.block.block-modal.stage-modal .artist-modal-bracket {
  font-size: 1.2em;
}

/* Larger label for Instagram button in stage popup (icon size unchanged) */
.block.block-modal.stage-modal .artist-modal-star .artist-modal-star-label {
  font-size: 0.72em;
  transform: translateY(0.06em);
}

.block.block-modal .artist-modal-countdown {
  font-size: 0.95em;
  font-weight: 600;
  color: #333;
  margin-top: 0.2em;
  letter-spacing: 0.01em;
  opacity: 0.85;
}

.block.block-modal .artist-modal-close {
  position: absolute;
  top: 0.5em;
  right: 0.5em;
  background: none;
  border: none;
  padding: 0;
  font-size: 1.4em; /* match star button base to keep equal heights */
  color: #000;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.2s;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Unified modal control styles (close and star) */
.modal-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
}
.modal-control .modal-control-icon {
  width: 0.9em;
  height: 0.9em;
  display: inline-block;
}
/* icon-only variation uses same icon sizing; container placement differs */

.block.block-modal .artist-modal-close .modal-close-icon,
.block.block-modal .artist-modal-close .modal-control-icon {
  display: block;
  width: 0.9em; /* match star icon size */
  height: 0.9em;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  padding: 0.3em; /* total ~1.5em (0.9 + 2*0.3) to match star pill height */
}

/* Star toggle in modal */
.block.block-modal .artist-modal-star {
  position: static; /* flow with content below countdown */
  background: rgba(0, 0, 0, 0.08);
  border: none;
  height: 1.5em; /* match close icon total height (1em icon + 2*0.25em padding) */
  padding: 0 0.5em; /* pill padding for icon + label */
  font-size: 1.4em; /* balance overall scale relative to modal */
  color: #c94f7c;
  cursor: pointer;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
  border-radius: 9999px; /* fully rounded pill */
  margin-top: 0.9em;
}
.block.block-modal.stage-modal .artist-modal-star {
  position: static; /* place below description */
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
  margin-top: 0.9em;
  text-decoration: none;
}
.block.block-modal.stage-modal .artist-modal-star:hover,
.block.block-modal.stage-modal .artist-modal-star:focus {
  text-decoration: none;
}
.block.block-modal .artist-modal-star .artist-modal-star-icon,
.block.block-modal .artist-modal-star .modal-control-icon { width: 0.9em; height: 0.9em; display: inline-block; }
.block.block-modal .artist-modal-star:hover {
  color: #a23d62;
}
.block.block-modal .artist-modal-star .artist-modal-star-label {
  font-size: 0.58em;
  font-weight: 600;
  margin-left: 0.3em;
  color: #000;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  font-stretch: 95%;
  font-variation-settings: "wdth" 95;
  white-space: nowrap;
}

.block,
.block-inner {
  border-radius: 0.75em;
}

.block.block-modal,
.block.block-modal-animating {
  border-radius: 0.75em !important;
}

.block.placeholder {
  border-radius: 0.75em !important;
}

.fab-btn {
  position: fixed;
  bottom: 4.2em;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.18);
  font-size: 2em;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10010;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  overflow: visible;
}
.fab-map {
  left: 3em;
  z-index: 30000;
}
.fab-menu {
  right: 3em;
  z-index: 30001;
}
.fab-icon {
  width: 60%;
  height: 60%;
  display: block;
  margin: auto;
}

.map-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #e7aac5;
  z-index: 20000;
}

/* --- PDF Overlay --- */
.pdf-overlay {
  position: fixed;
  inset: 0;
  background: #e7aac5; /* festival pink */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50000; /* above menu/map */
}
.pdf-frame-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.pdf-title {
  margin: 0;
  padding: 0 1.2em; /* horizontal padding only; height is fixed below */
  color: #000;
  font-weight: 800;
  font-size: 1.65em; /* match stage header size */
  background: transparent;
  text-align: center;
  text-transform: uppercase; /* match stage header casing */
  line-height: 0.9; /* align visual density with headers */
  height: var(--timetable-header-height); /* same height as table header */
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 0.16em solid #000; /* black border at bottom */
}
.pdf-frame {
  /* Ensure PDF viewer height is viewport minus fixed header height */
  flex: 0 0 auto;
  height: calc(100vh - var(--timetable-header-height));
  width: 100%;
  border: none;
  background: #222;
}
.pdf-overlay-close {
  position: fixed;
  right: clamp(1.2em, 4vw, 3em); /* match .menu-fab-close */
  bottom: 4.2em; /* mirrors .fab-btn default */
  background: #e7aac5; /* festival pink */
  border: 0.13em solid #000; /* black border */
  color: #000;
  border-radius: 50%;
  width: 72px; /* match .fab-btn default */
  height: 72px; /* match .fab-btn default */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50010;
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.18); /* match .fab-btn */
}
.pdf-overlay-close:hover { background: #e7aac5; filter: brightness(0.96); }
.pdf-overlay-close svg { width: 60%; height: 60%; display: block; }

@media (max-width: 480px) {
  .pdf-overlay-close {
    right: 1.2em; /* match .menu-fab-close on small screens */
    bottom: 2.7em; /* mirrors .fab-btn mobile */
    width: 56px; /* match .fab-btn mobile */
    height: 56px; /* match .fab-btn mobile */
  }
}

@media (min-width: 821px) {
  .pdf-overlay-close {
    bottom: 2em; /* match .fab-btn on wide screens */
  }
}

/* --- Menu Overlay --- */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: #e4ffad; /* artist card green */
  z-index: 40000;
  display: none;
  align-items: stretch;
  justify-content: center; /* center the content wrapper horizontally */
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto; /* make the overlay scrollable */
  -webkit-overflow-scrolling: touch;
  padding: 1em;
  box-sizing: border-box; /* ensure padding does not exceed viewport width */
}

@media (max-width: 820px) {
  .menu-overlay {
    border-top: 0.16em solid #000; /* match sticky header border width */
  }
}
.menu-card {
  position: relative;
  width: min(100%, 500px);
  max-width: 100%; /* allow full width on very small screens */
  height: auto; /* let content define height; overlay scrolls */
  background: transparent;
  color: #000;
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 2em auto 0;
  padding: 2.2em 1.2em 4em 1.2em; /* extra bottom padding so footer/version have space */
  font-size: clamp(1.05em, 2.8vw, 1.6em); /* responsive scale */
  overflow: visible; /* no internal scroll */
  box-sizing: border-box;
}

/* Close FAB over menu overlay at same spot as main menu button */
.menu-fab-close {
  position: fixed;
  right: 3em; /* match .fab-menu */
  bottom: 4.2em; /* mirrors .fab-btn default */
  z-index: 40010; /* above overlay content */
}

@media (max-width: 480px) {
  .menu-fab-close {
    right: 1.2em;
    bottom: 2.7em;
  }
}

@media (min-width: 821px) {
  .menu-fab-close { bottom: 2em; } /* match .fab-btn on wide screens */
}
.menu-title { display: none; }
.menu-close { display: none; }
.menu-links {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
  margin-bottom: 4em;
}
.menu-logo {
  display: block;
  margin: 0 auto 3em auto;
  width: clamp(120px, 50%, 280px);
  height: auto;
}
.menu-link {
  display: block;
  width: 100%;
  text-align: center;
  background: #f0e9df;
  color: #3a2017;
  text-decoration: none;
  padding: clamp(0.7em, 2.4vw, 1em) clamp(0.9em, 2.8vw, 1.2em);
  border-radius: 0.55em;
  border: 0.13em solid #000;
  font-weight: 800;
  font-size: clamp(1em, 4.2vw, 1.3em);
  box-sizing: border-box;
  max-width: 100%;
}
.menu-install-btn {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  font-family: "Anybody", sans-serif;
}
.menu-install-btn::-moz-focus-inner { border: 0; padding: 0; }
.menu-link:active,
.menu-link:focus,
.menu-link:hover { filter: brightness(0.98); }

.menu-emergency {
  background: transparent;
  color: #000;
}
.emergency-lead {
  font-size: clamp(1em, 3.5vw, 1.2em);
  line-height: 1.5;
  text-align: center;
  margin: 0 0 0.8em 0;
}
.emergency-section-title {
  margin: 1em 0 0.5em 0;
  font-size: clamp(1.2em, 5.5vw, 1.6em);
  text-align: center;
}
.menu-emergency .emergency-call {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto 0.8em auto;
  background: #e7aac5; /* pink buttons as requested */
  color: #000;
  border-color: #000;
  font-size: clamp(1em, 4.2vw, 1.3em);
  padding: clamp(0.7em, 2.4vw, 1em) 1.2em;
  text-decoration: none;
  box-sizing: border-box;
  max-width: 100%;
  margin-bottom: 2em;
}

.menu-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
  width: 100%;
  text-align: center;
  font-size: clamp(0.9em, 3.5vw, 1em);
  padding-top: 1em;
}
.menu-version {
  width: 100%;
  text-align: center;
  font-size: 0.9em;
  line-height: 1.2em;
  margin: 2em 0 1em 0; /* natural spacing above footer */
  padding-bottom: 6em;
}
.menu-version-text { margin-bottom: 0.3em; opacity: 0.6; }
.menu-version-number { margin-bottom: 0.4em; opacity: 0.6; }
.menu-developed-by { margin-top: 1.5em; }
.menu-developed-by .menu-inline-link {
  display: inline-block;
  padding: 0.4em 0.8em 0.24em 0.8em; /* nudge text slightly lower */
  border-radius: 9999px;
  border: 0.12em solid #000;
  text-decoration: none;
}
.menu-developed-by .menu-inline-link:hover,
.menu-developed-by .menu-inline-link:focus {
  background: rgba(0, 0, 0, 0.12);
}
.menu-inline-link {
  color: #000;
  text-decoration: none;
  border-bottom: 0.08em solid transparent;
}
.menu-inline-link:visited { color: #000; }
.menu-inline-link:focus,
.menu-inline-link:hover {
  border-bottom-color: #000;
}

/* --- Stage Info Overlay --- */
/* obsolete: stage-info-* classes removed in favor of reusing .block.block-modal structure */

/* Reduce menu overlay typography on wider screens */
@media (min-width: 821px) {
  .menu-card { font-size: 1.2em; }
}
@media (min-width: 1200px) {
  .menu-card { font-size: 1.1em; }
}

/* Fixed overlay header to ensure stage labels are always visible on iOS */
.sticky-header-overlay {
  position: fixed;
  top: env(safe-area-inset-top);
  top: constant(safe-area-inset-top);
  left: 0;
  width: 100vw;
  z-index: 2500;
  display: grid;
  grid-template-rows: var(--timetable-header-height);
  background: #e7aac5;
  border-bottom: 0.16em solid #000;
  pointer-events: none;
}

/* Match original header typography and sizing */
.sticky-header-overlay > div {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 1.65em;
  line-height: 0.9!important ;
  /* allow natural height; the grid row defines the header height */
}

.map-image-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden;
  margin-bottom: 0;
}

#festival-map {
  max-width: 100%;
  max-height: 100%;
  transition: transform 0.1s ease-out;
  will-change: transform;
  display: block;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: grab;
  transform-origin: 0 0;
}

#osd-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Prevent selection/tap highlight on the interactive map (mobile double-tap) */
.map-overlay,
.map-image-wrapper,
#osd-map,
.openseadragon-container,
.openseadragon-canvas,
.openseadragon-container * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

.zoom-controls {
  position: absolute;
  bottom: 15em;
  left: 3em;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  align-items: center;
  z-index: 30010;
  pointer-events: auto;
}

.zoom-level-indicator {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5em 1em;
  border-radius: 1.5em;
  font-size: 0.9em;
  font-weight: 500;
  min-width: 3em;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.zoom-controls button {
  background: #000;
  border: none;
  border-radius: 50%;
  width: 72px;
  height: 72px;
  font-size: 2em;
  font-weight: bold;
  color: #fff;
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30011;
  position: relative;
  pointer-events: auto;
  overflow: visible;
  padding: 0;
  margin: 0;
}
.zoom-controls button:hover {
  background: #222;
}

.map-overlay-close {
  position: fixed;
  top: 1.5em;
  right: 2em;
  background: none;
  border: none;
  color: #000;
  font-size: 2.5em;
  cursor: pointer;
  z-index: 20001;
  padding: 0.2em 0.5em;
  transition: color 0.2s;
}
.map-overlay-close:hover,
.map-overlay-close:focus {
  color: #dc005f;
  outline: none;
}

.fab-gradient-bg {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  height: 80px;
  pointer-events: none;
  z-index: 19999;
  background: linear-gradient(
    to bottom,
    rgba(241, 208, 223, 0) 0%,
    rgba(241, 208, 223, 0.95) 100%
  );
}

.cell.day-label {
  background: #fff !important;
  color: #000 !important;
}

/* White background under day + time columns across full height */
/* Remove grid pseudo overlay; fixed bg handles left columns */

.timetable-bg .cell.header {
  font-size: 1.4em;
  line-height: 0.85;
  height: var(--timetable-header-height);
  min-height: var(--timetable-header-height);
  max-height: 4em;
}

.timetable-bg {
  grid-template-rows: var(--timetable-header-height) repeat(auto-fill, 1em);
}
.timetable-fg {
  grid-template-rows: var(--timetable-header-height) repeat(auto-fill, 1em);
}

.timetable-fg .block-inner {
  font-stretch: 88%;
  font-variation-settings: "wdth" 88;
  /* Keep slot text readable across sizes */
  font-size: clamp(1em, 1.45vw, 1.25em);
  line-height: 1.05;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Styles für Klammer-Inhalte in Künstlernamen */
.artist-brackets {
  font-style: normal;
  font-weight: 500;
  font-size: 0.85em;
  letter-spacing: 0.02em;
  line-height: 1.2;
  transform: skew(-4deg);
}

/* Styles für kurze Slots (≤30 Minuten) - Inhalt in einer Zeile */
.timetable-fg .block-inner.block-inner--short-slot {
  flex-direction: row;
  white-space: nowrap;
  justify-content: center;
  align-items: center;
}

/* Abstand zwischen Hauptnamen und Klammer-Inhalt bei kurzen Slots */
.timetable-fg .block-inner.block-inner--short-slot .artist-brackets {
  margin-left: 0.3em;
}

/* Styles für lange Slots (>30 Minuten) - Inhalt in mehreren Zeilen */
.timetable-fg .block-inner:not(.block-inner--short-slot) {
  flex-direction: column;
  white-space: normal;
}

.map-controls {
  position: absolute;
  top: 1.5em;
  left: 2em;
  display: flex;
  align-items: center;
  gap: 0.8em;
  z-index: 30020;
}

.map-overlay-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5em;
  cursor: pointer;
  z-index: 20001;
  padding: 0.2em 0.5em;
  transition: color 0.2s;
}

.map-overlay-close:hover,
.map-overlay-close:focus {
  color: #dc005f;
  outline: none;
}

.zoom-controls {
  position: static;
  display: flex;
  flex-direction: row;
  gap: 0.5em;
  align-items: center;
  z-index: 30010;
  pointer-events: auto;
}

.zoom-controls button {
  background: #000;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 1.5em;
  font-weight: bold;
  color: #fff;
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30011;
  position: relative;
  pointer-events: auto;
  overflow: visible;
  padding: 0;
  margin: 0;
}

@media (min-width: 821px) {
  .zoom-controls button { width: 72px; height: 72px; font-size: 2em; }
  .map-controls { left: 6em; top: 3em;   }
}

@media (max-width: 820px) {
  html {
    font-size: 12px;
  }
  /* Reduce block text size sooner to protect grid layout */
  .timetable-fg .block-inner {
    font-size: clamp(1.05em, 2.8vw, 1.25em);
    line-height: 1.04;
  }
  /* Tighter alignment of blocks to hour line on mobile */
  .timetable-fg .block {
    margin-top: -0.3em;
  }
  .timetable-fg .block-inner.block-inner--short-slot {
    font-size: clamp(0.98em, 2.3vw, 1.12em);
  }
  .timetable-bg {
    grid-template-columns: 1.8em 1.2em repeat(4, 1fr);
    grid-template-rows: var(--timetable-header-height) repeat(auto-fill, 1.1em);
    grid-auto-rows: 1.1em;
  }
  .timetable-fg {
    grid-template-columns: 1.8em 1.2em repeat(4, 1fr);
    grid-template-rows: var(--timetable-header-height) repeat(auto-fill, 1.1em);
    grid-auto-rows: 1.1em;
  }
  .timetable-bg .cell {
    border-right: 0.15em solid #000;
    border-bottom: 0.05em solid #000;
    padding: 0.25em;
  }
  .timetable-bg .cell[style*="grid-column: 3"],
  .timetable-bg .cell[style*="grid-column: 4"],
  .timetable-bg .cell[style*="grid-column: 5"],
  .timetable-bg .cell[style*="grid-column: 6"] {
    border-left: 0.15em solid #000;
  }
  .cell.day-label,
  .cell.time-label {
    min-width: 1.8em;
    max-width: 1.8em;
    font-size: 0.8em;
  }
  .day-label-inner {
    padding-left: 0em;
    top: calc(var(--timetable-header-height) + 0.8em);
  }
  .cell.day-label {
    justify-content: flex-start;
    padding-top: 0.7em;
    padding-bottom: 0.7em;
  }
  .block.block-modal {
    width: 100% !important;
    max-width: 60vw !important;
    min-width: 0;
    min-height: unset;
    height: auto !important;
    aspect-ratio: 2 / 1.8; /* taller on mobile */
    top: 40% !important;
    left: 50% !important;
    transform: translate(-50%, -40%) !important;
    font-size: 16px;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    z-index: 99999 !important;
  }
  .block.block-modal h2 {
    font-size: 1.9em;
  }
}

/* --- PWA Install Prompt --- */
.install-prompt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 40000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1.2em;
}
.install-prompt-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: #e7aac5;
  color: #000;
  border: 0.13em solid #000;
  border-radius: 0.75em;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.2);
  padding: 2.8em 2.8em 1.8em 2.2em; /* extra top/right padding for close button */
  /* Make popup text narrower (variable font width) */
  font-stretch: 88%;
  font-variation-settings: "wdth" 88;
}
.install-prompt-title {
  margin: 0 2em 0.4em 0;
  font-size: 4.4em;
  text-align: left; /* left align the title */
  font-stretch: 86%;
  font-variation-settings: "wdth" 86;
}
.install-prompt-content {
  font-size: 1.85em;
  line-height: 1.6;
  font-stretch: 88%;
  font-variation-settings: "wdth" 88;
  font-weight: 600; /* lighter than global 700 for body text */
}
/* Make emphasized words (e.g., "Teilen") a bit narrower */
.install-prompt-content strong {
  font-weight: 800;
  font-stretch: 84%;
  font-variation-settings: "wdth" 84, "wght" 800;
}
.install-prompt-content ol:not(.install-steps) {
  margin: 0; /* keep generic ols tight, leave .install-steps to control its own spacing */
}
.install-lead {
  margin: 0 0 0.8em 0;
}
.install-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2em 0;
  display: flex;
  flex-direction: column;
  gap: 0.45em;
  counter-reset: install-step;
}
.install-step {
  display: grid;
  grid-template-columns: 1.4em 28px 1fr; /* number, icon, text */
  align-items: center;
  column-gap: 0.5em;
}
.install-step span { font-weight: 700; }
.install-step--noicon { grid-template-columns: 1.4em 1fr; }
.install-step--noicon span { grid-column: 2; }
.install-step::before {
  counter-increment: install-step;
  content: counter(install-step) ".";
  font-weight: 800;
  grid-column: 1;
  text-align: right;
}
.install-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #000;
  padding: 0;
  margin: 0;
  line-height: 0;
  transform: translateY(-0.12em);
}
.install-step:not(.install-step--noicon) span:not(.install-step-icon) { grid-column: 3; }
.install-icon {
  display: block;
  filter: none;
  color: #000;
  padding: 0;
  margin: 0;
}
.install-icon--plus { width: 20px; height: 20px; }
.install-prompt-buttons {
  display: flex;
  gap: 0.6em;
  justify-content: flex-end;
  margin-top: 0.8em;
}
.install-prompt-close {
  position: absolute;
  top: 0.5em; /* align with modal close */
  right: 0.5em; /* align with modal close */
  background: none;
  border: none;
  cursor: pointer;
  color: #000;
  z-index: 2;
}
.install-prompt-close { font-size: 1.6em; }
.install-prompt-close .modal-close-icon,
.install-prompt-close .modal-control-icon {
  display: block;
  width: 0.9em; /* match star/close icon size */
  height: 0.9em;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  padding: 0.3em; /* total ~1.5em */
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7em 1.1em;
  font-family: "Anybody", sans-serif;
  font-weight: 700;
  border-radius: 0.6em;
  border: 0.13em solid #000;
  cursor: pointer;
}
.btn-primary {
  background: #000;
  color: #fff;
}
.btn-secondary {
  background: transparent;
  color: #000;
}

/* arrows removed */

@media (max-width: 480px) {
  .install-prompt-title { font-size: 3.3em; }
  .install-prompt-content { font-size: 1.7em; }
  .install-step { grid-template-columns: 1.4em 28px 1fr; column-gap: 0.45em; }
  .install-step--noicon { grid-template-columns: 1.4em 1fr; }
  .install-step-icon { width: 28px; height: 28px; transform: translateY(-0.16em); }
  .install-prompt-close { top: 0.5em; right: 0.5em; }
  /* Ensure install close circle matches modal control height (modal uses 15px base with 1.4em) */
  .install-prompt-close { font-size: 2.1em; }
}

.menu-chip {
  display: inline-block;
  padding: 0.25em 0.5em;
  border: 0.12em solid #000;
  border-radius: 0.6em;
  background: #fff;
  color: #000;
}
/* removed chip styles for iOS/Android labels per request */

@media (max-width: 480px) {
  html {
    font-size: 10px;
  }
  /* Further reduce to prevent column jitter on very small screens */
  .timetable-fg .block-inner {
    font-size: clamp(1.12em, 4.6vw, 1.35em);
    line-height: 1.02;
  }
  .timetable-fg .block-inner.block-inner--short-slot {
    font-size: clamp(1.02em, 3.8vw, 1.18em);
  }
  .timetable-bg {
    grid-template-columns: 2.2em 1.5em repeat(4, 1fr);
    grid-template-rows: var(--timetable-header-height) repeat(auto-fill, 1.18em);
    grid-auto-rows: 1.18em;
  }
  .timetable-fg {
    grid-template-columns: 2.2em 1.5em repeat(4, 1fr);
    grid-template-rows: var(--timetable-header-height) repeat(auto-fill, 1.18em);
    grid-auto-rows: 1.18em;
  }
  .cell.day-label,
  .cell.time-label {
    min-width: 2.2em;
    max-width: 2.2em;
    font-size: 0.9em;
  }
  .day-label-inner {
    padding-left: 0em;
    margin-left: 0.1em;
    top: calc(var(--timetable-header-height) - 0.5em);
  }
  .cell.day-label {
    justify-content: flex-start;
    padding-top: 0.7em;
    padding-bottom: 0.7em;
  }
  .block.block-modal {
    font-size: 15px;
    height: auto !important;
    max-height: none !important;
    min-height: 180px;
  }
  .block.block-modal,
  .block.block-modal-animating {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: 40% !important;
    transform: none !important;
    margin: 24px auto !important;
    max-width: calc(100vw - 48px) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    z-index: 99999 !important;
  }
  .now-bar {
    --now-bar-height: 0.5em;
    z-index: 200;
    box-shadow: 0 0 6px 2px rgba(220, 0, 95, 0.18);
  }
  .now-dot {
    --now-dot-size: 1.3em;
    left: -0.5em;
    transform: translateY(calc((var(--now-bar-height) - var(--now-dot-size)) / 2 + var(--now-dot-nudge)));
  }
  .cell.day-label,
  .cell.time-label {
    font-size: 1.2em;
    max-width: 1.8em;
    min-width: 1.8em;
  }
  .cell.time-label {
    margin-left: -0.25em;
  }
  .fab-btn {
    width: 56px;
    height: 56px;
    font-size: 1.5em;
    bottom: 2.7em;
  }
  .fab-map {
    left: 1.2em;
  }
  .fab-menu {
    right: 1.2em;
  }
  .zoom-controls button {
    width: 56px;
    height: 56px;
    font-size: 1.5em;
  }
  .zoom-controls {
    left: 1.9em;
    bottom: 12em;
  }
  .zoom-level-indicator {
    font-size: 0.8em;
    padding: 0.4em 0.8em;
    min-width: 2.5em;
  }
}

@media (min-width: 821px) {
  .fab-btn {
    bottom: 2em;
  }
  .block.block-modal,
  .block.block-modal-animating {
    max-width: 70vw !important;
    width: 600px !important;
    min-height: 320px !important;
    font-size: 20px;
  }
}

@media (max-width: 400px) {
  html {
    font-size: 8px;
  }
  .timetable-fg .block-inner {
    font-size: clamp(1.08em, 4.8vw, 1.28em);
    line-height: 1;
  }
  .timetable-fg .block-inner.block-inner--short-slot {
    font-size: clamp(1em, 4vw, 1.14em);
  }
  .timetable-bg {
    grid-template-columns: 2.5em 1.8em repeat(4, 0.9fr);
    grid-template-rows: var(--timetable-header-height) repeat(auto-fill, 1.24em);
    grid-auto-rows: 1.24em;
  }
  .timetable-fg {
    grid-template-columns: 2.5em 1.8em repeat(4, 0.9fr);
    grid-template-rows: var(--timetable-header-height) repeat(auto-fill, 1.24em);
    grid-auto-rows: 1.24em;
  }
  .cell.day-label,
  .cell.time-label {
    min-width: 2.5em;
    max-width: 2.5em;
    font-size: 1em;
  }
  .day-label-inner {
    padding-left: 0.2em;
  }
  .cell.day-label {
    justify-content: flex-start;
    padding-top: 0.15em;
    padding-bottom: 0.15em;
    padding-left: 0em;
    padding-right: 0em;
  }
  .block.block-modal {
    font-size: 13px;
    margin: 0.5em !important;
    padding: 1.5em 2em 1em 2em !important;
  }
  .block.block-modal,
  .block.block-modal-animating {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: 40% !important;
    transform: translateY(-50%) !important;
    margin: 10vw auto !important;
    max-width: 80vw !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
    z-index: 99999 !important;
  }
  .block.block-modal h2 {
    font-size: 2em;
    margin-bottom: 0.2em;
  }
  .cell.day-label,
  .cell.time-label {
    font-size: 1.4em;
    max-width: 1.8em;
    min-width: 1.8em;
  }
  .cell.day-label {
    padding-top: 0.7em;
    padding-bottom: 0.7em;
    padding-left: 0em;
    padding-right: 0em;
  }
  .cell.time-label {
    font-size: 1.4em;
    max-width: 1.8em;
    min-width: 1.8em;
    margin-left: -0.25em;
  }
  /* html base 8px -> match modal 15px*1.4 = 21px: 21/8 = 2.625 */
  .install-prompt-close { font-size: 2.625em; }
  /* .cell.day-label-inner {
    margin-left: -0.8em !important;
  } */
}
