[data-coronation-hint][hidden],
[data-coronation-error][hidden],
[data-coronation-enter][hidden],
.coronation-experience [hidden] {
  display: none;
}

.coronation-ready [data-coronation-image] {
  cursor: zoom-in;
  user-select: none;
}

.art-player-notes .coronation-entry-hint,
.art-player-notes .coronation-entry-error {
  margin-top: .25rem;
  font-size: .875rem;
}

#coronation-viewer [data-coronation-enter] {
  flex: none;
}

.coronation-experience {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border: 0;
  background: transparent;
  color: #fff5df;
}

.coronation-experience::backdrop {
  background: transparent;
}

.coronation-shade,
.coronation-surface {
  position: absolute;
  inset: 0;
}

.coronation-shade {
  z-index: 0;
  opacity: 0;
  background: #100b08;
}

.coronation-plate {
  position: absolute;
  z-index: 3;
  overflow: hidden;
  transform-origin: center;
  pointer-events: none;
}

.coronation-entry-actor {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  width: 0;
  transform-origin: 0 0;
  pointer-events: none;
}

.coronation-entry-actor canvas {
  position: absolute;
  bottom: 100%;
  left: 0;
  width: auto;
  max-width: none;
  height: 100%;
  transform: translateX(-50%);
}

.coronation-plate img,
.coronation-surface canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.coronation-surface {
  z-index: 2;
  touch-action: none;
  outline: none;
}

.coronation-surface[data-walking] {
  cursor: grab;
}

.coronation-surface[data-walking]:active {
  cursor: grabbing;
}

.coronation-surface:focus-visible ~ .coronation-walk-help {
  border-color: #fff6e8;
}

.coronation-actions {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1.2rem, env(safe-area-inset-right));
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .45rem;
  margin-left: .75rem;
}

.coronation-experience[data-entered] .coronation-actions {
  top: auto;
  bottom: max(1rem, env(safe-area-inset-bottom));
}

.coronation-actions button,
.coronation-touch-controls button,
.coronation-loading,
.coronation-walk-help {
  border: 1px solid #fff1d842;
  border-radius: 2px;
  background: #17110fba;
  color: #fff5df;
  font: 500 .875rem/1.3 system-ui, sans-serif;
}

.coronation-actions button,
.coronation-touch-controls button {
  min-height: 2.75rem;
  padding: .55rem .8rem;
  cursor: pointer;
}

.coronation-actions button:hover,
.coronation-touch-controls button:active {
  background: #493325;
}

.coronation-actions button:focus-visible,
.coronation-touch-controls button:focus-visible {
  outline: 2px solid #fff6e8;
  outline-offset: 3px;
}

.coronation-loading,
.coronation-walk-help {
  position: absolute;
  z-index: 5;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 2rem);
  margin: 0;
  padding: .55rem .8rem;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.coronation-loading { top: 50%; transform: translate(-50%, -50%); }
.coronation-walk-help {
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: max(.75rem, env(safe-area-inset-left));
  transform: none;
}

@media (max-width: 700px) {
  .coronation-experience[data-entered] .coronation-walk-help {
    bottom: max(4.25rem, calc(env(safe-area-inset-bottom) + 3.25rem));
  }
}

.coronation-touch-controls,
.coronation-touch-help {
  display: none;
}

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

@media (any-pointer: coarse) {
  .art-player-notes .coronation-entry-hint,
  .coronation-keyboard-help {
    display: none;
  }

  .coronation-touch-help { display: inline; }

  .coronation-touch-controls {
    position: absolute;
    z-index: 4;
    bottom: max(7rem, calc(env(safe-area-inset-bottom) + 6rem));
    left: max(.75rem, env(safe-area-inset-left));
    display: grid;
    grid-template-columns: repeat(3, 2.75rem);
    gap: .25rem;
    touch-action: none;
  }

  .coronation-touch-controls button:first-child { grid-column: 2; }
  .coronation-touch-controls button:nth-child(2) { grid-column: 1; }
}
