/* An optional song panel; nothing is added to the textarea's layered layout. */
#edVoice { gap: 7px; }
#edVoice svg { width: 20px; height: 20px; flex: none; }
body.skin-fresh #edVoice { order: 6; }
body.skin-fresh #edVoice .ed-btn-l { display: none; }
.voice-panel, .voice-dock { color: #f5f3ef; background: #1d1c20; border: 1px solid #454149; border-radius: 20px; box-shadow: 0 20px 70px #0008; font-size: 14px; line-height: 1.5; }
.voice-panel *, .voice-dock * { box-sizing: border-box; }
.voice-panel [hidden], .voice-dock [hidden], .voice-panel[hidden], .voice-dock[hidden] { display: none !important; }
.voice-panel { position: fixed; z-index: 160; top: calc(74px + env(safe-area-inset-top, 0px)); right: 16px; width: min(390px, calc(100vw - 24px)); max-height: calc(100dvh - 98px - env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; overflow: hidden; }
.voice-head { padding: 18px 18px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid #ffffff12; }
.voice-head h2 { margin: 0; font-size: 20px; letter-spacing: -.4px; font-weight: 750; color: #fff; }
.voice-head p { margin: 3px 0 0; color: #bbb6c0; max-width: 280px; overflow-wrap: anywhere; font-size: 12px; }
.voice-body { overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px; }
.voice-panel button, .voice-dock button { font: inherit; cursor: pointer; color: inherit; background: #343139; border: 1px solid #ffffff18; border-radius: 10px; padding: 9px 12px; min-height: 40px; }
.voice-panel button:hover, .voice-dock button:hover { background: #45414b; }
.voice-panel button:disabled, .voice-dock button:disabled { opacity: .5; cursor: default; }
.voice-panel :focus-visible, .voice-dock :focus-visible { outline: 2px solid #fff312; outline-offset: 3px; }
.voice-panel .voice-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; min-width: 40px; height: 40px; padding: 9px; border-radius: 50%; }
.voice-panel svg { width: 19px; height: 19px; flex: none; }
.voice-local { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .9px; font-weight: 650; color: #d1cad5; }
.voice-local::before { content: ""; width: 6px; height: 6px; background: #d6cf69; border-radius: 50%; }
.voice-privacy { font-size: 12px; margin: 5px 0 16px; color: #b8b2bf; }
.voice-notice { margin-bottom: 18px; padding: 13px; border-radius: 12px; background: #363322; border: 1px solid #d9c84b44; }
.voice-notice p { font-size: 12px; margin: 0 0 10px; color: #ede8d1; }
.voice-panel .voice-record { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: #d54d59; border-color: #ee6875; font-weight: 700; }
.voice-panel .voice-record:hover { background: #e05a66; }
.voice-message { padding: 10px 12px; border-radius: 10px; font-size: 12px; background: #293b31; color: #dbf4e4; margin: 12px 0; overflow-wrap: anywhere; }
.voice-message.voice-error { background: #41282d; color: #ffd4da; }
.voice-all { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; font-size: 11px; color: #c6bfcd; cursor: pointer; }
.voice-all input { accent-color: #fff312; width: 16px; height: 16px; flex: none; }
.voice-list { display: flex; flex-direction: column; }
.voice-item { padding: 15px 0; border-bottom: 1px solid #ffffff12; min-width: 0; }
.voice-item-top { display: flex; align-items: center; gap: 10px; }
.voice-item-copy { min-width: 0; display: flex; flex-direction: column; }
.voice-name { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.voice-item-copy > span { color: #b7b1bd; font-size: 11px; margin-top: 3px; overflow-wrap: anywhere; }
.voice-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.voice-actions button { background: transparent; font-size: 11px; padding: 5px 9px; min-height: 34px; }
.voice-panel .voice-danger, .voice-dock .voice-danger { color: #ffa9b3; }
.voice-empty { padding: 15px 8px; color: #bcb5c3; font-size: 13px; text-align: center; }
.voice-usage { color: #aaa3b2; font-size: 11px; margin: 14px 0 0; }
.voice-player { margin-top: 12px; }
.voice-player audio { display: block; width: 100%; height: 40px; }
.voice-rename { margin-top: 12px; }
.voice-rename label { display: block; font-size: 12px; }
.voice-rename input { display: block; margin-top: 5px; width: 100%; background: #111014; color: #fff; border: 1px solid #766c80; border-radius: 8px; padding: 9px; font: inherit; }
.voice-rename > div { display: flex; gap: 8px; margin-top: 8px; }
.voice-dock { position: fixed; z-index: 170; bottom: max(16px, env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); width: min(620px, calc(100vw - 24px)); padding: 16px 20px; }
.voice-dock-main { display: flex; align-items: center; gap: 20px; }
.voice-dock-copy { display: flex; flex-direction: column; min-width: 95px; max-width: 180px; }
#voiceState { font-size: 11px; color: #ff9da9; }
#voiceTimer { font-size: 27px; font-weight: 550; font-variant-numeric: tabular-nums; letter-spacing: .8px; }
#voiceDockProject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #c6bfcd; }
#voiceWave { flex: 1; min-width: 0; width: 200px; height: 54px; }
.voice-dock .voice-stop { display: grid; place-items: center; background: #d94c58; border: 4px solid #1d1c20; outline: 1px solid #ef7580; width: 66px; height: 66px; border-radius: 50%; padding: 0; flex: none; }
.voice-stop > span { width: 23px; height: 23px; border-radius: 5px; background: #fff; }
.voice-recovery { font-size: 12px; }
.voice-recovery p { color: #ffd4da; margin: 12px 0; }
.voice-recovery > div { display: flex; flex-wrap: wrap; gap: 8px; }
.voice-dock.is-pending #voiceWave, .voice-dock.is-pending #voiceState { display: none; }
body.voice-active .voice-panel { max-height: calc(100dvh - 285px - env(safe-area-inset-top, 0px)); }
@media (max-width: 760px) {
  body.skin-fresh #edVoice { display: none !important; }
  .voice-panel { top: auto; bottom: max(12px, env(safe-area-inset-bottom, 0px)); right: 12px; width: calc(100vw - 24px); max-height: calc(100dvh - 110px - env(safe-area-inset-top, 0px)); border-radius: 22px; }
  .voice-head { padding: 15px 16px 12px; }
  .voice-body { padding: 14px 16px; }
  .voice-panel button { min-height: 42px; }
  .voice-dock { padding: 12px 15px; }
  .voice-dock-main { gap: 12px; }
  #voiceTimer { font-size: 24px; }
  .voice-dock-copy { max-width: 140px; }
  .voice-dock .voice-stop { width: 58px; height: 58px; }
  body.voice-active .voice-panel { bottom: calc(155px + env(safe-area-inset-bottom, 0px)); max-height: calc(100dvh - 245px - env(safe-area-inset-top, 0px)); }
  body.voice-recovering .voice-panel { bottom: calc(270px + env(safe-area-inset-bottom, 0px)); max-height: calc(100dvh - 345px - env(safe-area-inset-top, 0px)); }
}
