* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #222;
  font-family: Arial, sans-serif;
}

.viewport {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
}

/* 1500 × 1500 design space */
.kiosk-stage {
  position: relative;
  width: min(100vw, 100vh);
  height: min(100vw, 100vh);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #ddd;
}

.layer,
.art,
.hotspots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.art {
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.hotspots {
  pointer-events: none;
}

/* Only the actual SVG shapes are clickable */
.hotspot {
  pointer-events: auto;
  cursor: pointer;

  /* Temporary visible debugging style  */
  fill: rgba(255, 0, 0, 0.0);
  stroke: rgba(255, 255, 255, 0);
  stroke-width: 4;
}

/* Make final hotspots invisible later */
body.hide-hotspots .hotspot {
  fill: transparent;
  stroke: transparent;
}


/* Layer order */
.main-layer {
  z-index: 10;
}

.hub-layer {
  z-index: 20;
}

.area-overlay {
  z-index: 30;
}

.area-hotspots {
  z-index: 40;
}

.content-panel {
  z-index: 100;
}


/* Default visibility */
.hub-layer,
.area-overlay,
.area-hotspots,
.content-panel {
  display: none;
}


/* Main screen */
body.screen-main .main-layer {
  display: block;
}

body.screen-main .hub-layer,
body.screen-main .area-overlay,
body.screen-main .area-hotspots,
body.screen-main .content-panel {
  display: none;
}


/* Hub screen */
body.screen-hub .main-layer {
  display: none;
}

body.screen-hub .hub-layer {
  display: block;
}


/* Active area overlays */
body.active-area1 #area1Overlay,
body.active-area2 #area2Overlay,
body.active-area3 #area3Overlay,
body.active-area4 #area4Overlay {
  display: block;
}

body.active-area1 #area1Hotspots,
body.active-area2 #area2Hotspots,
body.active-area3 #area3Hotspots,
body.active-area4 #area4Hotspots {
  display: block;
}


/* Content panel */
body.content-open .content-panel {
  display: flex;
}

.content-panel {
  position: absolute;
  width: 60%;
  height: 85%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  padding: 32px;
  flex-direction: column;
  gap: 20px;
  overflow: auto;
  border-radius: 16px;
}
.content-page {
    max-width: 100%;
    margin: 0 auto;
}

.content-page video {
    display: block;
    width: 100%;
    height: auto;
}

/*
.content-panel {
  position: absolute;
  inset: 8%;
  background: rgba(255, 255, 255, 0.96);
  color: #111;
  padding: 32px;
  flex-direction: column;
  gap: 20px;
  overflow: auto;
  border-radius: 16px;
}
  */

.close-button {
  align-self: flex-end;
  font-size: 20px;
  padding: 10px 18px;
  cursor: pointer;
}

.content-inner {
  font-size: 1.2em;
  line-height: 1.5;
}

/* Map Key panel bits below */

.map-key-panel {
  display: none;
  position: absolute;
  left: 20%;
  top: 75%;
  width: 38%;
  height: 22%;

  /* Based on 1500 × 1500 design-space coordinates.
     Example: left 980px = 65.333%, top 180px = 12%. */
  /*left: 65.333%;
  top: 12%;
  width: 24%;
  height: 28%;*/
  
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  color: #111;
  padding: 10px;
  border-radius: 12px;
  overflow: hidden;
  pointer-events: auto;
  font-family: "Cabin Sketch", cursive;
}

body.screen-main.key-open .map-key-panel {
  display: block;
}

.map-key-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.map-key-list {
  height: 100%;
  margin: 0;
  padding: 36px 16px 16px 32px;
  overflow-y: auto;
  font-size: clamp(12px, 1.6vw, 20px);
  line-height: 1.4;
  font-family: "Cabin Sketch", cursive;
  line-height: 1.4;
}


.hub-background {
  position: absolute;
  inset: 0;
  z-index: 1;

  display: none;

  background:
    radial-gradient(
      circle at center,
      #ffffff 40%,
     /* #e9d2a6 45%,*/
     #3fafc7 95%
      /*#5bb2f5 80%*/
    );
}

body.screen-hub .hub-background {
  display: block;
}


.map-number-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 15;

  display: none;
  pointer-events: none;
}

body.screen-main:not(.key-open) .map-number-layer { display: none; }

body.screen-main.key-open .map-number-layer { display: block; }

/*
.map-number circle {
  fill: #fff;
  stroke: #111;
  stroke-width: 4;
}*/

.map-number text {
  font-family: "Cabin Sketch", cursive;
  /*font-size: 34px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  fill: #111; */
}

.easter-video {
  position: absolute;

  left: calc(676 / 1500 * 100%);
  top: calc(154 / 1500 * 100%);

  width: calc(244 / 1500 * 100%);
  height: calc(318 / 1500 * 100%);

  z-index: 35;

  object-fit: contain;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.easter-video.is-playing {
  opacity: 1;
  visibility: visible;
}

.content-audio {
  display: block;
  width: 100%;
  margin: 0 0 24px 0;
}
