:root {
  --fondo: #0E1F16;
  --fondo-alt: #143024;
  --texto: #F4F6F0;
  --texto-suave: rgba(244, 246, 240, 0.72);
  --verde: #2FA84F;
  --amarillo: #F5C518;
  --rojo: #D63031;
  --borde: rgba(244, 246, 240, 0.12);
  --tabbar: #0A1811;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--fondo);
  color: var(--texto);
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.appbar {
  padding: 14px 20px;
  padding-top: calc(14px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--borde);
  background:
    linear-gradient(90deg, var(--verde), var(--amarillo), var(--rojo)) top / 100% 3px no-repeat,
    var(--fondo);
}

.appbar-brand { font-weight: 700; font-size: 1.05rem; }

main { flex: 1; padding: 16px 16px 20px; overflow-x: hidden; }

.screen { display: none; max-width: 720px; margin: 0 auto; }
.screen.active { display: block; }

.page { padding-bottom: 8px; }

h2 { font-size: 1.5rem; margin-bottom: 6px; }

.lead { color: var(--texto-suave); line-height: 1.5; margin-bottom: 16px; }

.search input {
  width: 100%;
  font: inherit;
  color: var(--texto);
  background: var(--fondo-alt);
  border: 1px solid var(--borde);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.search input::placeholder { color: rgba(244, 246, 240, 0.45); }

.lista { list-style: none; }

.cancion { border-bottom: 1px solid var(--borde); }
.cancion:last-child { border-bottom: none; }

.cancion a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 4px;
  color: var(--texto);
  text-decoration: none;
}

.cancion .titulo { font-weight: 700; font-size: 1.05rem; }
.cancion .artista { color: var(--texto-suave); font-size: 0.9rem; }

.tag {
  align-self: flex-start;
  margin-top: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--rojo);
  border-radius: 999px;
  padding: 3px 10px;
}

.vacio { color: var(--texto-suave); padding: 24px 4px; }

.back {
  background: none;
  border: none;
  color: var(--amarillo);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0 12px;
}

.detalle-head { margin-bottom: 14px; }
.detalle-head .artista { color: var(--texto-suave); margin-top: 2px; }
.detalle-head .tag { margin-top: 8px; }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 640px) {
  .grid { grid-template-columns: 1fr 1fr; }
}

.col h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--amarillo);
  margin-bottom: 8px;
}

.col pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.55;
  background: var(--fondo-alt);
  border: 1px solid var(--borde);
  border-radius: 12px;
  padding: 14px;
}

form { display: flex; flex-direction: column; gap: 6px; }

label { font-weight: 600; font-size: 0.9rem; margin-top: 12px; }

input[type="text"],
textarea {
  font: inherit;
  color: var(--texto);
  background: var(--fondo-alt);
  border: 1px solid var(--borde);
  border-radius: 12px;
  padding: 12px 14px;
  width: 100%;
}

input::placeholder, textarea::placeholder { color: rgba(244, 246, 240, 0.45); }

textarea { resize: vertical; min-height: 100px; }

input:focus, textarea:focus { outline: 2px solid var(--amarillo); outline-offset: 1px; }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-weight: 500;
  cursor: pointer;
}

.check input { width: 18px; height: 18px; accent-color: var(--amarillo); }

.btn {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: #0A1811;
  background: linear-gradient(90deg, var(--verde), var(--amarillo));
}

.btn:active { transform: scale(0.98); }

.tabbar {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: var(--tabbar);
  border-top: 1px solid var(--borde);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}

.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  color: var(--texto-suave);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
}

.tabbar a svg { width: 24px; height: 24px; }

.tabbar a.active { color: var(--amarillo); }
