.player-video>#dash-video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#000}
#dash-video{outline:none;cursor:pointer}
.video-toggle{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:2;width:76px;height:76px;min-width:60px;min-height:60px;border-radius:50%;display:grid;place-items:center;background:#101c2cba;color:#fff;border:1px solid #ffffff70;box-shadow:0 4px 24px #0005;font-size:34px;line-height:1;touch-action:manipulation;cursor:pointer}
.video-toggle:hover{background:#162a41e6}.video-toggle:focus-visible{outline:3px solid #7dd3fc;outline-offset:5px}
.video-loading{position:absolute;left:50%;top:50%;width:38px;height:38px;margin:-19px 0 0 -19px;border:3px solid #ffffff40;border-top-color:#fff;border-radius:50%;animation:demo-spin .9s linear infinite;pointer-events:none}
.video-toggle[hidden],.video-loading[hidden]{display:none}
@keyframes demo-spin{to{transform:rotate(360deg)}}
@media(max-width:720px), (height:662px){.video-toggle{width:64px;height:64px;font-size:29px}}
@media(max-width:400px){.brand{font-size:14px;letter-spacing:.5px}}
@media(prefers-reduced-motion:reduce){.video-loading{animation-duration:2s}}
/* The video keeps its own aspect ratio; short browser windows use all available height. */
#player-panel .player-video{height:56.25vw;padding-bottom:0;max-height:75vh;max-height:75dvh;min-height:0}
#player-panel.video-layout-ready .player-video{max-height:none}
#player-panel.compact-video-viewport{display:flex;flex-direction:column}
#player-panel.compact-video-viewport>.player-stage{order:0;flex:none}
#player-panel.compact-video-viewport>.player-toolbar{order:1;flex:none;min-height:56px}
#player-panel.compact-video-viewport>.related-section{order:2;flex:none;width:100%}
#player-panel.compact-video-viewport #close-player{position:fixed;top:8px;right:8px;top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));z-index:5;background:#111827b8;color:#e5edf5;border:1px solid #ffffff40;box-shadow:0 2px 10px #0004}
@media(max-height:662px){#player-panel:not(.video-layout-ready) .player-video{max-height:100vh;max-height:100dvh}}
/* Shared rhythm and icons across Safari, Chrome and Firefox. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-bottom:16px}
body{background:#edf4f9;background:radial-gradient(ellipse at 50% 0,#f8fcff 0,#edf4f9 70%)}
.icon-sprite{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
.ui-icon{display:block;width:24px;height:24px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
button .ui-icon{pointer-events:none}
.site-header{background:linear-gradient(110deg,#d9efff 0%,#e9f8ff 55%,#d8f4ee 100%);border-bottom:2px solid #8ccadf;box-shadow:0 3px 14px #16658b12}
.header-inner{padding-left:max(32px,env(safe-area-inset-left));padding-right:max(32px,env(safe-area-inset-right))}
.brand{letter-spacing:1px;font-size:22px;color:#075f8f}
.header-greeting{height:auto;min-height:36px;max-width:80%;padding:5px 12px;border:1px solid #afd4e5;border-radius:10px;background:#ffffffb8;color:#245875;font-weight:550}.header-greeting:hover{background:#fff;border-color:#6db9d5}.header-greeting .edit-name{color:#187da3}
main{padding-bottom:max(12px,env(safe-area-inset-bottom))}
.content-section{padding-top:22px}
#search-form{border-radius:14px;border-color:#c5d8e7;min-height:60px;box-shadow:0 4px 18px #29557906}
.search-form>span{display:grid;place-items:center}
#search-form>span .ui-icon{width:23px;height:23px}
#chips{display:flex;background:#e1ecf4;border:1px solid #d3e1ec;border-radius:13px;padding:4px;gap:4px;width:100%;max-width:550px;margin:16px 0 12px}
#chips button{max-width:none;min-height:42px;border:0;border-radius:9px;background:transparent;color:#536d80;font-weight:600;box-shadow:none}
#chips button.active{background:#087ead;color:#fff;box-shadow:0 3px 9px #087ead26}
.results-toolbar{margin:8px 0 10px;min-height:28px}
#songs{background:transparent;border:0;border-radius:0;overflow:visible}
.table-heading{padding-left:16px;padding-right:16px;color:#627e91;font-size:10px}
.song{padding:14px 16px;margin-bottom:9px;border:1px solid #dbe6ee;border-radius:14px;background:#fff;min-height:114px;box-shadow:0 2px 6px #2e506503}
.song:last-child{border-bottom:1px solid #dbe6ee}
.song.current{background:#eaf6fd;border-color:#9fcee6;box-shadow:inset 3px 0 #1685b2}
.song-main{gap:18px}
.song-main img{width:112px;height:82px;border:0;border-radius:10px;background:#e0ebf2}
.song-title{font-size:17px;font-weight:600;line-height:1.45;max-height:2.9em}
.song-artist{color:#6b7f90;font-size:13px;margin-top:6px}
.song-index{font-variant-numeric:tabular-nums;color:#7790a0}
.song-actions .icon-button{background:#f3f7fa;border-radius:50%;color:#748b9c}
.song-actions .icon-button.liked{background:#fff0f3;color:#c95271}
.song-actions .icon-button.liked .ui-icon,.related-song [aria-pressed="true"] .ui-icon,#playing-favorite[aria-pressed="true"] .ui-icon{fill:currentColor}
.song-actions .ui-icon,.related-song .ui-icon{width:22px;height:22px}
.empty{background:#fff;border:1px dashed #c9dae7;border-radius:14px;padding:40px 20px}
.empty strong{font-size:19px;line-height:1.5;margin-bottom:6px}
.loading{margin-left:0;margin-right:0;height:110px;border-radius:14px}
footer{justify-content:center;flex-wrap:wrap;line-height:1.6;text-align:center;color:#7a8e9e;padding-top:22px}
#player-panel:not(.compact-video-viewport) .player-toolbar{background:#111b2b;border-bottom:1px solid #26354a;padding:10px max(16px,env(safe-area-inset-right)) 10px max(16px,env(safe-area-inset-left))}
#player-panel:not(.compact-video-viewport) .player-toolbar .search-form{max-width:1000px;margin-left:auto;margin-right:auto;border-radius:12px}
#player-panel:not(.compact-video-viewport) .now-playing{max-width:1100px;margin:0 auto;padding:16px 24px 18px}
#player-panel:not(.compact-video-viewport) #playing-title{font-size:17px;line-height:1.45}
#player-panel:not(.compact-video-viewport) #playing-artist{font-size:13px;color:#a5b8ce}
#player-panel:not(.compact-video-viewport) .player-controls .icon-button{background:#1e2e42;border:1px solid #32445a;border-radius:50%}
#player-panel:not(.compact-video-viewport) .play-control{width:54px;height:54px;display:grid;place-items:center;box-shadow:0 3px 16px #10b98125}
.player-controls .ui-icon{width:23px;height:23px}
.play-control .ui-icon{width:25px;height:25px;margin:auto}
.video-toggle .ui-icon{width:34px;height:34px}
.video-toggle{display:grid;place-items:center;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}
#player-panel:not(.compact-video-viewport) #playing-favorite{background:#1e2e42;border:1px solid #32445a;border-radius:50%}
#player-panel:not(.compact-video-viewport) #playing-favorite[aria-pressed="true"]{background:#432b3c;border-color:#785268;color:#ffa7c0}
#playing-favorite .ui-icon{width:23px;height:23px}
#player-panel #seek{-webkit-appearance:none;appearance:none;display:block;padding:0;margin:0;height:28px;min-height:28px;background:linear-gradient(to right,#39cba3 var(--seek-progress,0%),#455368 var(--seek-progress,0%)) center/100% 4px no-repeat;touch-action:pan-y;cursor:pointer;border-radius:0}
#seek::-webkit-slider-runnable-track{height:4px;background:transparent;border:0;border-radius:4px}
#seek::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;margin-top:-6px;border-radius:50%;border:2px solid #d7fff2;background:#37cba1;box-shadow:0 0 0 3px #37cba11a}
#seek::-moz-range-track{height:4px;background:transparent;border:0;border-radius:4px}
#seek::-moz-range-thumb{width:13px;height:13px;border-radius:50%;border:2px solid #d7fff2;background:#37cba1;box-shadow:0 0 0 3px #37cba11a}
.seek-bar{gap:14px;font-size:12px;color:#aabdd2}
.show-related{display:flex;align-items:center;justify-content:center;gap:6px;font-size:12px;letter-spacing:.1px}
.show-related .ui-icon{width:17px;height:17px}
.related-section{padding-top:24px}
.related-heading{padding-bottom:16px}.related-heading h2{font-size:22px;color:#274b65;letter-spacing:-.4px}
#related-songs{border-radius:16px;border-color:#d8e5ee;box-shadow:0 4px 20px #2a527008}
.related-song{padding:14px 16px;border-color:#e5edf3}
.related-song .song-main img{border:0;border-radius:10px}
.related-song .icon-button{border-radius:50%;background:#f3f7fa}
.related-song .icon-button[aria-pressed="true"]{background:#fff0f3;color:#c95271}
#dialog-submit{border-radius:10px}
#dialog-content input{border-radius:10px}
@media(hover:hover) and (pointer:fine){.song:not(.current):hover{background:#f7fbfe;border-color:#bdd7e7;box-shadow:0 3px 12px #31557309}.song-actions .icon-button:hover,.related-song .icon-button:hover{background:#e4f2fa}.related-song:hover{background:#f7fbfe}}
@media(min-width:1500px){main{max-width:1240px}.header-inner{max-width:1488px}#player-panel:not(.compact-video-viewport) .now-playing{max-width:1200px}}
@media(max-width:720px), (height:662px){
.header-inner{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right));gap:10px}.brand{font-size:18px}.header-greeting{font-size:12px;min-height:34px;padding:4px 9px}
main{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
.content-section{padding-top:16px}#search-form{min-height:56px;padding-left:12px}#search-form button{padding-left:14px;padding-right:14px;font-size:12px}#search-form input{font-size:16px}
#chips{max-width:none;margin-top:12px}#chips button{font-size:14px;min-height:42px}
.song{padding:12px 10px;min-height:112px;gap:8px;border-radius:13px}.song-main{gap:12px}.song-main img{width:104px;height:80px}.song-title{font-size:17px;line-height:1.45}.song-artist{font-size:13px;margin-top:5px}
.song-actions .icon-button{min-width:44px;min-height:44px}.table-heading{padding-left:10px;padding-right:10px}.song-index{font-size:12px}
#player-panel:not(.compact-video-viewport) .now-playing{padding:14px 14px 16px}#player-panel:not(.compact-video-viewport) #playing-title{font-size:15px;line-height:1.4}
#player-panel:not(.compact-video-viewport) .player-toolbar{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));gap:8px}
.video-toggle .ui-icon{width:29px;height:29px}.related-heading h2{font-size:20px}.related-heading .muted{font-size:11px}
.related-song{padding:12px 10px;gap:10px}.related-song .song-main img{width:104px;height:80px}.related-section{padding-top:20px}.related-song .icon-button{min-width:44px;min-height:44px}
}
@media(max-width:400px){.brand{font-size:16px}.header-greeting{font-size:11px;padding:4px 7px}.song,.table-heading{grid-template-columns:minmax(0,1fr) 44px;gap:6px}.song-main{gap:10px}.song-main img,.related-song .song-main img{width:88px;height:68px}.song-title{font-size:16px}.song-artist{font-size:12px}.song{min-height:106px}.song-actions .ui-icon,.related-song .ui-icon{width:21px;height:21px}.related-heading .muted{font-size:10px}.related-heading h2{font-size:19px}.related-song{min-height:104px}}
@media(max-height:662px){.content-section{padding-top:12px}#chips{margin-top:10px;margin-bottom:8px}#chips button{min-height:36px;padding-top:6px;padding-bottom:6px}}
@supports not (backdrop-filter:blur(1px)){.video-toggle{background:#15263ce6}}
@media(prefers-reduced-motion:reduce){.song,.icon-button,.video-toggle{transition:none}}
#player-panel #seek{height:44px;min-height:44px}
#seek::-moz-range-progress{height:4px;background:transparent}
/* Search sits after playback controls and before the related tracks. */
#player-panel #close-player{position:absolute;top:8px;right:8px;z-index:5;min-width:44px;min-height:44px;background:#111827b8;color:#e5edf5;border:1px solid #ffffff40;box-shadow:0 2px 10px #0004}
#player-panel:not(.compact-video-viewport)>.player-toolbar,#player-panel.compact-video-viewport>.player-toolbar{width:100%;max-width:1160px;margin:0 auto;background:transparent;border:0;padding:18px 16px 0;gap:0;min-height:70px}
#player-panel:not(.compact-video-viewport)>.player-toolbar .search-form,#player-panel.compact-video-viewport>.player-toolbar .search-form{max-width:none;margin:0;flex:1;background:#fff;border-color:#bdcfdb;border-radius:12px;box-shadow:0 2px 10px #24486b05;padding:5px 6px 5px 14px}
#player-panel .player-toolbar input{color:#243447}
#player-panel .player-toolbar input::placeholder{color:#64748b}
#player-panel .player-toolbar .search-form button{background:#077dae;color:#fff}
#player-panel .player-toolbar .search-form button:hover{background:#066b96}
@media(max-width:720px), (height:662px){#player-panel:not(.compact-video-viewport)>.player-toolbar,#player-panel.compact-video-viewport>.player-toolbar{padding-left:12px;padding-right:12px;padding-top:14px}}
/* Voice and clear controls stay reachable without opening the keyboard. */
#search-form,#player-search-form{gap:7px}
#search-form .voice-button,#player-search-form .voice-button,#search-form .search-clear,#player-search-form .search-clear{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:0;border-radius:9px;box-shadow:none;background:#e9f4fa;color:#187ca5}
#search-form .search-clear,#player-search-form .search-clear{background:transparent;color:#6a8093}
#search-form .search-clear:hover,#player-search-form .search-clear:hover{background:#edf3f7}
#search-form .voice-button[aria-disabled="true"],#player-search-form .voice-button[aria-disabled="true"]{color:#8293a0;background:#f0f4f7}
#search-form.is-listening .voice-button,#player-search-form.is-listening .voice-button{background:#ffecf0;color:#b34361;box-shadow:0 0 0 3px #e698aa30}
.voice-button .ui-icon{width:21px;height:21px}.search-clear .ui-icon{width:18px;height:18px}
.search-form input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
.search-form input::-ms-clear{display:none}
#search-form .search-clear[hidden],#player-search-form .search-clear[hidden],.voice-status[hidden]{display:none}
.voice-status{font-size:12px;line-height:1.6;color:#526d80;margin:7px 3px 0;overflow-wrap:anywhere}
#player-panel .player-toolbar{flex-direction:column;align-items:stretch}
#player-panel .player-toolbar .search-form{width:100%}
#player-search-voice-status{flex:0 0 auto;width:100%;margin:6px 0 0}
@media(max-width:400px){#search-form,#player-search-form{gap:4px}#search-form .voice-button,#player-search-form .voice-button{flex-basis:40px;width:40px;min-width:40px}#search-form .search-clear,#player-search-form .search-clear{flex-basis:36px;width:36px;min-width:36px}#search-form>button[type="submit"],#player-search-form>button[type="submit"]{padding-left:10px;padding-right:10px;font-size:12px}}

#voice-capture{width:min(90%,440px);margin:auto;padding:24px;text-align:center;background:#111827;color:#fff;border:1px solid #475569;border-radius:18px}
#voice-capture::backdrop{background:#000d;backdrop-filter:blur(5px)}
#voice-capture [data-transcript]{min-height:52px;margin:18px 0;padding:12px;background:#1e293b;color:#67e8f9;border-radius:12px;overflow-wrap:anywhere}
#voice-capture button{min-height:44px;padding:8px 16px;border-radius:10px;background:#334155;color:#fff}
body:has(#voice-capture) :is(#search-form,#player-search-form) .voice-button{color:#b91c1c;background:#fee2e2;border:1px solid #fca5a5}
body:has(#voice-capture) :is(#search-form,#player-search-form).is-listening .voice-button{color:white;background:#b91c1c}
body:has(#voice-capture) .voice-status:not([hidden]){position:fixed;z-index:95;top:max(12px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 24px);padding:10px 14px;border:1px solid #f87171;border-radius:12px;background:#111827;color:#fecaca;text-align:center}

body[data-version="1"] #player-panel .seek-bar,
body[data-version="1"] #toggle-play{display:none}
.video-fullscreen{position:absolute;z-index:3;right:8px;bottom:8px;min-width:44px;min-height:44px;color:#fff;background:#111827d9;border:1px solid #ffffff60;border-radius:10px}
.video-fullscreen:hover{background:#23334a}
#player-panel .player-video:fullscreen{width:100%;height:100%!important;max-height:none;background:#000}

.related-actions{display:flex;justify-content:flex-end;gap:4px}
.song-actions{justify-content:flex-end}
.playing-actions .icon-button[hidden]{display:none}
.song-actions .share-song,.related-actions .share-song{color:#087ead}
.related-actions .save-song[aria-pressed="true"]{color:#087ead;background:#e4f2fa}
@media(max-width:480px){
  .related-actions{gap:0}
}
