/* Persistent YouTube dock lives in the outer official site shell, alongside the BGM player. */
#ddPersistentVideo{position:fixed;z-index:2147482980;right:var(--dd-video-dock-right,max(14px,env(safe-area-inset-right)));bottom:var(--dd-video-dock-bottom,100px);width:min(var(--dd-video-dock-width,355px),calc(100vw - 28px));border:1px solid rgba(145,190,215,.6);border-radius:16px;background:#f1f7fb;color:#17314b;overflow:hidden;box-shadow:0 16px 48px rgba(4,17,35,.36);font:13px/1.5 "Noto Sans TC","Microsoft JhengHei",system-ui,sans-serif;box-sizing:border-box}
#ddPersistentVideo[hidden]{display:none!important}
#ddPersistentVideo *{box-sizing:border-box}
#ddPersistentVideo .dd-video-toolbar{display:flex;align-items:center;gap:8px;padding:7px 9px;min-height:43px;border-bottom:1px solid #bed4e2}
#ddPersistentVideo .dd-video-indicator{color:#0789b8;font-weight:900}
#ddPersistentVideo .dd-video-title{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:850;font-size:12px}
#ddPersistentVideo .dd-video-actions{display:flex;gap:5px;flex:none}
#ddPersistentVideo .dd-video-actions button{appearance:none;border:1px solid #bad0df;border-radius:8px;padding:5px 9px;background:#fff;color:#1d3954;font-size:11px;font-weight:800;line-height:1.4;cursor:pointer}
#ddPersistentVideo .dd-video-actions button.dd-video-toggle{background:#078ab5;color:#fff;border-color:#078ab5}
#ddPersistentVideo .dd-video-actions button:focus-visible,#ddPersistentVideo a:focus-visible{outline:3px solid #00a8d2;outline-offset:2px}
#ddPersistentVideo .dd-video-stage{aspect-ratio:16/9;width:100%;background:#080e17}
#ddPersistentVideo .dd-video-stage iframe{display:block;border:0;width:100%;height:100%}
#ddPersistentVideo .dd-video-footer{display:flex;flex-wrap:wrap;gap:4px;padding:6px 10px;color:#46677f;font-size:11px}
#ddPersistentVideo .dd-video-footer a{color:#0076a1;text-decoration:none;font-weight:800}
#ddPersistentVideo.dd-video-expanded{width:min(850px,calc(100vw - 28px),calc((100dvh - 95px)*1.77778));right:50%;bottom:50%;transform:translate(50%,50%);box-shadow:0 20px 72px rgba(0,0,0,.54)}
#ddPersistentVideo.dd-video-expanded .dd-video-stage{max-height:calc(100dvh - 120px);aspect-ratio:16/9}
#ddPersistentVideo.dd-video-expanded .dd-video-stage iframe{min-height:0}
:root[data-site-theme="dark"] #ddPersistentVideo{background:#15283a;color:#e6f5ff;border-color:#45657a}
:root[data-site-theme="dark"] #ddPersistentVideo .dd-video-toolbar{border-color:#365468}
:root[data-site-theme="dark"] #ddPersistentVideo .dd-video-actions button{background:#263d53;color:#eaf4fb;border-color:#47647a}
:root[data-site-theme="dark"] #ddPersistentVideo .dd-video-actions button.dd-video-toggle{background:#007da9;border-color:#007da9;color:#fff}
:root[data-site-theme="dark"] #ddPersistentVideo .dd-video-footer{color:#bad0df}
:root[data-site-theme="dark"] #ddPersistentVideo .dd-video-footer a{color:#7dd7f3}
@media(max-width:520px){#ddPersistentVideo{width:min(var(--dd-video-dock-width,300px),calc(100vw - 20px));right:var(--dd-video-dock-right,10px);border-radius:12px;bottom:var(--dd-video-dock-bottom,88px)}#ddPersistentVideo .dd-video-toolbar{min-height:38px;padding:5px 7px}#ddPersistentVideo .dd-video-actions button{font-size:10px;padding:5px 7px}#ddPersistentVideo .dd-video-footer{padding:4px 8px;font-size:10px}#ddPersistentVideo.dd-video-expanded{width:min(calc(100vw - 12px),calc((100dvh - 95px)*1.77778))}}
@media(max-height:480px){#ddPersistentVideo:not(.dd-video-expanded){width:min(255px,calc(100vw - 20px))}#ddPersistentVideo .dd-video-footer{display:none}}
@media(prefers-reduced-motion:reduce){#ddPersistentVideo{transition:none!important}}
