/* Speech controls stay at the edge of the game; media is always opt-in. */
.ddz-chat-voice-tools{display:flex;gap:7px;align-items:center;margin:0 0 8px}
.ddz-chat-voice-tools button{min-height:38px;padding:6px 10px;font-size:11px;flex:1;gap:6px}
.ddz-chat-voice-tools button>span{color:#bfe4e3;font-size:14px}
.ddz-chat-voice-tools #ddz-record-start>span{font-size:10px;color:#edab9d}
.ddz-chat-voice-tools [aria-expanded=true]{border-color:#e5ca8b88;background:#bca56e24;color:#ffe2a4}
.ddz-chat-panel>form{position:relative}
.ddz-phrase-menu{position:absolute;left:10px;right:10px;bottom:calc(100% - 3px);z-index:20;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-height:38dvh;overflow:auto;padding:8px;border:1px solid #95ccd377;border-radius:10px;background:linear-gradient(145deg,#263a53fa,#172c44fc);box-shadow:inset 0 1px 0 #c7ecff0b,0 7px 20px #050c2180}
.ddz-phrase-menu button{border:1px solid #97bcc733;border-radius:7px;min-height:40px;padding:7px 5px;background:#92c6cf0a;color:#dcebe8;font:500 11px/1.4 -apple-system,BlinkMacSystemFont,"Microsoft YaHei",sans-serif;cursor:pointer;white-space:nowrap}
.ddz-phrase-menu button:hover:not(:disabled),.ddz-phrase-menu button:focus-visible{border-color:#d1d5a7a1;background:#bdc78417;color:#ffedc3}
.ddz-record-state{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding:9px;margin-bottom:8px;border:1px solid #e8a79666;border-radius:10px;background:linear-gradient(130deg,#613f4566,#26344e99)}
.ddz-record-led{width:7px;height:7px;border-radius:50%;flex:none;background:#f4a38e;box-shadow:0 0 0 4px #f4a38e13;animation:ddz-record-pulse 1.2s ease-in-out infinite}
#ddz-record-time{font:600 11px/1.5 ui-monospace,Consolas,monospace;min-width:0;flex:1;white-space:nowrap;color:#f4d9cb}
.ddz-record-state button{min-height:36px;padding:5px 9px;font-size:10px}
.ddz-record-preview{display:block;width:100%;height:36px;flex-basis:100%;max-width:100%;color-scheme:dark;margin-top:3px}
.ddz-chat-voice-message{display:flex;align-items:center;gap:9px;border:1px solid #a6d8df55;border-radius:10px;background:linear-gradient(120deg,#476a7a39,#7c88a426);padding:8px 11px;min-height:44px;color:#dbf2ed;font:600 12px/1.4 -apple-system,BlinkMacSystemFont,"Microsoft YaHei",sans-serif;cursor:pointer;min-width:106px;max-width:100%}
.ddz-chat-voice-message:before{content:"▶";font-size:11px;color:#e4d5a8}
.ddz-chat-voice-message[data-playing=true]:before{content:"❚❚";animation:ddz-voice-glow 1s ease-in-out infinite}
.ddz-chat-voice-message[data-playing=true]{border-color:#cbe9c78c;box-shadow:0 0 12px #9bd8c719}
.ddz-chat-voice-message:disabled{opacity:.5;cursor:default}
.ddz-chat-phrase-message:before{content:"♫"}
.ddz-seat[data-speaking=true] .ddz-portrait{outline:2px solid #a3e9cb;outline-offset:3px;box-shadow:0 0 21px #76e1c74d,inset 0 0 0 3px #173d45}
.ddz-voice-count{display:inline-grid;place-items:center;min-width:17px;height:17px;margin-left:4px;padding:0 4px;border:1px solid #8cd1c75e;border-radius:50%;background:#28676c66;color:#d8f6e5;font:700 9px/1 sans-serif}
#ddz-voice-open[data-active=true]{border-color:#84d7c57d;color:#c5f0da;background:linear-gradient(#2a646b66,#21484e88);box-shadow:0 0 11px #79d0c718}
#ddz-voice-open[data-speaking=true]{animation:ddz-voice-glow 1s ease-in-out infinite}
.ddz-voice-dialog,.ddz-audio-dialog{width:min(460px,calc(100vw - 24px));max-height:85dvh;overflow:auto;padding:20px;border-color:#97c6d94d;background:radial-gradient(ellipse at 25% 0,#46657744,transparent 65%),linear-gradient(145deg,#1d324c,#18283f);box-shadow:0 24px 70px #020a1f80,inset 0 1px 0 #cce4ff15}
.ddz-voice-dialog>header,.ddz-audio-dialog>header{margin-bottom:15px;gap:10px}
.ddz-voice-dialog>header h2,.ddz-audio-dialog>header h2{font-size:18px;color:#f3dfb1;letter-spacing:.8px}
.ddz-voice-dialog>header h2>span{display:inline-block;color:#91dace;font-size:21px;margin-right:3px}
.ddz-voice-dialog>header button,.ddz-audio-dialog>header button{font-size:11px;min-height:44px;padding:7px 12px;flex:none}
.ddz-voice-summary{display:flex;gap:14px;align-items:center;padding:15px;border:1px solid #91c7d62e;border-radius:13px;background:linear-gradient(125deg,#4d9b9a14,#98b6d00a)}
.ddz-voice-orb{display:flex;align-items:center;justify-content:center;gap:3px;width:48px;height:48px;flex:none;border:1px solid #b1dad252;border-radius:50%;color:#b9e5d8;background:radial-gradient(ellipse at center,#80d6bb22,#315a6c28);box-shadow:inset 0 0 15px #85b4b618}
.ddz-voice-orb>i{width:3px;height:10px;border-radius:4px;background:currentColor}
.ddz-voice-orb>i:nth-child(2),.ddz-voice-orb>i:nth-child(3){height:22px}
.ddz-voice-dialog[data-speaking=true] .ddz-voice-orb>i{animation:ddz-voice-wave .55s ease-in-out infinite alternate}
.ddz-voice-dialog[data-speaking=true] .ddz-voice-orb>i:nth-child(2){animation-delay:-.2s}.ddz-voice-dialog[data-speaking=true] .ddz-voice-orb>i:nth-child(3){animation-delay:-.4s}
#ddz-voice-status{font-size:13px;line-height:1.7;color:#dcece4;margin:0;overflow-wrap:anywhere}
.ddz-voice-note,.ddz-audio-intro{font-size:11px;line-height:1.8;color:#a5bdd0;margin:11px 1px 14px}
.ddz-voice-members{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.ddz-voice-members:empty{display:none}
.ddz-voice-members>li,.ddz-voice-member{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #9ac8d22c;border-radius:10px;min-height:48px;color:#e1e9ef;background:#0f243955;font-size:12px;overflow-wrap:anywhere}
.ddz-voice-members>li:before{content:"◉";display:grid;place-items:center;flex:none;width:27px;height:27px;border:1px solid #b6d9d73d;border-radius:50%;color:#b0d6d6;background:#254358;font-size:14px}
.ddz-voice-members>li[data-speaking=true]{border-color:#b5e3bf89;background:#6baf9220;box-shadow:0 0 12px #8bddac0b}
.ddz-voice-members>li[data-speaking=true]:before{color:#d5ffd8;animation:ddz-voice-glow .7s ease-in-out infinite alternate}
.ddz-voice-members>li[data-muted=true]:before{content:"⊘";color:#a8bacb}
.ddz-voice-members>li>small{margin-left:auto;color:#9bb8c8;font-size:10px;white-space:nowrap}
.ddz-voice-error{border:1px solid #e1a08f55;background:#773f474a;color:#f1c3b4;border-radius:8px;padding:9px 11px;font-size:11px;line-height:1.7;margin-top:10px}
.ddz-voice-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:17px}
.ddz-voice-actions>button{flex:1;min-height:46px;font-size:12px}
.ddz-audio-control{padding:13px 0;border-top:1px solid #b2d1dc23}
.ddz-music-status{padding:9px 11px;margin:0 0 12px;border:1px solid #91c7d642;border-radius:8px;color:#d6e6b5;background:#7dba9210;font-size:11px;line-height:1.7}
#ddz-audio-open[data-playing=true]{border-color:#b3d69177;color:#e3edc7;background:linear-gradient(#688d622f,#284f4338)}
.ddz-audio-control label{display:flex;gap:12px;align-items:center;justify-content:space-between;color:#dce9ed;font-size:12px;min-height:32px;cursor:pointer}
.ddz-audio-control strong{display:block;color:#e8e9db;font-size:13px;font-weight:650}
.ddz-audio-control select{flex:none;max-width:44%;min-height:44px;padding:6px 8px;border:1px solid #a7c6d65c;border-radius:8px;background:#142a41;color:#e1e9d7;font-size:12px}
.ddz-phrase-menu button{white-space:normal;overflow-wrap:anywhere;text-wrap:balance;line-height:1.45}
.ddz-audio-control small{display:block;color:#93afc4;font-size:10px;font-weight:400;margin-top:3px}
.ddz-audio-toggle>input{appearance:none;position:relative;flex:none;width:42px;height:25px;border:1px solid #a7c6d65c;border-radius:14px;background:#142a41;transition:background .18s,border-color .18s;cursor:pointer}
.ddz-audio-toggle>input:before{content:"";position:absolute;top:3px;left:3px;width:17px;height:17px;border-radius:50%;background:#b8c8d2;transition:translate .18s,background .18s}
.ddz-audio-toggle>input:checked{background:#477870;border-color:#9dd8bf99}.ddz-audio-toggle>input:checked:before{translate:17px 0;background:#e2edc3}
.ddz-audio-control .ddz-audio-slider-label{margin-top:12px;font-size:11px;gap:10px}
.ddz-audio-control output{font:650 11px/1.4 ui-monospace,Consolas,monospace;color:#edcf97}
.ddz-audio-control input[type=range]{display:block;width:100%;height:32px;padding:0;margin:4px 0 0;accent-color:#d9c18d;touch-action:pan-y}
.ddz-audio-control :focus-visible{outline:2px solid #d8cc98;outline-offset:3px}
@keyframes ddz-record-pulse{50%{opacity:.5;box-shadow:0 0 0 6px #f4a38e00}}@keyframes ddz-voice-wave{to{scale:1 .45}}@keyframes ddz-voice-glow{50%{filter:brightness(1.4)}}
@media(max-width:760px){
  .ddz-chat-voice-tools{gap:6px;margin-bottom:7px}.ddz-chat-voice-tools button{min-height:44px;font-size:12px}
  .ddz-phrase-menu button{min-height:44px;font-size:12px}
  .ddz-record-state{gap:6px;padding:8px}.ddz-record-state button{min-height:44px;font-size:11px;padding:6px 10px}
  #ddz-record-time{font-size:10px}.ddz-chat-dialog .ddz-chat-scroll{min-height:36px}
  .ddz-voice-dialog,.ddz-audio-dialog{padding:15px;max-height:88dvh}.ddz-voice-summary{padding:12px;gap:10px}
  .ddz-voice-note,.ddz-audio-intro{font-size:11px}.ddz-voice-dialog>header h2,.ddz-audio-dialog>header h2{font-size:16px}
}
@media(max-height:500px){.ddz-voice-dialog,.ddz-audio-dialog{max-height:94dvh}.ddz-chat-voice-tools{margin-bottom:5px}.ddz-chat-voice-tools button{min-height:36px;padding-block:5px;font-size:10px}.ddz-voice-summary{padding:9px}.ddz-voice-note{margin-block:8px}.ddz-voice-actions{margin-top:10px}}
@media(max-height:500px){
  .ddz-chat-dialog form:has(.ddz-record-state:not([hidden])) .ddz-chat-compose,
  .ddz-chat-dialog form:has(.ddz-record-state:not([hidden])) .ddz-chat-meta{display:none}
}
@media(prefers-reduced-motion:reduce){.ddz-record-led,.ddz-voice-dialog .ddz-voice-orb>i,.ddz-voice-members>li:before,#ddz-voice-open,.ddz-chat-voice-message:before{animation:none!important}.ddz-audio-toggle>input,.ddz-audio-toggle>input:before{transition:none}}
@media(prefers-reduced-transparency:reduce){.ddz-voice-dialog,.ddz-audio-dialog{background:#1d324c;backdrop-filter:none}}
