:root {
  color-scheme: light;
  --bg: #f5efe7;
  --surface: #fffaf2;
  --ink: #243040;
  --muted: #66707c;
  --line: #e2d8ca;
  --accent: #315f72;
  --accent-strong: #233f55;
  --rose: #d87a70;
  --gold: #d79b45;
  --green: #5e8b72;
  --shadow: 0 20px 60px rgba(37, 48, 64, 0.14);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 18% 8%, rgba(216, 122, 112, 0.24), transparent 30rem),
    radial-gradient(circle at 82% 18%, rgba(94, 139, 114, 0.24), transparent 28rem),
    var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.app {
  width: min(1120px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  gap: 24px;
  align-items: center;
}

.player {
  background: rgba(255, 250, 242, 0.88);
  border: 1px solid rgba(226, 216, 202, 0.86);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 44px);
  backdrop-filter: blur(18px);
}

.eyebrow,
.label {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(3.2rem, 8vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.subcopy {
  max-width: 24rem;
  margin-bottom: 28px;
  color: var(--muted);
  line-height: 1.7;
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 96px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.now-playing h2 {
  margin: 4px 0 0;
  font-size: 1.35rem;
}

.pulse {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: #e8f0ed;
  overflow: hidden;
}

.pulse span {
  position: absolute;
  width: 12px;
  border-radius: 99px;
  background: var(--accent);
  transform-origin: bottom;
  animation: breathe 1.4s ease-in-out infinite;
  animation-play-state: paused;
}

.is-playing .pulse span {
  animation-play-state: running;
}

.pulse span:nth-child(1) {
  height: 18px;
  translate: -16px 0;
}

.pulse span:nth-child(2) {
  height: 34px;
  animation-delay: 0.18s;
}

.pulse span:nth-child(3) {
  height: 24px;
  translate: 16px 0;
  animation-delay: 0.34s;
}

@keyframes breathe {
  0%,
  100% {
    scale: 1 0.62;
    opacity: 0.65;
  }
  50% {
    scale: 1 1;
    opacity: 1;
  }
}

.transport {
  display: flex;
  gap: 12px;
  margin: 22px 0;
}

.play-button,
.ghost-button,
.sound-card {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  min-height: 48px;
}

.play-button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  background: var(--accent-strong);
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(35, 63, 85, 0.24);
}

.ghost-button {
  padding: 0 18px;
  color: var(--accent-strong);
  background: #e8f0ed;
  font-weight: 750;
}

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

.is-playing .play-icon {
  width: 14px;
  height: 16px;
  border: solid currentColor;
  border-width: 0 5px;
}

.controls {
  display: grid;
  gap: 18px;
}

.range-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  align-items: center;
  color: var(--muted);
  font-weight: 750;
}

.range-control output {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--accent);
}

.sound-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.sound-card {
  min-height: 118px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 250, 242, 0.82);
  border: 1px solid rgba(226, 216, 202, 0.88);
  box-shadow: 0 12px 34px rgba(37, 48, 64, 0.08);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.sound-card:hover,
.sound-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(49, 95, 114, 0.5);
  outline: none;
}

.sound-card.active {
  color: #fff;
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.sound-card strong,
.sound-card small {
  display: block;
}

.sound-card strong {
  margin-bottom: 6px;
  font-size: 1rem;
}

.sound-card small {
  color: var(--muted);
  line-height: 1.45;
}

.sound-card.active small {
  color: rgba(255, 255, 255, 0.74);
}

.sound-mark {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.sound-mark.white {
  background: linear-gradient(135deg, #dfe8ea, #7f9da7);
}

.sound-mark.pink {
  background: linear-gradient(135deg, #f3c5c1, #d87a70);
}

.sound-mark.brown {
  background: linear-gradient(135deg, #b89678, #6b4b39);
}

.sound-mark.rain {
  background: linear-gradient(135deg, #b7d7df, #315f72);
}

.sound-mark.waves {
  background: linear-gradient(135deg, #98c6bb, #3f7890);
}

.sound-mark.womb {
  background: linear-gradient(135deg, #d79b45, #9a5045);
}

.sound-mark.shush {
  background: linear-gradient(135deg, #c8d8ca, #5e8b72);
}

@media (max-width: 820px) {
  .app {
    min-height: auto;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .player {
    z-index: 1;
  }
}

@media (max-width: 560px) {
  .app {
    padding-inline: 14px;
  }

  .player {
    padding: 22px;
  }

  .transport,
  .now-playing {
    flex-direction: column;
    align-items: stretch;
  }

  .sound-list {
    grid-template-columns: 1fr;
  }

  .sound-card {
    min-height: 96px;
  }
}
