.hh-attachments{margin:0 0 8px;font-size:12px;color:#607087;min-width:0}
.hh-drop-zone{position:relative}
.hh-drop-zone.is-file-drag::after{content:"松开添加文件 · 发送前可移除";position:absolute;inset:0;z-index:6;display:flex;align-items:center;justify-content:center;pointer-events:none;border:2px dashed #66a487;border-radius:12px;background:#f1fbf6ee;color:#277655;font-size:13px;font-weight:500}
.hh-attachment-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:7px;min-height:30px}
.hh-attachment-toolbar button{border:1px solid #dce4ee;border-radius:9px;background:#fff;color:#45576c;font-size:12px;line-height:1.4;padding:5px 9px;cursor:pointer}
.hh-attachment-toolbar button:hover{background:#f2f6fd;border-color:#bad0f0}
.hh-attachment-toolbar button:disabled{cursor:default;opacity:.45}
.hh-attachment-add span{font-size:16px;vertical-align:-1px;margin-right:3px}
.hh-attachment-hint{font-size:11px;color:#8b98aa;margin-left:2px}
.hh-attachment-record.is-recording{color:#b52939;background:#fff2f3;border-color:#edbcc1}
.hh-record-cancel{color:#7b6470!important}
.hh-attachment-drafts{display:flex;flex-wrap:wrap;gap:7px;margin-top:0}
.hh-attachment-drafts:not(:empty){margin-top:8px}
.hh-attachment-draft{position:relative;display:flex;align-items:center;gap:8px;max-width:100%;width:230px;box-sizing:border-box;border:1px solid #dce5f1;background:#f8faff;border-radius:11px;padding:8px;color:#52647a}
.hh-draft-thumbnail{width:42px;height:42px;object-fit:cover;border-radius:7px;flex:0 0 42px;background:#e7edf7}
.hh-draft-kind{display:flex;align-items:center;justify-content:center;flex:0 0 39px;width:39px;height:40px;border-radius:7px;background:#eaf0fa;color:#5280be;font-size:11px}
.hh-draft-body{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.hh-draft-body strong{font-size:12px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#304860}
.hh-draft-body small{font-size:10px;color:#94a2b5}
.hh-draft-status{font-size:10px;overflow-wrap:anywhere}
.hh-draft-uploading .hh-draft-status,.hh-draft-processing .hh-draft-status{color:#507bc3}
.hh-draft-error{border-color:#efc6c6;background:#fff9f9}
.hh-draft-error .hh-draft-status{color:#a5484b}
.hh-draft-actions{display:flex;gap:3px;align-self:flex-start}
.hh-draft-actions button{border:0;background:transparent;color:#7b8fa6;cursor:pointer;padding:1px 3px;font-size:12px}
.hh-draft-actions button:last-child{font-size:18px;line-height:20px}
.hh-draft-transcript{flex:1 0 100%;min-width:0;margin-top:2px;display:flex;flex-direction:column;gap:5px}
.hh-attachment-draft:has(.hh-draft-transcript){flex-wrap:wrap;width:370px}
.hh-draft-transcript label{font-size:10px;color:#6c7e95}
.hh-transcript-preview{margin:0;color:#45617e;font-size:11px;line-height:1.5;max-height:66px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
.hh-draft-transcript>small{font-size:10px;color:#8496aa}
.hh-draft-transcript textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:46px;max-height:120px;outline:none;border:1px solid #d8e2ee;border-radius:7px;background:#fff;color:#334b65;font-family:inherit;font-size:12px;line-height:1.5;padding:6px 8px}
.hh-draft-transcript textarea:focus{border-color:#88b2ee}
.hh-draft-transcript button{align-self:flex-end;border:0;background:transparent;color:#3a77c5;font-size:11px;cursor:pointer;padding:1px 3px}
.hh-message-attachments{display:flex;flex-wrap:wrap;gap:8px;margin-top:9px;max-width:100%}
.hh-message-attachments a{text-decoration:none}
.hh-message-image{display:flex;flex-direction:column;gap:3px;max-width:min(340px,100%);color:#6b7c93!important;font-size:11px}
.hh-message-image img{display:block;max-width:100%;max-height:300px;object-fit:contain;border:1px solid #dce4ef;border-radius:10px;background:#fff}
.hh-message-image span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hh-message-file{display:flex;align-items:center;gap:10px;max-width:100%;border:1px solid #dce6f3;border-radius:10px;background:#fff;padding:9px 12px;color:#426187!important;font-size:12px}
.hh-message-file>span:first-child{font-size:22px;color:#5790d5}
.hh-message-file>span:last-child{min-width:0;overflow-wrap:anywhere}
.hh-message-file small{display:block;font-size:10px;color:#8a9bb1;margin-top:3px}
.hh-message-audio{display:flex;flex-direction:column;gap:5px;max-width:100%;color:#698097;font-size:11px}
.hh-message-audio audio{width:280px;max-width:100%;height:38px}
@media(max-width:600px){.hh-attachment-hint{flex:1 0 100%;margin:0}.hh-attachment-draft{width:100%}.hh-attachment-draft:has(.hh-draft-transcript){width:100%}.hh-message-audio audio{width:240px}.hh-message-image{max-width:100%}}
/* Dictation stays beside the composer; its waveform reflects the microphone. */
.composer-box .hh-attachment-toolbar .hh-attachment-record:not(.is-recording){width:auto;font-size:12px;gap:4px}
.hh-voice-panel[hidden]{display:none!important}
.hh-voice-panel{position:absolute;inset:auto 0 calc(100% + 10px);z-index:9;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px 18px;padding:16px 18px;border:1px solid var(--line,#e1e7e3);border-radius:16px;background:var(--surface,#fff);color:var(--ink,#25352c);box-shadow:0 8px 32px #142b1e16}
.hh-voice-info{display:flex;align-items:center;gap:8px;font-size:13px;min-width:0}
.hh-voice-dot{width:7px;height:7px;border-radius:50%;background:#e25a55;box-shadow:0 0 0 4px #e25a5512;flex-shrink:0}
.hh-voice-info time{margin-left:auto;color:var(--muted,#77857d);font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}
.hh-voice-wave{grid-column:1;display:flex;align-items:center;justify-content:center;gap:4px;height:32px;overflow:hidden}
.hh-voice-wave i{height:3px;width:4px;flex:0 1 4px;border-radius:3px;background:#28a370;transition:height .07s linear}
.hh-voice-actions{grid-column:2;grid-row:1/3;display:flex;align-items:center;gap:8px}
.composer-box .hh-voice-actions button{min-height:36px;padding:7px 12px;border:0;border-radius:9px;background:var(--surface-soft,#f0f3f1);font-size:12px;cursor:pointer}
.composer-box .hh-voice-actions .hh-voice-finish{background:#08a65a;color:white}
.hh-voice-actions button:disabled{opacity:.45;cursor:default}
.hh-voice-panel>small{grid-column:1/-1;font-size:11px;color:var(--muted,#7c8880)}
.hh-voice-panel.is-acquiring .hh-voice-dot{background:#a4ada8;box-shadow:none}
.hh-voice-panel.is-acquiring .hh-voice-wave i{background:#c2cbc6}
.group-compose-tools .hh-voice-only{display:contents}
.group-compose-tools .hh-voice-only .hh-attachment-toolbar{display:inline-flex;min-height:28px}
.group-compose-tools .hh-voice-only .hh-attachment-drafts:not(:empty){position:absolute;bottom:calc(100% + 10px);left:0;right:0;z-index:8;margin:0;padding:8px;border-radius:12px;background:var(--surface,#fff);box-shadow:0 8px 32px #142b1e16}
.hh-voice-only .hh-attachment-toolbar [hidden]{display:none!important}
@media(max-width:540px){.hh-voice-panel{padding:12px;gap:10px}.hh-voice-info{grid-column:1/-1}.hh-voice-wave{grid-row:2}.hh-voice-actions{grid-row:2}.hh-voice-wave i{width:3px}.hh-voice-panel>small{line-height:1.5}}
@media(prefers-reduced-motion:reduce){.hh-voice-wave i{transition:none}}
.hh-dictation-progress{display:flex;align-items:center;flex-wrap:wrap;gap:8px;width:100%;box-sizing:border-box;padding:9px 12px;border:1px solid var(--line,#e1e7e3);border-radius:10px;background:var(--surface,#fff);font-size:12px;color:var(--ink,#33453a)}
.hh-dictation-state{flex:1;min-width:0;overflow-wrap:anywhere}
.hh-dictation-progress .hh-draft-actions{align-self:center}
.hh-dictation-progress .hh-draft-actions button{font-size:12px;line-height:20px;color:var(--muted,#7c8880);padding:1px 5px}
.hh-dictation-progress.hh-draft-error{color:#b24b46}
.hh-dictation-progress .hh-transcript-preview{flex:1 0 100%;font-size:12px}
.hh-dictation-progress>button{border:0;padding:5px 8px;border-radius:6px;background:#eef8f2;color:#238153;cursor:pointer}
.hh-dictation-progress.hh-draft-processing .hh-dictation-state::before,.hh-dictation-progress.hh-draft-uploading .hh-dictation-state::before{content:'';display:inline-block;width:11px;height:11px;margin-right:7px;vertical-align:-2px;border:1.5px solid #c4ded0;border-top-color:#2a9b64;border-radius:50%;animation:hh-voice-spin .8s linear infinite}
@keyframes hh-voice-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.hh-dictation-progress .hh-dictation-state::before{animation:none!important}}
/* The group toolbar must not become a narrow positioning box for dictation. */
.group-frame .composer-box .group-compose-tools .hh-voice-only{display:contents;position:static}
.group-frame .composer-box .group-compose-tools{position:static}

.hh-draft-uploading .hh-draft-status::before,.hh-draft-processing .hh-draft-status::before{content:'';display:inline-block;width:9px;height:9px;margin-right:5px;border:1.5px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-1px;animation:hh-file-upload-spin .8s linear infinite}
@keyframes hh-file-upload-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.hh-draft-status::before{animation:none!important}}
