:root {
  color-scheme: light;
  --paper: #efe5d8;
  --ink: #4a342b;
  --accent: #b76547;
  --accent-dark: #914832;
  --sage: #7d8870;
  --clay-light: #d8ae91;
  --track: rgba(74, 52, 43, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding:
    max(28px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
}

body::before {
  width: 240px;
  height: 320px;
  left: -118px;
  bottom: -92px;
  border: 2px solid rgba(125, 136, 112, 0.28);
  border-radius: 50% 50% 44% 56% / 61% 43% 57% 39%;
  box-shadow: 34px -22px 0 rgba(125, 136, 112, 0.08);
  transform: rotate(-18deg);
}

body::after {
  width: 190px;
  height: 190px;
  right: -82px;
  top: -54px;
  border-radius: 50%;
  background: rgba(216, 174, 145, 0.26);
  box-shadow: -24px 30px 0 rgba(183, 101, 71, 0.07);
}

.card {
  width: min(100%, 390px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: translateY(-3vh);
}

h1 {
  max-width: 11ch;
  margin: 0 0 clamp(46px, 8vh, 72px);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(42px, 13vw, 62px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.play-button {
  position: relative;
  width: 104px;
  height: 104px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 16px 36px rgba(145, 72, 50, 0.23);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.play-button:active {
  transform: scale(0.94);
  background: var(--accent-dark);
  box-shadow: 0 9px 22px rgba(145, 72, 50, 0.2);
}

.play-button:focus-visible {
  outline: 4px solid rgba(183, 101, 71, 0.28);
  outline-offset: 6px;
}

.play-icon {
  width: 0;
  height: 0;
  margin-left: 8px;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 26px solid currentColor;
}

.pause-icon {
  display: none;
  align-items: center;
  gap: 9px;
}

.pause-icon i {
  display: block;
  width: 8px;
  height: 32px;
  border-radius: 4px;
  background: currentColor;
}

.play-button.is-playing .play-icon {
  display: none;
}

.play-button.is-playing .pause-icon {
  display: flex;
}

.progress-wrap {
  width: min(260px, 74vw);
  margin-top: 34px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition: opacity 240ms ease, transform 240ms ease;
}

.progress-wrap.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.seek {
  --seek-progress: 0%;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent) 0 var(--seek-progress), var(--track) var(--seek-progress) 100%);
}

.seek::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -8px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(74, 52, 43, 0.22);
}

.seek::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: var(--track);
}

.seek::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
}

.seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(74, 52, 43, 0.22);
}

.seek:focus-visible {
  outline: 3px solid rgba(183, 101, 71, 0.28);
  outline-offset: 2px;
}

.time {
  margin-top: -5px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: rgba(53, 39, 43, 0.58);
}

.status {
  min-height: 1.4em;
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--accent-dark);
}

@media (max-height: 560px) {
  .card {
    transform: none;
  }

  h1 {
    margin-bottom: 30px;
    font-size: clamp(36px, 11vw, 48px);
  }

  .play-button {
    width: 88px;
    height: 88px;
  }

  .progress-wrap {
    margin-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
