:root {
  --bg: #0b0d14; --bg2: #11141d; --card: #171b27; --card2: #202536; --line: #272d3f;
  --text: #f1f3f8; --muted: #9098ad; --accent: #ff5a36; --accent2: #ffb238; --live: #ff3b5c; --ok: #33d17a;
  --r: 18px; --tabs-h: 64px; --top-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --font-d: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.4 var(--font); -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
[hidden] { display: none !important; }
a { color: var(--accent2); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* cabecera */
.top { position: sticky; top: 0; z-index: 30; height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) 14px 0;
  display: flex; align-items: center; justify-content: space-between; background: var(--bg); border-bottom: 1px solid #ffffff08; }
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent2)); position: relative; }
.brand-mark::after { content: ''; position: absolute; left: 12px; top: 9px; border-left: 9px solid var(--bg); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.brand-name { font-family: var(--font-d); font-weight: 800; font-size: 22px; letter-spacing: -.5px; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.bell { position: relative; background: var(--card); border: 0; width: 42px; height: 42px; border-radius: 14px; font-size: 18px; }
.count-badge { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent);
  color: #fff; font: 700 11px/18px var(--font); font-style: normal; text-align: center; }

/* layout */
main { padding: 4px 14px calc(var(--tabs-h) + var(--safe-b) + 24px); }
.view { animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* botones */
.btn { background: var(--accent); color: #fff; border: 0; border-radius: 14px; padding: 11px 18px; font-weight: 600; white-space: nowrap; }
.btn.ghost { background: var(--card2); color: var(--text); }
.btn.sm { padding: 8px 12px; font-size: 14px; border-radius: 12px; }
.btn.wide { width: 100%; margin: 12px 0; }
.btn:active, .act:active, .chip:active { transform: scale(.97); }
.pill { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 7px 13px; font-size: 14px; font-weight: 600; }
.ib { background: var(--card2); border: 0; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; flex: none; }
.ib.rec { background: var(--live); color: #fff; }
.link { background: none; border: 0; color: var(--accent2); font-weight: 600; padding: 4px 0; }
input, select { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; outline: none; min-width: 0; }
input:focus, select:focus { border-color: var(--accent); }
.search { width: 100%; margin: 6px 0 10px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; font-size: 14px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.ghost { background: transparent; border-style: dashed; color: var(--muted); }

/* inicio */
.hero { background: radial-gradient(120% 120% at 0% 0%, #ff5a3626, transparent 55%), var(--card); border: 1px solid #ff5a3630; border-radius: 22px; padding: 16px; margin: 8px 0 6px; }
.hero-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.host-avatar { width: 40px; height: 40px; flex: none; border-radius: 13px; display: grid; place-items: center; font-size: 20px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.host-avatar.sm { width: 34px; height: 34px; font-size: 16px; border-radius: 11px; }
.host-avatar.thinking { animation: pulse 1.1s infinite ease-in-out; }
@keyframes pulse { 50% { transform: scale(.88); filter: brightness(1.3); } }
.host-label { font-weight: 700; color: var(--accent2); font-size: 14px; }
.hero-text { font-size: 17px; line-height: 1.5; margin-bottom: 14px; }
.hero-text:not(.muted) { color: var(--text); }
.ask { display: flex; gap: 8px; }
.ask input { flex: 1; background: var(--bg); font-size: 16px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 4px; }
h2 { font-family: var(--font-d); font-size: 19px; margin: 0; letter-spacing: -.2px; }
.page-title { margin: 10px 0 12px; font-size: 24px; }
.empty { color: var(--muted); font-size: 14px; padding: 8px 2px; }

/* tarjetas */
.row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 0 8px; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.card { scroll-snap-align: start; flex: none; width: 230px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.card .thumb { height: 120px; background: var(--card2) center/cover no-repeat; position: relative; display: grid; place-items: center; }
.card .thumb img.logo { max-width: 55%; max-height: 64px; object-fit: contain; }
.card .badge { position: absolute; top: 9px; left: 9px; }
.card .multi { position: absolute; top: 9px; right: 9px; background: #000b; border-radius: 99px; padding: 3px 9px; font-size: 12px; font-weight: 600; }
.card .ch-logo { position: absolute; bottom: 8px; right: 8px; width: 36px; height: 36px; border-radius: 10px; background: #fff; object-fit: contain; padding: 3px; }
.card .body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { color: var(--muted); font-size: 13px; }
.card .note { font-size: 13px; color: var(--accent2); }
.card .btn { margin-top: auto; }
.card .body > .btn { margin-top: 10px; }
.badge { display: inline-flex; align-items: center; gap: 5px; background: var(--live); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 99px; }
.badge.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.4s infinite; }
.badge.time { background: #000c; }
@keyframes blink { 50% { opacity: .3; } }
.tag { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--card2); color: var(--muted); font-weight: 600; }
.tag.geo { color: var(--accent2); }

/* listas */
.segmented { display: flex; background: var(--card); border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 8px; }
.segmented button { flex: 1; border: 0; background: none; border-radius: 10px; padding: 9px 6px; font-weight: 600; font-size: 14px; color: var(--muted); }
.segmented button.on { background: var(--card2); color: var(--text); }
.filters { display: flex; gap: 8px; margin-bottom: 6px; }
.filters select { flex: 1; }
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 14px; background: none; border: 0; text-align: left; width: 100%; }
.item:hover { background: var(--card); }
.item .lg { width: 50px; height: 50px; border-radius: 12px; flex: none; background: #fff; object-fit: contain; padding: 4px; }
.lg.ph, .logo.ph { background: var(--card2) !important; display: grid; place-items: center; font-weight: 700; color: var(--muted); font-size: 18px; padding: 0; }
.item .tx { min-width: 0; flex: 1; }
.item .nm { font-weight: 600; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.item .nw { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.item .progress { margin-top: 6px; }
.group-title { font-weight: 700; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; margin: 16px 6px 2px; }
.progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); width: 0; }

/* avisos */
.notice { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 16px; }
.notice.ok { border-color: #33d17a55; }
.notice h3 { margin: 0 0 6px; font-size: 16px; }
.notice p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.notice .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.nitem { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-bottom: 10px; }
.nitem.sent { opacity: .6; }
.nitem .when { width: 64px; flex: none; text-align: center; background: var(--card2); border-radius: 12px; padding: 8px 4px; }
.nitem .when b { display: block; font-size: 17px; font-family: var(--font-d); }
.nitem .when small { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.nitem .tx { flex: 1; min-width: 0; }
.nitem .t { font-weight: 600; }
.nitem .s { color: var(--muted); font-size: 13px; }
.nitem .acts { display: flex; gap: 6px; }
.list-title { font-weight: 700; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .8px; margin: 18px 2px 8px; }

/* reproductor */
.player { position: sticky; top: calc(var(--top-h) + var(--safe-t)); z-index: 25; background: var(--bg); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.video-wrap { position: relative; aspect-ratio: 16/9; background: #000; overflow: hidden; }
.video-wrap video, .video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.vmsg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; background: #000d; font-size: 15px; }
.spin { width: 34px; height: 34px; border: 3px solid #ffffff22; border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(1turn); } }
.pbar { display: flex; align-items: center; gap: 12px; padding: 10px 14px 6px; }
.p-logo { width: 42px; height: 42px; border-radius: 11px; background: #fff; object-fit: contain; padding: 3px; flex: none; }
.p-info { flex: 1; min-width: 0; }
.p-name { font-weight: 800; font-family: var(--font-d); font-size: 18px; }
.p-now { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 1px 0 6px; }
.p-actions { display: flex; gap: 6px; padding: 4px 14px 4px; }
.act { flex: 1; background: var(--card); border: 0; border-radius: 12px; padding: 7px 2px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.act b { font-size: 18px; line-height: 1.1; font-weight: 600; }
.act span { font-size: 11px; color: var(--muted); }
.act.on b { color: var(--accent2); }
.act.casting { background: var(--accent); }
.act.casting span { color: #fff; }
@media (min-width: 700px) {
  .video-wrap { border-radius: var(--r); }
  .player { padding-top: 6px; border-bottom: 0; }
  .pbar, .p-actions { padding-left: 2px; padding-right: 2px; }
}

/* chat */
.chat { display: flex; flex-direction: column; background: var(--bg); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.chat-title { flex: 1; font-family: var(--font-d); font-weight: 800; font-size: 18px; line-height: 1.2; }
.chat-title .small { font-family: var(--font); font-weight: 400; }
.chat-log { font-size: 14.5px; flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 90%; line-height: 1.5; }
.msg.user { align-self: flex-end; background: var(--accent); color: #fff; padding: 10px 14px; border-radius: 18px 18px 4px 18px; }
.msg.assistant { align-self: flex-start; background: var(--card); border: 1px solid var(--line); padding: 11px 14px; border-radius: 18px 18px 18px 4px; }
.msg.assistant ul { margin: 6px 0; padding-left: 18px; }
.msg .trace { font-size: 12px; color: var(--muted); margin-top: 8px; }
.msg-cards { margin-top: -4px; }
.msg-cards .card { width: 210px; }
.msg-cards .card .thumb { height: 96px; }
.proposal { align-self: stretch; background: linear-gradient(135deg, #ff5a3622, #ffb23818); border: 1px solid #ff5a3655; border-radius: var(--r); padding: 12px 14px; }
.proposal .t { font-weight: 600; margin-bottom: 2px; }
.proposal .s { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.proposal .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.proposal.done { background: #33d17a14; border-color: #33d17a55; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; background: var(--muted); border-radius: 50%; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
.chat-sugg { padding: 0 14px; }
.chat-form { display: flex; gap: 8px; padding: 10px 14px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); }
.chat-form input { flex: 1; border-radius: 99px; padding: 12px 16px; }
.chat-form .send { border-radius: 99px; width: 48px; padding: 0; }

/* móvil: el chat es una pantalla completa que se abre encima */
@media (max-width: 999px) {
  .chat { position: fixed; inset: 0; z-index: 50; padding-top: var(--safe-t); transform: translateY(100%); transition: transform .22s ease; visibility: hidden; }
  body.chat-open .chat { transform: none; visibility: visible; }
  body.chat-open.playing .chat { top: calc(var(--safe-t) + (100vw * 9 / 16)); padding-top: 0; border-top: 1px solid var(--line); }
}
/* escritorio: chat fijo a la derecha */
@media (min-width: 1000px) {
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 20px; padding: 0 20px; align-items: start; }
  main { padding: 4px 0 calc(var(--tabs-h) + 30px); }
  .chat { position: sticky; top: calc(var(--top-h) + 10px); height: calc(100dvh - var(--top-h) - 20px); border: 1px solid var(--line); border-radius: 22px; background: var(--bg2); overflow: hidden; }
  .chat .back, .tabs .tab-chat { display: none; }
  .tabs { left: 20px; right: 450px; border-radius: 20px 20px 0 0; border: 1px solid var(--line); border-bottom: 0; }
}

/* pestañas */
.tabs { position: fixed; z-index: 40; bottom: 0; left: 0; right: 0; height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; background: #0f121bf2; backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabs button { position: relative; flex: 1; background: none; border: 0; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 600; }
.tabs button span { font-size: 20px; line-height: 1; filter: grayscale(1) opacity(.7); }
.tabs button.active { color: var(--text); }
.tabs button.active span { filter: none; }
.tabs .count-badge { top: 6px; right: calc(50% - 24px); }

/* sheet / toast */
.sheet-back { position: fixed; inset: 0; background: #000a; z-index: 60; }
.sheet { position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; max-height: 82dvh; overflow: auto; background: var(--bg2); border-radius: 24px 24px 0 0;
  padding: 8px 18px calc(18px + var(--safe-b)); border-top: 1px solid var(--line); animation: up .2s ease; }
@media (min-width: 700px) { .sheet { left: 50%; right: auto; width: 480px; bottom: auto; top: 50%; transform: translate(-50%, -50%); border-radius: 24px; border: 1px solid var(--line); animation: none; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet-backbtn { background: none; border: 0; color: var(--muted); font-weight: 600; padding: 4px 0 10px; font-size: 15px; cursor: pointer; }
.add-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 14px; }
.add-grid button { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; font-weight: 600; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.add-grid button b { font-size: 22px; line-height: 1; }
.add-grid button.on { border-color: var(--accent, #7c5cff); background: color-mix(in srgb, var(--accent, #7c5cff) 14%, var(--card)); }
.st-item img, .st-cand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--line); }
.st-live { color: #ff5c7a; font-weight: 700; }
.st-cand { cursor: pointer; }
.sheet-handle { width: 40px; height: 4px; background: var(--line); border-radius: 4px; margin: 4px auto 14px; }
.sheet h3 { margin: 0 0 8px; font-family: var(--font-d); font-size: 19px; }
.sheet p { color: var(--muted); line-height: 1.5; margin: 0 0 12px; }
.sheet .menu { display: flex; flex-direction: column; gap: 6px; }
.sheet .menu button { text-align: left; background: var(--card); border: 0; border-radius: 14px; padding: 14px; font-weight: 600; }
.toast { position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabs-h) + var(--safe-b) + 14px); background: var(--text); color: var(--bg);
  padding: 11px 16px; border-radius: 14px; font-weight: 600; font-size: 14px; display: flex; gap: 12px; align-items: center; max-width: 92vw; box-shadow: 0 10px 30px #0009; }
.toast button { background: var(--bg); color: var(--text); border: 0; border-radius: 9px; padding: 6px 10px; font-weight: 600; white-space: nowrap; }
.skel { background: linear-gradient(90deg, var(--card) 0%, var(--card2) 50%, var(--card) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; height: 220px; }
@keyframes sk { to { background-position: -200% 0; } }

/* mini reproductor de radio */
.radio-bar { position: fixed; z-index: 45; left: 8px; right: 8px; bottom: calc(var(--tabs-h) + var(--safe-b) + 8px); display: flex; align-items: center; gap: 10px;
  background: #1b2030f2; backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 18px; padding: 8px 10px; box-shadow: 0 10px 30px #0008; }
.r-logo { width: 44px; height: 44px; border-radius: 12px; background: #fff; object-fit: contain; padding: 3px; flex: none; }
.r-info { flex: 1; min-width: 0; }
.r-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib.big { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 18px; }
body.radio-on main { padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 90px); }
body.radio-on .toast { bottom: calc(var(--tabs-h) + var(--safe-b) + 84px); }
@media (min-width: 1000px) { .radio-bar { left: 28px; right: 458px; } }
.chip .rl { width: 22px; height: 22px; border-radius: 6px; background: #fff; object-fit: contain; }
.search-sec { margin: 14px 2px 4px; font-weight: 700; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .8px; }

/* ---- v7: un solo sitio para conversar ---- */
.ask-open { display: flex; align-items: center; gap: 12px; width: 100%; margin: 8px 0 4px; padding: 12px 14px; text-align: left; color: var(--text);
  background: radial-gradient(120% 140% at 0% 0%, #ff5a3626, transparent 60%), var(--card); border: 1px solid #ff5a3630; border-radius: 18px; }
.ask-open-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ask-open-tx .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask-open-go { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: #fff; flex: none; }
@media (min-width: 1000px) { .ask-open { display: none; } }

/* canales nombrados por Zapp: se pulsan y se ponen */
.chlink { display: inline; padding: 0 5px; margin: 0 1px; border-radius: 7px; border: 0; font: inherit; font-weight: 600; cursor: pointer;
  color: var(--text); background: #ff5a3622; box-shadow: inset 0 -2px 0 #ff5a3666; }
.chlink::before { content: '▶ '; font-size: .75em; color: var(--accent); }
.chlink.radio::before { content: '🎧 '; }
.chlink:hover { background: #ff5a3640; }
.play-prop { display: flex; flex-wrap: wrap; gap: 8px; margin: -2px 0 10px; }

/* tus radios con lo que suena ahora */
.rcard { flex: none; width: 190px; display: flex; gap: 10px; align-items: center; padding: 10px; text-align: left; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.rcard.on { border-color: var(--accent); }
.rcard .rl { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: #fff; flex: none; }
.rcard .tx { min-width: 0; }
.rcard .nm { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard .nw { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.r-info { cursor: pointer; }

/* ---- v8: chat a prueba de desbordes ---- */
.chat { min-width: 0; }
.chat-log { overflow-x: hidden; overscroll-behavior: contain; }
.chat-log > * { min-width: 0; max-width: 100%; flex: none; }
.msg { overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
.msg.user { max-width: 85%; }
.msg.assistant { max-width: 100%; }
.msg a { color: var(--accent2); text-decoration: underline; text-underline-offset: 2px; }
.msg code { background: var(--card2); padding: 1px 5px; border-radius: 6px; font-size: .92em; }
.msg ul { padding-left: 18px; margin: 6px 0; }
.msg li { margin: 3px 0; }
.msg .trace { overflow-wrap: anywhere; }
.chlink { white-space: normal; -webkit-box-decoration-break: clone; box-decoration-break: clone; line-height: 1.6; vertical-align: baseline; }
.msg-cards { width: 100%; align-self: stretch; padding-bottom: 6px; scrollbar-width: thin; }
.msg-cards .card { width: min(210px, 72%); }
.card .title, .card .meta, .card .note { overflow-wrap: anywhere; }
.card .title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .btn { max-width: 100%; white-space: normal; }
.play-prop { width: 100%; }
.play-prop .btn, .proposal .btn { white-space: normal; text-align: left; max-width: 100%; }
.proposal { max-width: 100%; }
.proposal .s { overflow-wrap: anywhere; }
.chat-log .chips { flex-wrap: wrap; }
.chat-log .chip { white-space: normal; text-align: left; max-width: 100%; }
.chat-form { flex: none; }
.chat-form input { min-width: 0; }

/* estrella de favoritos */
.ib.star { background: none; color: var(--muted); font-size: 20px; }
.ib.star.on { color: var(--accent2); }
.card .thumb .ib.star { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; background: #000a; color: #fff; border-radius: 10px; }
.card .thumb .ib.star.on { color: var(--accent2); }
.card .thumb { position: relative; }
.item > .item .tx { min-width: 0; }

/* escritorio: la barra de pestañas NO tapa el chat (esta regla va después de la base) */
@media (min-width: 1000px) {
  .tabs { left: 20px; right: 450px; }
  .chat { height: calc(100dvh - var(--top-h) - 24px); }
}

/* EN DIRECTO */
.live-head { position: sticky; top: calc(var(--top-h) + var(--safe-t)); z-index: 5; background: var(--bg); padding: 6px 0 8px; }
.live-head .search { margin: 0; }
.live-list { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.live-row { display: flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px 6px 8px 10px; }
.live-row.fav { border-color: #ffb23855; }
.live-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: none; border: 0; color: var(--text); text-align: left; padding: 0; }
.live-main .lg { width: 48px; height: 48px; border-radius: 12px; flex: none; background: #fff; object-fit: contain; padding: 4px; }
.live-main .tx { flex: 1; min-width: 0; }
.live-main .ch { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-main .pg { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 1px 0 5px; }
.live-main .nx { font-size: 12px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard .progress { margin-top: 5px; }
.rcard { width: 210px; }

/* ajustes */
.set-block { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.set-title { font-weight: 700; margin-bottom: 8px; }
.vpn-state { display: inline-block; font-size: 13px; padding: 4px 10px; border-radius: 99px; background: var(--card2); color: var(--muted); margin-bottom: 10px; }
.vpn-state.ok { background: #33d17a22; color: #6ee7a0; }
.howto { margin-bottom: 12px; font-size: 14px; }
.howto summary { cursor: pointer; font-weight: 600; color: var(--accent2); }
.howto ol { padding-left: 20px; line-height: 1.5; color: var(--muted); }
.howto a { color: var(--accent2); }
.set-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.set-form input { width: 100%; }
.vpn-out { min-height: 18px; margin: 6px 0; }
.set-block .btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.top-actions { display: flex; gap: 8px; align-items: center; }
@media (max-width: 420px) { .tabs button { font-size: 11px; } }

/* salud de la señal */
.lgwrap { position: relative; flex: none; display: flex; }
.lgwrap .hdot { position: absolute; right: -3px; bottom: -3px; border: 2px solid var(--bg); }
.hdot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; background: #6b7280; }
.hdot.ok { background: #22c55e; }
.hdot.bad { background: #ef4444; }
.hdot.unk { background: #6b7280; animation: pulse 1.4s infinite ease-in-out; }
.ok-toggle { gap: 8px; }
.ok-toggle.on { border-color: #22c55e; color: #86efac; }
.only-ok [data-ok="0"] { display: none !important; }
.item[data-ok="0"] .nm { opacity: .6; }

/* ---- v12: escritorio = "app shell": la página NO hace scroll; solo la columna izquierda y el chat ---- */
@media (min-width: 1000px) {
  html, body { height: 100%; overflow: hidden; }
  .layout { height: calc(100dvh - var(--top-h) - var(--safe-t)); align-items: stretch; }
  .main-col { height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; min-width: 0; }
  .main-col .player { top: 0; }
  .live-head { top: 0; }
  .chat { position: relative; top: auto; height: calc(100% - 20px); margin-top: 10px; }
  /* vídeo que cabe en pantalla: deja ver la barra de acciones sin bajar */
  .video-wrap { width: min(100%, calc((100dvh - var(--top-h) - 230px) * 16 / 9)); margin: 0 auto; }
}
/* móvil: con el chat abierto, el fondo no se desplaza */
@media (max-width: 999px) { body.chat-open { overflow: hidden; } }

.only-ok [data-ok=""] { display: none !important; }
.tag.vias { background: #3b82f622; color: #93c5fd; }
.card .btns { display: flex; gap: 6px; flex-wrap: wrap; }
.menu .hdot { vertical-align: middle; }

/* ---- v14: escritorio viendo un canal = reproductor FIJO arriba + contenido con su propio scroll debajo ---- */
@media (min-width: 1000px) {
  .main-col { display: flex; flex-direction: column; overflow: hidden; }
  .main-col .player { position: relative; top: auto; flex: none; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .main-col main { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  /* el vídeo nunca pasa del ~52% del alto: debajo siempre queda sitio útil para navegar */
  .video-wrap { width: min(100%, calc((100dvh - var(--top-h)) * .52 * 16 / 9)); }
  /* barra del reproductor compacta en una sola fila: info a la izquierda, botones a la derecha */
  .player { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "video video" "info acts"; align-items: center; column-gap: 12px; }
  .player .video-wrap { grid-area: video; }
  .player .pbar { grid-area: info; padding: 8px 0 0; min-width: 0; }
  .player .p-actions { grid-area: acts; padding: 8px 0 0; gap: 4px; }
  .player .act { flex: none; width: 58px; padding: 6px 2px 5px; }
  .player .act span { font-size: 10px; }
  .p-info { min-width: 0; }
  .p-now { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* escritorio: las pestañas van en la cabecera (arriba, centradas) → abajo no se pierde altura */
@media (min-width: 1000px) {
  .tabs { top: calc(var(--safe-t) + 8px); bottom: auto; left: 50%; right: auto; transform: translateX(-50%); height: 40px; padding: 4px; gap: 4px;
    width: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); z-index: 60; }
  .tabs button { flex: none; flex-direction: row; gap: 7px; padding: 0 16px; border-radius: 10px; font-size: 14px; }
  .tabs button span { font-size: 16px; }
  .tabs button.active { background: var(--card2); }
  .tabs .count-badge { top: -4px; right: -2px; }
  main, .main-col main { padding-bottom: 24px; }
  body.radio-on .main-col main { padding-bottom: 96px; }
  .radio-bar { bottom: 12px; }
  .toast { bottom: 24px; }
  body.radio-on .toast { bottom: 96px; }
}
.h2-sub { font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
/* Directo: filtros en una sola fila (más sitio para la lista) */
.live-head { display: flex; gap: 8px; align-items: center; }
.live-head .segmented { margin: 0; flex: none; width: 200px; }
.live-head .search { flex: 1; min-width: 0; }
@media (max-width: 420px) { .live-head { flex-wrap: wrap; } .live-head .segmented { width: 100%; } }

/* v16: en móvil, viendo un canal, los filtros de Directo no se esconden detrás del reproductor */
@media (max-width: 999px) { body.playing .live-head { position: static; } }
/* objetivos táctiles mínimos de 44px en móvil */
@media (pointer: coarse) { .ib { width: 44px; height: 44px; } .btn.sm { min-height: 40px; } }

/* ======================= v17: acabado más profesional ======================= */
/* iconos SVG del sprite: trazo uniforme, heredan el color */
.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.i.sm { width: 16px; height: 16px; }
.bell { display: grid; place-items: center; color: var(--text); border: 1px solid var(--line); background: var(--card); transition: background .15s; }
.bell:hover { background: var(--card2); }
.bell .i { width: 20px; height: 20px; }
.pill { display: inline-flex; align-items: center; gap: 6px; }
.host-avatar .i { width: 18px; height: 18px; stroke: #fff; }
.ask-open-go .i { width: 18px; height: 18px; }
.chat-form .send { display: grid; place-items: center; }
.chat-form .send .i { stroke: #fff; }

/* pestañas */
.tabs button .i { width: 22px; height: 22px; opacity: .7; }
.tabs button.active .i { opacity: 1; stroke: var(--accent); }
.tabs button.active { color: var(--text); }
@media (min-width: 1000px) { .tabs button .i { width: 18px; height: 18px; } .tabs button.active .i { stroke: var(--text); } }

/* acciones del reproductor */
.act { color: var(--text); gap: 3px; padding: 8px 2px 7px; transition: background .15s; }
.act:hover { background: var(--card2); }
.act .i { width: 20px; height: 20px; }
.act.on .i { fill: var(--accent2); stroke: var(--accent2); }
.act.casting .i { stroke: #fff; }

/* estrellas de favorito */
.ib.star { color: var(--muted); }
.ib.star .i { width: 20px; height: 20px; }
.ib.star.on { color: var(--accent2); }
.ib.star.on .i { fill: var(--accent2); stroke: var(--accent2); }
.card .thumb .ib.star .i { width: 18px; height: 18px; }
#r-fav.on .i { fill: var(--accent2); stroke: var(--accent2); }
.ib.big .i { stroke: #fff; }
#r-toggle .i { fill: #fff; stroke: #fff; stroke-width: 1.5; }

/* cabeceras de sección sin emojis */
h2 { display: flex; align-items: center; gap: 8px; }
.section-head h2 { font-size: 18px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 4px #ff3b5c22; animation: blink 1.6s infinite; }
.h2-sub::before { content: '·'; margin-right: 6px; }

/* tarjetas: más aire y respuesta al pasar el ratón */
.card { transition: transform .15s ease, border-color .15s; }
@media (hover: hover) { .card:hover { transform: translateY(-2px); border-color: #3a4260; } .rcard:hover { border-color: #3a4260; } }
.rcard { transition: border-color .15s; }

/* "Ver en la tele" */
.tv-opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.tv-opt { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.tv-opt b { font-size: 15px; }
.tv-opt span { color: var(--muted); font-size: 14px; line-height: 1.45; }

/* pantalla de PIN */
body.locked { overflow: hidden; }
.lock { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(90% 60% at 50% 0%, #ff5a3622, transparent 70%), var(--bg); }
.lock-box { width: min(340px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.lock-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent2)); margin-bottom: 18px; }
.lock-ic .i { width: 28px; height: 28px; stroke: #fff; }
.lock h1 { font-family: var(--font-d); font-weight: 800; font-size: 30px; margin: 0 0 6px; letter-spacing: -.5px; }
.lock p { color: var(--muted); margin: 0 0 26px; min-height: 22px; }
.lock p.err { color: #ff7a8f; }
.pin-dots { display: flex; gap: 18px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); transition: background .12s, border-color .12s, transform .12s; }
.pin-dots i.on { background: var(--text); border-color: var(--text); transform: scale(1.08); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
/* el input real queda encima de los puntos, invisible: así sale el teclado numérico del móvil */
.pin-input { position: absolute; left: 0; right: 0; bottom: 0; height: 60px; opacity: 0; font-size: 16px; }

/* foco visible al navegar con teclado */
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
input:focus-visible { outline: none; }

/* v17b: móvil sin desbordes horizontales */
html, body { max-width: 100%; overflow-x: hidden; }
.top { gap: 10px; }
.top-actions { min-width: 0; flex-shrink: 1; }
@media (max-width: 480px) { #btn-install { padding: 7px 10px; font-size: 13px; } .brand-name { font-size: 20px; } }
@media (max-width: 360px) { #btn-install { display: none; } }
.row > .empty { flex: 1 0 100%; white-space: normal; margin: 0; }
/* evento sin imagen */
.card .thumb.ev { background: radial-gradient(120% 120% at 0% 0%, #ff5a3633, transparent 60%), linear-gradient(135deg, #1d2234, #141826); }
.ev-face { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 12px 10px; text-align: center; width: 100%; }
.ev-teams { display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ev-teams b { font-family: var(--font-d); font-size: 16px; line-height: 1.15; }
.ev-teams span { font-size: 11px; font-weight: 700; color: var(--accent2); text-transform: uppercase; letter-spacing: 1px; }
.ev-comp { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }

/* v19: mis listas IPTV */
.src-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.src-item { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 10px 10px 14px; }
.src-item .tx { flex: 1; min-width: 0; }
.src-item .t { font-weight: 600; }
.src-item .s { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.src-item .s.err { color: #ff7a8f; }
.set-block .segmented { margin-bottom: 10px; }
.set-form .hint { margin: 0; line-height: 1.45; }
.set-form input[type=file] { padding: 10px; }
#ch-seg button { padding-left: 2px; padding-right: 2px; font-size: 13px; white-space: nowrap; letter-spacing: -0.01em; }

/* v19b: enlaces Jellyfin */
.src-item.col { flex-direction: column; align-items: stretch; }
.src-item .row-top { display: flex; align-items: center; gap: 8px; }
.feed-url { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; margin-top: 8px; }
.feed-url > span { grid-column: 1 / -1; }
.feed-url code { font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; overflow-wrap: anywhere; user-select: all; }
.chk { display: flex; gap: 10px; align-items: center; padding: 6px 0; cursor: pointer; }
.chk input { width: 20px; height: 20px; flex: none; accent-color: var(--accent, #7c5cff); }
.howto { margin-top: 12px; } .howto summary { cursor: pointer; font-weight: 600; } .howto ol { padding-left: 18px; line-height: 1.5; }

/* v20: cuentas + manual */
.auth-box { display: flex; flex-direction: column; gap: 10px; width: min(340px, 100%); }
.auth-box input { width: 100%; }
.auth-box .auth-tabs { margin: 4px 0; }
.auth-box .btn { width: 100%; justify-content: center; }
.auth-box #auth-note { margin: 0; text-align: center; min-height: 1em; }
.auth-box.shake { animation: shake .35s; }
.man { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 16px; }
.man-h { font-weight: 700; margin-top: 8px; color: var(--accent, #ff6a3d); }
.man-step { display: flex; gap: 12px; align-items: flex-start; }
.man-step .t { font-weight: 600; margin-bottom: 2px; }
.man-step p { margin: 0; line-height: 1.45; }
.man-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.auth-box .auth-tabs button { white-space: nowrap; padding-left: 14px; padding-right: 14px; }

/* v21: historial del chat */
.hist-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 12px; }
.hist-item { display: flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; }
.hist-item.on { border-color: var(--accent, #ff6a3d); }
.hist-open { flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: inherit; padding: 10px 4px 10px 14px; cursor: pointer; font: inherit; }
.hist-open .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-open .s { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.hist-item .ib { margin-right: 6px; }
.chat-head .pill { white-space: nowrap; }
@media (max-width: 440px) { .chat-title .muted { display: none; } }

/* v22: ver evento, fuentes y audio de radio */
.dub-bar { display: flex; align-items: center; gap: 8px; margin: 8px 14px 0; padding: 8px 10px; border-radius: 14px; background: color-mix(in srgb, var(--accent, #ff6a3d) 16%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent, #ff6a3d) 40%, transparent); }
.dub-bar .dub-tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.dub-bar .chip { padding: 4px 9px; font-size: 12.5px; }
.dub-delay { font-variant-numeric: tabular-nums; font-size: 12.5px; min-width: 34px; text-align: center; color: var(--muted); }
.act.on { background: color-mix(in srgb, var(--accent, #ff6a3d) 22%, var(--card)); }
.item.on { background: var(--card); }
.item[disabled] { opacity: .5; }
.lgwrap .dot { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--bg); }
.dot.ok { background: #2bd576; } .dot.warn { background: #ffb020; } .dot.bad { background: #ff5a6e; }
@media (max-width: 999px) {
  .p-actions { gap: 4px; padding-left: 10px; padding-right: 10px; }
  .p-actions .act span { font-size: 10px; }
}

/* valoración de respuestas del chat */
.rate { display: flex; gap: 2px; margin: -4px 0 2px 4px; align-self: flex-start; }
.rate .ib { width: 30px; height: 30px; font-size: 14px; opacity: .55; filter: grayscale(1); background: transparent; }
.rate .ib:hover:not([disabled]) { opacity: 1; filter: none; }
.rate .ib.on { opacity: 1; filter: none; }
.rate.done .ib:not(.on) { display: none; }
.auth-privacy { margin-top: 2px; font-size: 11.5px; opacity: .8; }

/* chat agéntico: plan y pasos en vivo */
.msg.working { display: flex; flex-direction: column; gap: 6px; min-width: 200px; }
.steps { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--muted); }
.steps .step { line-height: 1.35; }
.steps .step.now { color: var(--text); animation: stepPulse 1.4s ease-in-out infinite; }
@keyframes stepPulse { 50% { opacity: .55; } }
.steps .plan { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 2px; color: var(--text); font-size: 13px; }
.steps .plan li.done { color: var(--muted); text-decoration: line-through; }
details.how { align-self: flex-start; margin: 0 0 -4px 4px; font-size: 12px; color: var(--muted); max-width: 90%; }
details.how summary { cursor: pointer; list-style: none; padding: 2px 0; }
details.how summary::before { content: '▸ '; }
details.how[open] summary::before { content: '▾ '; }
details.how .steps { padding: 4px 0 6px 12px; border-left: 2px solid var(--line); margin-left: 3px; }
.lesson { display: flex; gap: 8px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lesson .tx { flex: 1; font-size: 13.5px; }
.lesson .tx small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }

/* "Lo tuyo": se oculta si no hay ni favoritos ni recientes */
.mine:not(:has(> div:not([hidden]):not(.section-head))) { display: none; }
.mine > div + div:not(.section-head) { margin-top: 10px; }
/* lecciones por revisar */
.lesson.pending { border-left: 3px solid var(--accent, #f5a524); padding-left: 8px; }
.lesson .tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px; margin-right: 6px; border-radius: 6px; background: var(--accent, #f5a524); color: #000; vertical-align: 1px; }
.btn.attn { border-color: var(--accent, #f5a524); }

/* ventana flotante / mini reproductor (móvil) */
.act.dim { opacity: .45; }
.act.on span { color: var(--accent2); }
.mini-ctl { display: none; }
@media (max-width: 999px) {
  body.mini .player { position: fixed; z-index: 46; top: auto; left: auto; right: auto; bottom: auto; width: min(58vw, 320px); padding: 0; border: 0;
    border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 10px 34px #000a; touch-action: none; transition: box-shadow .2s; }
  body.mini .player.mini-br { right: 12px; bottom: calc(var(--tabs-h) + var(--safe-b) + 12px); }
  body.mini .player.mini-bl { left: 12px; bottom: calc(var(--tabs-h) + var(--safe-b) + 12px); }
  body.mini .player.mini-tr { right: 12px; top: calc(var(--top-h) + var(--safe-t) + 10px); }
  body.mini .player.mini-tl { left: 12px; top: calc(var(--top-h) + var(--safe-t) + 10px); }
  body.mini.radio-on .player.mini-br, body.mini.radio-on .player.mini-bl { bottom: calc(var(--tabs-h) + var(--safe-b) + 88px); }
  body.mini .player .pbar, body.mini .player .p-actions, body.mini #dub-bar { display: none; }
  body.mini .video-wrap { border-radius: 14px; }
  body.mini .video-wrap video, body.mini .video-wrap iframe { pointer-events: none; }
  body.mini .vmsg { font-size: 12px; padding: 8px; }
  body.mini .vmsg .btn { display: none; }
  body.mini .mini-ctl { display: flex; position: absolute; top: 6px; right: 6px; gap: 6px; z-index: 3; }
  body.mini .mini-ctl .ib { width: 30px; height: 30px; border-radius: 50%; background: #000a; color: #fff; }
  body.mini .mini-ctl .ib .i { width: 16px; height: 16px; }
}

/* Mi agenda: calendario y catálogo */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 8px; }
.cal-head b { font-family: var(--font-d); font-size: 18px; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; padding: 2px 0 4px; }
.cal-d { aspect-ratio: 1 / 1; min-height: 40px; background: var(--card); border: 1px solid transparent; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; color: var(--muted); font-size: 14px; }
.cal-d.has { color: var(--text); font-weight: 600; }
.cal-d.today { border-color: var(--accent); }
.cal-d.sel { background: var(--text); color: var(--bg); }
.cal-d .dots { display: flex; gap: 2px; height: 6px; }
.cal-d .dots i { width: 6px; height: 6px; border-radius: 50%; }
.cdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.cdot.big { width: 12px; height: 12px; }
.sub-card { margin-top: 18px; }
.sub-card .btns a.btn { text-decoration: none; }
.cat-row { gap: 12px; align-items: center; }
.cat-row .tag.ok { background: #33d17a22; color: #33d17a; }
.cat-title { font-family: var(--font-d); font-size: 20px; margin: 10px 0 4px; }
.cat-btns { margin: 10px 0 6px; }
.ev-row { cursor: pointer; }
.ev-row input[type=checkbox] { width: 22px; height: 22px; flex: none; accent-color: var(--accent); }
.ev-row.in { opacity: .75; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cat-btns { margin: 12px 0 8px; }
#av-cat > .btn.sm { margin-bottom: 4px; }
.ev-row { align-items: center; }
.ev-row .s { line-height: 1.35; }

/* catálogo: buscador, categorías en mosaico, filas y fases */
.cat-search { width: 100%; border-radius: 14px; padding: 12px 14px; margin: 4px 0 10px; }
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 6px 0 4px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 74px; padding: 8px 6px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--text); text-align: center; line-height: 1.2; }
.cat-tile .e { font-size: 24px; }
.cat-tile.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, var(--card)); }
.cat-list { display: flex; flex-direction: column; gap: 8px; }
.cat-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; color: var(--text); }
.cat-row .cat-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex: none; }
.cat-row .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cat-row .nm { font-weight: 650; }
.cat-row .nw { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-row .tag.ok { flex: none; background: #33d17a22; color: #33d17a; border-radius: 99px; padding: 3px 9px; font-weight: 700; }
.cat-results { margin-bottom: 10px; display: flex; flex-direction: column; gap: 10px; }
.cat-mine .chips { margin-top: 0; }
.cat-hero { background: linear-gradient(135deg, color-mix(in srgb, var(--c) 18%, var(--card)), var(--card)); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin: 10px 0 6px; }
.cat-hero .cat-title { margin: 0 0 4px; }
.cat-hero p { margin: 4px 0; }
.cat-hero .btns { margin-top: 10px; }
.phase-box .chips small { opacity: .65; font-weight: 400; }
.ev-row { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.ev-row .ev-when { width: 52px; flex: none; text-align: center; }
.ev-row .ev-when b { display: block; font-family: var(--font-d); font-size: 16px; }
.ev-row .ev-when small { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.ev-row .tx { flex: 1; min-width: 0; }
.ev-row .t { font-weight: 600; }
.ev-row .s { color: var(--muted); font-size: 12.5px; }
.ev-row.in { border-color: #33d17a55; }
.ev-row.off { opacity: .45; }
/* escaparate de Inicio */
.feat-card { flex: none; width: 210px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, var(--card)), var(--card)); border: 1px solid var(--line); }
.feat-card .feat-top { display: flex; justify-content: space-between; align-items: center; }
.feat-card .e { font-size: 24px; }
.feat-card .tag { font-size: 10.5px; background: #ffffff1a; border-radius: 99px; padding: 2px 8px; }
.feat-card .nm { font-weight: 700; line-height: 1.25; }
.feat-card .nw { color: var(--muted); font-size: 12px; line-height: 1.3; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feat-card .btn { align-self: flex-start; }

/* ---- Directo · Parrilla: cronograma horizontal como en las teles ---- */
.live-head #lv-mode { width: 170px; }
@media (max-width: 420px) { .live-head #lv-mode { width: 100%; } }
.epg { --rowh: 62px; --hdh: 34px; position: relative; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin;
  max-height: max(340px, calc(100dvh - var(--top-h) - var(--safe-t) - var(--tabs-h) - var(--safe-b) - 80px));
  background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; margin-top: 4px; }
@media (min-width: 1000px) { .epg { max-height: calc(100dvh - var(--top-h) - var(--safe-t) - 150px); } }
.epg-in { position: relative; }
.epg-hd { position: sticky; top: 0; z-index: 3; display: flex; height: var(--hdh); background: var(--bg2); border-bottom: 1px solid var(--line); }
.epg-corner { position: sticky; left: 0; z-index: 4; flex: none; width: var(--chw); display: flex; align-items: center; padding: 0 6px; background: var(--bg2); border-right: 1px solid var(--line); }
.epg-nowbtn { border: 0; background: var(--card2); color: var(--text); border-radius: 9px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.epg-ticks { position: relative; flex: none; }
.epg-tick { position: absolute; top: 0; bottom: 0; padding: 9px 0 0 6px; font-size: 12px; font-weight: 700; color: var(--text); border-left: 1px solid var(--line); white-space: nowrap; }
.epg-tick.half { color: var(--muted); font-weight: 500; }
.epg-tick.day { color: var(--accent2); }
.epg-row { display: flex; height: var(--rowh); border-bottom: 1px solid #ffffff08; }
.epg-row.fav .epg-ch { box-shadow: inset 3px 0 0 var(--accent2); }
.epg-ch { position: sticky; left: 0; z-index: 2; flex: none; width: var(--chw); display: flex; align-items: center; gap: 8px; padding: 0 8px; border: 0;
  border-right: 1px solid var(--line); background: var(--card); color: var(--text); text-align: left; }
.epg-ch .lg { width: 40px; height: 40px; border-radius: 10px; flex: none; background: #fff; object-fit: contain; padding: 3px; }
.epg-cn { font-size: 12px; font-weight: 600; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.epg-tl { position: relative; flex: none; }
.epg-p { position: absolute; top: 4px; bottom: 4px; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; overflow: hidden;
  padding: 0 8px; border: 0; border-right: 3px solid var(--bg2); border-radius: 10px; background: var(--card); color: var(--text); text-align: left; }
.epg-p:hover { background: var(--card2); }
.epg-p.live { background: #2a2030; box-shadow: inset 0 0 0 1px #ff5a3655; }
.epg-p.past { opacity: .45; }
.epg-pt { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epg-ph { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epg-pb { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); }
.epg-now { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--live); z-index: 1; pointer-events: none; }
.epg-now::before { content: ''; position: sticky; top: 0; display: block; width: 8px; height: 8px; margin-left: -3px; border-radius: 50%; background: var(--live); }
@media (max-width: 599px) {
  .epg { --rowh: 56px; }
  .epg-ch { flex-direction: column; justify-content: center; gap: 2px; padding: 2px 4px; }
  .epg-ch .lg { width: 30px; height: 30px; }
  .epg-cn { font-size: 10px; -webkit-line-clamp: 1; text-align: center; max-width: 100%; }
}
/* botón «+» de la cabecera: añadir canales y listas */
.bell.add { background: var(--accent); border-color: transparent; color: #fff; }
.bell.add:hover { background: #ff6f4f; }
.bell.add .i { width: 22px; height: 22px; stroke-width: 2.5; }
/* canales de YouTube/Twitch/Kick emitiendo ahora */
.tag.onair { background: #ff3b5c22; color: #ff6b85; border: 1px solid #ff3b5c55; font-weight: 800; letter-spacing: .3px; margin-left: 6px; }
.epg-cn .tag.onair { margin-left: 4px; padding: 0 3px; }
.chip.live-chip { border-color: #ff3b5c66; color: #ff8aa0; }
.chip.live-chip.on { background: #ff3b5c; color: #fff; }
.epg-p.idle { background: transparent; border: 1px dashed var(--line); color: var(--muted); } .epg-p.idle .epg-pt { font-weight: 500; }
.lv-src { margin: 2px 0 6px; } .lv-src:empty { display: none; }

/* ---- barras de desplazamiento con el tema de la app (antes salían las blancas del sistema) ---- */
:root { color-scheme: dark; --sb-thumb: #2c3346; --sb-thumb-h: #3b4460; }
* { scrollbar-color: var(--sb-thumb) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--sb-thumb); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--sb-thumb-h); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
/* la parrilla: la barra horizontal en el color de la marca, para que se vea que se puede deslizar */
.epg { scrollbar-color: #ff5a3699 transparent; }
.epg::-webkit-scrollbar-thumb { background: #ff5a3688; background-clip: padding-box; }
.epg::-webkit-scrollbar-thumb:hover { background: var(--accent); background-clip: padding-box; }

/* interruptor (canales por defecto) */
.sw { flex: none; width: 42px; height: 24px; border-radius: 12px; border: 0; padding: 0; background: #3a3f4b; position: relative; cursor: pointer; transition: background .15s; }
.sw i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #cbd0da; transition: transform .15s, background .15s; }
.sw.on { background: var(--accent, #f97316); }
.sw.on i { transform: translateX(18px); background: #fff; }
.def-item.off .tx, .def-ch.off .tx, .def-ch.off img { opacity: .45; }
.def-ch img, .def-ph { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; flex: none; }
.def-ph { display: grid; place-items: center; background: #2a2f3a; font-weight: 700; color: #aab; }

/* guía de las listas IPTV */
.gm-item { align-items: flex-start; }
.gm-item img, .gm-item .def-ph { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; flex: none; }
.gm-item .s { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.gm-via { font-size: 11px; padding: 1px 7px; border-radius: 9px; background: #2a2f3a; color: var(--muted); }
.gm-via.warn { background: rgba(255,178,56,.15); color: var(--accent2); }
.gm-cands { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.gm-cands .chip { font-size: 12px; }
.gm-bar { height: 6px; border-radius: 3px; background: #2a2f3a; overflow: hidden; margin: 4px 0 8px; }
.gm-bar i { display: block; height: 100%; background: var(--ok); }

/* recientes: «x» para quitar */
.rcard { position: relative; }
.rc-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: #2a2f3a; border: 1px solid var(--line); color: var(--muted); cursor: pointer; opacity: .85; }
.rc-x .i { width: 12px; height: 12px; }
.rc-x:hover, .rc-x:focus-visible { background: var(--accent); color: #fff; opacity: 1; }
@media (hover: hover) { .rcard .rc-x { opacity: 0; transition: opacity .15s; } .rcard:hover .rc-x, .rcard:focus-within .rc-x { opacity: .9; } }
/* caras de partido sin imagen: nunca rompen la tarjeta */
.ev-face { overflow: hidden; }
.ev-teams b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; max-width: 100%; }
.ev-comp { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%; }
.rcard .tx { padding-right: 16px; }

.tag.warn { background: rgba(255,178,56,.15); color: var(--accent2); }
.where-slot { display: contents; }
#ch-seg { overflow-x: auto; scrollbar-width: none; } #ch-seg::-webkit-scrollbar { display: none; } #ch-seg button[hidden] { display: none; } @media (max-width: 480px) { #ch-seg button { flex: 1 0 auto; padding-left: 8px; padding-right: 8px; } }
/* chat ocultable (escritorio): la columna desaparece y queda un botón flotante «✦ Zapp» */
.chat-fab { display: none; }
@media (max-width: 999px) { #chat-min { display: none; } }
@media (min-width: 1000px) {
  body.chat-min .layout { grid-template-columns: minmax(0, 1fr); }
  body.chat-min .chat { display: none; }
  body.chat-min .tabs { right: auto; }   /* las pestañas van centradas arriba: estirarlas a la derecha dejaba una caja vacía */
  /* sin chat el vídeo se haría enorme: como mucho ~55 % del alto, para que quede sitio para la lista de debajo */
  body.chat-min .video-wrap { width: min(100%, calc((100dvh - var(--top-h)) * 0.55 * 16 / 9)); }
  body.chat-min .chat-fab { display: inline-flex; align-items: center; gap: 8px; position: fixed; right: 24px; bottom: calc(var(--tabs-h) + 16px); z-index: 40;
    padding: 12px 18px; border: 0; border-radius: 99px; background: var(--accent, #6c5ce7); color: #fff; font-weight: 700; box-shadow: 0 8px 24px #0006; }
  body.chat-min .chat-fab .i { stroke: #fff; }
}
#ch-seg .seg-ico { flex: 0 0 44px; font-size: 16px; display: grid; place-items: center; }
#ch-seg .yt-ico { width: 24px; height: 17px; display: block; }
/* modo cine (botón «Ampliar» del reproductor): fuera las listas y las pestañas; el vídeo, todo lo que quepa */
body.theater.playing main, body.theater.playing .tabs { display: none; }
body.theater.playing .video-wrap, body.theater.playing.chat-min .video-wrap { width: min(100%, calc((100dvh - var(--top-h) - 170px) * 16 / 9)); }
body.theater.playing .main-col { overflow: hidden; }
#p-theater.on { color: var(--accent2); }

/* guía de bienvenida (cuenta nueva) */
.ob-dots { display: flex; gap: 6px; margin: 2px 0 14px; }
.ob-dots span { flex: 1; height: 4px; border-radius: 99px; background: var(--line); }
.ob-dots span.done { background: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.ob-dots span.on { background: var(--accent); }
.ob-lead { display: flex; align-items: center; gap: 10px; }
.ob-lead h4 { margin: 0; font-family: var(--font-d); font-size: 21px; line-height: 1.2; }
.ob-emoji { font-size: 28px; line-height: 1; }
.ob-body > p { line-height: 1.5; }
.ob-rows { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.ob-row { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.ob-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ob-row .small { line-height: 1.4; }
.ob-ic { font-size: 20px; line-height: 1.2; width: 26px; text-align: center; flex: none; }
.ob-chips { margin: 12px 0; }
.ob-chips .chip { cursor: pointer; }
.ob-tip { background: var(--card); border: 1px dashed var(--line); border-radius: 14px; padding: 10px 12px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.ob-tip b { color: var(--text); }
.ob-key { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 7px; background: var(--card2); color: var(--text); vertical-align: middle; font-weight: 700; }
.ob-key .i { width: 15px; height: 15px; }
.ob-warn { background: #ffb23818; border: 1px solid #ffb23855; color: var(--accent2); border-radius: 14px; padding: 10px 12px; font-size: 14px; line-height: 1.45; }
.ob-list { padding-left: 4px; list-style: none; line-height: 1.5; color: var(--muted); margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.ob-inline { margin-top: -2px; }
.ob-nav { position: sticky; bottom: calc(-18px - var(--safe-b)); display: flex; justify-content: space-between; gap: 10px; padding: 12px 0 4px; margin-top: 14px; background: var(--bg2); border-top: 1px solid var(--line); }
.ob-nav .btn { flex: 1; }
.ob-final { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 8px; }
.ob-final .btn { flex: 1; }

/* ---------------- YouTube ---------------- */
body.yt-mode #p-src, body.yt-mode #p-dub { display: none; }
#p-queue { display: none; }
body.yt-mode #p-queue { display: flex; }
.yt-qrow { gap: 6px; padding: 6px 4px; }
.yt-qrow.dragging { background: var(--card2); box-shadow: 0 6px 20px #0008; position: relative; z-index: 2; }
.yt-drag { cursor: grab; touch-action: none; user-select: none; color: var(--muted); font-size: 20px; padding: 8px 4px; flex: none; }
.yt-qrow.dragging .yt-drag { cursor: grabbing; }
.yt-qbtns { display: flex; gap: 4px; flex: none; }
.yt-qbtns .ib { width: 32px; height: 32px; font-size: 15px; }
.yt-qbtns .ib:disabled { opacity: .3; }
.yt-resume { display: flex; gap: 14px; align-items: center; }
.yt-resume > img { width: 120px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; flex: none; }
.yt-resume .tx { min-width: 0; }
.yt-resume .btns { margin-bottom: 0; }
.yt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.yt-top .pill { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.yt-top .pill.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.yt-form .search { margin-top: 0; }
.yt-back { display: block; }
.yt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px 12px; margin: 8px 0; }
.yt-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 0 8px; scrollbar-width: none; }
.yt-row::-webkit-scrollbar { display: none; }
.yt-row .yt-card { flex: none; width: 220px; scroll-snap-align: start; }
.yt-card { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.yt-card.on .yt-tt { color: var(--accent2); }
.yt-th { position: relative; padding: 0; border: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 16/9; background: var(--card2); cursor: pointer; }
.yt-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-badge { position: absolute; right: 6px; bottom: 6px; background: #000c; color: #fff; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 6px; }
.yt-badge.live { background: var(--live); }
.yt-badge.list { left: 0; right: 0; bottom: 0; border-radius: 0; padding: 5px 10px; text-align: right; }
.yt-pos { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--live); }
.yt-meta { padding-right: 34px; min-width: 0; }
.yt-tt { background: none; border: 0; padding: 0; text-align: left; color: var(--text); font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.yt-sub { color: var(--muted); font-size: 13px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-chlink { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.yt-chlink:hover { color: var(--text); }
.yt-more { position: absolute; right: -4px; bottom: 0; width: 34px; height: 34px; background: none; }
/* lista (canales, vídeos de una lista) */
.yt-list { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.yt-list.videos .yt-card { flex-direction: row; align-items: flex-start; gap: 12px; padding: 4px 0; }
.yt-list.videos .yt-th { width: 160px; flex: none; border-radius: 10px; }
.yt-list.videos .yt-meta { flex: 1; padding-top: 2px; }
.yt-chan { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 14px; }
.yt-chan:hover { background: var(--card); }
.yt-chan-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; background: none; border: 0; text-align: left; color: var(--text); cursor: pointer; padding: 0; }
.yt-chan-main img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; background: var(--card2); }
.yt-chan .tx { min-width: 0; }
.yt-chan .nm { font-weight: 600; }
.yt-chan .nw { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-chip-av { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; margin-left: -6px; }
/* cabecera de canal y de lista */
.yt-chead { margin: 4px 0 12px; }
.yt-banner { aspect-ratio: 6.2/1; border-radius: var(--r); background: var(--card2) center/cover no-repeat; margin-bottom: 12px; }
.yt-cinfo { display: flex; align-items: center; gap: 14px; }
.yt-cinfo .tx { flex: 1; min-width: 0; }
.yt-cinfo h2 { margin: 0 0 2px; font-size: 20px; }
.yt-av { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.yt-phead { display: flex; gap: 16px; align-items: flex-start; margin: 4px 0 14px; }
.yt-phead h2 { margin: 0 0 4px; font-size: 20px; }
.yt-phead .btns { margin-bottom: 0; }
.yt-pthumb { width: 180px; aspect-ratio: 16/9; object-fit: cover; border-radius: 14px; flex: none; }
.yt-newlist { aspect-ratio: 16/9; border: 2px dashed var(--line); border-radius: 14px; background: none; color: var(--muted); font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.yt-newlist:hover { color: var(--text); border-color: var(--muted); }
.yt-th-empty { display: grid; place-items: center; width: 100%; height: 100%; font-size: 34px; color: var(--muted); }
.yt-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 12px; }
.yt-acc { margin-top: 24px; }
/* reproductor: cargando y «solo audio» con la carátula del vídeo */
.yt-load { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.yt-load img { width: min(240px, 50%); aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; opacity: .5; }
.yt-cover { display: flex; align-items: center; gap: 18px; width: 100%; max-width: 640px; text-align: left; }
.yt-cover > img { width: 38%; max-width: 240px; aspect-ratio: 1; object-fit: cover; border-radius: 16px; flex: none; box-shadow: 0 10px 30px #0008; }
.yt-cover-tx { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.yt-cover-tx b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yt-cover-tx input[type=range] { width: 100%; padding: 0; margin-top: 6px; accent-color: var(--accent); border: 0; background: none; }
.yt-acts { display: flex; align-items: center; gap: 8px; margin: 6px 0 8px; }
.yt-acts .ib { font-size: 13px; font-weight: 700; }
.yt-cover-tx .btn { align-self: flex-start; }
.item.on { background: var(--card); }
.yt-q-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; background: none; border: 0; text-align: left; color: var(--text); padding: 0; cursor: pointer; }
.yt-q-n { width: 22px; text-align: center; color: var(--muted); font-size: 13px; flex: none; }
.yt-q-th { width: 80px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; flex: none; }
@media (max-width: 600px) {
  .yt-grid { grid-template-columns: 1fr; }
  .yt-list.videos .yt-th { width: 132px; }
  .yt-phead { flex-direction: column; }
  .yt-pthumb { width: 100%; }
  .yt-cover { gap: 12px; }
  .yt-cover > img { width: 30%; }
  .yt-acts .ib { width: 36px; height: 36px; }
  .yt-acts .ib.big { width: 42px; height: 42px; }
}
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; flex-wrap: wrap; }
.set-row select { max-width: 100%; flex: 1 1 220px; }
.yt-cbtns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin: 0; }
@media (max-width: 600px) { .yt-cinfo { flex-wrap: wrap; } .yt-cbtns { width: 100%; justify-content: flex-start; } }
