.hero.hero--library { height: 430px; min-height: 430px; padding-bottom: 54px; }
.library-section [hidden], .library-dialog [hidden] { display: none !important; }
.library-section .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hero--library .hero__media img { object-position: center 42%; }
.library-subnav { display: flex; justify-content: center; gap: 40px; padding: 0 22px; border-bottom: 1px solid var(--line); background: #fff; }
.library-subnav a { padding: 20px 4px 18px; border-bottom: 3px solid transparent; color: var(--muted); text-decoration: none; font-weight: 700; }
.library-subnav a[aria-current] { border-color: var(--orange); color: var(--ink); }
.section.library-section { padding-top: 60px; padding-bottom: 100px; min-height: 510px; }
.library-section.page-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
.library-section button, .library-dialog button { cursor: pointer; }
.library-section button:disabled, .library-dialog button:disabled { cursor: wait; opacity: .55; }
.library-section :focus-visible, .library-dialog :focus-visible, .library-subnav :focus-visible { outline: 2px solid #bb7100; outline-offset: 4px; }
.library-topline { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.library-topline h2 { margin: 0 0 10px; font-size: clamp(1.5rem, 2.7vw, 2rem); }
.library-topline p { margin: 0; color: var(--muted); line-height: 1.7; word-break: keep-all; }
.library-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 10px 20px; border: 1px solid #d8dde0; border-radius: 4px; background: #fff; color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.library-button:hover { background: #f3f5f6; }
.library-button--primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.library-button--primary:hover { background: #30363a; }
.library-button--danger { color: #b22c20; border-color: #dfb8b3; }
.library-filters { display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.library-filters button { min-height: 42px; padding: 10px 17px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #515d65; font-weight: 650; }
.library-filters button:hover { background: #f4f6f7; }
.library-filters button[aria-pressed="true"] { border-color: var(--orange); background: #fff8eb; color: #5d3900; font-weight: 800; }
.library-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 26px 0 18px; }
.library-total { margin: 0; color: var(--muted); font-size: .92rem; }
.library-total strong { color: var(--ink); }
.library-search { display: flex; width: min(100%, 340px); }
.library-search input { min-width: 0; width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid #d8dde0; border-right: 0; border-radius: 4px 0 0 4px; background: #fff; }
.library-search button { padding: 0 16px; border: 1px solid #d8dde0; border-radius: 0 4px 4px 0; background: #f7f9fa; white-space: nowrap; }
.library-table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); text-align: left; table-layout: fixed; }
.library-table th { padding: 18px 22px; background: #f7f9fa; color: #515d65; font-size: .85rem; font-weight: 700; }
.library-table th:first-child { width: 160px; }
.library-table th:last-child { width: 150px; text-align: center; }
.library-table td { padding: 24px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.library-table tbody tr:hover { background: #fcfcfa; }
.library-category { color: #666f76; font-size: .88rem; }
.library-title { padding: 0; border: 0; background: none; color: #151b1f; font-size: 1.05rem; font-weight: 750; text-align: left; line-height: 1.6; overflow-wrap: anywhere; }
.library-title:hover { text-decoration: underline; text-underline-offset: 5px; }
.library-excerpt { display: -webkit-box; margin: 6px 0 0; overflow: hidden; -webkit-line-clamp: 1; -webkit-box-orient: vertical; color: var(--muted); font-size: .88rem; line-height: 1.6; overflow-wrap: anywhere; }
.library-file-cell { text-align: center; }
.library-file-button { display: inline-flex; align-items: center; gap: 10px; padding: 4px; border: 0; background: none; }
.library-file-button > span:last-child { color: var(--muted); font-size: .85rem; }
.file-icon { --file-color: #667078; position: relative; display: inline-flex; flex: 0 0 36px; align-items: end; justify-content: center; width: 36px; height: 43px; padding-bottom: 6px; border: 1.5px solid var(--file-color); border-radius: 3px; background: #fff; color: var(--file-color); font-size: 9px; font-weight: 850; letter-spacing: -.2px; line-height: 1; }
.file-icon::before { content: ""; position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border-bottom: 1.5px solid var(--file-color); border-left: 1.5px solid var(--file-color); background: #fff; clip-path: polygon(0 0, 100% 100%, 0 100%); }
.file-icon::after { content: ""; position: absolute; top: 4px; right: -1px; width: 15px; height: 2px; background: var(--file-color); transform: rotate(45deg); }
.file-icon[data-kind="pdf"] { --file-color: #c13e35; }
.file-icon[data-kind="word"], .file-icon[data-kind="hwp"] { --file-color: #3066a8; }
.file-icon[data-kind="sheet"] { --file-color: #27784f; }
.file-icon[data-kind="slide"] { --file-color: #bb592a; }
.file-icon[data-kind="image"] { --file-color: #7b599b; }
.library-message { padding: 64px 20px; border-bottom: 1px solid var(--line); text-align: center; }
.library-message .file-icon { margin-bottom: 18px; opacity: .6; }
.library-message h3 { margin: 0 0 10px; font-size: 1.1rem; }
.library-message p { margin: 0; color: var(--muted); line-height: 1.8; }
.library-message button { margin-top: 20px; }
.library-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 30px; }
.library-pagination button { min-width: 40px; min-height: 40px; border: 1px solid #d8dde0; border-radius: 3px; background: #fff; }
.library-pagination button[aria-current] { border-color: #050505; background: #050505; color: #fff; }
.library-note { margin: 30px 0 0; color: var(--muted); font-size: .85rem; line-height: 1.8; }
.library-dialog { width: min(680px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 0; border: 0; border-radius: 8px; background: #fff; color: var(--ink); box-shadow: 0 24px 90px #0003; }
.library-dialog::backdrop { background: #111a; }
.library-dialog__inner { padding: 32px; }
.library-dialog__header { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.library-dialog__header h2 { margin: 0; font-size: 1.6rem; line-height: 1.5; overflow-wrap: anywhere; }
.library-close { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border: 1px solid #e0e4e6; border-radius: 4px; background: #fff; font-size: 1.5rem; }
.library-form { display: grid; gap: 21px; }
.library-field { display: grid; gap: 9px; }
.library-field > label, .library-field > span { font-size: .92rem; font-weight: 750; }
.library-field input:not([type="file"]), .library-field select, .library-field textarea { width: 100%; min-height: 46px; padding: 12px; border: 1px solid #cdd3d7; border-radius: 4px; background: #fff; color: var(--ink); }
.library-field textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
.library-field small { color: var(--muted); line-height: 1.7; }
.library-upload { position: relative; display: grid; justify-items: center; gap: 8px; padding: 24px 16px; border: 1px dashed #b6bfc5; border-radius: 4px; background: #f9fafb; text-align: center; }
.library-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.library-upload:focus-within { outline: 2px solid #bb7100; outline-offset: 3px; }
.library-upload.is-dragging { border-color: #bb7100; background: #fff8eb; }
.library-upload strong { font-size: .92rem; }
.library-upload small { font-size: .8rem; }
.library-selected { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.library-selected li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #e1e5e7; border-radius: 4px; font-size: .86rem; }
.library-selected li > span:not(.file-icon) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.library-selected button { flex: 0 0 32px; min-height: 32px; border: 0; background: #f4f6f7; border-radius: 3px; }
.library-error { margin: 0; color: #b02e23; font-size: .9rem; line-height: 1.7; }
.library-dialog__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding-top: 22px; border-top: 1px solid var(--line); }
.library-detail-category { margin: 0 0 10px; color: #9b5b00; font-size: .9rem; font-weight: 750; }
.library-detail-description { margin: 0 0 30px; color: #4b555d; overflow-wrap: anywhere; line-height: 1.9; }
.library-detail-paragraph { min-height: 1.9em; margin: 0; white-space: pre-wrap; }
.library-detail-paragraph + .library-detail-paragraph { margin-top: .65em; }
.library-attachments { display: grid; gap: 10px; margin: 16px 0 30px; padding: 0; list-style: none; }
.library-attachments a { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid #e0e4e7; border-radius: 4px; text-decoration: none; }
.library-attachments a:hover { background: #f7f9fa; border-color: #b4bdc4; }
.library-attachments a > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .92rem; }
.library-attachments small { display: block; margin-top: 5px; color: var(--muted); font-size: .8rem; }
.library-download-arrow { font-size: 1.4rem; }
.library-detail-label { margin: 0; font-size: .93rem; }
.library-toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: calc(100% - 48px); margin: 0; padding: 16px 24px; border-radius: 4px; background: #172026; color: #fff; box-shadow: 0 6px 24px #0002; }
.library-toast:empty { display: none; }
body:has(.library-dialog[open]) { overflow: hidden; }
@media (max-width: 640px) {
  .hero.hero--library { height: 360px; min-height: 360px; padding-bottom: 42px; }
  .section.library-section { padding: 38px 20px 64px; }
  .library-topline { align-items: start; flex-direction: column; gap: 18px; }
  .library-topline .library-button { align-self: flex-end; }
  .library-filters { gap: 6px; }
  .library-filters button { padding: 9px 12px; font-size: .86rem; }
  .library-toolbar { flex-direction: column-reverse; align-items: stretch; }
  .library-search { width: 100%; }
  .library-table th:first-child { width: 88px; }
  .library-table th:last-child { width: 60px; }
  .library-table th, .library-table td { padding: 18px 8px; }
  .library-table th:last-child { padding-inline: 4px; font-size: .75rem; white-space: nowrap; }
  .library-category { font-size: .75rem; word-break: keep-all; }
  .library-title { font-size: .94rem; }
  .library-excerpt { font-size: .8rem; }
  .library-file-button { gap: 3px; flex-direction: column; }
  .library-file-button > span:last-child { font-size: .7rem; }
  .library-dialog__inner { padding: 24px 20px; }
  .library-dialog__header h2 { font-size: 1.3rem; }
  .library-dialog { max-height: calc(100dvh - 24px); }
  .library-attachments a { padding: 12px; gap: 12px; }
  .library-attachments a > span:nth-child(2) { font-size: .85rem; }
}
