/* Identidad visual de En Una Nota. La lógica y los estados del juego siguen en styles.css. */
@font-face{font-family:Nunito;src:url('./nunito-800.ttf') format('truetype');font-weight:800;font-style:normal;font-display:swap}
:root{color-scheme:light;--bg:#FEF6EF;--panel:#fff;--panel-2:#f7fafe;--text:#01215A;--muted:#65768d;--line:#e2e9f0;--accent:#01215A;--accent-2:#71E5FE;--pink:#D4A6FC;--ink:#01215A;--success:#18785f;--danger:#b7434b;--surface:#fff}
body{font-family:Nunito,ui-sans-serif,system-ui,sans-serif;background:var(--bg);color:var(--text)}body::before,body::after{content:none}
button{background:#fff;color:var(--text);border-color:var(--line);border-radius:12px;font-weight:800}button:hover{border-color:#8299b3;background:#f5fafe}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #9072dd;outline-offset:2px}button.primary,.huge{background:var(--text);border-color:var(--text);color:#E0F6FE}button.primary:hover,.huge:hover{background:#11366b}button.danger{color:var(--danger)}input,select{background:white;color:var(--text);border-color:#dce4ed;border-radius:12px}label{color:var(--text)}
.shell{width:min(1560px,100%);padding:24px clamp(16px,3vw,42px)}.topbar{background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px 20px;gap:14px;margin-bottom:18px}.brand-title{flex-wrap:wrap;gap:12px}.brand-identity,.phone-brand{display:flex;align-items:center;gap:3px}.brand-logo,.player-logo,.welcome-logo{object-fit:contain;clip-path:inset(9% 9% round 16%)}.brand-logo{width:64px;max-height:none}.brand-name{font-size:clamp(1rem,1.5vw,1.4rem);letter-spacing:-.04em;white-space:nowrap}.brand-name span:nth-child(2){color:#71E5FE}.brand-name span:nth-child(3){color:#D4A6FC}.session-info{border:1px solid var(--line);border-radius:12px;padding:6px 10px;min-width:88px;letter-spacing:.05em}.session-info strong{font-size:1rem}.session-info button{min-height:28px}.header-qr{font-size:.6rem}.header-qr img{width:64px;border:1px solid var(--line)}.spotify-bar{flex:1 1 360px}.connection-pill{background:#f8fafe;border-radius:12px}.status{background:#fff}.status.connected{background:#ecf8f2;color:#18785f}.status.disconnected{background:#fff5f5;color:#b7434b}
.workspace{grid-template-columns:minmax(210px,250px) minmax(0,1fr) minmax(250px,310px);gap:16px}.panel,.stage{border-color:#e9edf3;border-radius:18px;background:white;padding:20px;box-shadow:0 14px 40px #01215a09}.setup-panel h2,.score-panel h2{font-size:1.1rem;letter-spacing:-.02em}.playlist-grid{max-height:420px}.playlist-card{border-radius:12px;background:#f8fbfd}.playlist-card:hover{background:#eef9fd}.playlist-card img,.playlist-cover-placeholder{border-radius:10px;background:#E0F6FE}.stage{min-height:600px;display:flex;flex-direction:column;gap:16px}.playlist-banner{border:0;background:#eef8fc;color:var(--text);border-radius:12px;font-size:.9rem}.now-playing{display:flex;flex-direction:column;justify-content:center;text-align:center;gap:17px;min-height:280px;overflow:visible}.now-playing img{width:min(200px,50vw);border-radius:20px;background:var(--text)}.cover-placeholder{opacity:1}.answer-hidden img{border-color:var(--line)}.answer-hidden h2,.answer-hidden p{color:var(--muted)}.track-copy{width:100%;justify-items:center}.now-playing h2{font-size:clamp(1.6rem,3vw,2.5rem);line-height:1.1}.round-meter{width:min(100%,460px);align-self:center;color:var(--muted);grid-template-columns:auto 1fr}.meter-track{height:8px;background:#edf0f4;border:0}.meter-track span{background:#D4A6FC}.controls{grid-template-columns:repeat(auto-fit,minmax(min(120px,100%),1fr));width:100%}.controls .huge{grid-column:1/-1}.controls button{font-size:.83rem}.controls button.primary:not(.huge){background:#eef7fc;border-color:#dceaf2;color:var(--text)}
.buzz-item,.score-row{background:#f8fafc;border-color:#edf0f4;border-radius:12px}.score,.buzz-time{color:var(--text)}.score-action.positive,.admin-player-row button[data-delta='1']{color:#18785f;background:#eaf8f2;border-color:#bfebd8}.score-action.negative,.admin-player-row button[data-delta='-1']{color:#b7434b;background:#fff1f1;border-color:#f0cbd0}.score-row.winner{background:#eefaf4;border-color:#bfe7d3}.score-row.winner strong{color:#18785f}.golden-goal-banner,.golden-vote-panel,.continue-warning{background:#fff8e7;border-color:#edd99f;color:#795d16}.golden-vote-panel span{color:var(--text)}#goldenGoal{background:#f8edcf;border-color:#ead9a8;color:#795d16}#continueSong.pause-mode,#playFullSong.pause-mode{background:#fff1f1;border-color:#edcbd0;color:#a43b49}
.manual-timer{background:var(--text);border-color:#E0F6FE;color:white;box-shadow:0 18px 50px #01215a30}.review-popup{background:#eefaff;color:var(--text);border-color:#bcebf6;box-shadow:0 12px 30px #01215a12}.welcome-screen{background:#01215ae8}.welcome-card,.winner-card,.rules-card{background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:0 24px 70px #00163340}.welcome-logo{width:150px}.welcome-card h1{font-size:clamp(2rem,6vw,3rem)}.eyebrow{color:#557a9a}.winner-card p,.winner-card span{color:var(--text)}.winner-modal,.rules-modal{background:#01215abf}.winner-card,.rules-card{color:var(--text)}
.phone{width:min(100%,460px);padding:28px 20px}.join-screen,.buzzer-screen{background:white;border:1px solid #e9edf3;border-radius:24px;padding:28px;box-shadow:0 16px 50px #01215a12}.phone-brand{justify-content:center}.phone-brand .player-logo{width:76px}.phone-brand .brand-name{font-size:1.35rem}.join-screen h1{font-size:2.1rem;line-height:1.1}.join-error{min-height:0}.admin-key-toggle{min-height:30px}.player-head{background:#f8fbfe;border-color:#e8eef5;border-radius:14px;box-shadow:none}.player-head h1{color:var(--text);font-size:clamp(2rem,9vw,3rem);text-shadow:none}#rank{background:#eef8fc;border-color:#d4eef6;color:var(--text)}.buzzer{width:min(100%,300px);justify-self:center;border:10px solid #E0F6FE;background:#01215A;color:#E0F6FE;font-size:clamp(3rem,15vw,5rem);text-shadow:none;box-shadow:0 0 0 7px #f1e8ff,0 12px 0 #d4c5f3}.buzzer.buzzed{background:#2d6d7d;box-shadow:0 0 0 7px #e3f8f1,0 8px 0 #bfe5d7}.buzzer:disabled{cursor:not-allowed}.buzzer-screen.golden-goal-active .buzzer:not(.buzzed){background:#9e7624;color:#fff;box-shadow:0 0 0 7px #fbf1d9,0 12px 0 #e1cf9e}.round-state{color:var(--text)}#buzzState{font-size:1rem}.admin-controls,.player-vote{background:#f8fbfe;border-color:var(--line);border-radius:16px}.admin-controls h2,.admin-playlist-picker,.player-vote strong,.admin-player-row span{color:var(--text)}.admin-player-row{background:#fff;border-radius:10px}.admin-playlist-picker select{background:#fff}.player-vote button.selected{border-color:#18785f}
@media(max-width:1100px){.workspace{grid-template-columns:minmax(180px,240px) minmax(0,1fr)}.score-panel{grid-column:1/-1;grid-template-columns:1fr 1fr}.buzz-board{border-bottom:0;border-right:1px solid var(--line);padding:0 16px 0 0}}
@media(max-width:700px){.shell{padding:14px}.topbar{display:flex}.brand-title{gap:8px}.brand-logo{width:52px}.brand-name{font-size:1rem}.header-qr img{width:56px}.spotify-bar{justify-content:flex-start;flex:1 1 100%}.spotify-bar button,.connection-pill{width:auto}.workspace{display:flex;flex-direction:column}.workspace>*{width:100%}.stage{order:0;min-height:0}.setup-panel{order:1}.score-panel{order:2;display:grid;grid-template-columns:1fr}.buzz-board{border-right:0;border-bottom:1px solid var(--line);padding:0 0 16px}.now-playing img{width:min(200px,50vw)}.huge{grid-column:1/-1}.controls{grid-template-columns:repeat(2,minmax(0,1fr))}.join-screen,.buzzer-screen{padding:22px}}

/* Reglas y selección de playlist desde la barra superior. */
.workspace{grid-template-columns:minmax(0,1fr) minmax(250px,310px)}
.playlist-modal{position:fixed;inset:0;z-index:55;display:grid;place-items:center;padding:20px;background:#01215abf}
.playlist-modal-card{width:min(100%,840px);max-height:min(82vh,760px);display:flex;flex-direction:column;gap:14px;padding:24px;background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:0 24px 70px #00163340}
.playlist-modal-head{display:flex;align-items:center;justify-content:space-between;gap:20px}.playlist-modal-head h2{margin:0;font-size:1.5rem}.playlist-modal-head .eyebrow{margin-bottom:4px}.playlist-modal-head button{width:42px;min-height:42px;font-size:1.1rem}.playlist-modal-actions{display:flex;justify-content:flex-end}.playlist-modal-actions button{padding:0 14px;min-height:38px}.playlist-modal .playlist-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:12px;max-height:none;overflow-y:auto;padding:2px 4px 4px 2px}.playlist-modal .playlist-card{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:10px;min-width:0;text-align:left}.playlist-modal .playlist-card img,.playlist-modal .playlist-cover-placeholder{width:100%;aspect-ratio:1;object-fit:cover}.playlist-modal .playlist-card span{white-space:normal;overflow-wrap:anywhere;line-height:1.3}.playlist-modal .playlist-grid>.muted{grid-column:1/-1}
@media(max-width:1100px){.workspace{grid-template-columns:minmax(0,1fr) minmax(250px,310px)}.score-panel{grid-column:auto;grid-template-columns:1fr}.buzz-board{border-right:0;border-bottom:1px solid var(--line);padding:0 0 16px}}
@media(max-width:700px){.workspace{display:flex;flex-direction:column}.playlist-modal{padding:12px}.playlist-modal-card{padding:18px;max-height:85vh}.playlist-modal .playlist-grid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px}.spotify-bar button{flex:0 1 auto}}

/* Acciones de la barra y paneles de partida. */
.topbar-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.topbar-actions button{min-height:42px;padding:0 14px}
.spotify-bar{flex:0 1 auto;margin-left:auto}
.workspace{grid-template-columns:minmax(0,1fr) minmax(220px,270px) minmax(220px,270px)}
.buzz-panel,.score-panel{min-width:0}
.buzz-panel h2,.score-panel h2{font-size:1.1rem;letter-spacing:-.02em}
.buzz-panel .buzz-board{border:0;padding:0}
.score-panel{grid-column:auto;grid-template-columns:1fr}
@media(max-width:1100px){.workspace{grid-template-columns:repeat(2,minmax(0,1fr))}.stage{grid-column:1/-1}.buzz-panel,.score-panel{grid-column:auto}.topbar-actions{order:1}.spotify-bar{order:2}}
@media(max-width:700px){.topbar-actions{width:100%;order:1}.spotify-bar{width:100%;order:2;justify-content:flex-end}.workspace{display:flex;flex-direction:column}.stage{order:0}.buzz-panel{order:1}.score-panel{order:2}.workspace>*{width:100%}}

/* Las reglas se mantienen legibles también en pantallas pequeñas. */
.rules-card{width:min(100%,680px);max-height:calc(100dvh - 48px);overflow-y:auto;padding:clamp(24px,4vw,34px)}
.rules-controls{display:grid;gap:12px;padding-top:4px}.rules-controls p{display:grid;gap:4px;margin:0;color:var(--muted);font-size:.95rem;line-height:1.45}.rules-controls strong{color:var(--text);font-size:1rem}

/* Control y colores del modo oscuro. */
.theme-toggle{display:inline-grid;place-items:center;width:42px;min-width:42px;padding:0!important}
.theme-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.theme-sun{display:none}.theme-moon{display:block}
html[data-theme="dark"]{color-scheme:dark;--bg:#07182f;--panel:#102a4a;--panel-2:#17365b;--text:#E0F6FE;--muted:#b4c6d9;--line:#34516e;--accent:#E0F6FE;--accent-2:#71E5FE;--pink:#D4A6FC;--ink:#07182f;--success:#80e1bd;--danger:#ffb3ba;--surface:#102a4a}
html[data-theme="dark"] .theme-sun{display:block}html[data-theme="dark"] .theme-moon{display:none}
html[data-theme="dark"] button{background:#17365b;color:var(--text);border-color:var(--line)}
html[data-theme="dark"] button:hover{background:#23456b;border-color:#71E5FE}
html[data-theme="dark"] button.primary,html[data-theme="dark"] .huge{background:#E0F6FE;color:#01215A;border-color:#E0F6FE}
html[data-theme="dark"] button.primary:hover,html[data-theme="dark"] .huge:hover{background:#c7edfa}
html[data-theme="dark"] button.danger{color:var(--danger)}
html[data-theme="dark"] .topbar,html[data-theme="dark"] .panel,html[data-theme="dark"] .stage,html[data-theme="dark"] .playlist-modal-card,html[data-theme="dark"] .rules-card,html[data-theme="dark"] .winner-card,html[data-theme="dark"] .welcome-card{background:#102a4a;border-color:var(--line);color:var(--text)}
html[data-theme="dark"] .session-info,html[data-theme="dark"] .header-qr img{border-color:var(--line)}
html[data-theme="dark"] .header-qr img{background:#fff}
html[data-theme="dark"] .connection-pill,html[data-theme="dark"] .status,html[data-theme="dark"] .playlist-card,html[data-theme="dark"] .buzz-item,html[data-theme="dark"] .score-row{background:#17365b;border-color:var(--line)}
html[data-theme="dark"] .status.connected{background:#143d38;color:#80e1bd}html[data-theme="dark"] .status.disconnected{background:#492c3a;color:#ffb3ba}
html[data-theme="dark"] .playlist-card:hover{background:#23456b}
html[data-theme="dark"] .playlist-banner,html[data-theme="dark"] .review-popup{background:#173b5d;color:var(--text);border-color:var(--line)}
html[data-theme="dark"] .answer-hidden h2,html[data-theme="dark"] .answer-hidden p,html[data-theme="dark"] .now-playing p{color:var(--muted)}
html[data-theme="dark"] .meter-track{background:#2a4563}html[data-theme="dark"] .meter-track span{background:#D4A6FC}
html[data-theme="dark"] .controls button.primary:not(.huge){background:#244967;color:var(--text);border-color:#436381}
html[data-theme="dark"] .golden-vote-panel,html[data-theme="dark"] .golden-goal-banner,html[data-theme="dark"] #goldenGoal{background:#534722;color:#ffe4a0;border-color:#8c7840}
html[data-theme="dark"] .golden-vote-panel.approved,html[data-theme="dark"] .score-row.winner{background:#173e3a;color:#80e1bd;border-color:#397a66}
html[data-theme="dark"] .golden-vote-panel.rejected,html[data-theme="dark"] .continue-warning,html[data-theme="dark"] #continueSong.pause-mode,html[data-theme="dark"] #playFullSong.pause-mode{background:#492c3a;color:#ffd3d8;border-color:#975d6a}
html[data-theme="dark"] .score-action.positive{background:#173e3a;color:#80e1bd;border-color:#397a66}html[data-theme="dark"] .score-action.negative{background:#492c3a;color:#ffd3d8;border-color:#975d6a}
html[data-theme="dark"] .manual-timer{background:#E0F6FE;border-color:#71E5FE;color:#01215A}
