.rb-file-card { position:relative; display:inline-grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"media media" "file remove"; vertical-align:top; box-sizing:border-box; width:480px; max-width:100%; margin:16px 0; border:1px solid #dce1e6; border-radius:4px; background:#fff; color:#25344a; box-shadow:0 1px 3px #09244b0a; font:13px/1.5 sans-serif; text-align:left; }
.rb-file-card .rb-file-link { display:flex; align-items:center; gap:12px; width:100%; min-height:58px; padding:16px 18px; color:inherit; text-decoration:none; box-sizing:border-box; }
.rb-file-card .rb-file-link { grid-area:file; min-width:0; }
#editor .rb-file-card .rb-file-link { border-bottom:0; color:#25344a; padding-right:8px; }
.rb_editor_data .rb-file-card .rb-file-link,
.rb_editor_data .rb-file-card .rb-file-link:hover,
.rb_editor_data .rb-file-card .rb-file-link:focus,
.rb_editor_data .rb-file-card .rb-file-name { text-decoration:none !important; border-bottom:0 !important; }
.rb-file-card .rb-file-title { display:flex; align-items:center; gap:4px; flex:1; min-width:0; }
.rb-file-card .rb-file-name { flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rb-file-card .rb-file-size, .rb-file-card .rb-file-count { flex:none; font-size:11px; line-height:1.5; color:#738191; white-space:nowrap; font-variant-numeric:tabular-nums; }
.rb-file-card .rb-file-download-info { display:inline-flex; align-items:center; gap:4px; flex:none; }
.rb-file-card.rb-file-pending .rb-file-count, .rb-file-card.rb-file-error .rb-file-count,
.rb-file-card:not(.rb-file-pending):not(.rb-file-error) .rb-file-status { display:none; }
.rb-file-card .rb-file-icon, .rb-file-card .rb-file-download { flex:none; width:22px; height:22px; display:inline-block; background-position:center; background-repeat:no-repeat; background-size:22px; }
.rb-file-card .rb-file-icon { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23738191' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8zM14 3v5h5M8 12h8M8 16h5'/%3E%3C/svg%3E"); }
.rb-file-card .rb-file-download { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233d536d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12m-4-4 4 4 4-4M5 16v4h14v-4'/%3E%3C/svg%3E"); }
.rb-file-card .rb-file-link:hover { background:#f8fafc; }
.rb-file-card .rb-file-status { flex:none; font-size:11px; color:#18934a; font-variant-numeric:tabular-nums; }
.rb-file-card.rb-file-pending .rb-file-status { color:#64748b; }
.rb-file-card.rb-file-error .rb-file-status { color:#bd3434; }
.rb-file-card.rb-file-pending { opacity:.5; }
.rb-file-card.rb-file-error { border-color:#c44343; }
.rb-file-card .rb-file-remove { display:none; }
#editor .rb-file-card .rb-file-remove { display:flex; grid-area:remove; align-self:center; align-items:center; justify-content:center; position:relative; transform:none; width:32px; height:32px; margin:0 5px 0 0; padding:0; border:0; background:transparent; color:#7c8999; font-size:0; cursor:pointer; opacity:1; }
#editor .rb-file-card .rb-file-remove::before, #editor .rb-file-card .rb-file-remove::after { content:''; position:absolute; width:11px; height:1px; background:currentColor; transform:rotate(45deg); }
#editor .rb-file-card .rb-file-remove::after { transform:rotate(-45deg); }
#editor .rb-file-card:hover .rb-file-remove, #editor .rb-file-card:focus-within .rb-file-remove, #editor .rb-file-pending .rb-file-remove, #editor .rb-file-error .rb-file-remove { opacity:1; }
#editor .rb-file-card .rb-file-remove:hover { color:#bd3434; background:transparent; }
.rb-file-link:focus-visible, .rb-file-remove:focus-visible { outline:2px solid #527de0; outline-offset:2px; }
#editor .rb-file-card .drag-handle { touch-action:none; user-select:none; -webkit-user-select:none; }
#editor .rb-file-card .drag-handle:before { content:''; position:absolute; inset:-16px; }
@media (pointer:coarse), (max-width:640px) { #editor .rb-file-card .rb-file-remove { width:44px; height:44px; margin-right:0; opacity:1; } #editor .rb-file-card .rb-file-link { padding:16px 0 16px 12px; gap:8px; } }
@media print { .rb-file-card .rb-file-remove, .rb-file-card .drag-handle { display:none !important; } }

/* 첨부 플레이어도 같은 원자 카드/이동 도구를 사용한다. 높이는 미디어 비율에 맡긴다. */
.rb-file-card.rb-media-card { border-radius:8px; overflow:visible; }
.rb-file-card.rb-video-card { width:640px; }
.rb-file-card.rb-audio-card { width:480px; padding:10px; }
.rb-media-card > video { grid-area:media; display:block; width:100%; max-width:100%; height:auto; min-height:0; background:#101820; border-radius:7px 7px 0 0; }
.rb-media-card > audio { grid-area:media; display:block; width:100%; max-width:100%; margin:0; }
.rb-file-card.rb-media-card .rb-file-link { min-height:40px; padding:10px 14px; font-size:12px; gap:8px; }
#editor .rb-file-card.rb-media-card .rb-file-link { padding-right:4px; }
.rb-media-card .rb-file-icon, .rb-media-card .rb-file-status { display:none; }
.rb-media-card .rb-file-download { width:18px; height:18px; background-size:18px; }
.rb-file-card.rb-audio-card .rb-file-link, #editor .rb-file-card.rb-audio-card .rb-file-link { padding-left:0; padding-right:0; }
/* 같은 행의 그리드 중앙에 제거 버튼을 놓아 플레이어/글자 높이에 영향을 받지 않는다. */
#editor .rb-file-card.rb-audio-card .rb-file-remove { margin:0 0 0 4px; }
.rb-media-resize-handle { display:none; }
#editor .rb-video-card.rb-media-selected > .rb-media-resize-handle { display:block; position:absolute; right:-6px; bottom:-6px; width:12px; height:12px; border:1px solid #09244b; border-radius:50%; background:#fff; box-sizing:border-box; cursor:nwse-resize; touch-action:none; user-select:none; z-index:30; }
#editor .rb-media-resize-handle::before { content:''; position:absolute; inset:-10px; }
@media (pointer:coarse), (max-width:640px) { .rb-file-card.rb-media-card .rb-file-link { min-height:48px; } }
