/* Irratia — estilos. Un dial FM es el motivo visual; el resto se mantiene sobrio. */

@font-face {
  font-family: "Bricolage";
  src: url("/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage";
  src: url("/fonts/bricolage-ext.woff2") format("woff2");
  font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #0F1A2E; --bg-2: #18243B; --bg-3: #22304A; --bg-glass: rgba(15, 26, 46, .86);
  --fg-0: #EEF1F7; --fg-1: #AEB8CB; --fg-2: #7D8AA3;
  --line: rgba(238, 241, 247, .10); --tick: rgba(238, 241, 247, .28); --tick-major: rgba(238, 241, 247, .55);
  --amber: #FFB627; --amber-text: #FFC55A; --on-amber: #1F1500; --live: #FF5B4D;
  --ink-0: #22304A;
  --art-bg: #FFFFFF;
  --shadow-sheet: 0 -12px 40px rgba(0, 0, 0, .35);
  --font: "Bricolage", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-h: 64px; --mini-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --pad: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #F1F3F7; --bg-2: #FFFFFF; --bg-3: #E3E8F0; --bg-glass: rgba(241, 243, 247, .88);
    --fg-0: #13203A; --fg-1: #47536B; --fg-2: #6B768C;
    --line: rgba(19, 32, 58, .10); --tick: rgba(19, 32, 58, .25); --tick-major: rgba(19, 32, 58, .55);
    --amber-text: #9A5F00; --ink-0: #0F1A2E;
    --shadow-sheet: 0 -12px 40px rgba(15, 26, 46, .18);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg-0);
  font: 400 16px/1.45 var(--font); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 6px; }
.i { width: 24px; height: 24px; flex: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: var(--on-amber); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ estructura */

.shell { min-height: 100dvh; }
.view {
  outline: none; max-width: 1180px; margin: 0 auto;
  padding: calc(var(--safe-t) + 14px) 0 calc(var(--nav-h) + var(--safe-b) + 24px);
}
body.has-mini .view { padding-bottom: calc(var(--nav-h) + var(--mini-h) + var(--safe-b) + 28px); }

.nav {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--bg-glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--line);
}
.nav .brand { display: none; }
@media (max-width: 899px) { .only-wide { display: none !important; } }
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: var(--nav-h); }
.tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11.5px; font-weight: 500; color: var(--fg-2); height: 100%;
}
.tabs a[aria-current="page"] { color: var(--fg-0); }
.tabs a[aria-current="page"] .i { color: var(--amber); }

@media (min-width: 900px) {
  :root { --pad: 36px; }
  .shell { display: grid; grid-template-columns: 228px 1fr; }
  .nav {
    position: sticky; top: 0; inset: auto; height: 100dvh; padding: 22px 14px; border-top: 0;
    border-right: 1px solid var(--line); background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
    display: flex; flex-direction: column; gap: 22px;
  }
  .nav .brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; font-weight: 700; font-size: 22px; letter-spacing: -.02em; }
  .nav .brand svg { width: 34px; height: 34px; }
  .tabs { display: flex; flex-direction: column; height: auto; gap: 2px; }
  .tabs a { flex-direction: row; justify-content: flex-start; gap: 12px; font-size: 15.5px; padding: 10px 12px; border-radius: 10px; height: auto; color: var(--fg-1); }
  .tabs a:hover { background: var(--bg-2); color: var(--fg-0); }
  .tabs a[aria-current="page"] { background: var(--bg-2); }
  .install { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--fg-1); font-size: 14.5px; border: 1px solid var(--line); }
  .install:hover { color: var(--fg-0); border-color: var(--tick-major); }
  .view, body.has-mini .view { padding-bottom: calc(var(--mini-h) + 48px); padding-top: 30px; }
}
.brand svg g { fill: #EEF1F7; }

/* ------------------------------------------------------------ tipografía y cabeceras */

.page-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px var(--pad) 18px;
}
.page-head h1 { font-size: 33px; line-height: 1.1; font-weight: 700; letter-spacing: -.025em; }
.page-head .back { margin-left: -8px; }
.wordmark { display: flex; align-items: center; gap: 9px; font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.wordmark svg { width: 30px; height: 30px; }
@media (min-width: 900px) { .wordmark { visibility: hidden; } .page-head h1 { font-size: 41px; } }

.section { margin-top: 30px; }
.section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 var(--pad) 12px; }
.section h2 { font-size: 21px; font-weight: 650; letter-spacing: -.015em; line-height: 1.2; }
.section .more { font-size: 14.5px; color: var(--fg-1); white-space: nowrap; }
.section .more:hover { color: var(--fg-0); }
.lede { color: var(--fg-1); font-size: 15px; padding: 0 var(--pad); max-width: 62ch; }
.muted { color: var(--fg-2); }

.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--fg-0); flex: none; }
.icon-btn:hover { background: var(--bg-2); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px;
  font-weight: 600; font-size: 15px; background: var(--bg-3); color: var(--fg-0); white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn .i { width: 20px; height: 20px; }
.btn.primary { background: var(--amber); color: var(--on-amber); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.on .i { color: var(--amber); }

/* ------------------------------------------------------------ arte (logos) */

.art {
  display: block; position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--art-bg);
  box-shadow: inset 0 0 0 1px rgba(15, 26, 46, .08);
}
.art img { width: 100%; height: 100%; object-fit: cover; }
.art.contain img { object-fit: contain; padding: 12%; }
.mono {
  display: grid; width: 100%; height: 100%; display: grid; place-items: center; color: #fff;
  font-weight: 750; letter-spacing: -.04em; font-size: var(--mono-size, 30px); line-height: 1; text-align: center; padding: 8%;
  background: var(--mono-bg, #3B4C6E);
  position: relative;
}
.mono::after { /* marcas de dial en la base del monograma */
  content: ""; position: absolute; left: 12%; right: 12%; bottom: 12%; height: 9%;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 1.5px, transparent 1.5px 7px);
  -webkit-mask: linear-gradient(#000 0 0); opacity: .8;
}

/* indicador de "sonando" */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; background: var(--amber); border-radius: 1px; height: 40%; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.35s; } .eq i:nth-child(3) { animation-delay: -.7s; }
.paused .eq i, .eq.paused i { animation-play-state: paused; }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }

/* ------------------------------------------------------------ filas horizontales y tiles */

.scroller {
  display: grid; grid-auto-flow: column; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
  padding: 2px var(--pad) 6px; scroll-padding-inline: var(--pad); scroll-snap-type: x proximity; scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; }
.tile { width: 112px; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.tile .art { width: 100%; transition: transform .15s var(--ease); }
.tile:active .art { transform: scale(.96); }
.tile .name { font-size: 14px; font-weight: 550; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .sub { font-size: 12.5px; color: var(--fg-2); margin-top: -5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.is-current .art { box-shadow: 0 0 0 2.5px var(--amber); }
.tile .badge { position: absolute; right: 6px; bottom: 6px; background: rgba(15,26,46,.85); border-radius: 6px; padding: 4px 5px; }
.tile.wide { width: 148px; }
@media (min-width: 900px) { .tile { width: 136px; } .tile.wide { width: 168px; } }

.grid-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 18px 14px; padding: 0 var(--pad); }
.grid-tiles .tile { width: auto; }
@media (min-width: 900px) { .grid-tiles { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 24px 18px; } }

/* ------------------------------------------------------------ listas */

.list { padding: 0 calc(var(--pad) - 10px); }
.item {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px;
  padding: 8px 4px 8px 10px; border-radius: 12px; width: 100%;
}
.item-main { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 14px; text-align: left; min-width: 0; }
.item:hover { background: var(--bg-2); }
.item .art { border-radius: 11px; }
.item .t { min-width: 0; }
.item .t strong { display: block; font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .t span { display: block; font-size: 13.5px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .acts { display: flex; align-items: center; }
.item.is-current .t strong { color: var(--amber-text); }
.fav-btn .i { width: 22px; height: 22px; }
.fav-btn.on { color: var(--amber); }

/* ------------------------------------------------------------ dial (portada) */

.dial { margin: 4px 0 6px; }
.dial-frame { position: relative; }
.dial-track {
  display: flex; align-items: center; gap: 26px; overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 26px calc(50% - 46px) 40px;
  background:
    linear-gradient(var(--tick-major), var(--tick-major)) left calc(100% - 14px) / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--tick-major) 0 2px, transparent 2px 60px) left calc(100% - 15px) / 100% 16px no-repeat,
    repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px 12px) left calc(100% - 15px) / 100% 8px no-repeat;
  background-attachment: local;
}
.dial-track::-webkit-scrollbar { display: none; }
.dial-item {
  flex: none; width: 92px; scroll-snap-align: center;
  transform: scale(calc(1 - var(--d, 1) * .28)); opacity: calc(1 - var(--d, 1) * .45);
  transition: transform .08s linear;
}
.dial-item .art { border-radius: 20px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.dial-needle {
  position: absolute; top: 6px; bottom: 6px; left: 50%; width: 3px; margin-left: -1.5px;
  background: var(--amber); border-radius: 2px; pointer-events: none;
  box-shadow: 0 0 14px rgba(255, 182, 39, .55);
}
.dial-needle::before { content: ""; position: absolute; top: -4px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--amber); }
.dial-now { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px var(--pad) 0; min-height: 76px; }
.dial-now h2 { font-size: 26px; line-height: 1.1; font-weight: 700; letter-spacing: -.025em; }
.dial-now p { color: var(--fg-1); font-size: 14.5px; margin-top: 3px; }
.dial-label { padding: 0 var(--pad); color: var(--fg-1); font-size: 15px; }
.big-play {
  width: 64px; height: 64px; border-radius: 50%; background: var(--amber); color: var(--on-amber);
  display: grid; place-items: center; flex: none; box-shadow: 0 6px 20px rgba(255, 182, 39, .3);
}
.big-play .i { width: 30px; height: 30px; }
.big-play:active { transform: scale(.95); }
@media (min-width: 900px) {
  .dial-item { width: 112px; }
  .dial-track { padding-inline: calc(50% - 56px); gap: 34px; }
  .dial-now h2 { font-size: 33px; }
}

/* ------------------------------------------------------------ explorar */

.genres { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 var(--pad); }
@media (min-width: 640px) { .genres { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; } }
.genre {
  position: relative; min-height: 84px; border-radius: 14px; padding: 12px 14px 26px; overflow: hidden;
  background: var(--g, #3B4C6E); color: #fff; font-weight: 650; font-size: 16px; line-height: 1.2; letter-spacing: -.01em;
  display: flex; flex-direction: column; justify-content: space-between;
}
.genre small { font-weight: 450; font-size: 12.5px; opacity: .82; }
.genre::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 10px; height: 8px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.6) 0 1.5px, transparent 1.5px 8px);
}
.genre:active { transform: scale(.98); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 var(--pad); }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2);
  font-size: 14.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none;
}
.chip:hover { border-color: var(--tick-major); }
.chip[aria-pressed="true"] { background: var(--fg-0); color: var(--bg); border-color: var(--fg-0); }
.chip .n { color: var(--fg-2); font-size: 12.5px; }

/* ------------------------------------------------------------ búsqueda */

.searchbar { position: relative; display: block; padding: 0 var(--pad); }
.searchbar input {
  width: 100%; height: 50px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2);
  padding: 0 46px 0 46px; font-size: 16.5px; outline: none; -webkit-appearance: none; appearance: none;
}
.searchbar input:focus { border-color: var(--amber); }
.searchbar input::-webkit-search-cancel-button { display: none; }
.searchbar > .i { position: absolute; left: calc(var(--pad) + 14px); top: 13px; color: var(--fg-2); pointer-events: none; }
.searchbar .clear { position: absolute; right: calc(var(--pad) + 3px); top: 3px; }

.empty { padding: 30px var(--pad); color: var(--fg-1); max-width: 52ch; }
.empty strong { display: block; color: var(--fg-0); font-size: 18px; margin-bottom: 4px; }
.loading { padding: 24px var(--pad); color: var(--fg-2); display: flex; gap: 10px; align-items: center; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--tick); border-top-color: var(--amber); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: var(--bg-2); border-radius: 16px; }

/* ------------------------------------------------------------ segmentado */

.segmented { display: inline-flex; margin: 0 var(--pad); padding: 3px; background: var(--bg-2); border-radius: 12px; gap: 2px; }
.segmented button { padding: 8px 14px; border-radius: 9px; font-size: 14.5px; font-weight: 550; color: var(--fg-1); }
.segmented button[aria-selected="true"] { background: var(--bg-3); color: var(--fg-0); }

/* ------------------------------------------------------------ ficha (emisora / podcast) */

.hero { display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: end; padding: 0 var(--pad); }
.hero .art { border-radius: 20px; }
.hero h1 { font-size: 26px; line-height: 1.12; font-weight: 700; letter-spacing: -.025em; }
.hero .by { color: var(--fg-1); margin-top: 4px; font-size: 15px; }
.hero .tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.hero .tags span { font-size: 12.5px; color: var(--fg-1); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px var(--pad) 0; }
.desc { padding: 16px var(--pad) 0; color: var(--fg-1); font-size: 15px; max-width: 70ch; white-space: pre-line; }
.desc.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.link-btn { color: var(--amber-text); font-weight: 600; font-size: 14.5px; padding: 6px var(--pad); }
@media (min-width: 900px) { .hero { grid-template-columns: 200px 1fr; gap: 28px; } .hero h1 { font-size: 41px; } }

.episodes { padding: 6px calc(var(--pad) - 10px) 0; }
.ep { padding: 14px 10px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; }
.ep .meta { grid-column: 1 / -1; font-size: 13px; color: var(--fg-2); display: flex; gap: 10px; align-items: center; }
.ep h3 { font-size: 16px; font-weight: 600; line-height: 1.3; letter-spacing: -.005em; }
.ep h3 button { text-align: left; }
.ep .ep-desc { grid-column: 1 / -1; font-size: 14.5px; color: var(--fg-1); white-space: pre-line; max-width: 70ch; }
.ep .ep-play { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; align-self: start; }
.ep .ep-play .i { width: 20px; height: 20px; }
.ep.is-current h3 { color: var(--amber-text); }
.ep.done h3 { color: var(--fg-2); }
.ep .bar { width: 64px; height: 4px; background: var(--bg-3); border-radius: 2px; overflow: hidden; }
.ep .bar span { display: block; height: 100%; background: var(--amber); }

/* ------------------------------------------------------------ mini reproductor */

.mini {
  position: fixed; z-index: 29; left: 8px; right: 8px; bottom: calc(var(--nav-h) + var(--safe-b) + 8px);
  height: var(--mini-h); border-radius: 16px; background: var(--bg-3);
  display: flex; align-items: center; gap: 8px; padding: 0 6px 0 8px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
}
.mini-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; height: 100%; }
.mini-art { width: 46px; height: 46px; flex: none; }
.mini-art .art { border-radius: 10px; }
.mini-text { min-width: 0; display: flex; flex-direction: column; }
.mini-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { font-size: 13px; color: var(--fg-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.mini-ctrls { display: flex; align-items: center; }
.mini .play-btn .i { width: 28px; height: 28px; }
.mini-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }
.mini-progress span { display: block; height: 100%; width: 0; background: var(--amber); }
.vol { display: none; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); flex: none; }
.is-loading .play-btn .i, .is-loading .big-play .i { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (min-width: 900px) {
  .mini {
    left: 0; right: 0; bottom: 0; border-radius: 0; height: 76px; padding: 0 24px; gap: 24px;
    background: var(--bg-glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--line); box-shadow: none;
  }
  .mini-open { flex: 0 1 360px; }
  .mini-ctrls { flex: 1; justify-content: center; gap: 8px; }
  .mini .play-btn { width: 48px; height: 48px; background: var(--amber); color: var(--on-amber); }
  .mini .play-btn:hover { background: var(--amber); filter: brightness(1.06); }
  .vol { display: flex; align-items: center; gap: 8px; color: var(--fg-1); flex: 0 1 200px; justify-content: flex-end; }
  .vol input { width: 120px; accent-color: var(--amber); }
}

/* ------------------------------------------------------------ reproductor completo */

.player {
  position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
  padding: calc(var(--safe-t) + 8px) 0 calc(var(--safe-b) + 28px);
  transform: translateY(0); transition: transform .32s var(--ease);
}
.player::before { /* resplandor con el color de la emisora */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 70vh; pointer-events: none;
  background: radial-gradient(120% 70% at 50% 0%, var(--accent, rgba(255,182,39,.25)), transparent 70%); opacity: .55;
}
.player.closing, .player.opening { transform: translateY(100%); }
.player > * { position: relative; }
.p-top { display: flex; align-items: center; justify-content: space-between; padding: 0 10px; }
.p-top .ctx { font-size: 13.5px; color: var(--fg-1); text-align: center; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-body { max-width: 460px; margin: 0 auto; padding: 0 24px; }
.p-art { width: min(78vw, 340px); margin: 18px auto 0; }
.p-art .art { border-radius: 26px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.p-title { margin-top: 26px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.p-title h2 { font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -.025em; }
.p-title p { color: var(--fg-1); margin-top: 4px; font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.p-title .fav-btn { margin-top: -6px; margin-right: -10px; }
.p-live { margin-top: 22px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--fg-1); }
.p-live .pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px; background: rgba(255, 91, 77, .14); color: var(--live); font-weight: 650; font-size: 12.5px; letter-spacing: .02em; }
.p-dial { margin-top: 8px; height: 26px; position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(90deg, var(--tick-major) 0 2px, transparent 2px 60px) var(--off, 0) 0 / 100% 18px no-repeat,
    repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px 12px) var(--off, 0) 10px / 100% 8px no-repeat;
  transition: background-position .5s var(--ease);
}
.p-dial::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: var(--amber); border-radius: 2px; }
.seek { margin-top: 22px; }
.seek input { width: 100%; accent-color: var(--amber); height: 22px; }
.seek .times { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.p-ctrls { display: flex; align-items: center; justify-content: space-between; margin: 18px auto 0; max-width: 320px; }
.p-ctrls .icon-btn { width: 56px; height: 56px; }
.p-ctrls .icon-btn .i { width: 30px; height: 30px; }
.p-ctrls .big-play { width: 76px; height: 76px; }
.p-ctrls .big-play .i { width: 36px; height: 36px; }
.p-acts { display: flex; justify-content: center; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.p-acts .btn { height: 38px; font-size: 14px; padding: 0 14px; background: var(--bg-2); }
.p-acts .btn.on { color: var(--amber-text); }
.p-more { margin-top: 34px; }
.p-more h3 { font-size: 17px; font-weight: 650; padding: 0 0 8px; }
.p-more .list { padding: 0; margin: 0 -10px; }
.p-notes { margin-top: 28px; color: var(--fg-1); font-size: 14.5px; white-space: pre-line; }
.p-error { margin-top: 14px; padding: 10px 14px; background: rgba(255, 91, 77, .12); color: var(--fg-0); border-radius: 12px; font-size: 14.5px; }
@media (min-width: 900px) {
  .player { inset: 0 0 0 auto; width: 480px; border-left: 1px solid var(--line); box-shadow: -20px 0 60px rgba(0,0,0,.3); }
  .player.closing, .player.opening { transform: translateX(100%); }
}

.backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(5, 10, 20, .5); }
.menu {
  position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; background: var(--bg-2); border-radius: 22px 22px 0 0;
  padding: 10px 10px calc(var(--safe-b) + 14px); box-shadow: var(--shadow-sheet); max-height: 80vh; overflow: auto;
}
.menu h3 { font-size: 17px; font-weight: 650; padding: 12px 14px 8px; }
.menu p { padding: 0 14px 8px; color: var(--fg-1); font-size: 14px; }
.menu button.opt { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 14px; border-radius: 12px; font-size: 16px; text-align: left; }
.menu button.opt:hover { background: var(--bg-3); }
.menu button.opt[aria-checked="true"] { color: var(--amber-text); font-weight: 600; }
@media (min-width: 900px) { .menu { left: 50%; right: auto; bottom: 50%; transform: translate(-50%, 50%); width: 380px; border-radius: 20px; } }

.toast {
  position: fixed; z-index: 80; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 84px); transform: translate(-50%, 20px);
  background: var(--fg-0); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-size: 14.5px; font-weight: 500;
  max-width: min(92vw, 440px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 100px; } }

.offline-note { margin: 0 var(--pad) 14px; padding: 10px 14px; border-radius: 12px; background: var(--bg-2); color: var(--fg-1); font-size: 14px; }
.foot { padding: 40px var(--pad) 0; color: var(--fg-2); font-size: 13px; max-width: 70ch; }
.foot a { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------ aviso de instalación (móvil) */

.install-banner {
  position: fixed; z-index: 40; left: 8px; right: 8px;
  bottom: calc(var(--nav-h) + var(--safe-b) + 8px);
  background: var(--bg-2); color: var(--fg-0); border: 1px solid var(--line); border-radius: 20px;
  padding: 14px 14px 12px; box-shadow: 0 16px 44px rgba(0, 0, 0, .35);
  transform: translateY(calc(100% + 24px)); opacity: 0; transition: transform .32s var(--ease), opacity .2s;
}
body.has-mini .install-banner { bottom: calc(var(--nav-h) + var(--mini-h) + var(--safe-b) + 16px); }
.install-banner.show { transform: none; opacity: 1; }
.ib-head { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: start; }
.ib-head img { border-radius: 12px; }
.ib-head h2 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; margin-top: 2px; }
.ib-head p { font-size: 14px; color: var(--fg-1); margin-top: 3px; line-height: 1.4; }
.ib-close { width: 36px; height: 36px; margin: -6px -6px 0 0; color: var(--fg-1); }
.install-banner ol { margin: 12px 0 0; padding: 0 0 0 60px; font-size: 14.5px; color: var(--fg-1); display: grid; gap: 6px; }
.install-banner ol strong { color: var(--fg-0); font-weight: 600; }
.install-banner .i.inline { width: 19px; height: 19px; vertical-align: -4px; color: var(--amber-text); }
.ib-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.ib-actions .btn { height: 40px; }
@media (min-width: 900px) { .install-banner { display: none; } }
