:root {
  --ink: #403b39;
  --muted: #8d8580;
  --paper: #fcfaf7;
  --rose: #d89188;
  --rose-dark: #bd756e;
  --sage: #8eaa9a;
  --line: rgba(89, 76, 69, 0.12);
  --font-ui: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  --font-display: Georgia, 'Times New Roman', serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  position: fixed;
  background: var(--paper);
}

body {
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

button {
  color: inherit;
  font: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

p,
h1,
h2 {
  margin: 0;
}

.app {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l);
}

.calm {
  position: absolute;
  z-index: 0;
  inset: 0;
  opacity: 0;
  background: #fffdfa;
  transition: opacity 720ms ease;
}

.calm.is-lit {
  opacity: 1;
}

.petals {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease;
}

.petals.is-on {
  opacity: 1;
}

.scene {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 560ms ease, visibility 0s linear 560ms;
}

.scene.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 560ms ease, visibility 0s;
}

.fx {
  position: absolute;
  z-index: 6;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.sound {
  position: absolute;
  z-index: 20;
  top: calc(var(--safe-t) + 12px);
  right: calc(var(--safe-r) + 12px);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(89, 76, 69, 0.1);
  border-radius: 50%;
  background: rgba(255, 253, 250, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 400ms ease, visibility 0s linear 400ms, transform 120ms ease;
}

.sound.is-on {
  opacity: 0.78;
  visibility: visible;
  transition: opacity 400ms ease, visibility 0s;
}

.sound:active {
  transform: scale(0.92);
}

.sound svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #6f6863;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound__body {
  fill: #6f6863;
  stroke: none;
}

.sound__slash {
  opacity: 0;
  stroke-width: 1.9;
}

.sound.is-muted .sound__wave {
  opacity: 0;
}

.sound.is-muted .sound__slash {
  opacity: 1;
}

.sound.is-muted {
  opacity: 0.48;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
