/* Free book formatter (/tools/book-formatter). Uses the --hn-* tokens from
   home.css. Bump ?v= in book-formatter.html on any edit. */
.bf-app { max-width: 1180px; margin: 0 auto; scroll-margin-top: 90px; }
.bf-app [hidden] { display: none !important; }
.bf-link { background: none; border: 0; padding: 0; font: inherit; color: var(--hn-blue-deep); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hn-blue-line); }
.bf-link:hover { text-decoration-color: currentColor; }
.bf-error { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: #fef2f2; color: #b42318; font-size: 14px; }

/* Step 1 */
.bf-start { max-width: 760px; margin: 0 auto; }
.bf-drop {
    display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; cursor: pointer;
    padding: 56px 24px; border: 1.5px dashed var(--hn-line); border-radius: 20px; background: var(--hn-fill-2);
    color: var(--hn-ink-soft); font-size: 14.5px; transition: border-color .15s, background-color .15s;
}
.bf-drop:hover, .bf-drop.is-dragging { border-color: var(--hn-blue); background: var(--hn-blue-soft); }
.bf-drop b { font-size: 18px; font-weight: 600; color: var(--hn-ink); margin-top: 6px; }
.bf-drop u { color: var(--hn-blue-deep); text-decoration-color: var(--hn-blue-line); text-underline-offset: 3px; }
.bf-drop-icon { width: 52px; height: 52px; border-radius: 14px; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 1px var(--hn-line) inset; }
.bf-drop-icon img { width: 24px; height: 24px; }
.bf-busy { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 56px 24px; border: 1px solid var(--hn-line); border-radius: 20px; background: #fff; font-size: 15px; color: var(--hn-ink-2); }
.bf-spinner { width: 20px; height: 20px; border-radius: 999px; border: 2px solid var(--hn-blue-line); border-top-color: var(--hn-blue); animation: bf-spin .8s linear infinite; }
@keyframes bf-spin { to { transform: rotate(360deg); } }
.bf-start-note { text-align: center; margin: 16px 0 0; font-size: 14.5px; color: var(--hn-ink-soft); }

/* Step 2 */
.bf-work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px; align-items: start; }
.bf-panel, .bf-preview { min-width: 0; }
.bf-panel { display: flex; flex-direction: column; gap: 12px; }
.bf-file { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--hn-blue-soft); border: 1px solid var(--hn-blue-line); }
.bf-file b { display: block; font-size: 15px; color: var(--hn-ink); word-break: break-all; }
.bf-file small { font-size: 13px; color: var(--hn-ink-2); }
.bf-warn { padding: 12px 14px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 13.5px; line-height: 1.5; }
.bf-group { border: 1px solid var(--hn-line); border-radius: 16px; background: #fff; padding: 0 18px; }
.bf-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 16px 0; font-size: 15.5px; font-weight: 600; color: var(--hn-ink); }
.bf-group > summary::-webkit-details-marker { display: none; }
.bf-group > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--hn-ink-soft); border-bottom: 2px solid var(--hn-ink-soft); transform: rotate(45deg); transition: transform .15s; }
.bf-group[open] > summary::after { transform: rotate(-135deg); }
.bf-group[open] { padding-bottom: 18px; }
.bf-count { font-size: 12.5px; font-weight: 500; color: var(--hn-ink-soft); background: var(--hn-fill); border-radius: 999px; padding: 2px 9px; }
.bf-hint { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; color: var(--hn-ink-soft); }

.bf-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bf-fields + .bf-checks, .bf-checks + .bf-fields, .bf-themes + .bf-fields { margin-top: 14px; }
.bf-fields label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; font-weight: 500; color: var(--hn-ink); min-width: 0; }
.bf-fields label > span { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.bf-fields label i { font-style: normal; font-weight: 400; font-size: 12.5px; color: var(--hn-ink-mute); }
.bf-span { grid-column: 1 / -1; }
.bf-fields input, .bf-fields select, .bf-fields textarea {
    width: 100%; font: inherit; font-size: 15px; font-weight: 400; padding: 9px 11px; border: 1px solid var(--hn-line); border-radius: 10px;
    background: #fff; color: var(--hn-ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.bf-fields textarea { resize: vertical; line-height: 1.45; }
.bf-fields input:focus, .bf-fields select:focus, .bf-fields textarea:focus { border-color: var(--hn-blue); box-shadow: 0 0 0 3px var(--hn-blue-soft); }
.bf-checks { display: flex; flex-direction: column; gap: 9px; }
.bf-checks label { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--hn-ink-2); cursor: pointer; }
.bf-checks input, .bf-ch input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--hn-blue); flex-shrink: 0; }

/* Theme cards: a tiny chapter opening drawn in each style. */
.bf-themes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bf-theme { min-width: 0; position: relative; display: flex; flex-direction: column; gap: 2px; cursor: pointer; padding: 10px; border-radius: 12px; border: 1px solid var(--hn-line); background: #fff; transition: border-color .15s, box-shadow .15s; }
.bf-theme input { position: absolute; opacity: 0; pointer-events: none; }
.bf-theme:has(input:checked) { border-color: var(--hn-blue); box-shadow: 0 0 0 3px var(--hn-blue-soft); }
.bf-theme:has(input:focus-visible) { outline: 2px solid var(--hn-blue); outline-offset: 2px; }
.bf-theme b { font-size: 13.5px; color: var(--hn-ink); margin-top: 6px; }
.bf-theme small { font-size: 11.5px; line-height: 1.3; color: var(--hn-ink-soft); }
.bf-theme-art { display: flex; flex-direction: column; align-items: center; gap: 3px; height: 82px; padding: 10px 8px; border-radius: 8px; background: #fbfaf7; font-family: Georgia, serif; color: #1d1d1f; overflow: hidden; }
.bf-theme-art em { font-style: normal; font-size: 7px; letter-spacing: .18em; text-transform: uppercase; }
.bf-theme-art strong { font-weight: normal; font-size: 12px; margin-bottom: 5px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: clip; }
.bf-theme-art em { white-space: nowrap; }
.bf-theme-art i { display: block; width: 100%; height: 3px; border-radius: 2px; background: #d7d4cc; }
.bf-theme-art i:nth-of-type(3) { width: 70%; align-self: flex-start; }
.bf-theme--modern .bf-theme-art { align-items: flex-start; }
.bf-theme--modern .bf-theme-art em { font-family: Arial, sans-serif; font-weight: bold; }
.bf-theme--modern .bf-theme-art strong { font-family: Arial, sans-serif; font-weight: bold; font-size: 12px; border-bottom: 2px solid #1d1d1f; padding-bottom: 3px; }
.bf-theme--elegant .bf-theme-art em { font-style: italic; text-transform: none; letter-spacing: .25em; font-size: 7.5px; }
.bf-theme--elegant .bf-theme-art strong { text-transform: uppercase; letter-spacing: .14em; font-size: 9px; }
.bf-theme--elegant .bf-theme-art strong::after { content: "\2766"; display: block; text-align: center; font-size: 8px; margin-top: 2px; }
.bf-theme--minimal .bf-theme-art { align-items: flex-start; }
.bf-theme--minimal .bf-theme-art em { text-transform: none; font-style: italic; letter-spacing: 0; font-size: 8px; }
.bf-theme--minimal .bf-theme-art strong { font-weight: bold; font-size: 11.5px; }

/* Chapter list */
.bf-chapters { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; border: 1px solid var(--hn-line-soft); border-radius: 12px; }
.bf-ch { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--hn-line-soft); }
.bf-ch:last-child { border-bottom: 0; }
.bf-ch--part { background: var(--hn-fill-2); }
.bf-ch.is-off .bf-ch-body { opacity: .45; }
.bf-ch-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bf-ch-title { font: inherit; font-size: 14px; font-weight: 500; color: var(--hn-ink); border: 1px solid transparent; border-radius: 6px; padding: 3px 6px; margin-left: -6px; background: transparent; outline: none; min-width: 0; }
.bf-ch-title:hover { border-color: var(--hn-line); }
.bf-ch-title:focus { border-color: var(--hn-blue); background: #fff; }
.bf-ch small { font-size: 12px; color: var(--hn-ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-ch-eye { flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: none; border: 0; color: var(--hn-ink-soft); cursor: pointer; }
.bf-ch-eye:hover { background: var(--hn-fill); color: var(--hn-ink); }

/* Preview */
.bf-preview { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 12px; }
.bf-preview-bar { display: flex; gap: 10px; align-items: center; }
.bf-preview-bar select { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--hn-line); border-radius: 10px; background: #fff; color: var(--hn-ink); }
.bf-devices { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--hn-fill); }
.bf-devices button { font: inherit; font-size: 13px; font-weight: 500; padding: 6px 12px; border: 0; border-radius: 8px; background: none; color: var(--hn-ink-soft); cursor: pointer; }
.bf-devices button.is-on { background: #fff; color: var(--hn-ink); box-shadow: 0 1px 2px rgba(24, 24, 27, .12); }
.bf-device { margin: 0 auto; width: 100%; max-width: 400px; height: 640px; padding: 12px; border-radius: 34px; background: #1c1c20; box-shadow: var(--hn-shadow-pop); transition: max-width .25s, opacity .2s; }
.bf-device[data-w="tablet"] { max-width: 100%; border-radius: 26px; }
.bf-device.is-loading { opacity: .75; }
.bf-device iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 24px; background: #fbfaf7; }
.bf-device[data-w="tablet"] iframe { border-radius: 16px; }
.bf-download { height: 50px; font-size: 15.5px; border: 0; cursor: pointer; }
.bf-download:disabled { opacity: .7; cursor: progress; }

/* Step 3 */
.bf-done { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.bf-done-head { display: flex; gap: 16px; align-items: flex-start; padding: 22px 24px; border-radius: 18px; border: 1px solid var(--hn-line); background: #fff; }
.bf-check { flex-shrink: 0; width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; background: #ecfdf3; color: #067647; }
.bf-done-head h2 { margin: 0 0 4px; font-size: 21px; font-weight: 600; letter-spacing: -.02em; color: var(--hn-ink); }
.bf-done-head p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--hn-ink-2); }
.bf-upsell { display: grid; grid-template-columns: 1fr 220px; gap: 24px; align-items: center; padding: 28px; border-radius: 22px; background: var(--hn-sky-soft); }
.bf-upsell h3 { margin: 12px 0 8px; font-size: 26px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; color: var(--hn-ink); }
.bf-upsell p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--hn-ink-2); }
.bf-upsell-actions { display: flex; align-items: center; gap: 18px; margin-top: 20px; flex-wrap: wrap; }
.bf-upsell-facts { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.bf-upsell-facts div { background: #fff; border-radius: 14px; padding: 14px 16px; }
.bf-upsell-facts dt { font-size: 12.5px; color: var(--hn-ink-soft); }
.bf-upsell-facts dd { margin: 3px 0 0; font-size: 20px; font-weight: 600; letter-spacing: -.02em; color: var(--hn-ink); }
.bf-done-again { margin: 0; text-align: center; font-size: 14.5px; color: var(--hn-ink-soft); }

@media (max-width: 980px) {
    .bf-work { grid-template-columns: minmax(0, 1fr); }
    .bf-preview { position: static; }
    .bf-device { height: 560px; }
}
@media (max-width: 560px) {
    .bf-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bf-fields { grid-template-columns: 1fr; }
    .bf-upsell { grid-template-columns: 1fr; padding: 22px; }
    .bf-device { height: 520px; padding: 8px; border-radius: 26px; }
    .bf-device iframe { border-radius: 19px; }
    .bf-drop { padding: 40px 18px; }
}

/* ---------- Full-screen app (/tools/book-formatter/app) ----------
   A top bar, the settings in a scrolling sidebar and the preview filling the
   rest. Nothing else on the page. Phones switch between Edit and Preview. */
body.bf-shell { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: var(--hn-fill-2); font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
body.bf-shell.bf-modal-open { overflow: hidden; }
.bf-shell [hidden] { display: none !important; }
.bf-shell *, .bf-shell *::before, .bf-shell *::after { box-sizing: border-box; }

.bf-top { flex-shrink: 0; height: 60px; display: flex; align-items: center; gap: 18px; padding: 0 18px; background: #fff; border-bottom: 1px solid var(--hn-line); }
.bf-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--hn-ink); font-size: 15px; font-weight: 600; white-space: nowrap; }
.bf-brand img { width: 26px; height: 26px; border-radius: 7px; }
.bf-top-file { min-width: 0; display: flex; flex-direction: column; padding-left: 18px; border-left: 1px solid var(--hn-line); }
.bf-top-file b { font-size: 13.5px; font-weight: 600; color: var(--hn-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-top-file small { font-size: 12px; color: var(--hn-ink-soft); white-space: nowrap; }
.bf-top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.bf-top-btn { height: 38px; padding: 0 14px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--hn-ink); background: #fff; box-shadow: 0 0 0 1px var(--hn-line) inset; cursor: pointer; }
.bf-top-btn:hover { background: var(--hn-fill); }
.bf-shell .bf-download { height: 38px; font-size: 14px; padding: 0 16px; }
.bf-tabs { display: none; padding: 3px; border-radius: 10px; background: var(--hn-fill); }
.bf-tabs button { font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 8px; color: var(--hn-ink-soft); }
.bf-tabs button.is-on { background: #fff; color: var(--hn-ink); box-shadow: 0 1px 2px rgba(24, 24, 27, .12); }

.bf-main { flex: 1; min-height: 0; position: relative; display: flex; }
.bf-shell .bf-start { margin: auto; width: min(680px, calc(100% - 36px)); padding: 24px 0; }
.bf-shell .bf-busy { margin: auto; border: 0; background: none; }

.bf-shell .bf-work { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(360px, 440px) minmax(0, 1fr); gap: 0; align-items: stretch; }
.bf-shell .bf-panel { overflow-y: auto; padding: 16px; background: #fff; border-right: 1px solid var(--hn-line); overscroll-behavior: contain; }
.bf-shell .bf-group { border-radius: 14px; }
.bf-shell .bf-panel > * { flex-shrink: 0; }
.bf-shell .bf-chapters { max-height: none; }
.bf-shell .bf-preview { position: static; top: auto; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 16px 24px 24px; }
.bf-shell .bf-preview-bar { width: 100%; max-width: 720px; margin: 0 auto; }
.bf-stage { flex: 1; min-height: 0; display: flex; justify-content: center; }
.bf-shell .bf-device { height: 100%; max-height: 860px; max-width: 420px; }
.bf-shell .bf-device[data-w="tablet"] { max-width: 720px; }

.bf-file--mobile { display: none; margin-bottom: 0; }
.bf-toast { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 5; margin: 0; max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 10px; background: #b42318; color: #fff; font-size: 14px; box-shadow: var(--hn-shadow-pop); }

.bf-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(24, 24, 27, .45); overflow-y: auto; animation: bf-fade .18s ease; }
.bf-modal-card { position: relative; width: min(820px, 100%); display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: 22px; background: #fff; box-shadow: 0 24px 60px rgba(24, 24, 27, .28); }
.bf-modal-card .bf-done-head { border: 0; padding: 6px 44px 0 6px; }
.bf-modal-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; color: var(--hn-ink-soft); cursor: pointer; }
.bf-modal-x:hover { background: var(--hn-fill); color: var(--hn-ink); }
@keyframes bf-fade { from { opacity: 0; } }

@media (max-width: 860px) {
    .bf-top { gap: 10px; padding: 0 12px; }
    .bf-brand span, .bf-top-file, .bf-top-btn { display: none; }
    .bf-tabs { display: inline-flex; }
    .bf-file--mobile { display: flex; }
    .bf-top-actions { gap: 8px; }
    .bf-shell .bf-work { grid-template-columns: minmax(0, 1fr); }
    .bf-shell .bf-panel { border-right: 0; }
    .bf-work[data-view="edit"] .bf-preview, .bf-work[data-view="preview"] .bf-panel { display: none; }
    .bf-shell .bf-preview { padding: 12px; }
    .bf-shell .bf-device { max-height: none; }
    .bf-modal-card .bf-upsell { grid-template-columns: 1fr; }
}
@media (max-width: 860px) and (min-width: 560px) { .bf-shell .bf-panel .bf-themes { grid-template-columns: repeat(4, 1fr); } }

/* Saved state and recent books */
.bf-saved { flex-shrink: 0; font-size: 12.5px; color: var(--hn-ink-soft); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.bf-saved:not(:empty)::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: #17b26a; }
.bf-saved.is-bad { color: #b42318; }
.bf-saved.is-bad::before { background: #f04438; }
.bf-shell:not(.bf-is-working) .bf-saved { display: none; }
.bf-cover-current { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 9px 12px; border-radius: 10px; background: var(--hn-fill); font-size: 13.5px; color: var(--hn-ink); }
.bf-cover-current span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-landing-resume { text-align: center; margin: 14px 0 0; font-size: 14.5px; color: var(--hn-ink-soft); }
@media (max-width: 860px) { .bf-saved { font-size: 0; } .bf-saved:not(:empty)::before { width: 8px; height: 8px; } }

/* Library: /tools/book-formatter/app */
.bf-library { flex: 1; min-height: 0; overflow-y: auto; padding: 36px 28px 48px; }
.bf-lib-head, .bf-library .bf-error, .bf-lib-grid { max-width: 1180px; margin-left: auto; margin-right: auto; }
.bf-lib-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.bf-lib-head h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.025em; color: var(--hn-ink); }
.bf-lib-head p { margin: 6px 0 0; font-size: 14.5px; color: var(--hn-ink-soft); }
.bf-library .bf-error { margin-bottom: 18px; }
.bf-lib-grid { list-style: none; padding: 0; margin-top: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 22px; }
.bf-lib-card { position: relative; min-width: 0; }
.bf-lib-open { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left; text-decoration: none; color: inherit; cursor: pointer; }
.bf-lib-cover {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; aspect-ratio: 2 / 3;
    padding: 18px 14px; border-radius: 6px 12px 12px 6px; background: #fbfaf7; color: #1d1d1f; text-align: center; overflow: hidden;
    box-shadow: 0 0 0 1px var(--hn-line) inset, 0 10px 24px -14px rgba(24, 24, 27, .35); transition: transform .18s, box-shadow .18s;
    font-family: Georgia, "Iowan Old Style", serif;
}
.bf-lib-cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: linear-gradient(90deg, rgba(0,0,0,.09), rgba(0,0,0,0)); }
.bf-lib-open:hover .bf-lib-cover, .bf-lib-open:focus-visible .bf-lib-cover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--hn-line) inset, 0 16px 30px -14px rgba(24, 24, 27, .45); }
.bf-lib-cover strong { font-weight: normal; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.bf-lib-cover small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #6b6b70; }
.bf-lib-cover.has-image { padding: 0; }
.bf-lib-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bf-lib-cover--modern { align-items: flex-start; justify-content: flex-end; text-align: left; }
.bf-lib-cover--modern strong { font-family: Inter, Arial, sans-serif; font-weight: 700; letter-spacing: -.01em; }
.bf-lib-cover--modern strong::after { content: ""; display: block; width: 28px; border-bottom: 3px solid currentColor; margin-top: 8px; }
.bf-lib-cover--elegant strong { font-size: 13.5px; letter-spacing: .16em; text-transform: uppercase; }
.bf-lib-cover--elegant strong::after { content: "\2766"; display: block; margin-top: 8px; font-size: 13px; letter-spacing: 0; }
.bf-lib-cover--minimal { align-items: flex-start; justify-content: flex-start; text-align: left; }
.bf-lib-cover--minimal strong { font-weight: bold; }
.bf-lib-card--new .bf-lib-cover { background: var(--hn-fill-2); color: var(--hn-blue-deep); box-shadow: none; border: 1.5px dashed var(--hn-blue-line); border-radius: 12px; font-family: inherit; }
.bf-lib-card--new .bf-lib-cover::before { display: none; }
.bf-lib-card--new .bf-lib-cover em { font-style: normal; font-size: 14px; font-weight: 600; }
.bf-lib-card--new .bf-lib-open:hover .bf-lib-cover { background: var(--hn-blue-soft); border-color: var(--hn-blue); box-shadow: none; }
.bf-lib-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 0 2px; }
.bf-lib-meta b { font-size: 14.5px; font-weight: 600; color: var(--hn-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-lib-meta small { font-size: 12.5px; color: var(--hn-ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-lib-meta .bf-lib-file { color: var(--hn-ink-mute); }
.bf-lib-del {
    position: absolute; top: 8px; right: 8px; height: 30px; min-width: 30px; padding: 0 8px; border-radius: 8px; display: grid; place-items: center;
    background: rgba(255, 255, 255, .92); color: var(--hn-ink-soft); font-size: 12.5px; font-weight: 600; cursor: pointer; opacity: 0;
    box-shadow: 0 1px 3px rgba(24, 24, 27, .18); transition: opacity .15s;
}
.bf-lib-card:hover .bf-lib-del, .bf-lib-del:focus-visible, .bf-lib-del.is-confirm { opacity: 1; }
.bf-lib-del:hover { color: var(--hn-ink); }
.bf-lib-del.is-confirm { color: #fff; background: #d92d20; }
@media (hover: none) { .bf-lib-del { opacity: 1; } }
.bf-start-title { margin: 0 0 18px; text-align: center; font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: var(--hn-ink); }
.bf-start-hint { text-align: center; margin-top: 18px; }
.bf-top-btn { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 860px) {
    .bf-library { padding: 22px 16px 36px; }
    .bf-lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .bf-lib-head h1 { font-size: 23px; }
    .bf-top-btn.bf-top-btn--show { display: inline-flex; }
}
