:root {
  --bg: #0b0d10;
  --fg: #f2f4f7;
  --muted: #8a93a1;
  --accent: #ffb84d;
  --chip-bg: #1a1d22;
  --chip-border: #262a31;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

#app {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
  position: relative;
}

.topbar {
  display: flex;
  gap: 12px;
  padding: 16px;
  justify-content: flex-end;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--fg);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 15px;
  cursor: pointer;
}

.chip select {
  background: transparent;
  color: var(--fg);
  border: none;
  font: inherit;
  outline: none;
  cursor: pointer;
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  gap: 12px;
}

.animal-name {
  font-size: clamp(48px, 12vw, 128px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.status {
  color: var(--muted);
  font-size: clamp(14px, 2.5vw, 18px);
  min-height: 1.2em;
}

.play-button {
  position: absolute;
  left: 50%;
  bottom: max(40px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(40vw, 200px);
  height: min(40vw, 200px);
  border-radius: 50%;
  background: var(--accent);
  color: #1a1208;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 12px 40px rgba(255, 184, 77, 0.25);
}

.play-button:active { transform: translateX(-50%) scale(0.97); }

.play-button .icon {
  width: 45%;
  height: 45%;
  fill: currentColor;
}

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

.skip-button {
  position: absolute;
  right: 24px;
  bottom: max(40px, env(safe-area-inset-bottom));
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--fg);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.skip-button svg {
  width: 50%;
  height: 50%;
  fill: currentColor;
}
