/* Content stays padded; every separator reaches the containing card's edges. */
.file-list { text-align: left; max-height: 352px; overflow-y: auto; overscroll-behavior: contain; border-block-start: 1px solid var(--line); }
.file-row { display: grid; grid-template-columns: 56px minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 20px var(--transfer-pad, 24px); border-block-end: 1px solid var(--line); }
.file-visual { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 56px; height: 64px; border-radius: 10px; background: var(--bg-2); color: var(--muted); overflow: hidden; }
.file-visual svg { width: 28px; height: 28px; }
.file-extension { font-size: 9px; line-height: 1; letter-spacing: .06em; font-weight: 700; }
.file-kind-image { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent-text); }
.file-kind-archive { background: color-mix(in srgb, #7763b5 10%, var(--surface)); color: #7763b5; }
.file-kind-audio, .file-kind-video { background: color-mix(in srgb, #c17846 10%, var(--surface)); color: #aa683e; }
.file-kind-document, .file-kind-code { background: var(--fern-soft); color: var(--fern); }
.file-visual img { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; }
.file-details { min-width: 0; display: grid; gap: 4px; }
.file-name { font-weight: 600; font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.file-meta, .file-folder { font-size: .8rem; line-height: 1.5; color: var(--muted); }
.file-folder { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-actions { display: flex; align-items: center; gap: 2px; }
.file-action { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 8px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font: inherit; font-size: .8rem; cursor: pointer; }
.file-action svg { width: 20px; height: 20px; }
.file-action:hover:not(:disabled) { background: var(--bg-2); }
.file-action:disabled { opacity: .4; cursor: not-allowed; }
.file-action:focus-visible, .file-preview .btn:focus-visible { outline: 2px solid var(--fern); outline-offset: 3px; }
.file-preview { width: min(880px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.file-preview::backdrop { background: rgb(0 0 0 / .6); backdrop-filter: blur(4px); }
.file-preview [hidden] { display: none !important; }
.file-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.file-preview-head h2 { margin: 0; font-size: 1rem; line-height: 1.5; letter-spacing: 0; overflow-wrap: anywhere; }
.file-preview-head .file-action { flex: none; font-size: 1.7rem; }
.file-preview-body { padding: 24px; min-height: 240px; max-height: 65dvh; overflow: auto; display: grid; align-content: center; justify-items: center; gap: 20px; text-align: center; color: var(--muted); }
.file-preview-body img, .file-preview-body video { display: block; max-width: 100%; max-height: 56dvh; object-fit: contain; }
.file-preview-body audio { max-width: 100%; width: 460px; }
.file-preview-body pre { width: 100%; margin: 0; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); font: .85rem/1.6 ui-monospace, monospace; }
.file-preview-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 24px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.hero-card #selected-files.file-list { --transfer-pad: var(--card-pad); max-height: 300px; margin-top: 12px; }
.hero-card .selection-details summary { min-height: 32px; }
.hero-card .chip-ext.file-visual { width: 56px; height: 64px; border: 0; }
@media(max-width: 480px) {
  .file-row { gap: 12px; grid-template-columns: 48px minmax(0,1fr) auto; padding-block: 18px; }
  .file-visual { width: 48px; height: 56px; }
  .file-name { font-size: .9rem; }
  .file-actions { flex-direction: column; }
  .file-preview-head, .file-preview-foot { padding-inline: 20px; }
  .file-preview-foot { flex-wrap: wrap; }
}
