.library-atmosphere-frame { position: relative; isolation: isolate; }
.library-atmosphere { --cover-wash: #31677a; position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.library-atmosphere[data-cover-tone="sand"], .library-atmosphere[data-cover-tone="terracotta"] { --cover-wash: #957447; }
.library-atmosphere[data-cover-tone="forest"] { --cover-wash: #3c7865; }
.library-atmosphere[data-cover-tone="wine"] { --cover-wash: #86566d; }
.library-atmosphere[data-cover-tone="slate"] { --cover-wash: #547d97; }
.library-atmosphere-color { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 44%, color-mix(in srgb, var(--cover-wash) 28%, transparent), transparent 80%); }
.atmosphere-blur { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; filter: blur(48px) saturate(.8); transform: scale(1.1); opacity: .24; }
.library-atmosphere-center { position: absolute; inset: 6% 8%; display: flex; align-items: center; justify-content: center; }
.atmosphere-main { display: block; flex: 0 1 auto; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; filter: saturate(.85); opacity: .38; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent), linear-gradient(180deg, transparent, #000 12%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent), linear-gradient(180deg, transparent, #000 12%, #000 86%, transparent); -webkit-mask-composite: source-in; mask-composite: intersect; }
.library-atmosphere-shade { position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 80%, transparent), transparent 32%, color-mix(in srgb, var(--bg) 20%, transparent) 62%, color-mix(in srgb, var(--bg) 86%, transparent)), linear-gradient(90deg, color-mix(in srgb, var(--bg) 56%, transparent), transparent 35%, transparent 65%, color-mix(in srgb, var(--bg) 56%, transparent)); }
:root[data-theme="paper"] .atmosphere-blur { opacity: .18; }:root[data-theme="paper"] .atmosphere-main { opacity: .30; }
.library-atmosphere-frame .topbar, .library-atmosphere-frame .preview-footer { background: color-mix(in srgb, var(--bg) 85%, transparent); }
.book-front { position: relative; display: flex; flex: 0 0 auto; }
.book-select { display: block; padding: 0; border: 0; background: none; color: inherit; cursor: inherit; border-radius: 3px 9px 9px 3px; }
.book-select:focus-visible { outline-offset: 5px; }
.book-cover.image-cover { background: var(--surface); padding: 0; }
.custom-cover-image { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.book-cover.image-cover::after { opacity: .3; background: linear-gradient(90deg, #0007, transparent 4%, #fff2 5%, transparent 7%); }
.cover-dialog { width: min(920px, calc(100vw - 40px)); }
.cover-editor-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 32px; }
.cover-editor-summary { text-align: center; padding: 7px 6px; }
.cover-editor-summary .eyebrow { font-size: 9px; }.cover-editor-summary h3 { font: 23px/1.4 var(--serif); margin-bottom: 19px; }
.cover-editor-preview { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; width: 195px; aspect-ratio: .71; margin: auto; color: var(--accent); background-color: #182d3b; border: 1px solid var(--line); border-radius: 3px 9px 9px 3px; overflow: hidden; box-shadow: 9px 13px 30px #0004; }
.cover-editor-preview > img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.cover-editor-preview.cover-sand { color: #6e583c; }
.cover-editor-preview > strong { font: 24px var(--serif); padding-inline: 20px; }.cover-editor-preview > small { font-size: 10px; }.cover-editor-preview > .icon { width: 34px; height: 34px; }
.cover-file-name { font-size: 10px; color: var(--faint); overflow-wrap: anywhere; margin: 17px 0 10px; }
.cover-follow-note { font-size: 11px; line-height: 1.8; color: var(--muted); }
.cover-editor-options section { padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.cover-method-note { margin: 0 0 14px; font-size: 11px; line-height: 1.8; color: var(--muted); }
.cover-editor-options h3 { display: flex; align-items: center; gap: 9px; font-size: 14px; margin: 0 0 10px; }.cover-editor-options h3 > .icon { color: var(--accent); width: 17px; height: 17px; }
.cover-editor-options section > p { font-size: 11px; color: var(--muted); line-height: 1.8; margin-bottom: 13px; }
.cover-upload-choice { display: flex; align-items: center; justify-content: center; gap: 10px; position: relative; min-height: 55px; border: 1px dashed var(--accent); background: var(--accent-wash); border-radius: 6px; color: var(--accent-strong); font-size: 13px; }
.cover-upload-choice input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }.cover-upload-choice:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }.cover-upload-choice.is-busy { opacity: .5; }
.cover-file-limits { display: block; font-size: 10px; color: var(--faint); margin-top: 9px; }
.cover-local-actions { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }.cover-local-actions .button { font-size: 11px; min-height: 30px; padding: 4px 8px; }
.cover-editor-options .cover-ai-section { margin-top: 14px; }.cover-ai-section h3 .muted-tag { margin-left: auto; font-size: 9px; }.cover-ai-section > label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 7px; }.cover-ai-section textarea { font-size: 12px; min-height: 87px; }.cover-ai-section > .button { margin-top: 12px; }.cover-ai-section > small { display: block; font-size: 10px; color: var(--faint); margin-top: 9px; }
.cover-status { font-size: 11px; color: var(--accent); line-height: 1.8; margin: 11px 0 0; }.cover-status:empty { display: none; }
.cover-editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); margin-top: 23px; padding-top: 18px; }.cover-editor-footer p { color: var(--faint); font-size: 10px; line-height: 1.8; margin: 0; }.cover-editor-footer .button { flex-shrink: 0; }
@media (max-width: 700px) {
  .cover-dialog { width: calc(100vw - 24px); }.cover-editor-layout { grid-template-columns: 1fr; gap: 18px; }.cover-editor-summary { display: grid; grid-template-columns: 88px 1fr; grid-template-rows: auto auto auto; gap: 5px 15px; text-align: left; }.cover-editor-preview { grid-column: 1; grid-row: 1 / 5; width: 88px; }.cover-editor-preview > .icon, .cover-editor-preview > small, .cover-editor-preview .cover-frame { display: none; }.cover-editor-preview > strong { font-size: 16px; padding-inline: 9px; }.cover-editor-summary .eyebrow, .cover-editor-summary h3, .cover-file-name, .cover-follow-note { grid-column: 2; margin: 0; }.cover-editor-summary h3 { font-size: 20px; }.cover-follow-note { font-size: 10px; }.cover-editor-options section { padding: 14px; }.cover-editor-footer { flex-direction: column; align-items: stretch; gap: 11px; }
}
@media (max-width: 600px) { .library-atmosphere-center { inset: 7% 5%; }.atmosphere-blur { filter: blur(30px) saturate(.8); } }
