.attachment-card {
 --attachment-ink:#294b3c;--attachment-muted:#536c5a;--attachment-link:#246d5a;
 --attachment-fill:linear-gradient(115deg,#e4f2e9e8,#e7eddae6);
 --attachment-rim:#88bba1;--attachment-shine:#6dc9ae25;
}
[data-theme=dark] .attachment-card {
 --attachment-ink:#e6f1e5;--attachment-muted:#b7cdb7;--attachment-link:#8ae1c1;
 --attachment-fill:linear-gradient(115deg,#315548c9,#4b6245c2);
 --attachment-rim:#9cba90;--attachment-shine:#87dccb30;
}
:is(#app,#dialogs) .file-row.attachment-card {
 display:flex;align-items:flex-start;gap:9px;margin:8px 2px 10px;padding:10px 11px 8px;
 border:1px solid var(--attachment-rim);border-left-color:#71cdb5;border-radius:12px;
 background:var(--attachment-fill)!important;color:var(--attachment-ink);min-width:0;
 box-shadow:inset 0 1px 5px #e9ffe43b,inset 0 0 13px #b3d5a922,0 0 8px var(--attachment-shine);
 transition:border-color .16s,box-shadow .16s;
}
:is(#app,#dialogs) .attachment-card:focus-within {
 border-color:#79d9bb;box-shadow:inset 0 1px 5px #e9ffe43b,0 0 12px var(--attachment-shine);
}
:is(#app,#dialogs) .attachment-card>input[type=checkbox] { margin:5px 0 0; }
.attachment-card-content { flex:1;min-width:0; }
.attachment-card-heading { display:flex;align-items:flex-start;gap:7px;min-width:0; }
:is(#app,#dialogs) .attachment-card a.attachment-title {
 min-width:0;flex:1;font-size:13px;line-height:1.5;font-weight:500;color:var(--attachment-ink);
 overflow-wrap:anywhere;text-decoration:none;
}
:is(#app,#dialogs) .attachment-card[data-file-kind=pdf] a.attachment-title { color:var(--attachment-link);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px; }
:is(#app,#dialogs) .attachment-card a.attachment-title:hover { color:var(--attachment-link);text-decoration:underline;text-underline-offset:2px; }
.attachment-kind { display:grid;place-items:center;position:relative;flex-shrink:0;width:19px;height:23px;margin-top:1px;border-radius:4px;color:#f4ffff;background:linear-gradient(145deg,#56cfc6,#158da7);box-shadow:inset 0 1px 2px #ffffff80,0 1px 4px #12362f45; }
.attachment-kind svg { width:15px;height:18px;stroke:currentColor;stroke-width:1.4;fill:none; }
.attachment-kind b { position:absolute;bottom:3px;left:0;right:0;text-align:center;font-size:5px;line-height:1;font-weight:750;letter-spacing:.1px; }
.attachment-kind-image { background:linear-gradient(155deg,#f6a67c 4%,#f3bb7e 40%,#72cb9c 41%,#34a58a); }
.attachment-kind-word { background:linear-gradient(145deg,#63b6ee,#3476c6); }
.attachment-kind-file { background:linear-gradient(145deg,#8dbb9f,#557e69); }
.attachment-credit { display:flex;align-items:flex-start;gap:4px;margin:5px 0 0 25px; }
.attachment-credit>.icon { flex-shrink:0;width:12px;height:12px;margin-top:1px;color:var(--attachment-muted); }
:is(#app,#dialogs) .attachment-card .attachment-attribution { font-size:10px;line-height:1.5;margin:0;color:var(--attachment-muted); }
.attachment-card-footer { display:flex;align-items:flex-end;justify-content:space-between;gap:8px;margin:4px 0 0 25px; }
:is(#app,#dialogs) .attachment-card .attachment-meta { display:flex;align-items:center;flex-wrap:wrap;gap:5px;margin:0;min-width:0;font-size:10px;line-height:1.5;color:var(--attachment-muted); }
.attachment-meta .icon { width:12px;height:12px; }
:is(#app,#dialogs) .attachment-card a.attachment-download { flex-shrink:0;width:26px;height:25px;padding:4px;margin:-2px -4px -2px 0;color:var(--attachment-muted);border-radius:7px; }
.attachment-download .icon { width:17px;height:17px; }
:is(#app,#dialogs) .attachment-card a.attachment-download:hover { background:#82d1ac25;color:var(--attachment-link); }
.attachment-card a:focus-visible { outline:2px solid #71cdb5;outline-offset:2px;border-radius:3px; }
@media(hover:hover) {
 :is(#app,#dialogs) .attachment-card:hover { border-color:#8dcead;box-shadow:inset 0 1px 5px #e9ffe43b,inset 0 0 13px #b3d5a922,0 0 11px var(--attachment-shine); }
}
@media(prefers-reduced-motion:reduce) { :is(#app,#dialogs) .attachment-card { transition:none; } }

:is(#app,#dialogs) .attachment-card .attachment-card-more {
 display: grid;
 place-items: center;
 flex: 0 0 24px;
 width: 24px;
 height: 24px;
 padding: 4px;
 margin: -2px -4px 0 0;
 border: 0;
 border-radius: 7px;
 color: var(--attachment-muted);
 background: transparent;
}
.attachment-card-more .icon { width: 15px; height: 15px; }
:is(#app,#dialogs) .attachment-card .attachment-card-more:is(:hover,[aria-expanded=true]) {
 background: #82d1ac25;
 color: var(--attachment-link);
}
.attachment-card-more:focus-visible { outline: 2px solid #71cdb5; outline-offset: 1px; }
.attachment-card-menu[popover] {
 position: fixed;
 inset: auto;
 margin: 0;
 padding: 4px;
 min-width: 106px;
 border: 1px solid var(--attachment-rim);
 border-radius: 8px;
 background: var(--paper);
 color: var(--attachment-ink);
 box-shadow: var(--shadow);
}
.attachment-card-menu .btn { width: 100%; justify-content: flex-start; }
.attachment-rename-name { display: flex; align-items: center; gap: 0; min-width: 0; }
.attachment-rename-name input { flex: 1; min-width: 0; }
.attachment-rename-name:has(.attachment-rename-extension) input { border-start-end-radius: 0; border-end-end-radius: 0; }
.attachment-rename-extension {
 align-self: stretch;
 display: grid;
 place-items: center;
 padding: 0 .65rem;
 border: 1px solid var(--line);
 border-inline-start: 0;
 border-start-end-radius: 8px;
 border-end-end-radius: 8px;
 color: var(--muted);
 background: var(--soft);
 font-size: .82rem;
}
