/* Page base. The envelope and cards style themselves (assets/envelope/envelope.css). */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  overflow: hidden;
  background: #ece5d8;   /* same as the envelope scene */
  font-family: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  color: #6b1f2c;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }

/* Shown only if the envelope can't load. */
.load-failed {
  min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 24px; text-align: center; font-size: 1.25rem;
}
.load-failed p { margin: 0; }
.load-failed button {
  font: 600 12px/1 "Cormorant Garamond", serif; letter-spacing: .24em; text-transform: uppercase;
  padding: 14px 22px; border-radius: 99px; border: 0; background: #6b1f2c; color: #f6ead0; cursor: pointer;
}

.loading {
  position: fixed; inset: 0; display: grid; place-items: center;
  margin: 0; padding: 24px; text-align: center;
}

.ui-icon { display: block; flex-shrink: 0; pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.music-control {
  position: fixed; z-index: 100;
  top: calc(16px + env(safe-area-inset-top, 0px)); right: calc(16px + env(safe-area-inset-right, 0px));
}
.music-toggle {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid rgba(107, 31, 44, .24); border-radius: 50%; background: #ece5d8; color: #6b1f2c;
  box-shadow: 0 2px 8px rgba(40, 28, 16, .08); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.music-toggle > span { position: absolute; pointer-events: none; }
.music-toggle .music-on { opacity: 0; }
.music-toggle .music-off { opacity: 1; }
.music-toggle.is-playing .music-on { opacity: 1; }
.music-toggle.is-playing .music-off { opacity: 0; }
.music-toggle[aria-busy="true"] { opacity: .65; }
.music-toggle:focus-visible { outline: 2px solid #6b1f2c; outline-offset: 4px; }
@media (hover: hover) { .music-toggle:hover { background: #f8f1e5; } }
