/* Peças do player e os dois temas (Vibe e Lo-Fi Cidade). A moldura (TV fixa, faixa de botões e feed) está em player.css.
   Tipografia no estilo Apple dentro do player: SF Pro no iPhone/Mac, Inter nos outros. */

.player {
  --ui: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, 'Segoe UI', Roboto, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, 'Segoe UI', Roboto, sans-serif;
  --ok: #30d158; --gold: #ffd60a; --muted-2: #a1a1aa;
  container: pl / inline-size;
  font-family: var(--ui); font-optical-sizing: auto;
}

/* Player firme: sem rolagem para os lados (o facho e a onda sangram para fora de propósito), sem esticar
   no fim da rolagem e sem puxar a página de trás. Só o feed rola. */
.player { overscroll-behavior: contain; overflow-x: clip; }
@media (max-width: 959px) { html:has(.player[data-open='true']), body:has(.player[data-open='true']) { overflow: hidden; overscroll-behavior: none; } }

/* ---------- capa: a mesma placa do app ---------- */
.cv.about-cv { position: relative; overflow: hidden; display: grid; place-items: center; flex: none; }
.cv.about-cv { width: 96px; height: 96px; border-radius: 25px; font-size: 34px; }

/* ---------- nome e lugar (folha "Sobre a rádio") ---------- */
.ficha { display: grid; justify-items: center; gap: 6px; text-align: center; margin-top: 4px; }
.ficha h2 { margin: 0; font: 700 28px/1.1 var(--display); letter-spacing: -.022em; text-wrap: balance; overflow-wrap: anywhere; }
.wl { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 1.15em; row-gap: 2px; margin: 0; }
.wl > span { position: relative; white-space: nowrap; }
.wl > span + span::before { content: "·"; position: absolute; left: -.78em; color: var(--muted); }
.wl > span.ls::before { display: none; }
.f-meta { font: 500 15px/1.35 var(--ui); color: var(--text); opacity: .86; font-variant-numeric: tabular-nums; }

/* ---------- cartões do feed ---------- */
.hero-wrap > .warm { position: absolute; inset: 0; margin: auto; width: 150px; height: 150px; max-width: 100%; border-radius: 26px; z-index: 4; }
.spec { position: relative; }
.spec canvas { display: block; width: 100%; height: 100%; }
.spec-note { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); font: 500 10.5px/1 var(--ui); color: var(--muted); white-space: nowrap; pointer-events: none; }
.ico-sq { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgb(var(--accent-rgb) / .14); color: var(--accent-text); flex: none; }
.ico-sq svg { width: 19px; height: 19px; }

/* ---------- suas rádios e ficha completa ---------- */
.ig { border-radius: 14px; background: rgb(var(--ov) / .04); margin: 0; padding: 0; }
.ig > div { display: grid; grid-template-columns: minmax(96px, auto) minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 12px 14px; position: relative; }
.ig > div + div::before { content: ""; position: absolute; left: 14px; right: 0; top: 0; height: 1px; background: var(--line); }
.ig dt { font-size: 15px; color: var(--muted-2); }
.ig dd { margin: 0; font-size: 15px; text-align: right; overflow-wrap: anywhere; }
.ig dd.ok { color: var(--ok); }
.ig dd.warn { color: var(--gold); }
.ig a { color: var(--accent-text); }
/* "Fale com a rádio" no Sobre a rádio (ideia 3 do docs/29, aprovada em 21/11): WhatsApp e Instagram achados no site da rádio */
.ig > div.fale { align-items: center; }
.ig dd.fale { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.ig dd.fale a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; text-decoration: none; }
.ig dd.fale svg { width: 18px; height: 18px; flex: none; }
.ig dd.fale .fale-bt { display: contents; }
/* Programação: cada estilo com o seu ícone 3D (mesmo do Ouça por estilo) */
.ig .ab-gen { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 14px; }
.ig .ab-gen > span { display: inline-flex; align-items: center; gap: 6px; }
/* "Links desta rádio" no Sobre a rádio (Etapa 5 do docs/29, aprovado em 22/11): mesmas linhas da lista de cima */
.lk-eyebrow { display: flex; margin: 18px 0 8px; }
.ig.lk + .hint { margin-top: 10px; }
.ig .lk-host { display: block; margin-top: 2px; font-size: 12px; color: var(--muted-2); overflow-wrap: anywhere; }
.ig dd.lk-st { display: grid; justify-items: end; gap: 2px; }
.ig dd.lk-st.ok { color: var(--win); }
.ig dd.lk-st.warn { color: var(--amber-2); } /* no claro fica #a85a00: contraste acima de 4,5:1 */
.ig .lk-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.ig dd.lk-st:not(.ok):not(.warn) .lk-dot { background: var(--muted-2); }
.ig .lk-why { font-size: 12px; color: var(--muted-2); }
.lk-trocar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; }
.lk-trocar .pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; }
.lk-trocar .pill svg { width: 18px; height: 18px; }
.lk-trocar small { font-size: 13px; color: var(--muted-2); }
.ig .ab-gen img { width: 24px; height: 24px; object-fit: contain; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .3)); }

/* ---------- modo relógio ---------- */
.standby { position: absolute; inset: 0; z-index: 30; background: #000; display: grid; grid-template-rows: 1fr auto auto; justify-items: center; align-items: center; gap: 14px; padding: max(24px, var(--safe-t)) 20px calc(22px + var(--safe-b)); text-align: center; cursor: pointer; overflow: hidden; }
.big-clock { position: relative; display: grid; justify-items: center; gap: 10px; transition: transform 2s ease; font-variant-numeric: tabular-nums; }
.big-clock b { font: 200 clamp(88px, 27cqw, 300px)/.88 var(--display); letter-spacing: -.045em; color: #fff; text-shadow: 0 0 60px hsl(var(--h, 220) 80% 50% / .4); }
.big-clock small { font: 500 clamp(15px, 3.4cqw, 26px)/1.2 var(--ui); color: rgb(255 255 255 / .72); }
.sb-now { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 22px; background: rgb(var(--ov) / .08); border: 1px solid rgb(var(--ov) / .1); text-align: left; max-width: 100%; }
.sb-now .art { width: 46px; height: 46px; border-radius: 12px; flex: none; }
.sb-now > div { min-width: 0; display: grid; gap: 2px; padding-right: 4px; }
.sb-now b { font: 600 15px/1.2 var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-now small { font-size: 12.5px; color: rgb(255 255 255 / .65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-now .play { width: 46px; height: 46px; }
.sb-hint { position: relative; z-index: 1; margin: 0; font-size: 12px; color: rgb(255 255 255 / .45); }

/* ---------- folha de temas e equalizador ---------- */
.themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.th-card { display: grid; gap: 8px; padding: 8px 8px 12px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--s1); text-align: left; position: relative; }
.th-card[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 7%, var(--s1)); }
.th-card .chk { position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: none; place-items: center; z-index: 2; font: 800 13px/1 var(--ui); }
.th-card[aria-pressed="true"] .chk { display: grid; }
.th-card > span:last-child { display: grid; gap: 2px; padding: 0 4px; }
.th-card b { font: 700 16px/1.2 var(--ui); }
.th-card small { font-size: 12px; line-height: 1.35; color: var(--muted); }
.tg-group { border-radius: 14px; background: var(--s2); padding: 2px 14px; margin-top: 14px; }
.tg { display: flex; align-items: center; gap: 12px; padding: 11px 0; text-align: left; width: 100%; }
.tg + .tg { border-top: 1px solid var(--line); }
.tg > span { flex: 1; display: grid; gap: 2px; }
.tg b { font: 500 15px/1.25 var(--ui); }
.tg small { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.tg i { width: 51px; height: 31px; border-radius: 16px; background: var(--s3); position: relative; transition: background .2s; flex: none; }
.tg i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgb(0 0 0 / .3); transition: transform .2s; }
.tg[aria-checked="true"] i { background: #30d158; }
.tg[aria-checked="true"] i::after { transform: translateX(20px); }
.eq7-note { display: flex; gap: 10px; padding: 12px; margin-top: 12px; border-radius: 14px; background: rgb(255 214 10 / .08); border: 1px solid rgb(255 214 10 / .25); font-size: 13px; line-height: 1.4; color: #f3e7b4; }
.pv { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #0b0b0e; border: 1px solid var(--line); display: block; }
.pv i { position: absolute; display: block; }
.eq7-curve { position: relative; height: 132px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; margin-top: 12px; }
.eq7-curve svg { position: absolute; inset: 10px 8px 22px; width: calc(100% - 16px); height: calc(100% - 32px); overflow: visible; fill: none; }
.eq7-curve .g0 { stroke: var(--line-2); stroke-dasharray: 3 4; }
.eq7-curve .g1 { stroke: var(--line); }
.eq7-curve .c-line { fill: none; stroke: var(--accent); stroke-width: 2.4; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgb(var(--accent-rgb) / .6)); }
.eq7-curve .c-labels { position: absolute; left: 10px; right: 10px; bottom: 6px; display: flex; justify-content: space-between; font: 500 9.5px/1 var(--ui); color: var(--muted); }
.eq7-curve .c-name { position: absolute; left: 12px; top: 10px; font: 600 13px/1 var(--ui); color: var(--accent-text); }

/* ---------- folha Mais ---------- */
.mais-list { display: grid; gap: 8px; margin-top: 14px; }
.mais-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px 8px 10px; border-radius: 16px; background: var(--s1); border: 1px solid var(--line); text-align: left; }
.mais-row:active { transform: scale(.985); }
.mais-row > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.mais-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mais-t b { font: 600 15px/1.25 var(--ui); }
.mais-t small { font-size: 12.5px; color: var(--muted-2); }

@media (min-width: 960px) {
  .player[data-full="true"] { position: fixed; inset: 0; z-index: 60; height: auto; margin: 0; border-radius: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .big-clock { transition: none; }
  .goal { animation-duration: .01s; animation-fill-mode: none; opacity: 1; transform: translate(-50%, 0); }
}


/* ---------- tema Vibe (js: player/skins/vibe.js): enche a TV inteira ---------- */
.vibe { position: absolute; inset: 0; overflow: hidden; --vb-en: 0; }
/* fundo: manchas de luz desenhadas no canvas, borradas pelo CSS, com degradê escurecendo para baixo */
.vb-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: #140a1e; }
.vb-bg canvas { display: block; width: 100%; height: 100%; transform: scale(1.2); }
.vb-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(20 10 30 / 0) 0%, rgb(20 10 30 / .25) 50%, rgb(20 10 30 / .75) 100%); }
/* faixa do nome da rádio: letras vazadas gigantes passando sem parar (o texto vem duplicado: -50% emenda sem pulo) */
.vb-marquee { position: absolute; left: -28px; right: -28px; top: calc(var(--logoTop, 64px) + var(--lgN, 84px) / 2); transform: translateY(-50%); overflow: hidden; pointer-events: none; }
.vb-track { display: flex; width: max-content; will-change: transform; animation: vb-roll 46s linear infinite; }
.vb-track > span { flex: none; white-space: nowrap; font: 800 calc(var(--lgN, 84px) * .8)/1.05 var(--display); text-transform: uppercase; letter-spacing: -.02em; color: transparent; -webkit-text-stroke: 1.2px rgb(var(--ov) / .35); }
.vb-track i { font-style: normal; margin: 0 .4em; }
@keyframes vb-roll { to { transform: translateX(-50%); } }
/* palco: bolha desenhada no canvas (maior que o logo) e o logo por cima, inclinado e flutuando */
.vb-stage { position: absolute; left: 0; right: 0; height: calc(var(--lgN, 84px) * 2.1); top: calc(var(--logoTop, 64px) + var(--lgN, 84px) / 2 - var(--lgN, 84px) * 1.05); display: grid; place-items: center; }
.vb-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.vb-logo { position: relative; z-index: 2; transform: scale(calc(1 + var(--vb-en) * .06)); }
.player .cv.vb-cv { --sz: var(--lgN, 84px); position: relative; overflow: hidden; display: grid; place-items: center; flex: none; width: var(--sz); height: var(--sz); border-radius: 28%; font-size: calc(var(--sz) * .36); transform: rotate(-6deg); will-change: transform; animation: vb-float 5s ease-in-out infinite; box-shadow: 0 16px 34px -10px rgb(0 0 0 / .7); }
.player .cv.vb-cv[data-logo] { background: #fff; }
@keyframes vb-float { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-6px) rotate(-6deg); } }
.vb-name { position: absolute; z-index: 2; left: 50%; top: calc(var(--logoTop, 64px) + var(--lgN, 84px) + 12px); transform: translateX(-50%); width: max-content; max-width: calc(100% - 40px); text-align: center; text-shadow: 0 2px 12px rgb(0 0 0 / .55); pointer-events: none; }
.vb-name b { display: block; font: 800 21px/1.15 var(--display); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vb-name small { display: block; margin-top: 2px; font: 600 12.5px/1.2 var(--display); color: #ece6f6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vb-name small:empty { display: none; }
/* luz do espectro (toque troca o efeito): pequena, no pé da TV, atrás da régua */
.vb-spec { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; opacity: .5; }
/* rádio pausada: a faixa e o logo param */
.player:not([data-state="playing"]):not([data-state="direct"]) :is(.vb-track, .cv.vb-cv) { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .vb-track, .player .cv.vb-cv { animation: none; }
  .vb-logo { transform: none; }
}
/* prévia no cartão de temas */
.pv-vibe { background: radial-gradient(60% 70% at 15% 15%, #ff4d8d, transparent 70%), radial-gradient(60% 70% at 88% 30%, #7a5cff, transparent 70%), radial-gradient(60% 70% at 55% 100%, #ffb23e, transparent 70%), #140a1e; }
.pv-vibe i { left: 50%; top: 50%; width: 50px; height: 50px; transform: translate(-50%, -50%); border-radius: 46% 54% 42% 58%; background: rgb(var(--ov) / .22); }
.pv-vibe b { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; transform: translate(-50%, -50%) rotate(-6deg); border-radius: 9px; background: #fff; box-shadow: 0 6px 12px rgb(0 0 0 / .4); }

/* ---------- tema Lo-Fi Cidade (js: player/skins/lofi*.js; imagens em assets/lofi/) ---------- */
.lofi { position: absolute; inset: 0; overflow: hidden; background: #120c10; }
.lf-scene { position: absolute; inset: 0; }
.lf-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lf-grain { position: absolute; inset: -30%; pointer-events: none; opacity: .1; mix-blend-mode: overlay; animation: lf-grain .9s steps(6) infinite;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
@keyframes lf-grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-4%, 3%); } 40% { transform: translate(3%, -2%); } 60% { transform: translate(-2%, -4%); } 80% { transform: translate(4%, 2%); } 100% { transform: translate(0, 0); } }
.lf-vig { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(125% 95% at 50% 46%, transparent 60%, rgb(0 0 0 / .38)); }
.lf-load { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; color: #d9c7b8; font-size: 13px; letter-spacing: .06em; }
/* o logo vai para o canto de cima à direita, como na propaganda */
.lf-logo { position: absolute; z-index: 2; top: 12px; right: 12px; }
.player .cv.lf-cv { --sz: 52px; position: relative; overflow: hidden; display: grid; place-items: center; width: var(--sz); height: var(--sz); border-radius: 14px; font-size: calc(var(--sz) * .36); box-shadow: 0 8px 20px -6px rgb(0 0 0 / .7); }
.player .cv.lf-cv[data-logo] { background: #fff; }
.player:not([data-state="playing"]):not([data-state="direct"]) .lf-grain { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .lf-grain { animation: none; } }
/* prévia no cartão de temas */
.pv-lofi { background: #120c10 url("../../assets/lofi/base-s.jpg") 40% 50% / cover; }

/* "Sobre a rádio" no fim da página: uma linha só, estilo lista do iPhone (os dados abrem em tela cheia) */
.pk-row-t { flex: 1; min-width: 0; }
.pk-row-t b { display: block; font: 600 15px/1.25 var(--ui); }
.pk-row-t small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* "Itens a conferir" (menu): o estado do sinal em uma faixa, com respiro antes da lista */
.ck-st { display: flex; align-items: center; gap: 12px; margin: 14px 0 12px; padding: 12px 14px; background: rgb(var(--glass-rgb) / .86); border: 1px solid var(--line); border-radius: var(--r-lg); }
.ck-st + .sig-steps { margin-bottom: 14px; }

/* desempenho (Etapa 5): granulado parado no celular; animações paradas com o player fechado */
@media (pointer: coarse) { .lf-grain { animation: none; mix-blend-mode: normal; opacity: .06; } }
.player:not([data-open='true']) :is(.vb-track, .vb-cv, .lf-grain, .pt-eq i, .tv-seek .arrows i) { animation-play-state: paused; }
