:root {
  color-scheme: light;
  --mint: #8bb7ac;
  --mint-light: #b7d4cc;
  --deep-teal: #0e5551;
  --gold: #e9c473;
  --gold-dark: #9d7a35;
  --cream: #fffaf0;
  --ink: #173f3c;
  --muted: #67827d;
}

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

html {
  min-width: 320px;
  background: var(--mint);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: linear-gradient(145deg, #bfd9d2 0%, var(--mint) 62%, #7ca79e 100%);
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: 32px 20px;
}

.page-shell::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.3), transparent 48%);
  pointer-events: none;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 320px;
  aspect-ratio: 1;
  border: 1px solid rgba(235, 204, 139, 0.16);
  transform: rotate(45deg);
  pointer-events: none;
}

.ambient::before,
.ambient::after {
  position: absolute;
  inset: 12%;
  border: inherit;
  content: "";
}

.ambient::after {
  inset: 24%;
}

.ambient-one {
  top: -220px;
  right: -150px;
}

.ambient-two {
  bottom: -240px;
  left: -170px;
}

.player-card {
  width: min(100%, 510px);
  padding: 28px;
  border: 1px solid rgba(255, 250, 240, 0.72);
  border-radius: 34px;
  background: rgba(255, 250, 240, 0.9);
  box-shadow: 0 28px 72px rgba(22, 75, 70, 0.26);
  backdrop-filter: blur(16px);
}

.player-header {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 2px 12px 22px;
  text-align: center;
}

.player-header h1 {
  margin: 0;
  color: var(--deep-teal);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.player-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.cover-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 2px solid rgba(233, 196, 115, 0.9);
  border-radius: 26px;
  background: var(--deep-teal);
  box-shadow: 0 20px 42px rgba(9, 71, 67, 0.28);
}

.cover-frame::after {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(233, 196, 115, 0.38);
  border-radius: 18px;
  content: "";
  pointer-events: none;
}

.cover-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.audio-player {
  display: grid;
  gap: 14px;
  padding: 26px 5px 0;
}

.player-status {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(157, 122, 53, 0.3);
  border-radius: 12px;
  color: #704f12;
  background: rgba(233, 196, 115, 0.16);
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: center;
}

.time-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.progress {
  --progress: 0%;
  width: 100%;
  height: 6px;
  margin: 0;
  border-radius: 999px;
  outline: none;
  appearance: none;
  background: linear-gradient(
    90deg,
    var(--deep-teal) 0,
    var(--deep-teal) var(--progress),
    rgba(14, 85, 81, 0.16) var(--progress),
    rgba(14, 85, 81, 0.16) 100%
  );
  cursor: pointer;
}

.progress::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid var(--cream);
  border-radius: 50%;
  appearance: none;
  background: var(--deep-teal);
  box-shadow: 0 2px 8px rgba(14, 85, 81, 0.34);
}

.progress::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 3px solid var(--cream);
  border-radius: 50%;
  background: var(--deep-teal);
  box-shadow: 0 2px 8px rgba(14, 85, 81, 0.34);
}

.progress:focus-visible,
.round-button:focus-visible {
  outline: 3px solid rgba(157, 122, 53, 0.44);
  outline-offset: 5px;
}

.player-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  padding-top: 4px;
}

.round-button {
  display: grid;
  place-items: center;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.restart-button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(14, 85, 81, 0.2);
  color: var(--deep-teal);
  background: rgba(139, 183, 172, 0.2);
}

.restart-icon {
  margin-top: -2px;
  font-size: 1.6rem;
  line-height: 1;
}

.play-button {
  width: 64px;
  height: 64px;
  border: 2px solid var(--gold);
  color: var(--cream);
  background: var(--deep-teal);
  box-shadow: 0 12px 24px rgba(14, 85, 81, 0.28);
}

.play-icon {
  margin-left: 4px;
  font-size: 1.25rem;
}

.pause-icon {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.15em;
}

.footer-note {
  margin: 19px 0 0;
  color: rgba(23, 63, 60, 0.56);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.76rem;
  letter-spacing: 0.15em;
  text-align: center;
  text-transform: uppercase;
}

.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 (hover: hover) {
  .round-button:hover {
    transform: translateY(-2px);
  }

  .restart-button:hover {
    background: rgba(139, 183, 172, 0.34);
  }

  .play-button:hover {
    box-shadow: 0 16px 28px rgba(14, 85, 81, 0.34);
  }
}

.round-button:active {
  transform: scale(0.95);
}

@media (max-width: 560px) {
  .page-shell {
    align-items: start;
    padding: 16px 12px;
  }

  .player-card {
    padding: 20px;
    border-radius: 28px;
  }

  .player-header {
    padding-bottom: 18px;
  }

  .cover-frame {
    border-radius: 22px;
  }

  .audio-player {
    padding-top: 22px;
  }
}

@media (max-height: 800px) and (min-width: 561px) {
  .page-shell {
    padding-block: 18px;
  }

  .player-card {
    width: min(100%, 430px);
    padding: 20px;
  }

  .player-header {
    padding-bottom: 15px;
  }

  .player-header h1 {
    font-size: 2.2rem;
  }

  .audio-player {
    gap: 10px;
    padding-top: 17px;
  }

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

  .footer-note {
    margin-top: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .round-button {
    transition: none;
  }
}
