:root {
  --fondo: #1a1312;
  --tarjeta: #251a18;
  --rojo: #932b23;
  --rojo-claro: #c9473b;
  --crema: #f3e6d3;
  --texto: #f6efe6;
  --gris: #a8988f;
  --borde: #4a2c28;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--fondo);
  background-image: radial-gradient(rgba(246,239,230,.07) 1px, transparent 1px);
  background-size: 3px 3px;
  color: var(--texto);
  font-family: "Archivo", sans-serif;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.radio-shell { width: min(100%, 540px); margin: 0 auto; padding: 22px 16px 28px; }
.radio-header { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.radio-logo { width: 72px; height: 72px; flex: 0 0 72px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--borde); }
.radio-heading { min-width: 0; }
.radio-heading p { margin: 0 0 3px; color: var(--rojo-claro); font: 17px/1 "VT323", monospace; letter-spacing: .08em; }
.radio-heading h1 { margin: 0; color: var(--crema); font: 700 30px/1 "Silkscreen", monospace; letter-spacing: .08em; }
.radio-random { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--gris); font: 17px/1 "VT323", monospace; white-space: nowrap; }
.radio-random i, .radio-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--rojo-claro); box-shadow: 0 0 12px var(--rojo-claro); animation: radio-pulse 1.5s ease-in-out infinite; }
.radio-card { overflow: hidden; padding: 12px; border: 2px solid var(--rojo); border-radius: 22px; background: var(--tarjeta); box-shadow: 0 22px 70px -28px rgba(147,43,35,.85); }
.radio-video { position: relative; overflow: hidden; aspect-ratio: 16/9; border-radius: 13px; background: #000; }
.radio-video iframe, .radio-video #player { display: block; width: 100%; height: 100%; border: 0; }
.radio-start { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border: 0; background: rgba(26,19,18,.86); color: var(--crema); cursor: pointer; transition: opacity .25s, visibility .25s; }
.radio-start:disabled { cursor: wait; }
.radio-start.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.radio-start-icon { display: grid; place-items: center; width: 66px; height: 66px; padding-left: 5px; border-radius: 50%; background: var(--rojo); font-size: 25px; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.radio-start:hover .radio-start-icon { background: var(--rojo-claro); transform: scale(1.06); }
#radio-start-label { font: 14px/1.4 "Silkscreen", monospace; letter-spacing: .06em; }
.radio-status-row { display: flex; justify-content: space-between; gap: 12px; margin: 15px 2px 10px; }
.radio-status, .radio-time { color: var(--rojo-claro); font: 17px/1 "VT323", monospace; }
.radio-time { color: var(--gris); white-space: nowrap; }
.radio-card h2 { margin: 0; color: var(--crema); font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; }
.radio-artist { margin: 5px 0 13px; color: var(--gris); font-size: 14px; }
.radio-artist a { color: var(--rojo-claro); }
.radio-progress { height: 5px; overflow: hidden; border-radius: 99px; background: var(--borde); }
.radio-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--rojo-claro); transition: width .3s linear; }
.radio-controls { display: flex; gap: 10px; margin-top: 17px; }
.radio-controls button { min-height: 48px; border-radius: 999px; cursor: pointer; }
.radio-controls button:disabled { opacity: .5; cursor: wait; }
.radio-play { flex: 0 0 52px; border: 0; background: var(--rojo); color: var(--texto); font-size: 20px; }
.radio-controls button:not(:disabled):hover { background: var(--rojo-claro); color: var(--texto); }
.radio-volume { display: flex; align-items: center; gap: 12px; margin-top: 17px; color: var(--gris); font: 17px/1 "VT323", monospace; }
.radio-volume input { width: 100%; accent-color: var(--rojo-claro); cursor: pointer; }
.radio-note { margin: 15px 3px 2px; color: var(--gris); font-size: 12px; line-height: 1.5; text-align: center; }
.radio-shell footer { padding: 22px 5px 0; text-align: center; }
.radio-live { display: inline-flex; align-items: center; gap: 8px; color: var(--crema); font: 18px/1 "VT323", monospace; }
.radio-shell footer p { margin: 10px auto 14px; max-width: 370px; color: var(--gris); font-size: 13px; line-height: 1.55; }
.radio-shell footer a { color: var(--rojo-claro); font: 20px/1 "VT323", monospace; text-decoration: none; }
.radio-shell footer a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--rojo-claro); outline-offset: 3px; }
@keyframes radio-pulse { 0%,100% { opacity: .45; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.15); } }
@media (max-width: 390px) {
  .radio-shell { padding: 14px 10px 20px; }
  .radio-logo { width: 58px; height: 58px; flex-basis: 58px; }
  .radio-heading h1 { font-size: 24px; }
  .radio-heading p { font-size: 14px; }
  .radio-random { font-size: 14px; }
  .radio-card { padding: 9px; border-radius: 17px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Reproductor integrado: video visible y controles junto a la señal. */
.is-embedded body{min-height:0;background:var(--tarjeta);background-image:none}
.is-embedded .radio-shell{width:100%;max-width:none;padding:12px 16px}
.is-embedded .radio-header{margin:0 0 10px;gap:10px}
.is-embedded .radio-logo{width:30px;height:30px;flex-basis:30px}
.is-embedded .radio-heading{display:flex;align-items:center;gap:10px}
.is-embedded .radio-heading p{font-size:16px;margin:0}
.is-embedded .radio-heading h1{font-size:16px;letter-spacing:0}
.is-embedded .radio-card{display:grid;grid-template-columns:minmax(260px,360px) minmax(0,1fr);column-gap:20px;border:0;border-radius:0;box-shadow:none;padding:0}
.is-embedded .radio-video{grid-column:1;grid-row:1/7;min-height:200px;aspect-ratio:auto;border-radius:6px}
.is-embedded .radio-status-row,.is-embedded .radio-card h2,.is-embedded .radio-artist,.is-embedded .radio-progress,.is-embedded .radio-controls,.is-embedded .radio-volume{grid-column:2;margin-top:0;margin-bottom:8px}
.is-embedded .radio-status-row{align-items:center}
.is-embedded .radio-card h2{font-size:18px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.is-embedded .radio-artist{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.is-embedded .radio-volume{margin:0}
.is-embedded .radio-note,.is-embedded footer{display:none}
@media(max-width:639px){
.is-embedded .radio-shell{padding:12px}
.is-embedded .radio-card{display:flex;flex-direction:column;gap:8px}
.is-embedded .radio-video{width:100%;height:200px;flex:0 0 200px}
.is-embedded .radio-status-row,.is-embedded .radio-card h2,.is-embedded .radio-artist,.is-embedded .radio-controls{margin:0}
.is-embedded .radio-heading p{font-size:14px}
.is-embedded .radio-heading h1{font-size:14px}
.is-embedded .radio-random{font-size:13px}
.is-embedded .radio-status{font-size:15px}
.is-embedded .radio-time{font-size:14px}
}
