/* 慕寒的小窝 · 夜色编辑室 */
:root{--glass-bg:rgba(24,25,39,.85);--glass-border:rgba(220,216,255,.11);--glass-shadow:0 12px 45px #08091122;--text-main:#efedf6;--text-sub:#a7a6ba;--accent:#b8a5ed}
body{font-size:14px;background:#10111c}a{color:inherit}button,input,textarea{font:inherit}button,a,input,textarea{ -webkit-tap-highlight-color:transparent}a{text-decoration:none}:focus-visible{outline:2px solid #c5b0ff;outline-offset:5px}button:disabled{opacity:.5;cursor:wait}#bg::after{background:radial-gradient(ellipse at 65% 0%,#8060a51a,transparent 65%);filter:none}#topbar{position:relative;top:0;left:0;transform:none;min-width:0;width:100%;border-radius:0;border-width:0 0 1px;padding:0 max(28px,calc((100vw - 1320px)/2));height:86px;gap:8px;box-shadow:none;background:#13141fe8}.logo{font-size:19px;letter-spacing:2px;white-space:nowrap;margin-right:54px}.brand-mark{display:inline-grid;place-items:center;background:#b9a4e5;color:#252035;border-radius:12px;width:34px;height:34px;margin-right:10px}.nav-link{font-size:13px;padding:11px 18px;color:var(--text-sub);border-radius:8px}.nav-link.active{color:#d6c5ff;background:#b49ae914;border-color:#b49ae925}#userBox{gap:8px}#userBox .btn{font-size:12px;padding:8px 11px}.btn{border-radius:8px;background:#ffffff06;border-color:var(--glass-border);padding:10px 16px}.btn.primary{background:#bca6eb;color:#211b31;border-color:transparent;font-weight:600}.btn:hover{background:#ffffff12}.btn.primary:hover{background:#cebaf7}#layout{max-width:1320px;margin:32px auto 130px;grid-template-columns:242px minmax(0,1fr);gap:32px;padding:0 28px}#sidebar{padding:22px 16px;top:24px;max-height:calc(100vh - 48px);border-radius:16px;background:#191a29c9}#sidebar h3{font-size:10px;letter-spacing:2px;color:#a5a1b7;opacity:1;padding:0 10px;margin:22px 0 12px}.profile{padding:6px 10px 20px;border-bottom:1px solid var(--glass-border)}.avatar{display:grid;place-items:center;width:50px;height:50px;margin-bottom:12px;border-radius:17px;background:linear-gradient(135deg,#bca2e8,#686793);color:#222033;font-size:23px;font-weight:700}.profile strong{font-size:17px}.profile p{font-size:11px;color:var(--text-sub);line-height:1.9;margin:6px 0}.online{font-size:10px;color:#b4cbbb}.online::before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:#aac8b6;margin-right:7px}.cat-item{font-size:12px;padding:11px 12px;border-radius:8px;margin-bottom:4px;display:flex;justify-content:space-between;align-items:center}.cat-item.active{background:#ad94d91a;border-color:#b49ae921;color:#d2bafc}.cat-count{font-size:10px;color:#8f8ba5}.quick-link{padding:8px 10px;font-size:12px;display:flex;justify-content:space-between;color:#bcb8d0}#quickLinks{margin-top:20px}#quickLinks h3{margin-top:8px}#weatherCard{margin-top:22px;padding:16px 10px;background:#ffffff03;border:1px solid var(--glass-border);box-shadow:none;border-radius:10px}#weatherCard::before{display:none}.weather-header{gap:6px}.weather-header .weather-title{font-size:11px}.weather-header .weather-city-name{font-size:10px;max-width:64px}.weather-header button{font-size:12px}.weather-main{gap:9px;margin:16px 0}#weatherIcon{font-size:28px}#weatherTemp{font-size:32px}#weatherText{font-size:11px}.weather-detail{gap:7px;font-size:10px;flex-wrap:wrap}.weather-city{display:flex;flex-wrap:wrap;gap:5px}.weather-city input{width:100%;flex:auto;min-width:0;padding:8px;font-size:11px}.weather-city button{flex:1;font-size:10px;padding:6px}#weatherStatus{font-size:10px;line-height:1.6}#weatherAttributions{font-size:9px}#content{padding:0;min-width:0;text-shadow:none;line-height:1.7}#content h1{text-shadow:none;font-size:30px;line-height:1.4;margin:10px 0 12px;letter-spacing:1px}#content .crumb{font-size:11px;color:#aaa4ba;margin:0 0 24px;display:flex;gap:10px;align-items:center}.crumb a:hover{color:#dbc7ff}.eyebrow{font-size:10px;letter-spacing:3px;color:#b8a4d5}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px}.page-heading p,.hero p{color:var(--text-sub);font-size:12px;line-height:2}.page-heading h1{margin-top:5px!important}.page-number{font-family:Georgia,serif;font-size:54px;color:#ffffff15;line-height:1}.hero{position:relative;isolation:isolate;overflow:hidden;border:1px solid #b49ae922;border-radius:18px;padding:40px;background:linear-gradient(115deg,#262237,#1d1c2d 55%,#343046);min-height:276px}.hero .eyebrow{color:#c7b7e1}.hero h1{font-size:36px!important;margin:16px 0!important;font-weight:500;letter-spacing:2px!important}.hero h1 em{font-style:normal;color:#d1b8f0}.hero p{max-width:390px}.hero-actions{display:flex;gap:12px;margin-top:25px}.hero-art{position:absolute;right:20px;top:24px;width:270px;height:240px;z-index:-1;opacity:.9}.orbit{position:absolute;border:1px solid #d5b9ff25;border-radius:50%;width:220px;height:220px;right:0;top:0}.orbit.two{width:170px;height:170px;right:25px;top:25px}.moon{position:absolute;width:112px;height:112px;border-radius:50%;background:radial-gradient(circle at 30% 25%,#f1dcfc,#b9a2d1 45%,#6e638f 90%);box-shadow:0 0 60px #b492d425,inset -15px -8px 30px #30244480;top:53px;right:53px}.star{position:absolute;color:#d9c6ed;font-size:25px;right:14px;top:28px}.star.small{font-size:13px;right:222px;top:170px}.orbit-label{position:absolute;right:61px;bottom:0;color:#b8a4d5;font-size:9px;letter-spacing:4px}.section-head{display:flex;justify-content:space-between;align-items:center;margin:30px 0 15px}.section-head h2{font-size:15px;font-weight:500;letter-spacing:1px}.section-head a,.section-head span{font-size:11px;color:#b6a5ce}.portal-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.portal{padding:21px;border:1px solid var(--glass-border);border-radius:12px;background:#1d1e2bb3;transition:.2s}.portal:hover,.entry:hover{border-color:#bca6eb66;transform:translateY(-3px);background:#292637}.portal-icon{display:grid;place-items:center;width:36px;height:36px;background:#b49ae918;color:#cbb6ec;border:1px solid #b49ae915;border-radius:10px;font-size:18px;margin-bottom:18px}.portal:nth-child(2) .portal-icon{color:#dcc49e;background:#cda67712}.portal:nth-child(3) .portal-icon{color:#a0c5b9;background:#a0c5b912}.portal h3{font-size:14px;font-weight:500;display:flex;justify-content:space-between}.portal p{font-size:11px;color:var(--text-sub);margin-top:6px}.home-bottom{display:grid;grid-template-columns:1.45fr 1fr;gap:24px}.recent-list{border-top:1px solid var(--glass-border)}.recent-row{display:flex;gap:14px;align-items:center;padding:16px 0;border-bottom:1px solid var(--glass-border)}.recent-row .serial{font-family:Georgia,serif;color:#777286;font-size:17px}.recent-row strong{font-size:12px;font-weight:500;display:block}.recent-row small{font-size:10px;color:var(--text-sub)}.recent-row .arrow{margin-left:auto;color:#b19acb}.note{border:1px solid var(--glass-border);border-radius:12px;padding:23px;background:#b198cc08}.note p{font-size:12px;line-height:2.2;color:#bbb4ca}.note small{display:block;margin-top:18px;color:#8e879e;font-size:10px}.site-footer{display:flex;justify-content:space-between;border-top:1px solid var(--glass-border);padding-top:18px;margin-top:34px;color:#8f8a9e;font-size:10px;letter-spacing:1px}.filter-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:22px}.filter-chip{font-size:11px;padding:7px 14px;border:1px solid var(--glass-border);border-radius:7px;color:var(--text-sub)}.filter-chip.active{background:#b49ae91a;color:#dcc7f7;border-color:#b49ae945}.content-search{margin-left:auto;min-width:140px;width:210px;padding:9px 12px;background:#ffffff05;border:1px solid var(--glass-border);border-radius:7px;color:#eee}.entries{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.entry{overflow:hidden;border:1px solid var(--glass-border);border-radius:12px;background:#1d1e2bc9;transition:.2s;display:block}.entry-body{padding:22px}.entry h2{font-size:16px;font-weight:500;margin:12px 0 8px}.entry p{font-size:12px;color:var(--text-sub)}.entry-meta{display:flex;justify-content:space-between;font-size:10px;color:#ad9cbe}.entry-foot{border-top:1px solid var(--glass-border);padding-top:14px;margin-top:24px;font-size:11px;color:#bba5d5;display:flex;justify-content:space-between}.art{height:165px;position:relative;overflow:hidden;display:grid;place-items:center;font-size:46px;color:#e4d6f2;background:linear-gradient(135deg,#3a3350,#202437)}.art.css-art::before{content:'';position:absolute;width:110px;height:78px;border-radius:10px;background:#c4a2ef33;border:1px solid #ffffff44;transform:rotate(-12deg);box-shadow:18px 20px 0 #998bc51a}.art span{z-index:1;font-family:Georgia,serif}.art.route-art{background:linear-gradient(120deg,#2c3944,#25313a);font-size:25px;letter-spacing:10px}.art.sunset{background:linear-gradient(#514965,#c38895 55%,#e9b19d 56%,#71637d 60%,#333c56)}.art.sunset::before{content:'';width:58px;height:58px;border-radius:50%;background:#f6dbb2;position:absolute;top:32px;box-shadow:0 0 35px #ffcca560}.art.sunset::after{content:'';position:absolute;inset:65% -20% -45%;background:repeating-linear-gradient(0deg,transparent 0 12px,#ecd0df22 13px 14px);transform:rotate(-6deg)}.art.city{background:linear-gradient(#252a4c,#7b6189)}.art.city::after{content:'';position:absolute;inset:35% 8% 0;background:repeating-linear-gradient(90deg,#191e35 0 22px,transparent 23px 34px);clip-path:polygon(0 55%,10% 55%,10% 15%,25% 15%,25% 38%,40% 38%,40% 0,55% 0,55% 25%,70% 25%,70% 45%,90% 45%,90% 20%,100% 20%,100% 100%,0 100%)}.art.portrait{background:linear-gradient(135deg,#494154,#927a7b)}.art.portrait::after{content:'';width:86px;height:130px;position:absolute;bottom:-20px;border-radius:50% 50% 0 0;background:#252333;box-shadow:0 -50px 0 -22px #252333}.art-caption{position:absolute;left:15px;bottom:12px;font:9px system-ui!important;letter-spacing:2px;z-index:2!important}.article-shell{background:#1c1d2bbd;border:1px solid var(--glass-border);border-radius:16px;padding:36px}.article-shell .art{height:280px;border-radius:10px;margin:25px 0}.article-body{max-width:640px;font-size:14px;line-height:2.1;color:#c6bfd4}.article-body h2{font-size:19px;color:#eee9f7;margin:28px 0 12px}.article-body p{margin:12px 0}.article-body pre{overflow:auto;padding:20px;border:1px solid var(--glass-border);border-radius:10px;background:#11131e;font-size:12px;line-height:1.8}.article-nav{display:flex;justify-content:space-between;gap:14px;margin-top:32px;padding-top:20px;border-top:1px solid var(--glass-border);font-size:12px;color:#c8b5e3}.empty-state{padding:55px 25px;text-align:center;border:1px dashed var(--glass-border);border-radius:12px;color:var(--text-sub);grid-column:1/-1}.empty-state h2{color:#e0d7eb;font-size:18px;margin-bottom:10px}.bbs-form{padding:24px;background:#1d1e2b;border-radius:12px}.bbs-form textarea{background:#12131f;min-height:120px;border-radius:8px}.post-item{background:#1d1e2b;border-color:var(--glass-border)}#player{width:min(850px,calc(100vw - 40px));bottom:16px;padding:12px 20px;border-radius:14px;background:#202130f5;box-shadow:0 8px 40px #0005;gap:18px}#player .cover{width:42px;height:42px;border-radius:50%;background:repeating-radial-gradient(circle,#302c40 0 3px,#514360 4px 5px);border:1px solid #b59bc966;font-size:14px;color:#ceb1e7}#player .info{width:160px}#player .info b{font-size:12px}#player .info span{font-size:10px}.pctrl button{width:30px;height:30px;font-size:12px;background:transparent;border:0}.pctrl button.main{width:36px;height:36px;font-size:14px;background:#bca6eb;color:#262035}#progressWrap{font-size:10px}#progressBar{background:#bca6eb}#playlistToggle{background:none;border:0;color:var(--text-sub);font-size:11px}#playlist{background:#222131;bottom:91px}.modal{background:#242332;border-radius:16px;max-height:85vh;overflow:auto}.modal-mask{background:#080912bb}.field input{background:#151520}.skip-link{position:fixed;top:-60px;left:20px;z-index:2000;padding:12px;background:#bca6eb;color:#111}.skip-link:focus{top:8px}
@media(min-width:1400px){#layout{margin-top:42px}}@media(max-width:1100px){.logo{margin-right:15px}.nav-link{padding:10px 12px}#topbar{padding:0 24px}.hero-art{right:-65px;opacity:.5}.hero p{max-width:330px}#layout{gap:24px;grid-template-columns:220px minmax(0,1fr)}}
@media(max-width:850px){#topbar{height:auto;min-height:100px;flex-wrap:wrap;padding:15px 20px;gap:6px}.logo{flex:1;order:0}#userBox{order:1}.nav-link{order:2;flex:1;text-align:center}#layout{grid-template-columns:1fr;margin-top:20px;padding:0 20px;gap:20px}#sidebar{position:static;display:flex;align-items:center;gap:15px;padding:12px;max-height:none;overflow:visible;flex-wrap:wrap}.profile,#sidebar>h3,#quickLinks{display:none}#catList{display:flex;gap:6px;flex:1;flex-wrap:wrap}.cat-item{width:auto;margin:0;gap:15px}#weatherCard{width:100%;margin:0;padding:12px;display:grid;grid-template-columns:1fr 1fr;gap:6px 16px}.weather-main{margin:0}.weather-header{justify-content:flex-start}.weather-detail{grid-column:2;grid-row:2}.weather-city{flex-wrap:nowrap;grid-column:1/-1}.weather-city input{flex:1;width:0}.weather-city button{flex:none}#weatherStatus{grid-column:1/-1}#weatherCard>div:last-child{grid-column:1/-1}#weatherAttributions{display:none}.hero-art{right:5px;opacity:.6}.hero{padding:30px}.hero h1{font-size:31px!important}.page-number{font-size:45px}#player .info{width:120px}}
@media(max-width:560px){#userBox .btn{font-size:10px;padding:7px}.logo{font-size:15px;letter-spacing:1px;margin-right:0}.brand-mark{width:27px;height:27px;margin-right:6px}.nav-link{padding:9px 5px;font-size:12px}#hello{display:none!important}#layout{padding:0 16px;margin-bottom:110px}#sidebar{border-radius:10px}.hero{padding:26px 22px;min-height:300px}.hero-art{right:-80px;top:70px;opacity:.3}.hero h1{font-size:29px!important}.hero p{max-width:260px;font-size:11px}.hero-actions .btn{font-size:11px}.portal-grid{gap:8px}.portal{padding:14px 10px}.portal-icon{width:30px;height:30px;margin-bottom:12px}.portal h3{font-size:12px}.portal p{font-size:10px;line-height:1.8}.home-bottom{grid-template-columns:1fr;gap:0}.entries{grid-template-columns:1fr}.content-search{width:100%;margin:8px 0 0}.article-shell{padding:22px}.article-shell .art{height:210px}#content h1{font-size:25px}.page-heading{margin-bottom:20px}.page-heading p{font-size:11px}.site-footer{font-size:9px;gap:10px}#player{bottom:10px;width:calc(100vw - 24px);padding:10px 12px;gap:10px}#player .cover{width:34px;height:34px}#player .info{width:auto;flex:1}#progressWrap{display:none}.pctrl{gap:0}#playlistToggle{font-size:10px}.article-nav{font-size:11px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;scroll-behavior:auto!important}}

.weather-detail span{white-space:normal;min-width:0;line-height:1.6}.weather-detail>span{flex-wrap:wrap}#weatherAqi{overflow-wrap:anywhere}#content:focus{outline:none}
@media(max-width:850px){#topbar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 4px}.logo{grid-column:1/3;grid-row:1}#userBox{grid-column:3/5;grid-row:1;justify-self:end}.nav-link{grid-row:2;white-space:nowrap}.weather-detail{padding:6px;margin:0}.weather-header{margin:0}#weatherCard{padding:10px}#weatherStatus{margin-top:2px}.weather-main{justify-content:flex-end}#sidebar{gap:10px}.cat-item{padding:8px 10px}}
#playlist .track{width:100%;border:0;background:transparent;color:var(--text-main);text-align:left;font-family:inherit}.modal input:focus-visible{outline:2px solid var(--accent)}
/* Community posts and account-aware editor */
.community { display:grid;gap:20px;min-width:0; }
.community-actions,.editor-actions,.post-tools { display:flex;align-items:center;gap:12px;flex-wrap:wrap; }
.community-actions { justify-content:space-between;color:var(--text-sub);font-size:13px; }
.community-editor { display:grid;gap:16px;padding:24px;border:1px solid rgba(220,216,255,.14);border-radius:18px;background:rgba(21,20,39,.5); }
.community-editor h2 { margin:0;font-size:20px; }
.community-editor label { display:grid;gap:8px;font-size:13px;color:var(--text-sub); }
.community-editor input:not([type=file]),.community-editor select,.community-editor textarea { box-sizing:border-box;width:100%;background:#242239;color:#f4f1ff;border:1px solid #49435e;border-radius:10px;padding:12px;font:inherit; }
.community-editor textarea { resize:vertical;min-height:120px; }
.community-editor input:focus,.community-editor textarea:focus,.community-editor select:focus { outline:2px solid #baa1ee;outline-offset:2px; }
.community-posts { display:grid;gap:18px;min-width:0; }
.community-post { padding:24px;min-width:0; }
.community-post h2 { margin:18px 0;font-size:23px;overflow-wrap:anywhere; }
.community-post h2 a { color:inherit;text-decoration:none; }
.community-body { white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.9; }
.community-photo,.community-preview { max-width:100%;max-height:520px;object-fit:contain;border-radius:12px;margin-top:16px; }
.community-preview { max-height:180px; }
.post-tools { margin-top:20px; }
.delete-post { color:#ffb6c1; }
.community-status,.editor-status { color:var(--text-sub);font-size:13px;overflow-wrap:anywhere; }
.community [hidden],#adminSetupField[hidden] { display:none!important; }
.back-link { color:#c9b4ef; }
@media(max-width:600px) { .community-editor,.community-post { padding:16px; }.community-post .post-head { align-items:flex-start;flex-direction:column;gap:6px; } }

/* ========== 侧边迷你音乐播放器 · 修正版 ========== */
#player {
    position: fixed;
    right: 22px;
    left: auto;
    bottom: 22px;
    transform: none;
    width: 318px;
    padding: 16px;
    z-index: 120;
    display: block;
    border-radius: 20px;
    background: rgba(22, 23, 35, .94);
    border: 1px solid rgba(222, 214, 255, .14);
    box-shadow: 0 18px 55px rgba(0, 0, 0, .36);
    overflow: hidden;
    transition: width .28s ease, height .28s ease, padding .28s ease, background .28s ease;
}
#player::before {
    content: '';
    position: absolute;
    inset: -50% 35% 45% -20%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(188, 166, 235, .18), transparent 68%);
}
#playerMiniToggle {
    position: absolute;
    right: 10px;
    top: 8px;
    z-index: 3;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: .2s;
}
#playerMiniToggle:hover { background: rgba(255,255,255,.055); }
#playerMiniToggle .mini-triangle {
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid #cdb2ff;
    filter: drop-shadow(0 0 4px rgba(205,178,255,.45));
    transition: transform .2s ease, filter .2s ease;
}
#playerMiniToggle:hover .mini-triangle { filter: drop-shadow(0 0 7px rgba(218,198,255,.75)); }
.player-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    padding-right: 24px;
    min-width: 0;
}
#player .cover {
    position: relative;
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: repeating-radial-gradient(circle at center, #11131c 0 4px, #2b2938 5px 7px, #161722 8px 10px);
    border: 1px solid rgba(210,187,255,.25);
    box-shadow: 0 8px 22px #0006, inset 0 0 0 8px #ffffff06;
    color: #2b2437;
    font-size: 0;
    animation: vinylSpin 8s linear infinite;
    animation-play-state: paused;
}
#player.playing .cover { animation-play-state: running; }
#player .cover::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #181622;
    border: 2px solid #ede4ff;
    z-index: 3;
}
#player .vinyl-groove {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: inset 0 0 0 7px rgba(255,255,255,.025), inset 0 0 0 14px rgba(255,255,255,.02);
}
#player .vinyl-label {
    position: absolute;
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #d8c6fb, #9a80c8);
    color: #251d32;
    font-size: 12px;
    font-weight: 800;
    z-index: 2;
}
@keyframes vinylSpin { to { transform: rotate(360deg); } }
#player .info { width: auto; min-width: 0; flex: 1; }
#player .info b {
    display: block;
    color: #f5f1fb;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 4px 0 3px;
}
#player .info > span:last-child {
    display: block;
    color: #9993a8;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.player-kicker {
    display: flex !important;
    align-items: center;
    gap: 6px;
    color: #bfa7e6 !important;
    font-size: 8px !important;
    letter-spacing: 1.5px;
}
.player-kicker i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #67d999;
    box-shadow: 0 0 9px #67d99999;
}
#player.playing .player-kicker i { animation: kickerPulse 1.25s ease-in-out infinite; }
@keyframes kickerPulse { 50% { opacity: .35; transform: scale(.75); } }
#progressWrap {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    align-items: center;
    gap: 8px;
    margin: 14px 0 11px;
    font-size: 9px;
    color: #8f899c;
    opacity: 1;
}
#progress {
    height: 4px;
    border-radius: 999px;
    background: #ffffff14;
    overflow: visible;
    cursor: pointer;
    position: relative;
}
#progressBar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg,#a88be0,#c7b1f1);
    position: relative;
}
#progressBar::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    width: 8px;
    height: 8px;
    transform: translateY(-50%);
    border-radius: 50%;
    background: #e3d8f7;
    box-shadow: 0 0 0 3px #bca6eb24;
    opacity: 0;
    transition: .2s;
}
#progress:hover #progressBar::after { opacity: 1; }
#curTime { text-align: left; }
#durTime { text-align: right; }
.player-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.pctrl { display: flex; align-items: center; gap: 5px; }
.pctrl button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #d8d2df;
    font-size: 12px;
    cursor: pointer;
    transition: .18s;
}
.pctrl button:hover { background: #ffffff0d; color: #fff; transform: translateY(-1px); }
.pctrl button.main {
    width: 38px;
    height: 38px;
    background: #bca6eb;
    color: #211b31;
    font-size: 14px;
    box-shadow: 0 5px 16px #a88bd033;
}
.pctrl button.main:hover { background: #cab7ef; }
.player-actions { display: flex; align-items: center; gap: 5px; position: relative; }
.player-icon-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: transparent;
    color: #aaa4b8;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.player-icon-btn:hover,
.player-icon-btn[aria-expanded="true"] { background: #ffffff0d; color: #d9c4ff; transform: translateY(-1px); }
.player-icon-btn svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    overflow: visible;
}
#volumeToggle svg path:first-child { fill: currentColor; stroke: none; }
#volumeToggle.muted .sound-wave { opacity: .2; }
#playModeToggle[data-mode="single"],
#playModeToggle[data-mode="shuffle"] { color: #cdb2ff; }
#playModeToggle svg text { fill: currentColor; stroke: none; font: 700 7px system-ui,sans-serif; }
.volume-wrap { position: relative; display: flex; align-items: center; }
.volume-popover {
    position: absolute;
    right: -18px;
    bottom: 38px;
    width: 156px;
    padding: 10px 11px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(220,216,255,.12);
    border-radius: 12px;
    background: rgba(25,24,39,.97);
    box-shadow: 0 12px 34px #0006;
    color: #a8a2b5;
    z-index: 5;
}
.volume-popover[hidden] { display: none; }
.volume-popover::after {
    content: '';
    position: absolute;
    right: 25px;
    bottom: -5px;
    width: 9px;
    height: 9px;
    background: rgba(25,24,39,.97);
    border-right: 1px solid rgba(220,216,255,.12);
    border-bottom: 1px solid rgba(220,216,255,.12);
    transform: rotate(45deg);
}
.volume-caption { font-size: 9px; letter-spacing: .5px; }
#volumeValue { font-size: 9px; min-width: 27px; text-align: right; font-variant-numeric: tabular-nums; color: #c5bdd2; }
#volumeSlider {
    appearance: none;
    -webkit-appearance: none;
    width: 82px;
    height: 3px;
    padding: 0;
    margin: 0;
    border-radius: 999px;
    background: #ffffff18;
    cursor: pointer;
    accent-color: #cdb2ff;
}
#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cdb2ff;
    box-shadow: 0 0 0 3px rgba(205,178,255,.12);
}
#volumeSlider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 50%;
    background: #cdb2ff;
    box-shadow: 0 0 0 3px rgba(205,178,255,.12);
}
#playlistToggle {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #ffffff08;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 999px;
    color: #aaa4b8;
    padding: 7px 10px;
    font-size: 10px;
    cursor: pointer;
    transition: .18s;
}
#playlistToggle:hover,
#playlistToggle[aria-expanded="true"] { color: #eee9f7; background: #ffffff10; border-color: #bca6eb35; }
#playlist {
    position: fixed;
    right: 22px;
    left: auto;
    bottom: 164px;
    transform: none;
    width: 318px;
    z-index: 119;
    padding: 10px;
    display: none;
    max-height: min(55vh,460px);
    overflow: auto;
    border-radius: 18px;
    background: rgba(26,25,40,.97);
    border: 1px solid rgba(220,216,255,.12);
    box-shadow: 0 18px 50px #0006;
}
#playlist.show { display: block; animation: playlistIn .2s ease-out; }
@keyframes playlistIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.playlist-head {
    position: sticky;
    top: -10px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 10px 12px;
    margin: -2px 0 4px;
    background: rgba(26,25,40,.97);
    border-bottom: 1px solid var(--glass-border);
}
.playlist-head strong { font-size: 12px; font-weight: 600; }
.playlist-head span { font-size: 9px; color: #8f899e; }
#playlist .track {
    width: 100%;
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 8px;
    align-items: center;
    padding: 9px 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-main);
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: .16s;
}
#playlist .track:hover { background: #ffffff09; }
#playlist .track.active { background: #b49ae916; }
#playlist .track .tag { width: auto; color: #80798f; font-size: 9px; text-align:center; }
#playlist .track.active .tag { color: #cdb7ef; }
.track-meta { min-width:0; display:block; }
.track-meta b { display:block; font-size:11px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.track-meta small { display:block; margin-top:2px; color:#817b8f; font-size:9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#playlist::-webkit-scrollbar { width:4px; }
#playlist::-webkit-scrollbar-thumb { background:#ffffff1c; border-radius:10px; }
#player.collapsed {
    width: 82px;
    height: 82px;
    padding: 9px;
    border-radius: 23px;
    background: rgba(22,23,35,.94);
}
#player.collapsed::before,
#player.collapsed .info,
#player.collapsed #progressWrap,
#player.collapsed #btnPrev,
#player.collapsed #btnNext,
#player.collapsed .player-actions { display:none; }
#player.collapsed .player-head { padding:0; display:block; }
#player.collapsed .cover { width:62px; height:62px; position:absolute; left:9px; top:9px; pointer-events:none; }
#player.collapsed { cursor:pointer; }
#player.collapsed .pctrl { position:absolute; inset:0; display:grid; place-items:center; z-index:4; pointer-events:none; }
#player.collapsed .pctrl button.main {
    pointer-events:none;
    width:30px;
    height:30px;
    background:rgba(23,21,32,.74);
    color:#fff;
    border:1px solid rgba(255,255,255,.2);
    box-shadow:0 3px 10px #0007;
    opacity:0;
    transition:.2s;
}
#player.collapsed:hover .pctrl button.main { opacity:1; }
#player.collapsed .player-bottom { display:block; }
#player.collapsed #playerMiniToggle {
    inset: 0;
    right: auto;
    top: auto;
    z-index: 20;
    pointer-events: auto;
    width: 100%;
    height: 100%;
    border-radius: 23px;
    background: transparent;
    box-shadow: none;
    display: block;
}
#player.collapsed #playerMiniToggle:hover { background: rgba(205,178,255,.045); }
#player.collapsed #playerMiniToggle .mini-triangle {
    position: absolute;
    right: 8px;
    top: 8px;
    transform: rotate(180deg);
}
@media (max-width:850px) {
    #player { right:12px; bottom:12px; width:min(318px,calc(100vw - 24px)); }
    #playlist { right:12px; bottom:164px; width:min(318px,calc(100vw - 24px)); max-height:45vh; }
}
@media (max-width:560px) {
    #player { padding:13px; border-radius:17px; }
    .player-head { gap:11px; }
    #player .cover { width:54px; height:54px; flex-basis:54px; }
    #progressWrap { display:grid; margin:11px 0 8px; }
    .player-actions { gap:2px; }
    .player-icon-btn { width:28px; height:28px; }
    #playlist { bottom:155px; }
    .volume-popover { right:-44px; width:150px; }
    .pctrl { gap:2px; }
    #player.collapsed { width:72px; height:72px; padding:8px; }
    #player.collapsed .cover { width:56px; height:56px; left:8px; top:8px; }
}
@media (prefers-reduced-motion:reduce) { #player .cover { animation:none !important; } }


/* ===== 帖子 R2 多图（v6） ===== */
.community-preview-grid,
.community-gallery {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
    margin-top:14px;
}
.community-preview-grid[hidden] { display:none!important; }
.community-preview-item {
    position:relative;
    min-width:0;
    aspect-ratio:4/3;
    overflow:hidden;
    border:1px solid rgba(220,216,255,.14);
    border-radius:12px;
    background:#12131f;
}
.community-preview-item img {
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
}
.community-preview-item.pending { border-color:rgba(190,166,235,.35); }
.media-remove {
    position:absolute;
    top:7px;
    right:7px;
    width:27px;
    height:27px;
    border:1px solid rgba(255,255,255,.2);
    border-radius:50%;
    background:rgba(18,19,31,.8);
    color:#f4efff;
    cursor:pointer;
    line-height:1;
    font-size:18px;
    backdrop-filter:blur(8px);
}
.media-remove:hover { background:rgba(116,78,136,.9); }
.media-badge {
    position:absolute;
    left:7px;
    bottom:7px;
    max-width:calc(100% - 14px);
    padding:4px 7px;
    border-radius:8px;
    background:rgba(18,19,31,.74);
    color:#d9d1e8;
    font-size:9px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    backdrop-filter:blur(8px);
}
.media-hint { margin-left:auto; }
.community-gallery a {
    min-width:0;
    overflow:hidden;
    border-radius:12px;
    border:1px solid rgba(220,216,255,.10);
    background:#11121d;
}
.community-gallery img {
    width:100%;
    height:100%;
    min-height:180px;
    max-height:420px;
    display:block;
    object-fit:cover;
    transition:transform .2s ease,opacity .2s ease;
}
.community-gallery a:hover img { transform:scale(1.012); opacity:.95; }
.community-gallery[data-count="1"] { grid-template-columns:1fr; }
.community-gallery[data-count="1"] img { object-fit:contain; max-height:620px; }
.community-gallery[data-count="2"] { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media(max-width:700px) {
    .community-preview-grid,.community-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
    .community-gallery[data-count="1"] { grid-template-columns:1fr; }
    .community-gallery img { min-height:130px; }
    .media-hint { width:100%; margin-left:0; }
}
/* Background images retain their source resolution; viewport fitting is handled by CSS. */
#bg { background-size:var(--bg-fit, cover); background-position:var(--bg-position, 50% 50%); background-repeat:no-repeat; pointer-events:none; transition:none; }
#bg.has-image::after { display:none; }
#bgModal .modal { width:min(560px, calc(100vw - 32px)); }
#bgModal input[type=color] { height:44px;padding:6px;cursor:pointer; }
#bgModal .bg-help { font-size:12px;line-height:1.7;color:var(--text-sub);margin:10px 0 16px;overflow-wrap:anywhere; }
#bgImageSettings { min-width:0;border:1px solid var(--glass-border);border-radius:12px;padding:16px;margin:16px 0; }
#bgImageSettings legend { padding:0 8px;font-size:13px; }
#bgImageSettings:disabled { opacity:.55; }
.bg-settings-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
#bgModal select { width:100%;min-width:0;padding:10px 8px;border:1px solid var(--glass-border);border-radius:8px;background:#151520;color:var(--text-main);font:inherit; }
#bgModal input[type=range] { width:100%;padding:0;accent-color:#bca6eb;cursor:pointer; }
#bgModal output { float:right;color:var(--text-sub);font-variant-numeric:tabular-nums; }
#bgOpts button.sw { padding:0; }
@media (max-width:640px) {
    #bg { background-size:var(--bg-mobile-fit, cover); }
    .bg-settings-grid { grid-template-columns:1fr;gap:0; }
    #bgModal .modal { max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);box-sizing:border-box; }
}

/* Mobile player: compact dock, touch-sized controls, and a viewport-bound playlist. */
.pctrl button svg { width:18px;height:18px;fill:currentColor;display:block;margin:auto; }
#player { overflow:visible; }
#player::before { clip-path:inset(0);inset:0;border-radius:inherit; }
#playlist { bottom:var(--player-stack, 210px);max-height:min(460px, calc(100dvh - var(--player-stack, 210px) - 16px));overscroll-behavior:contain; }
@media (max-width:640px) {
    body { padding-bottom:calc(var(--player-stack, 88px) + 16px); }
    #player, #player.collapsed { left:max(10px, env(safe-area-inset-left));right:max(10px, env(safe-area-inset-right));bottom:calc(10px + env(safe-area-inset-bottom));width:auto;height:auto;padding:10px 12px;border-radius:16px;transition:background .2s; }
    #player .player-head { display:flex;gap:10px;padding-right:44px;min-height:36px; }
    #player .cover, #player.collapsed .cover { position:relative;left:auto;top:auto;width:36px;height:36px;flex:0 0 36px;box-shadow:none; }
    #player .vinyl-label { width:20px;height:20px;font-size:10px; }
    #player .info, #player.collapsed .info { display:block;min-width:0; }
    #player .player-kicker, #player .info > span:last-child { display:none!important; }
    #player .info b { font-size:13px;margin:0; }
    #player #playerMiniToggle, #player.collapsed #playerMiniToggle { display:grid;place-items:center;position:absolute;inset:auto;right:8px;top:6px;width:44px;height:44px;border-radius:12px; }
    #player #playerMiniToggle .mini-triangle { position:static;transform:rotate(90deg); }
    #player.collapsed #playerMiniToggle .mini-triangle { transform:rotate(-90deg); }
    #player #progressWrap { display:grid;margin:2px 0;min-height:20px;grid-template-columns:32px minmax(0,1fr) 32px; }
    #player #progress::before { content:'';position:absolute;inset:-10px 0; }
    #player .player-bottom { display:flex;gap:4px; }
    #player .pctrl, #player .player-actions { gap:0; }
    #player .pctrl button, #player .pctrl button.main, #player .player-icon-btn { width:44px;height:44px;flex-shrink:0; }
    #player #playlistToggle { min-height:44px;padding:7px 8px; }
    #player .volume-popover { right:-50px;bottom:52px; }
    #player.collapsed .player-head { display:flex;padding-right:96px; }
    #player.collapsed #progressWrap { display:none; }
    #player.collapsed .player-bottom { display:block; }
    #player.collapsed .pctrl { position:absolute;inset:auto;right:54px;top:6px;display:flex;pointer-events:auto; }
    #player.collapsed .pctrl button.main { opacity:1;pointer-events:auto;background:#bca6eb;color:#211b31;box-shadow:none;border:0; }
    #playlist { left:max(10px, env(safe-area-inset-left));right:max(10px, env(safe-area-inset-right));width:auto;bottom:var(--player-stack, 156px);max-height:min(55dvh, calc(100dvh - var(--player-stack, 156px) - 12px));border-radius:16px; }
    #playlist .track { min-height:48px; }
}
@media (max-width:360px) {
    #player #playlistToggle { width:44px;justify-content:center; }
    #player #playlistToggle span { display:none; }
}

/* Shared theme surfaces: background alpha is independent of text and controls. */
:root { --theme-nav-alpha:.85; --theme-sidebar-alpha:.85; --theme-hero-alpha:.85; --theme-player-alpha:.85; --theme-player-surface-rgb:22,23,35; --theme-player-border-rgb:220,216,255; }
#topbar { --panel-alpha:var(--theme-nav-alpha); }
#sidebar, #weatherCard { --panel-alpha:var(--theme-sidebar-alpha); }
#content .hero { --panel-alpha:var(--theme-hero-alpha); }
#player, #playlist { --panel-alpha:var(--theme-player-alpha); }
#topbar { background:rgba(19,20,31,var(--panel-alpha)); }
#sidebar { background:rgba(25,26,41,var(--panel-alpha)); }
#weatherCard { background:rgba(25,26,41,var(--panel-alpha)); }
#content .hero { background:linear-gradient(115deg,rgba(38,34,55,var(--panel-alpha)),rgba(29,28,45,var(--panel-alpha)) 55%,rgba(52,48,70,var(--panel-alpha))); }
#player, #player.collapsed { background:rgba(var(--theme-player-surface-rgb),var(--panel-alpha)); }
#playlist { background:rgba(var(--theme-player-surface-rgb),var(--panel-alpha)); }
#playlist .playlist-head { background:transparent; }
#player::before { opacity:var(--panel-alpha); }
#topbar, #sidebar, #weatherCard, #player, #playlist {
    -webkit-backdrop-filter:blur(calc(14px * var(--panel-alpha)));
    backdrop-filter:blur(calc(14px * var(--panel-alpha)));
}
#themeSettings { min-width:0;border:1px solid var(--glass-border);border-radius:12px;padding:16px;margin:16px 0 24px; }
#themeSettings legend { padding:0 8px;font-size:13px; }
#themeSettings label { display:block;font-size:13px;margin:4px 0 12px; }
#themeSettings input[type=range] { min-height:24px; }
#themeStatus:empty { display:none; }

/* Desktop sidebar docks at the window edge; preserve the main content column. */
@media (min-width:851px) {
    #sidebar {
        position:fixed;
        left:max(12px, env(safe-area-inset-left));
        top:98px;
        width:242px;
        max-height:calc(100vh - 110px);
        max-height:calc(100dvh - 110px);
        overflow-y:auto;
        overscroll-behavior:contain;
        scrollbar-width:thin;
        z-index:20;
    }
    #content { grid-column:2; }
}
@media (min-width:851px) and (max-width:1100px) {
    #sidebar { width:220px; }
}

/* Synchronized lyrics occupy the spare top-right space on large screens. */
#lyricsDock { position:fixed;z-index:118;right:22px;bottom:var(--player-stack, 210px);width:318px;border-radius:12px;background:rgba(22,23,35,var(--theme-player-alpha));color:var(--lyrics-color,#e5d4ff);font-family:var(--lyrics-font,system-ui);font-size:var(--lyrics-size,18px);pointer-events:none;text-shadow:0 1px 4px #000b; }
#lyricsViewport { position:relative;height:70px;overflow:hidden;mask-image:linear-gradient(transparent,#000 22%,#000 78%,transparent); }
#lyricsLines { position:relative;transition:transform .3s ease; }
#lyricsLines p { margin:0;min-height:35px;line-height:1.5;padding:4px 12px;text-align:center;overflow-wrap:anywhere;opacity:.5; }
#lyricsLines p.active, #lyricsLines p:only-child { opacity:1; }
#lyricsSettings { min-width:0;border:1px solid var(--glass-border);border-radius:12px;padding:16px;margin:16px 0; }
#lyricsSettings legend { padding:0 8px;font-size:13px; }
#lyricsSettings label { display:block;margin:12px 0 8px;font-size:13px; }
@media (min-width:1900px) {
    #lyricsDock { top:8px;bottom:auto;right:16px;width:min(520px, calc((100vw - 1320px) / 2 - 32px));background:transparent; }
}
@media (max-width:1899px) { body:has(#playlist.show) #lyricsDock { display:none; } }
@media (max-width:640px) {
    #lyricsDock { left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));width:auto; }
    body { padding-bottom:calc(var(--player-stack,88px) + 90px); }
}
@media (prefers-reduced-motion:reduce) { #lyricsLines { transition:none; } }

.bg-gallery { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0 20px; }
.bg-preset { padding:0;overflow:hidden;min-width:0;border:2px solid transparent;border-radius:10px;background:#151520;color:var(--text-main);cursor:pointer;text-align:left; }
.bg-preset img { display:block;width:100%;aspect-ratio:16/10;object-fit:cover; }
.bg-preset img[hidden] { display:none; }
.bg-preset span { display:block;padding:8px;font-size:12px; }
.bg-preset[aria-pressed=true] { border-color:#c5a9f5; }
.bg-preset:hover { border-color:#b49ae980; }

/* Native modal keeps image zoom isolated from page scrolling and keyboard focus. */
#imageViewer { position:fixed;inset:0;width:100%;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:rgba(8,9,16,.96);color:#f6f3ff;overflow:hidden; }
#imageViewer[open] { display:grid;grid-template-rows:auto minmax(0,1fr) auto; }
#imageViewer::backdrop { background:#080910e8; }
.viewer-toolbar,.viewer-footer { display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left)); }
.viewer-toolbar { padding-top:max(10px,env(safe-area-inset-top));border-bottom:1px solid #ffffff18; }
.viewer-footer { padding-bottom:max(10px,env(safe-area-inset-bottom));border-top:1px solid #ffffff18; }
.viewer-tools { display:flex;gap:6px;align-items:center; }
#imageViewer button { min-width:44px;min-height:44px;border:1px solid #ffffff25;border-radius:10px;padding:6px 10px;background:#ffffff0d;color:inherit;cursor:pointer;touch-action:manipulation; }
#imageViewer button:disabled { opacity:.35;cursor:default; }
#viewerCount { white-space:nowrap;font-variant-numeric:tabular-nums; }
#viewerZoom { min-width:46px;text-align:center;font-size:12px;font-variant-numeric:tabular-nums; }
.viewer-stage { position:relative;min-height:0;overflow:hidden;touch-action:none;user-select:none; }
.viewer-stage.zoomed { cursor:grab; }
.viewer-stage.zoomed:active { cursor:grabbing; }
#imageViewer .viewer-image { position:absolute;left:50%;top:50%;max-width:none;max-height:none;object-fit:contain;transform-origin:center;user-select:none;-webkit-user-drag:none; }
.viewer-image[hidden] { display:none; }
.viewer-status { position:absolute;left:12px;right:12px;top:50%;text-align:center;color:#c1b9d0;pointer-events:none; }
.viewer-footer span { font-size:12px;color:#b7afc5;text-align:center; }
@media(max-width:600px) { .viewer-footer span { display:none; }.viewer-tools { gap:3px; }#imageViewer button { padding:6px 8px; } }

/* Matching sound-effects drawer; its controls stay opaque when the panel is translucent. */
#player .player-head { padding-left:20px; }
#player.collapsed .player-head { padding-left:0; }
#effectsToggle { position:absolute;left:2px;top:24px;width:32px;height:44px;display:grid;place-items:center;border:0;border-radius:10px;background:transparent;cursor:pointer;color:#cdb2ff;z-index:6; }
#effectsToggle span { width:0;height:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:7px solid currentColor;transition:transform .2s; }
#effectsToggle[aria-expanded=true] span { transform:rotate(180deg); }
#effectsToggle.effect-active { background:#bca6eb15; }
#player.collapsed #effectsToggle, #effectsPanel[hidden] { display:none; }
#effectsPanel { position:absolute;right:calc(100% + 12px);bottom:0;width:300px;max-height:calc(100dvh - 44px);overflow:auto;overscroll-behavior:contain;padding:18px;border-radius:18px;border:1px solid #dcd8ff24;background:rgba(22,23,35,var(--theme-player-alpha));backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);box-shadow:0 18px 45px #0005;color:var(--text-main); }
.effects-heading { display:flex;align-items:center;justify-content:space-between;margin-bottom:8px; }
.effects-heading strong { font-size:14px; }
#effectsClose { width:44px;height:44px;border:0;border-radius:10px;background:transparent;color:inherit;cursor:pointer; }
#effectsPanel label { display:block;font-size:11px;margin:12px 0 5px;color:#d4cce0; }
#effectsPanel output { float:right;font-variant-numeric:tabular-nums;color:#cdb2ff; }
#effectsPanel select { width:100%;padding:10px;background:#171624;color:#eee;border:1px solid #ffffff24;border-radius:8px;font:inherit; }
#effectsPanel input[type=range] { width:100%;height:24px;accent-color:#bca6eb;cursor:pointer; }
#effectsReset { width:100%;margin-top:12px;min-height:40px; }
#effectsStatus { font-size:11px;line-height:1.7;color:#b4aabd;margin:10px 0 0; }
@media(max-width:700px) {
    #effectsPanel { right:0;bottom:calc(100% + 10px);width:100%;max-height:calc(100dvh - var(--player-stack,210px) - 16px);padding:14px 16px; }
    body:has(#player.effects-open) #lyricsDock { display:none; }
}
@media(max-width:640px) {
    #player:not(.collapsed) .player-head { padding-left:40px; }
    #effectsToggle { left:4px;top:6px;width:44px; }
    #player:not(.collapsed) .player-head .cover { display:none; }
}

/* Exact slider values, styled to match the theme and sound-effects drawer. */
#bgModal .range-value, #effectsPanel .range-value { cursor:pointer;min-width:48px;min-height:28px;padding:2px 6px;margin-top:-3px;border:1px solid #bca6eb40;border-radius:6px;background:#bca6eb0d;color:#d6c1f5;line-height:22px;text-align:center;font-variant-numeric:tabular-nums; }
#bgModal .range-value:hover, #effectsPanel .range-value:hover { background:#bca6eb26;border-color:#bca6eb88; }
.range-value[hidden] { display:none!important; }
.range-value[aria-disabled=true] { cursor:default!important;opacity:.5; }
#bgModal input.range-number, #effectsPanel input.range-number { float:right;box-sizing:border-box;width:86px;max-width:45%;height:30px;min-height:30px;margin:-3px 0 0;padding:3px 6px;border:1px solid #bca6eb;border-radius:6px;background:#151520;color:#f0e6ff;font:inherit;font-variant-numeric:tabular-nums;outline:2px solid #bca6eb33;outline-offset:1px; }
@media(pointer:coarse) { #bgModal .range-value, #effectsPanel .range-value { min-height:36px;line-height:30px; }#bgModal input.range-number, #effectsPanel input.range-number { height:36px;font-size:16px; } }

@media(min-width:851px) {
/* Four desktop lyric locations. Mobile retains its existing layout. */
#lyricsDock[data-position] { bottom:auto;transform:none;background:transparent; }
#lyricsDock[data-position=top-right] { left:auto;right:16px;top:calc(var(--lyrics-nav-height,86px) + 8px);width:min(360px,calc(100vw - 24px)); }
#lyricsDock[data-position=top-left] { left:12px;right:auto;top:calc(var(--lyrics-nav-height,86px) + 8px);width:min(360px,calc(100vw - 24px)); }
#lyricsDock[data-position=right] { left:auto;right:max(18px,env(safe-area-inset-right));top:calc(var(--lyrics-nav-height,86px) + 12px);width:110px;height:min(54dvh,calc(100dvh - var(--lyrics-nav-height,86px) - var(--player-stack,210px) - 32px)); }
#lyricsDock[data-position=bottom] { left:50%;right:auto;top:auto;bottom:max(16px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(720px,calc(100vw - 700px)); }
#lyricsDock[data-position=right] #lyricsViewport { height:100%;mask-image:none; }
#lyricsDock[data-position=right] #lyricsLines { height:100%;display:grid;place-items:center; }
#lyricsDock[data-position=right] #lyricsLines p { writing-mode:vertical-rl;text-orientation:mixed;max-height:100%;max-width:100%;letter-spacing:.14em;overflow:hidden;padding:8px; }
#lyricsDock[data-motion=fade] #lyricsLines, #lyricsDock[data-motion=float] #lyricsLines { height:100%;display:grid;place-items:center;transition:none; }
#lyricsDock[data-motion=fade] #lyricsLines p, #lyricsDock[data-motion=float] #lyricsLines p, #lyricsDock[data-position=right] #lyricsLines p { display:none; }
#lyricsDock[data-motion=fade] #lyricsLines p.active, #lyricsDock[data-motion=float] #lyricsLines p.active, #lyricsDock[data-position=right] #lyricsLines p.active,
#lyricsDock[data-motion=fade] #lyricsLines p:only-child, #lyricsDock[data-motion=float] #lyricsLines p:only-child, #lyricsDock[data-position=right] #lyricsLines p:only-child { display:block; }
#lyricsDock[data-motion=fade] #lyricsLines p.active, #lyricsDock[data-motion=float] #lyricsLines p.active { opacity:var(--lyric-opacity,1);transition:none;will-change:opacity; }
#lyricsDock[data-motion=float] #lyricsLines p.active { transform:translateY(calc((1 - var(--lyric-opacity,1)) * 8px));will-change:opacity,transform; }
#lyricsDock[data-decoration=glow] { text-shadow:0 0 5px currentColor,0 0 16px currentColor,0 2px 3px #000; }
#lyricsDock[data-decoration=outline] { -webkit-text-stroke:.6px currentColor;text-shadow:1px 1px #151520,-1px -1px #151520,1px -1px #151520,-1px 1px #151520;letter-spacing:.08em;font-weight:700; }
#lyricsDock[data-decoration=ink] { font-style:italic;letter-spacing:.12em;text-shadow:2px 3px 2px #16102199; }
@media(min-width:1900px) { #lyricsDock[data-position=top-left] { top:8px;left:16px;width:min(520px,calc((100vw - 1320px)/2 - 32px)); } }
@media(min-width:1900px) { #lyricsDock[data-position=top-right] { top:8px;right:16px;width:min(520px,calc((100vw - 1320px)/2 - 32px)); } }
@media(max-width:1100px) { #lyricsDock[data-position=bottom] { width:calc(100vw - 24px);bottom:var(--player-stack,210px); } }
@media(max-width:640px) { #lyricsDock[data-position=right] { right:max(10px,env(safe-area-inset-right));width:72px; } }
@media(prefers-reduced-motion:reduce) { #lyricsDock #lyricsLines p.active { transition:none!important;transform:none!important;filter:none!important;opacity:1!important; } }

}
@media(max-width:850px) { .desktop-lyrics { display:none!important; } #lyricsDock { font-family:var(--lyrics-mobile-font,system-ui); } }

/* Native scrolling, themed chrome, and no full-screen live blur behind this panel. */
#bgModal { background:rgba(8,9,18,.76);backdrop-filter:none;-webkit-backdrop-filter:none; }
#bgModal .modal {
    color-scheme:dark;
    scrollbar-width:thin;
    scrollbar-color:#9d85c3 #242332;
    scrollbar-gutter:stable;
    overscroll-behavior:contain;
    contain:layout paint;
}
#bgModal .modal::-webkit-scrollbar { width:10px; }
#bgModal .modal::-webkit-scrollbar-track { background:#242332;border-radius:12px; }
#bgModal .modal::-webkit-scrollbar-thumb { background:#9d85c3;border:3px solid #242332;border-radius:12px; }
#bgModal .modal::-webkit-scrollbar-thumb:hover { background:#c5a9ec; }
#bgModal .modal::-webkit-scrollbar-button { display:none;width:0;height:0; }
body:has(#bgModal.show) { overflow:hidden; }
body:has(#bgModal.show) #player .cover,
body:has(#bgModal.show) #player .player-kicker i { animation-play-state:paused; }

/* Playlist search is part of the playlist glass itself: no second tinted layer. */
#playlist { overflow:hidden; }
#playlist.show { display:flex;flex-direction:column; }
#playlist .playlist-head {
    position:static;flex:none;justify-content:flex-start;align-items:center;gap:8px;
    margin:0;padding:2px 6px 8px;background:transparent;
    border-bottom:1px solid rgba(var(--theme-player-border-rgb),calc(var(--theme-player-alpha) * .10));
}
#playlist .playlist-head strong { flex:none; }
#playlistCount { margin-left:auto;flex:none;white-space:nowrap; }
.playlist-search-inline {
    color-scheme:dark;
    display:flex;align-items:center;flex:0 0 auto;
    width:30px;height:30px;min-width:30px;overflow:hidden;
    border:1px solid rgba(var(--theme-player-border-rgb),calc(var(--theme-player-alpha) * .11));
    border-radius:9px;
    background:transparent;
    color:var(--text-sub);
    box-shadow:none;
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
    transition:width .22s ease,border-color .18s ease,color .18s ease;
}
.playlist-search-inline.open {
    width:172px;
    background:transparent;
    border-color:rgba(var(--theme-player-border-rgb),calc(var(--theme-player-alpha) * .18));
    box-shadow:none;
}
.playlist-search-inline:focus-within {
    background:transparent;
    border-color:rgba(var(--theme-player-border-rgb),calc(var(--theme-player-alpha) * .32));
    box-shadow:none;
}
#playlistSearchToggle {
    display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;padding:0;
    border:0;border-radius:8px;background:transparent;color:inherit;cursor:pointer;
    transition:color .18s ease,opacity .18s ease;
}
#playlistSearchToggle svg { display:block;transition:transform .22s ease; }
#playlistSearchToggle:hover { background:transparent;color:var(--text-main); }
#playlistSearchToggle[aria-expanded=true] { color:var(--text-main); }
#playlistSearchToggle[aria-expanded=true] svg { transform:scale(.94); }
#playlistSearch {
    appearance:none;-webkit-appearance:none;
    flex:1 1 auto;min-width:0;width:0;height:28px;
    padding:0 4px 0 2px;border:0;border-radius:0;background:transparent;box-shadow:none;
    color:var(--text-main);font:inherit;font-size:11px;line-height:28px;outline:none;
    opacity:0;pointer-events:none;transform:translateX(-4px);
    transition:opacity .16s ease .03s,transform .18s ease .03s;
}
.playlist-search-inline.open #playlistSearch { width:auto;opacity:1;pointer-events:auto;transform:none; }
#playlistSearch::placeholder { color:var(--text-sub);opacity:.72; }
#playlistSearch::-webkit-search-cancel-button { -webkit-appearance:none; }
#playlistClear {
    flex:0 0 24px;width:24px;height:24px;margin-right:2px;border:0;border-radius:6px;
    background:transparent;color:var(--text-sub);font-size:18px;line-height:1;cursor:pointer;opacity:.9;
}
#playlistClear:hover { background:transparent;color:var(--text-main); }
#playlistTracks { min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#a48abd70 transparent; }
#playlistTracks::-webkit-scrollbar { width:4px; }
#playlistTracks::-webkit-scrollbar-thumb { background:#a48abd70;border-radius:8px; }
#playlist .track[hidden], #playlistClear[hidden], #playlistEmpty[hidden] { display:none; }
#playlistEmpty { margin:0;padding:24px 8px;text-align:center;color:#b7acc9;font-size:12px; }
@media(max-width:640px) {
    .playlist-search-inline.open { width:min(176px,48vw); }
    #playlistSearch { font-size:16px; }
    #playlistClear { width:28px;height:28px;flex-basis:28px; }
}
@media(max-width:360px) {
    .playlist-search-inline.open { width:142px; }
    #playlist .playlist-head { gap:5px; }
}
@media(prefers-reduced-motion:reduce) {
    .playlist-search-inline,#playlistSearch,#playlistSearchToggle svg { transition:none!important; }
}


/* Compact post composers and mobile weather disclosure. */
#weatherToggle { display:none; }
.community-editor[hidden], .editor-body[hidden] { display:none; }
.community-editor.is-collapsed { width:fit-content;max-width:100%;padding:0;gap:0; }
.editor-toggle { display:flex;align-items:center;gap:10px;min-height:48px;padding:0;border:0;background:transparent;color:var(--text-main);font:inherit;font-weight:600;cursor:pointer;text-align:left; }
.is-collapsed .editor-toggle { padding:12px 18px; }
.editor-toggle:hover { color:#d6c1f5; }
.fold-arrow { display:inline-block;color:#bca6eb;transition:transform 160ms ease-out; }
[aria-expanded=true] > .fold-arrow { transform:rotate(90deg); }
.editor-body { display:grid;gap:16px;animation:foldReveal 150ms ease-out; }
@keyframes foldReveal { from { opacity:0;transform:translateY(-3px); } to { opacity:1;transform:none; } }
@media(max-width:850px) {
    #weatherToggle { display:inline-flex;align-items:center;justify-content:center;grid-column:1/-1;justify-self:start;width:44px;height:44px;padding:0;border:1px solid #bca6eb30;border-radius:10px;background:#bca6eb0c;color:#bca6eb;cursor:pointer;font-size:20px; }
    #weatherCard.weather-collapsed { display:block;width:fit-content;max-width:100%;padding:0;border:0;background:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none; }
    #weatherCard.weather-collapsed > :not(#weatherToggle) { display:none!important; }
    #weatherCard:not(.weather-collapsed) .weather-detail { grid-row:auto; }
    #weatherCard:not(.weather-collapsed) > :not(#weatherToggle) { animation:foldReveal 150ms ease-out; }
}
@media(prefers-reduced-motion:reduce) { .fold-arrow { transition:none; } .editor-body, #weatherCard:not(.weather-collapsed) > :not(#weatherToggle) { animation:none; } }

/* Lightweight seven-segment clock: static shapes, opacity changes only. */
#navClock { flex:0 0 174px;display:flex;flex-direction:column;align-items:center;gap:5px;margin:0 auto;padding:5px 8px;color:#fff;contain:layout paint; }
#clockDigits { display:flex;align-items:center;gap:3px;height:28px; }
#clockDigits svg { width:14px;height:28px;overflow:visible; }
#clockDigits polygon { fill:currentColor;opacity:.08;transition:opacity 180ms ease-out; }
#clockDigits polygon.lit { opacity:1; }
.clock-colon { font:600 25px/28px monospace;align-self:center;margin:0 1px; }
#clockDate { color:#c8c0d6;font:10px/1.3 ui-monospace,Consolas,monospace;letter-spacing:1px;white-space:nowrap; }
@media(min-width:851px) and (max-width:1250px) { #topbar .logo { margin-right:8px; } #topbar .nav-link { padding-left:9px;padding-right:9px; } #navClock { flex-basis:144px;padding-left:0;padding-right:0; } }
@media(min-width:851px) and (max-width:1050px) { #topbar { flex-wrap:wrap;height:auto;min-height:86px;padding-top:10px;padding-bottom:10px; } #navClock { order:3;flex-basis:100%;flex-direction:row;justify-content:center;gap:12px; } }
@media(max-width:850px) { #navClock { grid-column:1/-1;grid-row:3;flex-direction:row;justify-content:center;gap:12px;padding:2px 0;margin:0; } #clockDigits { height:22px; } #clockDigits svg { height:22px;width:11px; } .clock-colon { font-size:20px;line-height:22px; } }
@media(prefers-reduced-motion:reduce) { #clockDigits polygon { transition:none; } }

/* Real audio spectrum, a small canvas with no blur or shadow rendering. */
#musicSpectrum { position:fixed;left:0;right:0;bottom:0;width:100%;height:110px;z-index:90;pointer-events:none;opacity:0;transition:opacity 350ms ease; }
#musicSpectrum.is-playing { opacity:1; }
@media(max-width:1100px) { #musicSpectrum { height:72px; } }
@media(max-width:850px) { #musicSpectrum { height:48px; } }
@media(prefers-reduced-motion:reduce) { #musicSpectrum { display:none;transition:none; } }

/* Folded watercooler posts keep the existing panel surface and content. */
.community-post.fold-note { padding:0;overflow:hidden; }
.note-toggle { width:100%;display:flex;align-items:center;gap:12px;min-height:56px;padding:16px 24px;border:0;background:transparent;color:var(--text-main);font:inherit;text-align:left;cursor:pointer; }
.note-toggle:hover { background:#bca6eb0a; }
.note-toggle:focus-visible { outline-offset:-3px; }
.note-toggle .fold-arrow { flex:none; }
.note-summary { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px; }
.note-details { padding:0 24px 24px;animation:foldReveal 160ms ease-out; }
.note-details[hidden] { display:none; }
.fold-note:not(.note-collapsed) .note-toggle { border-bottom:1px solid #bca6eb16;margin-bottom:16px; }
@media(max-width:600px) { .note-toggle { padding:14px 16px;min-height:52px; } .note-details { padding:0 16px 16px; } }
@media(prefers-reduced-motion:reduce) { .note-details { animation:none; } }

/* Sidebar disclosure: keep the handle reachable without animating large surfaces. */
#sidebarToggle { display:flex;align-items:center;justify-content:center;flex:none;width:36px;height:36px;margin:0 0 8px;padding:0;border:1px solid #bca6eb30;border-radius:9px;background:#bca6eb0c;color:#d4c8e6;cursor:pointer; }
#sidebarToggle:hover { background:#bca6eb20;color:#fff; }
#sidebarToggle:focus-visible { outline-offset:-3px; }
.sidebar-icon-fill { fill:currentColor;stroke:none;opacity:.5;transition:opacity 150ms ease; }
.sidebar-collapsed .sidebar-icon-fill { opacity:0; }
@media(min-width:851px) {
    /* Reveal the fixed-size surface without squeezing/reflowing its contents. */
    #sidebar { clip-path:inset(0 0 0 0 round 16px);transition:clip-path 280ms cubic-bezier(.22,.7,.25,1); }
    #sidebarToggle { margin-left:-12px; }
    #sidebar > :not(#sidebarToggle) { opacity:1;visibility:visible;transform:translateX(0);transition:opacity 180ms ease,transform 250ms ease,visibility 0s; }
    #sidebar.sidebar-collapsed { clip-path:inset(0 calc(100% - 44px) 0 0 round 12px); }
    #sidebar.sidebar-collapsed > :not(#sidebarToggle) { opacity:0;visibility:hidden;transform:translateX(-8px);transition:opacity 140ms ease,transform 250ms ease,visibility 0s 280ms; }
    #sidebar.sidebar-collapsed #sidebarToggle { border-color:transparent;background:transparent; }
}
@media(max-width:850px) {
    #sidebarToggle { margin:0; }
    #sidebar.sidebar-collapsed { justify-self:start;width:44px;max-width:100%;height:44px;min-height:0;padding:4px;margin-bottom:0;overflow:hidden;box-sizing:border-box; }
    #sidebar.sidebar-collapsed > :not(#sidebarToggle) { display:none!important; }
    #sidebar.sidebar-collapsed #sidebarToggle { margin:0;border-color:transparent;background:transparent; }
}
@media(prefers-reduced-motion:reduce) { .sidebar-icon-fill { transition:none; } }

/* Collapsed rail navigation shares the sidebar surface and theme opacity. */
#sidebar #sidebarShortcuts { display:none; }
#sidebar.sidebar-collapsed #sidebarShortcuts { display:grid!important;position:absolute;top:70px;left:4px;width:36px;gap:16px;opacity:1;visibility:visible;transform:none;transition:opacity 180ms ease; }
.sidebar-shortcut { display:grid;place-items:center;width:36px;height:40px;box-sizing:border-box;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--text-sub);font-size:15px;text-decoration:none;transition:background-color 150ms ease,color 150ms ease; }
.sidebar-shortcut:hover { background:#bca6eb18;color:var(--text-main); }
.sidebar-shortcut.active { color:#dcc9fa;background:#bca6eb1c;border-color:#bca6eb30; }
.sidebar-shortcut:focus-visible { outline-offset:-3px; }
@media(max-width:850px) { #sidebar.sidebar-collapsed { position:relative;height:280px; } #sidebar.sidebar-collapsed #sidebarShortcuts { top:52px;gap:12px; } }
@media(max-width:850px) { #sidebar.sidebar-collapsed { align-items:flex-start;align-content:flex-start; } }
