/* Dedicated singing view: preserve the existing media and timed lyrics. */
#karaoke-focus-toggle { background:#ffcc00!important;color:#142033!important;font-weight:700; }
#karaoke-focus-exit { display:none; }
body.karaoke-focus { overflow:hidden!important; }
body.karaoke-focus #karaoke-panel { display:none!important; }
body.karaoke-focus .karaoke-focus-stage {
 position:fixed!important; inset:0!important; z-index:2147483647!important;
 box-sizing:border-box!important; width:100vw!important; height:100vh!important; height:100dvh!important;
 max-width:none!important; max-height:none!important; margin:0!important;
 padding:clamp(12px,2vw,28px)!important; padding-top:56px!important;
 display:flex!important; flex-direction:column!important; align-items:center!important; justify-content:flex-start!important;
 gap:6px!important; overflow:auto!important; border:0!important; border-radius:0!important;
 background:#101827!important; color:#fff!important; transform:none!important;
}
body.karaoke-focus .karaoke-focus-stage > :not(video):not(.karaoke-display):not(#karaoke-focus-exit) { display:none!important; }
body.karaoke-focus .karaoke-focus-stage > video {
 display:block!important; flex:0 0 auto!important; min-height:0!important; width:auto!important;
 height:auto!important; max-width:100%!important; max-height:60vh!important; max-height:60dvh!important; margin:0!important;
 aspect-ratio:auto!important; object-fit:contain!important; background:#101827!important;
}
body.karaoke-focus .karaoke-focus-stage > .karaoke-display {
 display:grid!important; flex:0 0 auto!important; box-sizing:border-box!important;
 width:100%!important; max-width:1300px!important; min-height:0!important; height:auto!important;
 margin:0!important; padding:clamp(10px,2vw,24px)!important; gap:8px!important;
}
body.karaoke-focus .karaoke-display .sing-now { font-size:clamp(25px,4.4vw,62px)!important; line-height:1.16!important; }
body.karaoke-focus .karaoke-display .sing-next { font-size:clamp(18px,2.8vw,38px)!important; line-height:1.2!important; }
body.karaoke-focus #karaoke-focus-exit {
 display:block!important; position:absolute!important; top:10px!important; right:14px!important; z-index:2!important;
 color:#142033!important; background:#ffcc00!important; border:0!important; border-radius:9px!important;
 padding:10px 15px!important; font:700 15px system-ui,sans-serif!important; cursor:pointer;
}
/* Keep the visible picture and the lyrics together, without a tall letterbox. */
@media (max-width:700px) and (orientation:portrait) {
 body.karaoke-focus .karaoke-focus-stage {
  padding:6px!important; padding-top:calc(48px + env(safe-area-inset-top, 0px))!important;
  gap:4px!important;
 }
 body.karaoke-focus .karaoke-focus-stage > video {
  max-height:52vh!important; max-height:52dvh!important;
 }
 body.karaoke-focus .karaoke-focus-stage > .karaoke-display {
  padding:10px 8px!important;
 }
 body.karaoke-focus #karaoke-focus-exit { top:calc(5px + env(safe-area-inset-top, 0px))!important; right:8px!important; }
}
@media (orientation:landscape) and (max-height:520px) {
 body.karaoke-focus .karaoke-focus-stage { gap:4px!important; padding:4px!important; padding-top:44px!important; }
 body.karaoke-focus .karaoke-focus-stage > video { max-height:48vh!important; max-height:48dvh!important; }
 body.karaoke-focus .karaoke-focus-stage > .karaoke-display { padding:6px!important; gap:3px!important; }
 body.karaoke-focus .karaoke-display .sing-now { font-size:clamp(20px,3.8vh,30px)!important; }
 body.karaoke-focus .karaoke-display .sing-next { font-size:clamp(15px,3vh,22px)!important; }
 body.karaoke-focus .karaoke-display .sing-caption { display:none!important; }
}

/* Two persistent mode links; keep the return control at the far right. */
#cancons-banner #karaoke-toggle[hidden]{display:none!important}
#cancons-banner .mode-nav{margin-left:auto;display:flex;align-items:center;gap:8px;background:none;padding:0;border:0;white-space:nowrap}
#cancons-banner .mode-nav .mode-link{display:inline-flex;justify-content:center;align-items:center;min-height:38px;padding:7px 14px;border-radius:8px;border:1px solid #52647a;background:#263649;color:#f6f8fb;text-decoration:none;font-weight:700}
#cancons-banner .mode-nav .mode-link[aria-current=true]{background:#ffdc56;color:#17202b;border-color:#ffdc56}
#cancons-banner .mode-nav .mode-link:hover{border-color:#ffdc56}
#cancons-banner .return-cancons{display:inline-flex;align-items:center;justify-content:center;flex:none;width:38px;height:38px;color:#ffdc56;text-decoration:none;border:1px solid #52647a;border-radius:8px;background:#263649}
#cancons-banner .return-cancons:hover{border-color:#ffdc56;background:#344a61}
.song-player-title{display:block!important;flex:0 0 auto;width:100%;text-align:center;font:700 clamp(17px,2.1vw,24px)/1.24 Quicksand,system-ui,sans-serif!important;color:#ffdc56!important;margin:0 0 6px!important;padding:0!important;overflow-wrap:anywhere}
body.karaoke-focus .song-player-title{display:none!important}
@media(max-width:530px){#cancons-banner{flex-wrap:nowrap;gap:7px;padding:9px 10px}#cancons-banner .mode-nav{gap:5px}#cancons-banner .mode-nav .mode-link{font-size:12px;padding:6px 8px;min-height:33px}#cancons-banner img{width:32px}}
@media(max-width:430px){#cancons-banner{gap:5px;padding:8px 7px;font-size:12px}#cancons-banner img{width:28px}#cancons-banner .mode-nav{gap:4px}#cancons-banner .mode-nav .mode-link{padding:5px 6px;font-size:11px}#cancons-banner .return-cancons{width:32px;height:33px}}
@media(max-width:800px){.song-player-title{font-size:17px!important;margin-bottom:4px!important}}
@media(max-height:500px) and (orientation:landscape){.song-player-title{font-size:15px!important;margin-bottom:3px!important}}

/* Compact karaoke controls */
#karaoke-panel{padding-top:0}
#karaoke-panel .card{padding:14px 16px;margin-bottom:11px}
#karaoke-panel .transport-card{padding:7px 10px;background:#101a28}
#karaoke-panel .transport-bar{display:flex;align-items:center;gap:8px;min-width:0}
#karaoke-panel .transport-icon{font:700 20px/1 system-ui,sans-serif;width:35px;height:35px;min-height:35px;flex:none;padding:0;margin:0;border-radius:7px}
#karaoke-panel #karaoke-focus-toggle{margin-left:0;background:#263649!important;color:#ffdc56!important;border:1px solid #52647a}
#karaoke-panel #karaoke-progress{flex:1;min-width:42px;width:auto;margin:0}
#karaoke-panel #karaoke-time{font-size:12px;white-space:nowrap;flex:none}
#karaoke-panel #karaoke-status:empty{display:none}
#karaoke-panel .tune-card h3,#karaoke-panel .singalong-card h3{font-size:20px;margin:0 0 10px;font-weight:700;color:#ffdc56}
#karaoke-panel .tune-control label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:15px;margin:0 0 6px;color:#f6f8fb}
#karaoke-panel .control-value{color:#ffdc56;font-size:13px;font-weight:700;white-space:nowrap}
#karaoke-panel .tune-control input[type=range]{margin:0;display:block;height:18px}
#karaoke-panel .pitch-control{background:#111b29;border:1px solid #34465a;border-radius:10px;padding:11px 12px;margin:0 0 9px}
#karaoke-panel .pitch-presets{margin-top:6px;gap:6px}
#karaoke-panel .pitch-presets button{min-height:29px;padding:4px 10px;margin:0;font-size:13px}
#karaoke-panel #karaoke-pitch-note{font-size:11px;margin:6px 0 0}
#karaoke-panel .tune-grid,#karaoke-panel .record-balance{display:grid;grid-template-columns:1fr 1fr;gap:10px}
#karaoke-panel .tune-grid .tune-control,#karaoke-panel .record-balance .tune-control{background:#111b29;border:1px solid #34465a;border-radius:10px;padding:10px 12px;min-width:0}
#karaoke-panel .tune-grid select{max-width:none;height:38px}
#karaoke-panel .sync-adjust{font-size:13px;color:#b9c6d7;margin-top:9px;padding-top:8px;border-top:1px solid #34465a}
#karaoke-panel .sync-adjust summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;font-weight:600}
#karaoke-panel .sync-adjust summary:before{content:'▸';margin-right:7px}
#karaoke-panel .sync-adjust[open] summary:before{content:'▾'}
#karaoke-panel .sync-adjust summary span{margin-left:auto;color:#ffdc56}
#karaoke-panel .sync-adjust input{margin-top:8px}
#karaoke-panel .singalong-card{border:1px solid #ffdc5688;box-shadow:inset 4px 0 #ffdc56,0 5px 18px #0002;background:linear-gradient(140deg,#202e40,#172433)}
#karaoke-panel .singalong-card h3{display:flex;gap:8px;align-items:center;margin-bottom:4px}
#karaoke-panel .singalong-note{margin-bottom:10px}
#karaoke-panel .rec-controls{margin-top:9px;gap:8px}
#karaoke-panel .rec-controls button{margin:0;padding:8px 14px}
#karaoke-panel #rec-start{min-height:38px}
#karaoke-panel #rec-status{margin:8px 0 0;font-size:12px}
#karaoke-panel .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(max-width:450px){#karaoke-panel .card{padding:11px;margin-bottom:8px}#karaoke-panel .transport-card{padding:7px}#karaoke-panel .transport-bar{gap:5px}#karaoke-panel .transport-icon{width:31px;height:32px;min-height:32px}#karaoke-panel #karaoke-time{font-size:10px}#karaoke-panel .tune-grid,#karaoke-panel .record-balance{gap:6px}#karaoke-panel .tune-grid .tune-control,#karaoke-panel .record-balance .tune-control{padding:8px}#karaoke-panel .tune-control label{font-size:13px}#karaoke-panel .control-value{font-size:12px}}
