/* 자료실 — 카드·버튼·창 모양은 ../legal/legal.css 를 그대로 쓰고 여기엔 자료실 것만 둔다 */

.lb-toolrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lb-kinds { display: inline-flex; padding: 3px; background: var(--surface-2, #f4f5f8); border: 1px solid var(--border); border-radius: 999px; }
.lb-kinds button {
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-sub);
  padding: 6px 14px; background: none; border: 0; border-radius: 999px; cursor: pointer;
}
.lb-kinds button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(31, 35, 41, 0.12); }

.lb-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.lg-file.note { --k: #7048e8; --k-soft: #f3f0ff; }
.lg-file.note span { font-size: 11px; }
.lb-title { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.lb-title:hover { color: var(--accent); }
.lb-excerpt { white-space: pre-line; -webkit-line-clamp: 3; }

/* 이미지 카드 — 위에 미리보기 */
.lb-image { flex-direction: column; padding: 0; overflow: hidden; gap: 0; }
.lb-image .lg-body { padding: 14px 16px 16px; }
.lb-thumb {
  display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; padding: 0; cursor: zoom-in;
  background: var(--surface-2, #f4f5f8) center / cover no-repeat;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.lb-thumb:not(.loaded)::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.6) 50%, transparent 70%);
  background-size: 200% 100%; animation: lb-shimmer 1.2s linear infinite;
}
.lb-thumb.failed::after { content: "미리보기를 불러오지 못했습니다"; animation: none; background: none; display: grid; place-items: center; font-size: 12px; color: var(--text-dim); }
@keyframes lb-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* 보기 창 */
.lb-viewer { max-width: 820px; }
.lb-viewer .lg-dialog-head { align-items: flex-start; }
.lb-viewer .lg-dialog-head h2 { font-size: 19px; line-height: 1.4; margin-bottom: 4px; }
.lb-note { white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 1.75; color: var(--text); max-height: 62vh; overflow-y: auto; }
.lb-note a { color: var(--accent); }
.lb-view-desc { margin: 0 0 12px; color: var(--text-sub); }
.lb-big { display: grid; place-items: center; min-height: 160px; background: var(--surface-2, #f4f5f8); border-radius: var(--radius-sm, 10px); overflow: hidden; }
.lb-big img { display: block; max-width: 100%; max-height: 64vh; object-fit: contain; }
.lb-dialog { max-width: 640px; }
.lb-dialog textarea[name="body"] { min-height: 220px; }

@media (max-width: 720px) {
  .lb-toolrow .lg-search { max-width: none; }
  .lg-actions { flex-wrap: wrap; }
}

/* 글 카드 — 상자 전체가 읽기 버튼 */
.lb-open { cursor: pointer; }
.lb-open:hover h3 { color: var(--accent); }
.lb-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
