.chat-main{max-width:1320px;margin:20px auto;padding-bottom:30px}.chat-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:18px;height:calc(100dvh - 160px);min-height:500px}.chat-sidebar,.chat-room{border:1px solid #3a3248;border-radius:18px;background:#1b1923;min-width:0;overflow:auto;padding:18px}.chat-room{display:flex;flex-direction:column}.chat-toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between}.chat-toolbar h1,.chat-toolbar h2{font-size:20px;margin:8px 0;overflow-wrap:anywhere}.chat-sidebar>button{margin-bottom:14px;font-size:12px}.chat-quick{display:flex;gap:8px;margin-bottom:14px}.chat-quick button{flex:1;min-width:0;padding:11px 6px;font-size:13px;border-radius:14px}#rooms{display:grid;gap:8px}#rooms button{text-align:left;white-space:normal;overflow-wrap:anywhere}#rooms button.active{background:#d4b5fa;color:#231831}#members{display:flex;gap:6px;flex-wrap:wrap;padding:8px 0;max-height:90px;overflow:auto}#members button{font-size:12px;padding:5px 8px}#messages{flex:1;min-height:120px;overflow-y:auto;padding:12px 4px;overscroll-behavior:contain}.message{max-width:85%;margin:0 auto 16px 0;padding:12px;border-radius:14px;background:transparent;overflow-wrap:anywhere}.message.mine{margin-left:auto;margin-right:0;background:transparent}.message-head{display:flex;align-items:center;gap:10px;margin-bottom:8px;font-size:11px;color:#b6a8c7}.message-head button{padding:0;border:0;background:none;color:#dbc5f6;font-size:12px}.message p{white-space:pre-wrap;margin:4px 0;line-height:1.6}.message .chat-read-state{display:flex;justify-content:flex-end;align-items:center;gap:3px;margin-top:6px;font-size:11px;color:#9b8cb0;min-height:20px}.chat-read-avatar{width:20px;height:20px;border-radius:50%;object-fit:cover;border:2px solid #1b1923;box-sizing:border-box}html[data-mode=light] .chat-read-avatar{border-color:#fff}.chat-read-count{font-style:normal;font-size:11px;color:#9b8cb0;margin-left:2px}.chat-voice{display:inline-flex;align-items:center;gap:8px;margin-top:8px;padding:8px 14px;border-radius:20px;background:#2a2436;color:#e4def0;height:36px;box-sizing:border-box;width:86px;cursor:pointer}.message.mine .chat-voice{background:#7b5cc0;color:#fff}.chat-voice-play{display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#fff;color:#7b5cc0;flex:none}.chat-voice-wave{display:inline-flex;align-items:center;gap:3px}.chat-voice-wave i{display:inline-block;width:3px;border-radius:2px;background:currentColor;height:12px;opacity:.75}.chat-voice-wave i:nth-child(1){height:8px}.chat-voice-wave i:nth-child(2){height:14px}.chat-voice-wave i:nth-child(3){height:10px}.chat-voice-wave i:nth-child(4){height:14px}.chat-voice.is-playing .chat-voice-wave i{animation:chatwave 1s ease-in-out infinite}.chat-voice.is-playing .chat-voice-wave i:nth-child(2){animation-delay:.15s}.chat-voice.is-playing .chat-voice-wave i:nth-child(3){animation-delay:.3s}.chat-voice.is-playing .chat-voice-wave i:nth-child(4){animation-delay:.45s}@keyframes chatwave{0%,100%{transform:scaleY(.45)}50%{transform:scaleY(1.15)}}.chat-voice-sec{font-size:12px;color:inherit;min-width:20px;font-variant-numeric:tabular-nums;opacity:.9}html[data-mode=light] .chat-voice{background:#eef0f6;color:#5b5568}html[data-mode=light] .message.mine .chat-voice{background:#bda7e8;color:#3a2a55}html[data-mode=light] .chat-voice-play{color:#7b5cc0}.chat-compose #voiceBtn.recording{background:#e0475f;color:#fff}.chat-song{display:flex;flex-direction:column;gap:8px;margin-top:10px;padding:12px;border:1px solid #655176;border-radius:12px}.chat-song strong{font-size:14px}.chat-song audio{height:36px;max-width:100%}.chat-compose{display:flex;align-items:flex-end;gap:8px}.chat-compose textarea{flex:1;min-width:0;resize:vertical;max-height:180px}.chat-compose button{padding:10px;font-size:13px}.chat-compose .primary{width:auto}#songAttachment{padding:8px 10px;background:#372b48;border-radius:10px;margin:8px 0;font-size:13px}#songAttachment button{padding:3px 8px;margin-left:10px}#chatNotice{font-size:13px;color:#d6bcff}dialog{max-height:85dvh;overflow:auto}dialog select{width:100%;padding:10px;background:#18151f;color:#eee;border:1px solid #655176;border-radius:9px}.user-result{display:flex;gap:8px;justify-content:space-between;align-items:center;margin:10px 0}.user-result button{font-size:12px;padding:7px 10px}#songChoices,#profileSongs{display:grid;gap:10px;margin:14px 0}#songChoices button{text-align:left;white-space:normal}.profile-avatar{width:64px;height:64px;object-fit:cover;border-radius:18px}.chat-nav-link{display:inline-block;font-size:13px;margin:6px 12px 10px 0;color:#d8b9fa}.song-social a{font-size:13px;padding:7px 5px}.chat-main [hidden]{display:none!important}
.profile-banner{display:flex;gap:16px;align-items:center;padding:18px;border-radius:16px;background:linear-gradient(135deg,#3a2b56,#2a2138);border:1px solid #655176}
.profile-avatar-wrap{flex:none}
.profile-avatar-wrap img{width:84px;height:84px;border-radius:50%;object-fit:cover;border:3px solid #d4b5fa;display:block}
.profile-info h2{font-size:22px;margin:0;color:#f2ecff}
.profile-info div{color:#c9b6e0;font-size:13px}
.profile-info p{color:#b6a8c7;font-size:13px;margin:6px 0 0;max-width:420px}
#profileDialog{width:min(94vw,780px)}
#profileSongs{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px;margin:14px 0}
@media(max-width:560px){#profileSongs{grid-template-columns:repeat(3,1fr)}}
.profile-song{background:#22202b;border:1px solid #3a3248;border-radius:14px;padding:10px;overflow:hidden}
.profile-song-cover{position:relative;aspect-ratio:1/1;border-radius:10px;overflow:hidden;background:#2a2536}
.profile-song-cover img{width:100%;height:100%;object-fit:cover;display:block}
.profile-song-play{position:absolute;right:6px;bottom:6px;width:36px;height:36px;border-radius:50%;background:rgba(0,0,0,.6);color:#fff;border:0;cursor:pointer;display:flex;align-items:center;justify-content:center}
.profile-song.is-playing .profile-song-play{background:#d4b5fa;color:#231831}
.profile-song>div:nth-child(2){color:#f2ecff;font-size:13px;font-weight:600;margin-top:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-song>small{color:#b6a8c7;font-size:11px;display:block;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-mode=light] :is(.chat-sidebar,.chat-room){background:#fff;border-color:#dcd5e6}html[data-mode=light] .message{background:#f0edf6}html[data-mode=light] .message.mine,html[data-mode=light] #songAttachment{background:#e9dcf7;color:#362148}html[data-mode=light] .message-head button{color:#653c91}html[data-mode=light] #chatNotice{color:#60368d}
@media(max-width:760px){.chat-main{padding:0 12px 30px}.chat-layout{display:flex;flex-direction:column;height:auto;min-height:0}.chat-sidebar{max-height:230px;padding:12px}.chat-room{height:calc(100dvh - 130px);min-height:450px;padding:12px}.chat-compose{flex-wrap:wrap}.chat-compose textarea{flex-basis:100%}.chat-compose button{flex:1}.message{max-width:95%}.chat-toolbar h2{font-size:16px}.space-nav{flex-wrap:wrap}.space-nav nav{align-items:center;gap:10px}#rooms{grid-template-columns:repeat(2,minmax(0,1fr))}}

.chat-system-message{text-align:center;margin:16px auto;padding:8px 12px;max-width:90%;font-size:12px;color:#b4a4c9}.chat-system-message small{color:#cdb3ed}.chat-system-message p{margin:5px 0;line-height:1.6;overflow-wrap:anywhere}html[data-mode=light] .chat-system-message,html[data-mode=light] .chat-system-message small{color:#73528d}

#memberDetails{flex-shrink:0;margin:0 0 8px}#memberDetails>summary{cursor:pointer;font-size:12px;color:#bba6d0;padding:6px 0;width:fit-content}html[data-mode=light] #memberDetails>summary{color:#73528d}

.chat-song.music-share{display:grid;grid-template-columns:68px minmax(0,1fr) 44px;gap:12px 14px;padding:16px;max-width:520px;background:linear-gradient(120deg,#3b2b4e,#272234);border:1px solid #8b6ca44d;box-shadow:0 6px 20px #0001;border-radius:16px}.chat-cover{position:relative;width:68px;height:68px;border-radius:12px;overflow:hidden;display:grid;place-items:center;background:linear-gradient(135deg,#85629c,#493b66);color:#ead5ff;font-size:30px}.chat-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.chat-song-info{min-width:0;display:flex;flex-direction:column;justify-content:center;gap:5px}.chat-song-info small{font-size:9px;letter-spacing:2px;color:#bf9edd}.chat-song-info strong{font-size:16px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-song-info>span{font-size:12px;color:#c0b1cd;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-play{align-self:center;display:grid;place-items:center;width:44px;height:44px;padding:0!important;border:0;border-radius:50%;background:#dbc0ff;color:#342044;box-shadow:0 4px 15px #150e2526}.chat-play span{display:block;width:15px;height:18px;background:currentColor;clip-path:polygon(10% 0,100% 50%,10% 100%)}.chat-play.playing span{clip-path:none;background:linear-gradient(to right,currentColor 0 30%,transparent 30% 70%,currentColor 70% 100%)}.chat-song-timeline{grid-column:1/-1;display:flex;align-items:center;gap:10px}.chat-song-timeline output{font-size:11px;font-variant-numeric:tabular-nums;color:#cbbbd9}.chat-song-timeline input{flex:1;min-width:0;width:0;height:5px;padding:0;margin:0;accent-color:#d5affb;cursor:pointer}.chat-song-state{grid-column:1/-1;font-size:11px;color:#bca8cd}.music-share.is-playing{border-color:#b997e3aa}.music-share audio{display:none!important}html[data-mode=light] .chat-song.music-share{background:linear-gradient(120deg,#faf6ff,#eee5f8);border-color:#d6c3e8}html[data-mode=light] .chat-song-info>span,html[data-mode=light] .chat-song-state,html[data-mode=light] .chat-song-timeline output{color:#735b86}html[data-mode=light] .chat-play{background:#ddc4fa;color:#432857}@media(max-width:600px){.chat-song.music-share{grid-template-columns:54px minmax(0,1fr) 38px;gap:10px;padding:12px}.chat-cover{width:54px;height:54px;border-radius:10px}.chat-play{width:38px;height:38px}.chat-song-info strong{font-size:14px}.chat-song-info small{font-size:8px}.message:has(.music-share){max-width:100%;padding:10px}}

.chat-spectrum{grid-column:1/-1;width:100%;height:32px;display:block;opacity:.9}.chat-spectrum[hidden]{display:none!important}@media(prefers-reduced-motion:reduce){.chat-spectrum{display:none!important}}
.chat-song.music-share{box-sizing:border-box;width:min(100%,360px);max-width:360px;grid-template-columns:42px minmax(0,1fr) 44px;gap:6px 9px;padding:10px;border-radius:12px;box-shadow:none}
.chat-song.music-share .chat-cover{width:42px;height:42px;border-radius:8px;font-size:22px}
.chat-song.music-share .chat-song-info{gap:3px}.chat-song.music-share .chat-song-info small{display:none}.chat-song.music-share .chat-song-info strong{font-size:13px;line-height:1.35}.chat-song.music-share .chat-song-info>span{font-size:11px}
.chat-song.music-share .chat-play{width:44px;height:44px}.chat-song.music-share .chat-song-timeline{gap:7px}.chat-song.music-share .chat-song-state{font-size:10px;line-height:1.3}.chat-song.music-share .chat-spectrum{height:22px}
@media(max-width:600px){.chat-song.music-share{max-width:100%;grid-template-columns:38px minmax(0,1fr) 44px;padding:9px;gap:6px 8px}.chat-song.music-share .chat-cover{width:38px;height:38px}.message:has(.music-share){max-width:100%}}
/* 全屏聊天：隐藏侧栏与外壳干扰，聊天区铺满 */
.chat-room-actions{display:flex;align-items:center;gap:8px}
.chat-room-actions #chatFullscreen{display:grid;place-items:center;width:38px;height:38px;padding:0;border:1px solid #655176;border-radius:10px;background:transparent;color:#d4b5fa;cursor:pointer;transition:all .15s ease}
.chat-room-actions #chatFullscreen svg{width:17px;height:17px}
.chat-room-actions #chatFullscreen:hover{background:#2a2536}
.chat-room-actions #chatFullscreen.active{background:linear-gradient(135deg,#c9f98d,#91c34e);color:#17230e;border-color:transparent}
html[data-mode=light] .chat-room-actions #chatFullscreen{color:#653c91;border-color:#d6c3e8}
html[data-mode=light] .chat-room-actions #chatFullscreen:hover{background:#f0edf6}
html[data-mode=light] .chat-room-actions #chatFullscreen.active{color:#17230e}
html.chat-fullscreen .chat-main{max-width:none;margin:0;padding:0}
html.chat-fullscreen .chat-layout{grid-template-columns:1fr;height:100dvh;min-height:0}
html.chat-fullscreen .chat-sidebar{display:none}
html.chat-fullscreen .chat-room{border:0;border-radius:0;height:100dvh;min-height:0;overflow:hidden}
html.chat-fullscreen #messages{height:auto}
@media(max-width:760px){
  html.chat-fullscreen .chat-main{padding:0}
  html.chat-fullscreen .chat-layout{display:block;height:100dvh}
  html.chat-fullscreen .chat-sidebar{display:none}
  html.chat-fullscreen .chat-room{height:100dvh;min-height:0;border:0;border-radius:0;padding:10px 8px}
}
.music-share-lyrics{grid-column:1/-1;max-height:210px;overflow:hidden;text-align:center;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;border-top:1px solid #ffffff14;padding-top:8px;margin-top:2px}
.ms-lyric-scroll{max-height:200px;overflow:hidden;display:block;width:100%;writing-mode:horizontal-tb;text-orientation:mixed}
.ms-lyric-line{display:block;width:100%;box-sizing:border-box;font-size:13px;color:#a892bb;line-height:1.9;padding:1px 6px;transition:color .3s,font-size .3s,font-weight .3s;white-space:pre-wrap;word-break:normal;text-align:center;writing-mode:horizontal-tb}
.ms-lyric-line.active{color:#f0e2ff;font-size:15px;font-weight:600}
html[data-mode=light] .ms-lyric-line{color:#8a7396}
html[data-mode=light] .ms-lyric-line.active{color:#4a2e66}
.chat-compose{display:flex;align-items:flex-end;gap:8px;padding:8px 10px;flex-wrap:wrap}
.chat-compose textarea{flex:1;min-width:120px}
.chat-compose button{white-space:nowrap}
.chat-media{max-width:min(200px,55%);border-radius:12px;margin-top:6px;display:block;overflow:hidden}
.message .chat-media{max-width:min(200px,55%)}
.message.mine .chat-media{margin-left:auto}
.chat-media img{width:100%;display:block;border-radius:12px;cursor:zoom-in;object-fit:cover}
.chat-media video{width:100%;display:block;border-radius:12px;background:#000}
@media(max-width:760px){.chat-media{max-width:60%}}
.at-suggest{position:absolute;bottom:64px;left:10px;display:flex;flex-wrap:wrap;gap:6px;background:#262b36;border:1px solid #3a3f4a;border-radius:12px;padding:8px;z-index:30;max-width:260px}
.at-suggest button{padding:5px 9px;font-size:12px;border-radius:8px;background:#333a48;border:0;color:#e6e0f2}
.at-suggest button:hover{background:#4b475e}
.at-name{color:#d4b5fa;font-weight:600}
.chat-compose{position:relative}
