.attachment-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; min-height: 68px; margin: 10px 0 2px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 9px; background: color-mix(in srgb, var(--input) 38%, transparent); transition: border-color .12s ease, background-color .12s ease; }
.attachment-picker.is-dragging { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, var(--card)); }
.attachment-drop-copy { display: grid; min-width: 0; }
.attachment-drop-copy strong { font-size: .86rem; line-height: 1.45; }
.attachment-drop-copy small { color: var(--muted); font-size: .72rem; line-height: 1.5; }
.attachment-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; width: fit-content; margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: transparent; cursor: pointer; font-size: .8rem; }
.attachment-button:hover { background: var(--input); }
.attachment-button input { position: absolute; width: 1px; min-height: 1px; opacity: 0; pointer-events: none; }
.attachment-list { grid-column: 1 / -1; display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.attachment-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; min-height: 40px; padding: 5px 7px 5px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--sidebar); font-size: .78rem; }
.attachment-item > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-item small { color: var(--muted); }
.attachment-item.state-error { border-color: var(--failed); }
.attachment-item.state-error small { color: var(--failed); }
.attachment-item button { min-height: 34px; padding: 5px 9px; background: transparent; border-color: var(--line); color: var(--muted); font-size: .72rem; }
.task-attachments { display: flex; flex-wrap: wrap; gap: 7px; margin: 9px 0 14px; }
.task-attachments strong { width: 100%; color: var(--muted); font-size: .72rem; }
.task-attachments span { display: inline-flex; padding: 3px 8px; border-radius: 999px; background: var(--input); color: var(--muted); font-size: .72rem; }

@media (max-width: 760px) {
  .attachment-picker { grid-template-columns: minmax(0, 1fr) auto; min-height: 64px; padding: 9px 10px; }
  .attachment-drop-copy strong { font-size: .8rem; }
  .attachment-drop-copy small { font-size: .66rem; }
  .attachment-button { padding: 8px 10px; white-space: nowrap; }
  .attachment-list { grid-column: 1 / -1; }
  .attachment-item { grid-template-columns: minmax(0, 1fr) auto; }
  .attachment-item small { grid-column: 1; }
}
.attachment-preview { width: 52px; height: 52px; object-fit: contain; border-radius: 6px; }
.attachment-history { margin-block: 16px; min-width: 0; }
.task-attachments { display: flex; flex-wrap: wrap; gap: 12px; }
.task-attachments .attachment-card { display: flex; flex-direction: column; gap: 6px; width: min(240px, 100%); min-width: 0; padding: 10px; border: 1px solid var(--border, #ddd); border-radius: 10px; overflow-wrap: anywhere; }
.attachment-card img { width: 100%; max-height: 200px; object-fit: contain; border-radius: 6px; }
.attachment-permission-hint { margin-block: 8px; }
.attachment-item:has(.attachment-preview) { grid-template-columns: 52px minmax(0, 1fr) auto auto; }
.approval-notice { position: fixed; z-index: 50; top: 12px; right: 12px; max-width: min(440px, calc(100vw - 24px)); padding: 12px; border: 2px solid var(--accent, #2563eb); display: grid; gap: 8px; }
