.arcade-page {
  background: #0b121c;
  color: #ffefd0;
}

.arcade-page .lab-header {
  background: #0c141f;
  color: #f6e9d5;
  border-color: #755b38;
}

.arcade-page .lab-header a[aria-current],
.arcade-page .lab-header a:hover {
  color: #ecc989;
}

.arcade-page .lab-header .site-language-bar button[aria-pressed=true] {
  background: #ead5ac;
  color: #0c141f;
}

.arcade {
  --arcade-gold: #bb9765;
  position: relative;
  max-width: 112rem;
  margin-inline: auto;
  aspect-ratio: 1600 / 1001;
  background: #121b25 url('assets/campaign/works-arcade.webp') center / cover;
}

.arcade h1 {
  position: absolute;
  top: 5%;
  left: 4%;
  margin: 0;
  font: 500 clamp(2rem, 4.2vw, 4.65rem)/1.14 Georgia, 'Songti TC', serif;
  text-shadow: 0 2px 18px #080d15;
}

.exhibit {
  position: absolute;
}

.arcade a {
  color: inherit;
  text-decoration: none;
}

.arcade a:focus-visible,
.arcade-page .lab-header :is(a, button):focus-visible {
  outline: 2px solid #fff1b0;
  outline-offset: 3px;
}

a.exhibit {
  display: block;
  min-height: 44px;
}

.exhibit-name {
  position: absolute;
  inset-inline-start: var(--inscription-x, 50%);
  inset-block-start: var(--inscription-y, 90%);
  transform: translate(-50%, -50%) rotate(var(--inscription-tilt, 0deg));
  width: max-content;
  max-width: 95%;
  color: #f6d9a4;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 1px 1px #141016, 0 1px 7px #0d0c10;
  font: 600 clamp(.82rem, 1.54vw, 1.55rem)/1.22 Georgia, 'Songti TC', serif;
}

.exhibit-name small {
  display: block;
  margin-top: .15em;
  font: 500 .7em/1.3 system-ui, sans-serif;
}

.arcade a:hover .exhibit-name,
.arcade a:focus-visible .exhibit-name {
  color: #fff3d5;
  text-decoration: underline;
  text-underline-offset: .25em;
}

.exhibit-app {
  top: 24%;
  left: 3%;
  width: 32%;
  height: 58%;
}

.arcade-screens {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4%;
  height: 100%;
  padding-inline: 15% 10%;
}

.arcade-screens a {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 80%) auto;
  align-items: end;
  justify-items: center;
  min-width: 0;
}

.arcade-screens img {
  display: block;
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
  height: 94%;
  object-fit: contain;
  border: 1px solid #d2ac78;
  border-radius: clamp(6px, 1vw, .85rem);
  box-shadow: 0 8px 16px #080d14b0;
}

.arcade-screens .exhibit-name {
  --inscription-x: 46%;
  --inscription-y: 93.7%;
  --inscription-tilt: -2deg;
  color: #e2c89a;
  font-size: clamp(.75rem, 1.18vw, 1rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: .075em;
  text-shadow: 0 1px 2px #110d0a;
}

.arcade-screens a:first-child .exhibit-name {
  --inscription-x: 75%;
  --inscription-y: 95.5%;
}

.exhibit-world {
  inset: 10% 32% 25% 37%;
  --inscription-x: 54%;
  --inscription-y: 87.8%;
  --inscription-tilt: -1.8deg;
}

.exhibit-future {
  inset: 31% 14% 31% 73.5%;
  --inscription-x: 51%;
  --inscription-y: 22%;
  --inscription-tilt: -3deg;
}

.exhibit-future .exhibit-name {
  padding: .33em .68em .42em;
  border-block: 1px solid #b78651;
  border-radius: 2px 2px 46% 46% / 2px 2px 15% 15%;
  background: linear-gradient(155deg, #524333, #302a23 66%, #3b3329);
  box-shadow: -.22em .28em .45em #100d0e55;
  font-size: clamp(.72rem, 1.14vw, 1.16rem);
}

.exhibit-future .exhibit-name::before {
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 2px;
  height: clamp(.65rem, 1.48vw, 1.5rem);
  background: linear-gradient(90deg, #53351c, #d4a565);
  content: "";
}

.exhibit-costume {
  inset: 21% 1% 18% 83.5%;
  --inscription-x: 58%;
  --inscription-y: 87.2%;
  --inscription-tilt: 3deg;
}

@media (max-width: 760px) {
  .arcade {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: 1.3rem 4vw 2.2rem;
    aspect-ratio: auto;
    background: radial-gradient(ellipse at top, #1e2d3c, #0b121c 70%);
  }

  .arcade h1 {
    position: static;
    grid-column: 1 / -1;
  }

  .exhibit {
    position: static;
    height: auto;
    width: auto;
    padding: .7rem;
    border: 1px solid var(--arcade-gold);
    border-radius: .35rem;
    background-size: cover;
    background-position: center;
  }

  a.exhibit {
    display: grid;
    align-content: end;
    justify-items: center;
  }

  .exhibit-app {
    background-image: linear-gradient(0deg, #101a24 0%, transparent 38%),
      url('assets/campaign/cabinet-app.webp');
  }

  .arcade-screens {
    height: auto;
    padding-inline: 0;
  }

  .arcade-screens a {
    grid-template-rows: auto auto;
    gap: .45rem;
  }

  .arcade :is(.exhibit-name, .exhibit-future .exhibit-name) {
    position: static;
    transform: none;
    max-width: 100%;
    padding: .28em 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .arcade-screens .exhibit-name {
    color: #f6d9a4;
    font-size: .8rem;
    line-height: 1.3;
  }

  .exhibit-future .exhibit-name::before {
    display: none;
  }

  .arcade-screens img {
    width: min(100%, 8rem);
    height: auto;
  }

  a.exhibit-world {
    min-height: 17rem;
    background-image: linear-gradient(0deg, #0a101bee 0%, transparent 55%),
      url('assets/campaign/cabinet-world.webp');
  }

  a.exhibit-future,
  a.exhibit-costume {
    min-height: 12rem;
  }

  .exhibit-future {
    background-image: linear-gradient(0deg, #0a101bee 0%, transparent 55%),
      url('assets/campaign/cabinet-drawer.webp');
    background-position: 78% center;
  }

  .exhibit-costume {
    background-image: linear-gradient(0deg, #0a101bee 0%, transparent 55%),
      url('assets/campaign/silk.webp');
  }
}

@media (max-width: 540px) {
  .arcade {
    grid-template-columns: 1fr;
  }
}
