.wall-art-viewer {
  margin: 18px 0;
  direction: inherit;
  clear: both;
  text-align: center;
}

.wall-art-viewer [hidden] {
  display: none !important;
}

html.wav-fullscreen-lock,
body.wav-fullscreen-lock {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}

.wav-open-button,
.wav-primary {
  border: 0;
  background: #f4c430;
  color: #202020;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}

.wav-secondary {
  border: 1px solid #d7d7d7;
  background: #fff;
  color: #222;
  min-height: 44px;
  padding: 0 18px;
  cursor: pointer;
}

.wav-intro,
.wav-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
}

.wav-intro {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .58);
  padding: 18px;
}

.wav-intro-panel {
  width: min(420px, 100%);
  background: #fff;
  color: #222;
  padding: 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  text-align: center;
}

.wav-intro-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.wav-modal {
  display: flex;
  flex-direction: column;
  background: #000;
  color: #fff;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

.wav-modal:fullscreen,
.wav-modal:-webkit-full-screen {
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

.wav-stage {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
  touch-action: none;
  background: #000;
}

.wav-video,
.wav-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.wav-video {
  z-index: 1;
  opacity: 0;
  transition: opacity .18s ease;
}

.wav-camera-ready .wav-video {
  opacity: 1;
}

.wav-art {
  position: absolute;
  left: 50%;
  top: 45%;
  width: min(52vw, 320px);
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  touch-action: none;
  user-select: none;
  box-sizing: border-box;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .35);
  z-index: 2;
}

.wav-art img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.wav-frame-canvas {
  padding: 4px;
  background: #f7f7f4;
  box-shadow: 0 2px 2px rgba(255, 255, 255, .65) inset, 0 12px 28px rgba(0, 0, 0, .35);
}

.wav-frame-gold {
  padding: 10px;
  background: linear-gradient(135deg, #9b721f, #ffe08a 32%, #b8860b 66%, #6f4e12);
}

.wav-frame-black {
  padding: 10px;
  background: #111;
}

.wav-message {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  text-align: center;
  font-size: 14px;
  z-index: 3;
}

.wav-message:empty {
  display: none;
}

.wav-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, .88);
  flex-wrap: wrap;
}

.wav-toolbar button,
.wav-toolbar select {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: #222;
  color: #fff;
  padding: 0 12px;
}

.wav-toolbar button {
  cursor: pointer;
}

html[dir="rtl"] .wav-toolbar,
body[dir="rtl"] .wav-toolbar,
html[dir="rtl"] .wav-intro-panel,
body[dir="rtl"] .wav-intro-panel {
  direction: rtl;
}

@media (min-width: 768px) {
  .wav-open-button::after {
    content: "";
  }
}

@media (max-width: 767px) {
  .wav-art {
    width: min(68vw, 330px);
  }

  .wav-toolbar {
    justify-content: stretch;
  }

  .wav-toolbar button,
  .wav-toolbar select {
    flex: 1 1 auto;
  }
}
