.music-player{width:min(480px,100%);margin:22px auto 0;padding:12px 16px 10px;border:1px solid #8fd6ec70;border-radius:18px;background:#052652bd;box-shadow:0 8px 30px #001c3a45;position:relative;z-index:4}
.music-main{display:flex;align-items:center;gap:13px}.song-toggle{border:1px solid #c4f6ffaf;border-radius:30px;background:linear-gradient(145deg,#06bbd5,#087cb8);padding:9px 18px;font-size:14px;font-weight:bold;white-space:nowrap;box-shadow:0 3px 12px #00b7e44d}.music-title{display:flex;gap:2px;flex-direction:column;font-size:13px}.music-title span{font-size:11px;color:#b9dbe8;letter-spacing:.05em}.song-seek-label{display:block;height:17px;margin-top:4px}.song-seek-label input{width:100%;height:4px;accent-color:#82efff}.song-adjust{margin-top:5px;color:#b6d5e5;font-size:11px}.song-adjust summary{cursor:pointer}.song-adjust p{line-height:1.5;margin:8px 0}.song-adjust-controls{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:7px 0}.song-adjust-controls button{flex-shrink:0;border:1px solid #a9dce881;background:#0a3d68;border-radius:8px;padding:6px 8px;font-size:11px}.song-adjust-controls span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}.song-lyric-scene{position:fixed;z-index:1;inset:0;overflow:hidden;pointer-events:none;perspective:650px;display:grid;place-items:center}.song-lyric-plane{width:min(85vw,850px);height:110px;display:flex;align-items:center;justify-content:center;opacity:0;will-change:transform,opacity;filter:drop-shadow(0 0 5px #38dbff) drop-shadow(0 0 14px #008de5)}.song-lyric-plane img{display:block;max-width:100%;max-height:100px;width:auto;height:auto}.song-lyric-scene.active .song-lyric-plane{opacity:.85}.song-lyric-scene.active~.app-shell .search-section{position:relative}
@media(max-width:600px){.music-player{margin-top:15px;padding:9px 13px}.music-title{font-size:12px}.song-lyric-scene{align-items:center}.song-lyric-plane{width:88vw;height:65px}.song-lyric-plane img{max-height:60px}}
.song-lyric-scene{z-index:3;align-items:end;padding-bottom:13svh}.song-lyric-plane{min-height:90px}.song-lyric-scene img{width:100%;height:auto;max-height:90px;object-fit:contain}
@media(max-width:600px){.song-lyric-scene{align-items:end;padding-bottom:15svh}.song-lyric-plane{min-height:60px}.song-lyric-scene img{max-height:60px}}

/* Keep outlines crisp against the background without enlarging the text layer. */
.song-lyric-plane{filter:drop-shadow(0 0 2px #3bbde6);will-change:width,transform,opacity}.song-lyric-scene img{width:100%;height:auto;max-height:80px;object-fit:contain}

.song-export{border:1px solid #a9dce881;background:#0a3d68;border-radius:8px;padding:6px 8px;font-size:11px}.song-export-data{display:block;width:100%;min-height:110px;margin-top:8px;padding:8px;border:1px solid #91c5df;border-radius:8px;background:#061d40;color:#e3f7ff;font:12px monospace}

/* A compact song control alongside the language selector. */
.theme-song-button{position:absolute;right:128px;top:-48px;z-index:4;min-height:27px;padding:5px 10px;border:1px solid #87c8e1;border-radius:22px;background:#092b5bd9;color:#d8f5ff;font-size:11px;line-height:1.2;white-space:nowrap;cursor:pointer}
.theme-song-button:hover,.theme-song-button:focus-visible{background:#154878;color:#fff}
.song-lyric-scene{display:block;padding:0;perspective:none}
#song-lyric-canvas{display:block;width:100%;height:100%}
@media(max-width:600px){.theme-song-button{top:-43px;right:118px;padding:5px 9px}}

/* Show the song inside the search field without intercepting input. */
.search-input-wrap .search-lyric-canvas{position:absolute;inset:0;display:block;width:100%;height:100%;pointer-events:none;z-index:2}
.search-input-wrap.song-lyrics-active .search-placeholder{visibility:hidden!important}

/* Match the language selector and animate the three sound waves. */
.theme-song-button{height:29px;min-height:29px;display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:0 9px;font:600 11px/1.2 Arial,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif}
.theme-song-button .song-waves{width:12px;height:14px;display:block;overflow:visible;flex:none}.theme-song-button .song-waves path{fill:none;stroke:currentColor;stroke-width:.6;stroke-linecap:round;opacity:.24;animation:song-wave-light 1.05s ease-in-out infinite}.theme-song-button .song-waves path:nth-child(2){animation-delay:.15s}.theme-song-button .song-waves path:nth-child(3){animation-delay:.30s}.theme-song-button .song-play-icon{font-size:10px;line-height:1}
@keyframes song-wave-light{0%,30%,100%{opacity:.22}12%,22%{opacity:1}}
@media (prefers-reduced-motion:reduce){.theme-song-button .song-waves path{animation:none;opacity:1}}

/* Stable dimensions when language or playback state changes. */
.theme-song-button{width:114px;min-width:114px;max-width:114px;box-sizing:border-box}

/* Grade links sit just above the copyright at the bottom of the page. */
.app-shell > .grade-navigation{width:min(580px,calc(100% - 40px));margin:0 auto 24px;flex:none}
@media(max-width:400px){.app-shell > .grade-navigation{width:calc(100% - 32px);margin-bottom:20px}}

/* Halve the top space above both controls on portrait phones. */
@media (max-width:600px) and (orientation:portrait){.brand-heading .top-language,.brand-heading .theme-song-button{top:calc(-21.5px - clamp(38.5px,7svh,65px))}}
