:root {
  color-scheme: dark;
  --paper: #101010;
  --ink: #f6f0e7;
  --muted: #b9afa3;
  --line: #39332d;
  --panel: #191716;
  --panel-soft: #211d1a;
  --accent: #e84820;
  --accent-2: #ff7247;
  --shadow: 0 30px 95px rgba(0, 0, 0, 0.44);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
  background: var(--paper);
}

body.modal-open {
  overflow: hidden;
}

.site-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #090909;
}

.site-ambient__wash {
  position: absolute;
  inset: -42%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(48px) saturate(2.6) brightness(0.5) contrast(1.18);
  opacity: 0;
  transform: scale(1.28);
  transition: opacity 1.1s ease;
  will-change: opacity;
}

.site-ambient__wash.is-visible {
  opacity: 0.78;
}

.site-ambient__bloom {
  position: absolute;
  inset: -30%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(70px) saturate(3.2) brightness(0.62) contrast(1.25);
  opacity: 0;
  mix-blend-mode: soft-light;
  transform: scale(1.2);
  transition: opacity 1.1s ease;
}

.site-ambient__bloom.is-visible {
  opacity: 0.7;
}

.site-ambient__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='112' height='112' viewBox='0 0 112 112'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.28'%3E%3Cpath d='M0 28h112M0 56h112M0 84h112M28 0v112M56 0v112M84 0v112'/%3E%3Ccircle cx='28' cy='28' r='13'/%3E%3Ccircle cx='84' cy='56' r='18'/%3E%3Ccircle cx='50' cy='90' r='9'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 112px 112px;
}

.site-ambient__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 8, 8, 0.32), rgba(8, 8, 8, 0.48) 52%, rgba(8, 8, 8, 0.64)),
    radial-gradient(ellipse at 50% 10%, transparent 18%, rgba(8, 8, 8, 0.4) 80%);
}

button,
input,
audio {
  font: inherit;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100% - 28px, 820px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 46px) 0 18px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
}

.app-frame {
  align-self: center;
  display: grid;
  gap: clamp(12px, 2vw, 22px);
}

.app-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: left;
}

.logo {
  width: clamp(66px, 11vw, 96px);
  height: auto;
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
}

h1 {
  margin: 2px 0 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.18em;
  font-size: clamp(2.1rem, 6.4vw, 4.55rem);
  line-height: 0.9;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-payoff {
  color: var(--muted);
  font-size: 0.28em;
  font-weight: 750;
}

.player-panel {
  min-width: 0;
  padding: clamp(4px, 1.2vw, 12px) 0 0;
}

.local-player {
  display: grid;
  justify-items: center;
  gap: clamp(18px, 3vw, 28px);
  text-align: center;
}

.art-frame {
  width: min(64vw, 290px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  box-shadow: 0 20px 44px rgba(24, 23, 22, 0.12);
}

.track-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-area {
  width: min(100%, 620px);
  min-width: 0;
}

.track-kicker {
  margin: 0 0 6px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.track-title {
  margin: 0;
  font-size: clamp(1.85rem, 6vw, 3.15rem);
  font-weight: 900;
  line-height: 1;
  overflow-wrap: anywhere;
}

.track-artist {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  overflow-wrap: anywhere;
}

.progress-wrap {
  width: 100%;
  height: 10px;
  margin: clamp(22px, 4vw, 30px) 0;
  overflow: hidden;
  border-radius: 999px;
  background: #332d27;
}

.progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.4s ease;
}

.player-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.play-toggle {
  min-width: 150px;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #f6f0e7;
  color: #101010;
  cursor: pointer;
  font-weight: 850;
}

.play-toggle:focus-visible,
.volume-slider:focus-visible {
  outline: 3px solid rgba(14, 124, 134, 0.35);
  outline-offset: 3px;
}

.play-icon {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
}

.play-toggle.is-playing .play-icon {
  width: 13px;
  height: 13px;
  border: 0;
  background: currentColor;
}

.volume-control {
  min-width: 150px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.volume-slider {
  width: 150px;
  accent-color: var(--accent);
}

.about-panel {
  width: min(100%, 680px);
  margin: 8px auto 0;
  padding: 8px 6px 4px;
  text-align: left;
}

.promo-banner {
  width: min(100%, 680px);
  margin: 18px auto 6px;
}

.promo-banner a {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.promo-banner a:focus-visible {
  outline: 3px solid rgba(232, 72, 32, 0.45);
  outline-offset: 3px;
}

.promo-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.about-panel p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 2vw, 1.06rem);
  line-height: 1.55;
}

.about-panel p + p {
  margin-top: 14px;
}

.about-panel a {
  color: var(--accent-2);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.play-store-link:focus-visible {
  outline: 3px solid rgba(14, 124, 134, 0.35);
  outline-offset: 3px;
}

.listening-options {
  width: min(100%, 620px);
  margin: 28px auto 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.play-store-link {
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.play-store-link img {
  display: block;
  width: auto;
  height: 42px;
}

.voice-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.voice-badge {
  height: 42px;
  min-width: 212px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  background: #000;
  color: #fff;
  text-align: left;
}

.voice-badge strong {
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.1;
}

.voice-badge span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  line-height: 1.2;
}

.stream-audio {
  display: none;
}

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  padding: 0 6px;
  color: rgba(246, 240, 231, 0.58);
  font-size: 0.76rem;
  text-align: center;
}

.legal-footer span {
  white-space: nowrap;
}

.cookie-preferences {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(246, 240, 231, 0.72);
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.whatsapp-fab {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 35;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  color: #fff;
  background: #25d366;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.whatsapp-fab:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
}

.whatsapp-fab:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 30;
  width: min(calc(100% - 36px), 760px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(25, 23, 22, 0.96);
  box-shadow: var(--shadow);
}

.cookie-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.cookie-copy h2 {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.2;
}

.cookie-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.cookie-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.cookie-actions button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 850;
}

.cookie-reject {
  background: transparent;
  color: var(--ink);
}

.cookie-accept {
  background: var(--accent);
  color: #101010;
}

.cookie-preferences:focus-visible,
.cookie-actions button:focus-visible {
  outline: 3px solid rgba(232, 72, 32, 0.35);
  outline-offset: 3px;
}

.promo-modal[hidden] {
  display: none;
}

.promo-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: max(8px, env(safe-area-inset-top, 0px))
    max(8px, env(safe-area-inset-right, 0px))
    max(8px, env(safe-area-inset-bottom, 0px))
    max(8px, env(safe-area-inset-left, 0px));
}

.promo-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

.promo-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, calc(100vh * 819 / 1024));
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.promo-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  object-fit: contain;
}

.promo-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  cursor: pointer;
}

.promo-close span {
  display: block;
  font-size: 1.65rem;
  font-weight: 300;
  line-height: 1;
}

.promo-close:focus-visible {
  outline: 3px solid rgba(232, 72, 32, 0.45);
  outline-offset: 3px;
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 22px, 460px);
    padding-top: 18px;
  }

  .app-header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .about-panel {
    text-align: center;
  }

  .player-actions {
    align-items: center;
    flex-direction: column;
    gap: 12px;
  }

  .play-toggle {
    width: 100%;
  }

  .volume-control {
    width: min(68vw, 210px);
    min-width: 0;
    text-align: center;
  }

  .volume-slider {
    width: 100%;
  }

  .legal-footer span {
    white-space: normal;
  }

  .cookie-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .cookie-actions {
    width: 100%;
  }

  .cookie-actions button {
    flex: 1 1 0;
  }
}
