:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #071115;
  color: #eee3cd;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(ellipse at 50% 36%, #132a2e, #071115 70%);
}

.player {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(100%, 540px);
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  overflow: hidden;
  text-align: center;
  background: #09181c;
}

.scene,
.scene::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene {
  z-index: -1;
  background: url("/aland-singing-bowl.webp") center / cover no-repeat;
}

.scene::after {
  content: "";
  background: linear-gradient(180deg, #040e13a8, transparent 37%, transparent 57%, #050e12e8);
}

.mist {
  position: absolute;
  inset: 32% -12% 41%;
  background: radial-gradient(ellipse at center, #b6d8d528 0%, transparent 62%);
  animation: mist 26s ease-in-out infinite alternate;
}

.ripples {
  position: absolute;
  top: 41%;
  left: 50%;
  width: 55%;
  height: 5%;
  translate: -50% -50%;
}

.ripples i {
  position: absolute;
  inset: 0;
  border: 1px solid #c6dfd7;
  border-radius: 50%;
  opacity: 0;
  animation: ripple 18s linear infinite;
}

.ripples i:nth-child(2) { animation-delay: -6s; }
.ripples i:nth-child(3) { animation-delay: -12s; }

@keyframes mist {
  from { transform: translateX(-12%); opacity: .42; }
  to { transform: translateX(12%); opacity: .78; }
}

@keyframes ripple {
  0% { transform: scale(.5); opacity: 0; }
  30% { opacity: .14; }
  100% { transform: scale(2.5); opacity: 0; }
}

.title {
  align-self: start;
  padding: calc(clamp(40px, 10svh, 110px) + env(safe-area-inset-top)) 16px 0;
}

.title h1 {
  margin: 0;
  font-family: "Instrument Serif", Baskerville, Georgia, serif;
  font-size: clamp(3.05rem, 11vw, 4.45rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.055em;
}

.title p {
  margin: 16px 0 0;
  color: #c3d2cd;
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.transport {
  grid-row: 3;
  padding: 28px 16px calc(clamp(32px, 8svh, 72px) + env(safe-area-inset-bottom));
}

.status {
  min-height: 1.4em;
  margin: 0 0 20px;
  color: #c3d2cd;
  font-size: .79rem;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 6vw, 26px);
}

.control {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #e7dcc348;
  border-radius: 50%;
  background: #14242780;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.control:focus-visible { outline: 2px solid #eee3cd; outline-offset: 5px; }
.control:active:not(:disabled) { transform: scale(.96); }
.control:disabled { opacity: .48; cursor: default; }
.secondary { width: 50px; height: 50px; }
.primary { width: 76px; height: 76px; background: #e4d1aa; color: #253032; }
.control svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.primary svg { width: 30px; height: 30px; }
.primary .play-icon { fill: currentColor; }
.primary .pause-icon, .is-playing .play-icon { display: none; }
.is-playing .pause-icon { display: block; }

.timers {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.timer {
  min-height: 44px;
  min-width: 100px;
  padding: 0 14px;
  border-radius: 24px;
  font: 500 .8rem system-ui, sans-serif;
}

.timer[aria-current="true"] {
  border-color: #e4d1aa;
  background: #e4d1aa;
  color: #253032;
}

.countdown-slot {
  margin-top: 10px;
  min-height: 1em;
  color: #aebebb;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
}

@media (min-width: 600px) {
  .player { box-shadow: 0 0 90px #030a0c99; }
}

@media (prefers-reduced-motion: reduce) {
  .mist, .ripples i { animation: none; }
}
