﻿:root {
  --bg: #0e0b16;
  --surface: #1a1525;
  --surface-2: #241d33;
  --border: #33294a;
  --text: #f2eefb;
  --muted: #b5a9ca;
  --accent: #ff3d8b;
  --accent-2: #36e0ff;
  --ok: #3ddc97;
  --error: #ff6b6b;
  --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;   /* el footer queda abajo aunque la página sea corta */
  background: radial-gradient(ellipse at 10% 0%, #391333 0%, transparent 45%),
              radial-gradient(ellipse at 100% 30%, #112632 0%, transparent 40%), var(--bg);
  color: var(--text);
  line-height: 1.45;
}

a { color: var(--accent-2); }

.app-tooltip { position: fixed; inset: auto; margin: 0; width: max-content; max-width: min(280px, calc(100vw - 16px)); padding: 8px 11px; border: 1px solid var(--border); border-radius: 9px; background: #241d33; color: var(--text); font: 500 .8rem/1.4 system-ui, sans-serif; text-align: left; overflow-wrap: anywhere; box-shadow: 0 6px 22px #0007; z-index: 10000; }
.app-tooltip[hidden] { display: none; }
[data-tooltip]:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
@media (pointer: coarse) { .app-tooltip { font-size: .85rem; padding: 10px 12px; } }

.container { max-width: 960px; margin: 0 auto; padding: 16px; width: 100%; flex: 1; }

.site-footer {
  padding: 4px 16px; border-top: 1px solid var(--border); line-height: 1.2;
  text-align: center; color: var(--muted); font-size: .7rem;
}
.site-footer strong { color: var(--text); font-weight: 600; }
.site-footer a { color: inherit; text-decoration: none; }

header.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: rgba(14, 11, 22, .85); position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(8px);
  flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 850; letter-spacing: -.4px; color: var(--text); text-decoration: none; }
.topbar-brand-group { display: flex; align-items: center; gap: 12px; }
.eyebrow.home-header-tagline { display: inline-flex; }
.brand-name { display: flex; flex-direction: column; font-size: 1.25rem; line-height: 1.05; }
.brand-name > span { color: var(--accent-2); font-size: .95em; font-style: italic; }
.brand-mark { width: 48px; height: 48px; flex-shrink: 0; filter: drop-shadow(0 0 9px #ff3d8b30); }
.app-icon { width: 1.25em; height: 1.25em; display: inline-block; flex-shrink: 0; vertical-align: -.2em; }
.accent-icon { color: var(--accent); }
.section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-heading h1, .section-heading h2 { margin: 0; }
.icon-tile { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
  border: 1px solid #ff3d8b55; border-radius: 14px; color: var(--accent); background: #ff3d8b12; font-size: 1.4rem; flex-shrink: 0; }
.icon-tile.cyan { color: var(--accent-2); border-color: #36e0ff55; background: #36e0ff12; }
.welcome-banner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 30px 12px 34px; overflow: hidden; }
.welcome-banner h1 { font-size: clamp(1rem, 3.7vw, 2.5rem); font-weight: 900; line-height: 1.08; letter-spacing: -1px; margin: 12px 0; white-space: nowrap; }
.welcome-banner h1 > span { color: var(--accent); }
.welcome-banner p { color: var(--muted); max-width: 440px; margin-bottom: 20px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-2); font-size: .8rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.music-sources { display: flex; gap: 10px; flex-wrap: wrap; }
.music-sources > span { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; font-size: .85rem; }
.music-sources .app-icon { color: var(--accent); }
.welcome-art { position: relative; display: grid; place-items: center; flex: 0 1 230px; min-width: 0; min-height: 220px;
  background: radial-gradient(ellipse, #ff3d8b19, transparent 70%); }
.welcome-art > .brand-mark { width: 170px; height: 170px; z-index: 1; }
.sound-bars { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; opacity: .45; }
.sound-bars i { width: 7px; height: 48px; border-radius: 20px; background: linear-gradient(var(--accent-2), var(--accent)); }
.sound-bars i:nth-child(2n) { height: 105px; }
.sound-bars i:nth-child(3n) { height: 165px; }

.card {
  background: linear-gradient(145deg, #21172d, var(--surface)); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: 0 12px 36px #00000020;
}
.card h2 { margin-top: 0; font-size: 1.15rem; }

.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.home-music-summary { display: flex; align-items: center; gap: 12px; }
.home-music-summary .music-sources { flex-wrap: nowrap; flex-shrink: 0; }
.home-audience { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.home-audience strong { color: var(--text); }
.header-audience { display: flex; }
.online-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #70df9a; box-shadow: 0 0 8px #70df9a55; }
.home-entry-grid { align-items:stretch; }
.home-entry-card { display:flex; flex-direction:column; gap:16px; min-width:0; margin-bottom:0; }
.home-entry-card > .section-heading, .home-entry-card > .home-entry-description { margin:0; }
.home-entry-description h3 { margin:0 0 8px; }
.home-entry-description p { margin:0; }
.home-entry-controls { display:grid; gap:14px; margin: auto 0 0; }
.home-entry-controls > input, .home-entry-controls > .full { margin:0; min-height:54px; }
.topbar-brand-group, .topbar-user { min-width:0; max-width:100%; }
.topbar-brand-group { flex-wrap:wrap; }
@media (min-width: 768px) {
  .home-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Portada y QR integrados en una tarjeta; cola debajo a todo el ancho. */
.player-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin-bottom: 16px; }
.player-layout > .card { margin-bottom: 0; min-width: 0; }
.join-url strong { overflow-wrap: anywhere; }
.share-venue { margin-top: 14px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.share-actions .share-icon { position: relative; padding: 10px; min-width: 44px; min-height: 44px; }
.share-icon > .app-icon { width: 24px; height: 24px; }
.share-icon .share-indicator { width: 13px; height: 13px; margin-left: 3px; }
.share-actions .share-whatsapp { color: #25d366; }
.share-actions .share-facebook { color: #75aaff; }
.venue-header .share-venue { margin-top: 0; }
.venue-share-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.venue-name-code { display: flex; align-items: baseline; gap: 12px; }
.venue-name-code h1 { margin: 0; }
.player-venue-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.player-venue-heading h1 { margin: 0; overflow-wrap: anywhere; }
.player-venue-code { color: var(--accent-2); font-weight: 800; letter-spacing: .08em; }
.player-venue-heading .share-venue { margin-top: 0; }
.player-venue-heading .share-actions { gap: 6px; }
.player-venue-heading .share-icon { padding: 6px; }
.player-venue-heading .share-icon > .app-icon { width: 20px; height: 20px; }
.player-venue-heading .share-indicator { display: none; }
.venue-name-code > span { white-space: nowrap; }
.pl-qr .share-actions { justify-content: center; }
/* El código se ajusta al ancho de su tarjeta (columna angosta en tablet, ancho completo en celular) */
.pl-qr { container-type: inline-size; }
.pl-qr .venue-code { font-size: min(4.5rem, 17cqi); letter-spacing: .12em; }

label { display: block; font-size: .85rem; color: var(--muted); margin: 10px 0 4px; }
input, textarea {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 1rem;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
textarea { resize: vertical; font-family: inherit; }
.youtube-requests form button { margin-top: 10px; }
.youtube-errors { color: var(--error); overflow-wrap: anywhere; padding-left: 20px; }
input.code-input { text-transform: uppercase; letter-spacing: 6px; font-size: 1.6rem; text-align: center; font-weight: 700; }
input.code-input::placeholder { text-transform: none; letter-spacing: normal; font-size: 1rem; font-weight: 400; }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 10px; border: 0; cursor: pointer;
  background: linear-gradient(120deg, #cf1768, #ba125b); color: #fff; font-weight: 700; font-size: .95rem; text-decoration: none;
  transition: box-shadow .15s ease, filter .15s ease;
}
button:hover, .btn:hover { filter: brightness(1.08); box-shadow: 0 0 18px #ff3d8b25; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 4px; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.secondary, .btn.secondary { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
button.small { padding: 6px 10px; font-size: .85rem; }
button.danger { background: transparent; border: 1px solid var(--error); color: var(--error); }
.full { width: 100%; margin-top: 14px; }

.tabs { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.tabs button { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.tabs button.active { background: var(--accent); color: #fff; border-color: transparent; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--text); font-weight: 600;
}
.chip.active { background: var(--accent-2); color: #0e0b16; border-color: transparent; }

.albums { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-top: 12px; }
.album {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px; cursor: pointer; text-align: left; color: var(--text); display: block;
}
.album .cover {
  aspect-ratio: 1; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; font-size: 2rem; overflow: hidden; margin-bottom: 8px;
}
.album .cover img { width: 100%; height: 100%; object-fit: cover; }
.album .title { font-weight: 700; font-size: .9rem; }
.album .artist { color: var(--muted); font-size: .8rem; }

ul.list { list-style: none; margin: 0; padding: 0; }
ul.list li {
  display: flex; align-items: center; gap: 12px; padding: 10px 4px;
  border-bottom: 1px solid var(--border);
}
ul.list li:last-child { border-bottom: 0; }
.list .info { flex: 1; min-width: 0; }
.list .info .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .info .s { color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .pos { width: 26px; text-align: center; color: var(--muted); font-weight: 700; }
.list .item-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.badge {
  display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 999px;
  background: var(--accent-2); color: var(--bg); font-size: .72rem; font-weight: 700; vertical-align: middle;
}

.now-playing {
  display: flex; gap: 14px; align-items: center; padding: 14px;
  border-radius: 12px; background: linear-gradient(135deg, rgba(255,61,139,.25), rgba(54,224,255,.15));
  border: 1px solid var(--border);
}
.now-playing .eq { font-size: 1.8rem; color: var(--accent); }
.now-playing .t { font-weight: 800; font-size: 1.1rem; }

.breadcrumb { display: flex; gap: 8px; align-items: center; margin: 12px 0 4px; flex-wrap: wrap; }
.breadcrumb button { background: none; color: var(--accent-2); padding: 0; font-weight: 600; }

.venue-code {
  font-size: clamp(2.5rem, 10vw, 4.5rem); font-weight: 900; letter-spacing: 10px;
  color: var(--accent); text-shadow: 0 0 24px rgba(255,61,139,.6);
}
.qr:not(:empty) { display: inline-block; padding: 10px; background: #fff; border-radius: 10px; margin-top: 10px; }

.toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center;
  padding: 12px 18px; border-radius: 10px; background: var(--surface-2);
  border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,.4); z-index: 100;
  max-width: calc(100% - 32px);
}
.toast.ok { border-color: var(--ok); }
.toast.error { border-color: var(--error); }

/* Escenario del reproductor: un <video> que también reproduce audio. Es lo que pasa a pantalla completa. */
.stage { position: relative; margin-top: 12px; border-radius: 12px; overflow: hidden; }
.stage video { display: block; width: 100%; background: #000; }
.stage.has-video video { max-height: 60vh; }
.stage:not(.has-video) video { height: 54px; background: transparent; }   /* solo audio: solo los controles */
.stage-info { display: block; text-align: center; padding: 16px; }
.song-cover { width: min(100%, 280px); aspect-ratio: 1; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.04); }
.song-cover img { width: 100%; height: 100%; object-fit: contain; }
.song-cover .brand-mark { width: 65%; height: 65%; }
.stage:not(:fullscreen) .stage-title { font-size: 1.25rem; }
.stage:not(:fullscreen) .stage-info .muted { font-size: .9rem; }
.stage:fullscreen .song-cover { width: min(50vh, 70vw); }
.stage:fullscreen { display: flex; align-items: center; justify-content: center; background: #000; border-radius: 0; }
.stage.has-video:fullscreen video { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.stage:not(.has-video):fullscreen { background: radial-gradient(circle at top, #2a1840 0%, var(--bg) 70%); }
.stage:not(.has-video):fullscreen .stage-info { display: block; text-align: center; padding: 24px; }
.stage:not(.has-video):fullscreen video { position: absolute; left: 0; right: 0; bottom: 0; }
.stage-title { font-size: clamp(2rem, 6vw, 4.5rem); font-weight: 900; color: var(--text); }
/* Pedidos de YouTube: su reproductor (iframe) reemplaza al <video> */
.yt-host { display: none; }
.stage.is-youtube video { display: none; }
.stage.is-youtube .yt-host { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.yt-host iframe { display: block; width: 100%; height: 100%; border: 0; }
.stage.is-youtube:fullscreen .yt-host { height: 100%; aspect-ratio: auto; }
.stage-info .muted { font-size: clamp(1rem, 2.5vw, 1.8rem); }

/* Una sola caja visual para portadas, videos y YouTube. */
.stage:not(:fullscreen) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; align-items: start; }
.stage-track-info { grid-area: 1 / 1; min-width: 0; }
.stage:fullscreen .stage-track-info { display: contents; }
.stage-artwork { width: min(100%, 280px); aspect-ratio: 1; margin: 16px auto; grid-area: 1 / 1; overflow: hidden; border-radius: 12px; }
.stage-artwork .song-cover { width: 100%; height: 100%; margin: 0; }
.stage:not(:fullscreen) .stage-artwork { margin: 0 auto 6px; }
.stage.has-video .stage-artwork, .stage.is-youtube .stage-artwork { visibility: hidden; }
.stage:not(:fullscreen).has-video video,
.stage:not(:fullscreen).is-youtube .yt-host { grid-area: 1 / 1; width: min(100%, 280px); height: auto; aspect-ratio: 1; max-height: none; margin: 0 auto 6px; align-self: start; object-fit: contain; border-radius: 12px; }
.stage:not(:fullscreen) .stage-info { grid-area: 2 / 1; padding: 0 4px; line-height: 1.25; overflow: hidden; }
.stage:not(:fullscreen) .stage-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.stage:not(:fullscreen) .stage-info .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage:not(:fullscreen) .stage-message { grid-area: 3 / 1; margin: 4px 0; }
.stage:not(:fullscreen) .volume-controls { grid-area: 4 / 1; margin-top: 4px; }
.stage:not(:fullscreen):not(.has-video):not(.is-youtube) { row-gap: 12px; }
.stage:not(:fullscreen):not(.has-video):not(.is-youtube) video { grid-area: 2 / 1 / 3 / -1; }
.stage:fullscreen.has-video .stage-artwork, .stage:fullscreen.is-youtube .stage-artwork,
.stage:fullscreen.has-video .stage-info, .stage:fullscreen.is-youtube .stage-info { display: none; }
.stage:fullscreen:not(.has-video):not(.is-youtube) { flex-direction: column; }
.stage:fullscreen .stage-artwork { width: min(50vh, 70vw); flex-shrink: 0; }
.stage .player-fullscreen { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 10px; z-index: 6; color: var(--text); }
.stage:not(:fullscreen):not(.has-video):not(.is-youtube) .player-fullscreen { grid-area: 2 / 1 / 3 / -1; align-self: center; justify-self: end; height: 54px; margin: 0 4px 0 0; border: 0; background: transparent; box-shadow: none; border-radius: 50%; }
.stage:not(:fullscreen):not(.has-video):not(.is-youtube):has(.player-fullscreen) video { width: calc(100% - 44px); height: 54px; align-self: center; position: relative; z-index: 1; border-radius: 999px 0 0 999px; }
.stage:not(:fullscreen):not(.has-video):not(.is-youtube):has(.player-fullscreen)::after { content: ""; grid-area: 2 / 1 / 3 / -1; align-self: end; height: 54px; width: 100%; background: #333; border-radius: 999px; pointer-events: none; }
.stage:not(:fullscreen).has-video .player-fullscreen,
.stage:not(:fullscreen).is-youtube .player-fullscreen { grid-area: 1 / 1; justify-self: end; align-self: start; margin: 8px; background: #151020cc; }
.stage:fullscreen .player-fullscreen { position: absolute; right: 12px; bottom: 12px; background: #151020cc; }
.stage:fullscreen:not(.has-video):not(.is-youtube) video { right: 64px; width: calc(100% - 64px); }
.stage-share { grid-area: 1 / 2; min-width: 0; align-self: start; }
.stage-share .venue-code { font-size: clamp(1.6rem, 18cqi, 4rem); line-height: 1.1; letter-spacing: .08em; margin: 0 0 4px; }
.stage-share .qr:not(:empty) { width: min(100%, 140px); margin-top: 6px; padding: 6px; }
.stage-share .qr img, .stage-share .qr canvas { width: 100%; height: auto; }
.stage-share > .muted { font-size: .75rem; }
.stage-join-url { grid-area: 2 / 1 / 3 / -1; display: block; min-width: 0; margin: 4px 0; text-align: center; font-size: clamp(.5rem, 2vw, .75rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage:fullscreen .stage-join-url { display: block; font-size: clamp(.65rem, 1.5vw, 1rem); }
.stage .stage-join-url { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--text); font-weight: normal; text-decoration: none; min-height: 0; }
.stage-share .share-venue { margin-top: 4px; }
.stage-share .share-actions { gap: 6px; }
.stage-share .share-icon { padding: 6px; }
.stage-share .share-indicator { display: none; }
.stage:fullscreen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr) auto 54px; gap: 8px 16px; padding: 16px; align-items: center; }
.stage:fullscreen .stage-track-info { display: block; grid-area: 1 / 1; align-self: center; }
.stage:fullscreen .stage-artwork { width: min(100%, 480px, max(100px, calc(100dvh - 240px))); margin: 0 auto 8px; }
.stage:fullscreen .stage-artwork .song-cover { width: 100%; }
.stage:not(.has-video):fullscreen .stage-info { padding: 0 4px; }
.stage:fullscreen .stage-title { font-size: clamp(1rem, 3vw, 2.5rem); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.stage:fullscreen .stage-share { display: block; align-self: center; }
.stage:fullscreen .stage-share .qr:not(:empty) { width: min(100%, 35dvh, 300px); }
.stage:fullscreen .stage-share .venue-code { font-size: clamp(1.5rem, 8dvh, 4rem); }
.stage.has-video:fullscreen video, .stage.is-youtube:fullscreen .yt-host { grid-area: 1 / 1; position: static; width: 100%; height: 100%; max-height: 100%; min-height: 0; object-fit: contain; }
.stage:fullscreen:not(.has-video):not(.is-youtube) video { grid-area: 3 / 1 / 4 / -1; position: static; width: calc(100% - 64px); height: 54px; justify-self: start; }
.stage:fullscreen .player-fullscreen { bottom: 16px; right: 16px; }
@media (max-width: 599px) {
  .stage:not(:fullscreen) { column-gap: 8px; }
  .stage:not(:fullscreen) .stage-title { font-size: .85rem; }
  .stage:not(:fullscreen) .stage-info .muted { font-size: .65rem; }
}

/* ---------- Blazor ---------- */
h1 { font-size: 1.3rem; margin: 0 0 8px; }
h1[tabindex="-1"]:focus { outline: none; }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0 8px; }
.narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
.alert {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--error);
  background: rgba(255, 107, 107, .12); color: var(--text);
}
.topbar-user { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar-user form { margin: 0; }
.topbar-user .logout-icon { display:inline-grid; place-items:center; width:40px; height:40px; padding:0; flex-shrink:0; }
.header-venue-name { color: var(--text); text-decoration: none; font-weight: 700; overflow-wrap: anywhere; }
.venue-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.queue-title { margin-top: 16px; }
.actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pl-player .actions > .voice-control { flex: 0 0 auto; margin-left: auto; }
.pl-player .actions > .skip-button { flex: 0 0 auto; padding: 8px 10px; font-size: .85rem; }
.small-text { font-size: .85rem; }
button.link { background: none; color: var(--accent-2); padding: 0; font-weight: 600; }
.songs { margin-top: 12px; }
input[type=search] { margin-bottom: 4px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }

/* ---------- Celular y tablet (prioridad) ---------- */
.brand, .topbar-user .btn, .topbar-user button { white-space: nowrap; }

/* Filas de listas (cola, canciones): si los botones no caben junto al título, bajan a otra línea */
ul.list li { flex-wrap: wrap; }
.list .info { flex: 1 1 180px; }
.list .item-actions { margin-left: auto; }

.hint { color: var(--muted); font-weight: normal; }
.badge.muted-badge { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }

/* Página de playlists: lista + playlist elegida (una columna en celular) */
.playlists-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.playlists-layout > .card { margin-bottom: 0; min-width: 0; }
@media (min-width: 800px) { .playlists-layout { grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); align-items: start; } }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.page-header h1, .page-header h2 { margin: 0; }
.request-report { padding: 14px; }
.request-report .page-header { flex-wrap: nowrap; gap: 8px; margin-bottom: 6px; }
.request-report .page-header h1 { font-size: 1.05rem; }
.request-report h2 { font-size: .95rem; margin: 10px 0 4px; }
.request-report p { margin: 6px 0; }
.report-venue-name { font-size: .85rem; }
.report-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; gap: 8px; margin-top: 10px; }
.report-filters label { min-width: 0; margin: 0; font-size: .8rem; }
.report-filters input { width: 100%; min-width: 0; margin: 3px 0 0; padding: 8px; font-size: .85rem; }
.report-filters button { padding: 9px 12px; font-size: .85rem; }
.report-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0 6px; }
.report-totals > div { padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); min-width: 0; }
.report-totals span { display: block; color: var(--muted); font-size: .7rem; }
.report-totals strong { display: block; font-size: 1.35rem; line-height: 1.2; color: var(--accent-2); overflow-wrap: anywhere; }
.report-note { font-size: .7rem; line-height: 1.3; }
.report-users { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .8rem; }
.report-users th, .report-users td { text-align: left; padding: 6px; border-bottom: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-users th:last-child, .report-users td:last-child { text-align: right; width: 80px; }
.report-user-pages { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: .75rem; }
.report-popup { width: min(740px, calc(100% - 16px)); max-height: calc(100dvh - 16px); overflow: auto; padding: 0; border: 0; border-radius: var(--radius); background: var(--bg); color: var(--text); }
.report-popup::backdrop { background: #000a; }
.report-popup > .card { margin-bottom: 0; }
@media (max-width: 599px) {
  .report-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-filters button { grid-column: 1 / -1; justify-self: start; }
  .request-report .page-header h1 { font-size: .95rem; }
  .request-report .small { padding: 6px 9px; font-size: .75rem; }
}
.section-title { font-size: 1rem; margin: 18px 0 8px; }
.playlist-list { margin-top: 12px; }
.playlist-list li { padding: 4px 0; }
.playlist-pick {
  width: 100%; justify-content: space-between; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); font-weight: 600; text-align: left;
}
.playlist-pick.active { border-color: var(--accent-2); box-shadow: inset 0 0 0 1px var(--accent-2); }
.list li.unavailable .t { text-decoration: line-through; color: var(--muted); }

/* Reproductor: qué suena cuando no hay pedidos */
.fill-mode { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px 14px; margin: 14px 0 0; }
.fill-mode legend { padding: 0 6px; color: var(--muted); font-size: .85rem; }
.fill-options { display: flex; flex-wrap: nowrap; gap: 8px 12px; }
.fill-options .option { gap: 5px; white-space: nowrap; font-size: clamp(.75rem, 2.8vw, .95rem); }
.option { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0; color: var(--text); font-size: .95rem; cursor: pointer; }
.option input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.fill-playlist { display: flex; gap: 8px; margin-top: 10px; }
.fill-playlist select { flex: 1 1 0; min-width: 0; }
.playlist-settings { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 10px; }
select {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 1rem;
}

@media (max-width: 599px) {
  header.topbar { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-name { font-size: 1.1rem; }
  .welcome-banner { padding: 0 4px 24px; gap: 12px; }
  .welcome-art { display: none; }
  .welcome-banner p { display: none; }
  .topbar-brand-group { gap: 8px; }
  .home-header-tagline { display: inline-flex; gap: 4px; font-size: clamp(.5rem, 1.8vw, .65rem); letter-spacing: .2px; white-space: nowrap; }
  .welcome-banner h1 { font-size: clamp(1rem, 4.6vw, 1.7rem); margin-top: 0; }
  .home-entry-description { display: none; }
  .home-music-summary { gap: 8px; }
  .home-music-summary .music-sources { gap: 6px; }
  .home-music-summary .music-sources > span { gap: 4px; padding: 6px; font-size: .7rem; }
  .home-audience { gap: 4px; font-size: .65rem; }
  .header-audience { display: flex; font-size: clamp(.5rem, 1.8vw, .65rem); }
  .topbar-brand-group .home-header-tagline { white-space: normal; }
  .brand { font-size: .95rem; }
  .topbar-user { gap: 6px; }
  .topbar-user > .muted { display: none; }   /* el nombre del usuario no cabe en el encabezado */
  .container { padding: 12px; }
  .card { padding: 16px; border-radius: 12px; }
  .grid-2, .player-layout { gap: 12px; }
  .venue-code { letter-spacing: 6px; }
  /* Controles del reproductor en cuadrícula pareja; "Iniciar" a todo el ancho */
  .pl-player .actions { display: flex; flex-wrap: nowrap; }
  .pl-player .actions > button { flex: 1; min-width: 0; }
  .pl-player .actions button { white-space: nowrap; padding-inline: 6px; font-size: clamp(.7rem, 2.8vw, .9rem); }
}

/* Pantallas táctiles (celular, tablet): botones fáciles de tocar, ~44px de alto */
@media (pointer: coarse) {
  button, .btn { min-height: 44px; }
  button.small, .btn.small { min-height: 40px; padding: 8px 12px; }
  .chip { min-height: 40px; }
  button.link, .breadcrumb button { min-height: 0; }
}

#blazor-error-ui {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  padding: 12px 16px; background: #5c1d2b; color: #fff;
}
#blazor-error-ui .reload { color: #fff; margin-left: 8px; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 16px; top: 12px; }

/* Catalogo paginado */
.volume-controls { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.volume-controls label { margin: 0; }
.stage:fullscreen .volume-controls { position: absolute; bottom: 65px; left: 50%; transform: translateX(-50%); z-index: 5; width: min(90%, 520px); padding: 12px; border-radius: 12px; background: rgba(14,11,22,.9); color: #fff; }
/* Los controles de clientes conservan su altura; el reproductor usa una fila compacta. */
@media (max-width: 599px), (pointer: coarse) {
  .listener-media { --audio-controls-height: 120px; }
  .stage:not(.has-video) video { height: 64px; flex-shrink: 0; }
  .stage:not(.has-video):not(.is-youtube):fullscreen .volume-controls { bottom: 76px; }
}
.volume-controls input[type="range"] { flex: 1; width: auto; min-width: 100px; max-width: 240px; padding: 0; accent-color: var(--accent); }
.catalog-grid { width: 100%; border-collapse: collapse; margin-top: 1rem; table-layout: fixed; }
.catalog-results { overflow-anchor:none; display:flow-root; }
.catalog-grid th, .catalog-grid td { padding: .65rem .5rem; border-bottom: 1px solid rgba(255,255,255,.12); text-align: left; overflow-wrap: anywhere; }
.catalog-grid th:last-child, .catalog-grid td:last-child { width: 6rem; text-align: right; }
.catalog-pagination { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 1rem; }
.catalog-pagination span { font-size: .85rem; text-align: center; }

.song-message { color: var(--accent); font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; }
.stage:fullscreen .stage-message { position: absolute; top: 12px; left: 5%; width: 90%; z-index: 4; text-align: center; background: rgba(14,11,22,.85); padding: 12px; border-radius: 12px; font-size: clamp(1rem, 3vw, 2rem); }

.catalog-grid { table-layout: auto; }
.catalog-grid th:last-child, .catalog-grid td:last-child { width: 1%; white-space: nowrap; }
.catalog-song-title { overflow-wrap: anywhere; }
.request-controls { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; min-width: 0; }
.message-trigger { display: inline-flex; align-items: center; justify-content: center; padding: 6px; min-width: 36px; }
.catalog-message-dialog { width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.catalog-message-dialog::backdrop { background: #0009; }
.catalog-message-dialog p { overflow-wrap: anywhere; }
@media (max-width: 599px) {
  .catalog-song-title { font-size: .85rem; }
}
.request-controls button { flex: 0 0 auto; white-space: nowrap; }
.saved-message { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; color: #70df9a; padding: .4rem; }
.saved-message .app-icon { display: block; flex: none; width: 24px; height: 24px; }

.youtube-requests > summary { cursor: pointer; font-size: 1.1rem; font-weight: 800; }
.youtube-requests > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.youtube-requests-content { padding-top: 1rem; }


/* Controles propios, sin la interfaz nativa de audio del navegador. */
.custom-media-controls { width:100%; min-width:0; box-sizing:border-box; padding:8px; border:1px solid var(--border); border-radius:14px; background:var(--surface-2); }
.media-transport { display:flex; align-items:center; gap:8px; min-width:0; }
.custom-media-controls button { display:inline-grid; place-items:center; flex:0 0 40px; width:40px; height:44px; min-height:44px; padding:0; border-radius:10px; }
.custom-media-controls .app-icon { width:20px; height:20px; }
.custom-media-controls [hidden] { display:none !important; }
.custom-media-controls input[type=range] { min-width:0; padding:0; margin:0; height:28px; cursor:pointer; accent-color:var(--accent); }
.media-progress { flex:1 1 auto; width:0; }
.media-volume { flex:0 1 85px; width:85px; }
.media-time { flex:0 0 auto; font-size:.8rem; font-variant-numeric:tabular-nums; color:var(--muted); white-space:nowrap; }
.media-control-error { display:block; margin-top:8px; font-size:.8rem; color:var(--muted); }
.stage:not(:fullscreen) > .custom-media-controls { grid-area:2 / 1 / 3 / -1; align-self:end; }
.stage:not(.has-video):not(.is-youtube) > video { display:none; }
.stage:fullscreen > .custom-media-controls { position:absolute; bottom:12px; left:12px; right:12px; width:calc(100% - 24px); z-index:8; background:#211a30ee; }
@media(max-width:480px) {
  .custom-media-controls { padding:6px; }
  .media-transport { gap:5px; }
  .custom-media-controls button { flex-basis:34px; width:34px; }
  .media-time { font-size:.72rem; }
  .media-volume { flex-basis:55px; width:55px; }
}

.custom-media-controls input[type=range] { appearance:none; -webkit-appearance:none; border:0; background:transparent; }
.custom-media-controls input[type=range]::-webkit-slider-runnable-track { height:5px; border-radius:999px; background:linear-gradient(to right, var(--accent) var(--range-progress, 0%), var(--border) var(--range-progress, 0%)); }
.custom-media-controls input[type=range]::-webkit-slider-thumb { -webkit-appearance:none; width:16px; height:16px; margin-top:-5.5px; border-radius:50%; border:2px solid var(--text); background:var(--accent); }
.custom-media-controls input[type=range]::-moz-range-track { height:5px; border-radius:999px; background:var(--border); }
.custom-media-controls input[type=range]::-moz-range-progress { height:5px; border-radius:999px; background:var(--accent); }
.custom-media-controls input[type=range]::-moz-range-thumb { width:13px; height:13px; border-radius:50%; border:2px solid var(--text); background:var(--accent); }
.custom-media-controls input[type=range]:disabled { opacity:.4; cursor:default; }
