:root {
  color-scheme: dark;
  font-family: Georgia, 'Times New Roman', serif;
  color: #f2e0c5;
  background: #080605;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a[href] { cursor: pointer; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 1672 / 941;
  margin-inline: auto;
}

.scene, .scene img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.piece, .crawler-hit, .eye-layer { position: absolute; }
.piece, .crawler-hit {
  margin: 0;
  border: 0;
  padding: 0;
  background-color: transparent;
  text-decoration: none;
}
.piece { z-index: 2; background-size: 100% 100%; background-repeat: no-repeat; }
.piece[data-part="menu"] { display: none; }
a.piece, button.piece { transition: filter .18s ease; }
a.piece:hover, button.piece:hover { filter: brightness(1.24) saturate(1.11); }
a.piece:active, button.piece:active { filter: brightness(1.4) saturate(1.18); }
:is(a, button):focus-visible { outline: 2px solid #e9b879; outline-offset: 2px; }

.eye-layer { inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.crawler-hit { z-index: 1; border-radius: 35%; cursor: crosshair; }
.crawler-hit:focus-visible { outline-color: #b77538; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

dialog {
  width: min(90vw, 36rem);
  max-height: 88svh;
  padding: 5px;
  background: #130d0b;
  border: 1px solid #98714d;
  color: #f0dfc2;
  box-shadow: 0 0 55px #000, inset 0 0 40px #43211980;
}
dialog::backdrop { background: #080503d9; backdrop-filter: blur(4px); }
.dialog-inner {
  border: 1px solid #63462d;
  padding: clamp(1.6rem, 5vw, 3rem);
  position: relative;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, #29130e, transparent 70%);
}
.ornament { color: #d8ab7d; font-size: 1.1rem; }
.dialog-inner h2 { color: #f5d4ab; font-size: clamp(1.65rem, 5vw, 2.5rem); margin: .65em 0 .45em; }
.dialog-inner p { margin: 0 auto 1.25rem; font-size: 1.1rem; line-height: 1.55; }
.close {
  position: absolute;
  top: .4rem;
  right: .45rem;
  background: none;
  border: 0;
  padding: .3rem .65rem;
  line-height: 1;
  font-size: 1.65rem;
}
#panel-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
#panel-links a {
  display: inline-block;
  padding: .55rem .9rem;
  border: 1px solid #856041;
  color: #f4ddbe;
  text-decoration: none;
}
#panel-links a:hover { background: #442116; border-color: #c09161; }

@media (max-aspect-ratio: 1/1) {
  .stage { aspect-ratio: 941 / 1672; }
  .piece[data-part="play"] { display: none; }
  .piece[data-part="menu"] { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  a.piece, button.piece { transition: none; }
}
