* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: #111;
  color: #f5f5f5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.composite-wrap {
  position: relative;
  width: 100%;
  max-width: 1200px;
  line-height: 0;
}
#compositeImage {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.hit-layer {
  position: absolute;
  inset: 0;
}
.hit-area {
  position: absolute;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.hit-area:hover,
.hit-area:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: -2px;
  background: rgba(255, 255, 255, 0.08);
}
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 20;
}
.overlay[hidden] { display: none !important; }
.overlay-content {
  max-width: min(92vw, 720px);
  max-height: 92vh;
  text-align: center;
}
#singleImage {
  max-width: 100%;
  max-height: 78vh;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}
.player-name {
  margin: 12px 0 0;
  font-size: 1rem;
  line-height: 1.3;
}
.close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.order-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 20px;
  background: #f0c14b;
  color: #111;
  text-decoration: none;
  font-weight: 700;
  border-radius: 6px;
  min-height: 44px;
  line-height: 20px;
}
.order-btn-composite {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  margin-top: 0;
}
@media (orientation: landscape) {
  body.ls-opt {
    overflow: hidden;
  }
  body.ls-opt .page {
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
  }
  body.ls-opt .composite-wrap {
    position: fixed;
    inset: 0;
    z-index: 1;
    max-width: none;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
  }
  body.ls-opt #compositeImage {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
  body.ls-opt .hit-layer {
    /* JS aligns to the real object-fit contain box of the image. */
    inset: auto;
  }
  body.ls-opt .order-btn-composite {
    z-index: 6;
  }
}
