/* Reader: the text is the main surface; tools appear only when requested. */
.reader-page .publication-grid{display:block}
.reader-page .publication-content{width:100%;max-width:740px;margin:0;padding-inline:28px}
.reader-page .publication-body{max-width:none}
html[data-read-width=wide] .reader-page:not(.poem-page) .publication-content{max-width:800px}
.reader-page .work-hero .work-hero-copy .work-annotation{display:block;max-width:none;padding:0;margin:20px 0 0;border:0}
.reader-page .work-hero .work-hero-copy .work-note-body{max-width:65ch}
.reader-page .work-hero .work-hero-copy .work-note-preview{font-size:1rem;line-height:1.75;-webkit-line-clamp:2;line-clamp:2;max-height:3.5em;color:#b8c2d4}
.reader-page .work-hero .work-hero-copy .work-note-more{margin-top:9px;font-size:.875rem}
.reader-page .work-about-full>.work-about-content{max-width:74ch}
.reader-page #reading-panel{position:fixed;inset:auto;display:none;margin:0;padding:20px;width:310px;border:1px solid #c0c5ed30;border-radius:18px;background:#131a25fa;box-shadow:0 18px 55px #0007;z-index:1400;overflow:auto;font-size:1rem}
.reader-page #reading-panel:popover-open{display:flex;flex-direction:column;gap:16px}
.reader-page #reading-panel [hidden]{display:none!important}
.reader-page .reader-panel-head button{display:block;font-size:24px;line-height:1;width:34px;height:34px;border-radius:9px;background:#ffffff07}
.reader-page .reader-panel-head{font-size:1rem}
.reader-page.reading-focus .publication-content{margin:0;padding-top:0}
.reader-page.reading-focus .work-about-full,.reader-page.reading-focus .related-publications,.reader-page.reading-focus .original-source{display:none}
.reader-page .related-publications{margin-top:44px}
.reader-page .related-publications>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.reader-page .related-publications>div>a{display:block;padding:24px;border:1px solid #ffffff1a;border-radius:16px;background:#10151c;min-width:0}
.reader-page .related-publications h2{font-size:22px;margin-bottom:22px}
.reader-page .related-publications h3{font-size:20px;line-height:1.45;margin:12px 0;color:#d8dfed}
.reader-page .related-publications span{font-size:13px;color:#8493ac}
.reader-page .related-publications p{font-size:14px;line-height:1.7;color:#99a7bd;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.reader-page .author-work-tools{display:block;position:relative;margin:0 0 22px;padding:0;border:0;background:none}
.author-work-tools>summary{display:inline-flex;align-items:center;gap:9px;list-style:none;padding:9px 14px;border:1px solid #bac6e733;border-radius:11px;background:#bbacff07;color:#b5c1d8;font-size:14px;cursor:pointer;min-height:42px}
.author-work-tools>summary::-webkit-details-marker{display:none}
.author-edit-menu{position:absolute;top:calc(100% + 8px);left:0;z-index:35;display:grid;gap:4px;width:285px;max-width:calc(100vw - 40px);padding:8px;border:1px solid #b8bfe833;border-radius:14px;background:#141b26;box-shadow:0 16px 40px #0007}
.author-edit-menu>button,.author-edit-menu>a{display:flex;align-items:center;gap:12px;padding:12px;text-align:left;font-size:14px;line-height:1.5;border-radius:8px;color:#c7d0e2;background:none;border:0}
.author-edit-menu>button:hover,.author-edit-menu>a:hover{background:#b9afff0b}
.catalog-search-hit{color:#bbc4d6!important;display:block!important;font-size:1rem;line-height:1.65}
.catalog-search-hit[hidden],.catalog-entry-copy p[hidden]{display:none!important}
.catalog-search-hit mark{background:#b7a6fb25;color:#e7dcff;border-radius:3px;padding:0 2px}
.catalog-refinements{grid-column:1/-1}
.catalog-refinements>summary{display:none}
.catalog-refinements .catalog-selects{margin-top:0}
/* The owner workspace has one save bar and separate, explicit sections. */
.admin-shell .admin-grid{grid-template-columns:260px minmax(0,1fr);gap:28px;align-items:start}
.admin-shell .admin-list{position:sticky;top:24px;max-height:calc(100dvh - 48px);overflow:auto;border-radius:18px;background:#111721;padding:20px}
.admin-shell .admin-editor{min-width:0;padding:28px;border:1px solid #ffffff1b;border-radius:20px;background:#0e141d}
.editor-work-heading{display:flex;align-items:start;justify-content:space-between;gap:20px;margin-bottom:26px}
.editor-work-heading h2{font-size:26px;line-height:1.35;margin:9px 0 0;overflow-wrap:anywhere}
#editor-state{font-size:14px;color:#96a5be}
.editor-work-heading>a{font-size:14px;line-height:1.5;white-space:nowrap;margin-top:5px;color:#bbb9e8}
.editor-tabs{display:flex;gap:4px;padding:5px;background:#080d15;border:1px solid #ffffff13;border-radius:12px;margin-bottom:28px;overflow:auto}
.editor-tabs>button{flex:1;min-height:44px;padding:10px 14px;border-radius:8px;white-space:nowrap;font-size:14px;color:#96a5bf}
.editor-tabs>button[aria-selected=true]{background:#b8b0f011;color:#e0daf8}
.editor-tabs>button:focus-visible{outline:2px solid #b5a7f7;outline-offset:-2px}
.admin-editor [hidden]{display:none!important}
.admin-editor [role=tabpanel]{padding:0;min-width:0}
.admin-editor label{font-size:14px;line-height:1.6;color:#b3bfd4;display:block;margin-bottom:20px}
.admin-editor input:not([type=file]):not([type=color]),.admin-editor textarea,.admin-editor select{font-size:16px;line-height:1.7;background:#080e17;border:1px solid #b9c6e528;border-radius:11px;color:#d8e0ef;margin-top:8px}
.admin-editor input:focus,.admin-editor textarea:focus{outline:2px solid #b3a4f55c;outline-offset:2px}
.admin-editor textarea{min-height:0;resize:vertical;width:100%;padding:16px}
.admin-editor #content{line-height:1.8;min-height:400px}
.editor-field-hint{font-size:14px;line-height:1.7;color:#8f9fb9;margin:-5px 0 22px}
.editor-extra{margin-top:24px;border-top:1px solid #ffffff14;padding-top:18px}
.editor-extra>summary{font-size:14px;color:#9dabc3;cursor:pointer;margin-bottom:16px}
.admin-editor .cover-editor{border:0;padding:0;margin:0 0 24px}
.admin-editor #cover-preview{width:216px;height:216px;object-fit:contain;background:#070b12;border:1px solid #ffffff24;border-radius:18px;padding:5px;max-width:100%}
.editor-theme{margin:0;padding:22px 0 0;border:0;border-top:1px solid #ffffff14}
.editor-theme legend{font-size:16px;line-height:1.6;padding:0}
.editor-theme-presets{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 24px}
.editor-theme-presets button{min-height:44px;padding:10px 16px;border:1px solid #ffffff28;border-radius:10px;font-size:14px;color:white}
.editor-theme-presets button[data-theme-start='#f4c94e']{color:#111722}
#editor-gradient-preview{height:100px;border-radius:16px;border:1px solid #ffffff25;margin-top:12px}
.editor-notice{font-size:14px;line-height:1.7;padding:14px 18px;background:#b6a0ff08;border-left:2px solid #b7a1df;border-radius:0 10px 10px 0;color:#b6bfd4;margin:0 0 22px}
.editor-save-bar{position:sticky;bottom:16px;z-index:30;border:1px solid #b7c4ef29;background:#111925fa;border-radius:14px;padding:16px;margin:28px -8px -8px;box-shadow:0 8px 30px #0005}
.editor-save-bar #save-status{font-size:14px;line-height:1.65;color:#9fafc8;margin:0 0 12px}
.editor-save-bar .editor-actions{display:flex;flex-wrap:wrap;gap:10px;margin:0;align-items:center}
.editor-save-bar .button{font-size:14px;min-height:44px;padding:11px 15px;border-radius:10px;white-space:normal;text-align:center}
.editor-save-bar .button.primary{margin-left:auto}
.editor-more-actions{margin-top:12px;font-size:14px;color:#8797b2}
.editor-more-actions>summary{cursor:pointer;display:inline-block}
.editor-more-actions>button{display:block;font-size:14px;line-height:1.5;padding:12px 0;color:#c4b8d6;text-align:left}
#notes-preview{display:block;width:100%;height:700px;max-height:85dvh;border:1px solid #ffffff22;border-radius:14px;background:#090e16;margin-top:22px}
.preview-annotation-tools{display:flex;justify-content:flex-end;margin-bottom:12px}
.preview-annotation-tools>button{font-size:14px;color:#bbb2e6;padding:10px 14px;border:1px solid #bdb0f030;border-radius:10px}
.editor-preview .publication-layout{padding:22px;max-width:100%}
.editor-preview .publication-breadcrumb{display:none}
.editor-preview .work-hero{margin-bottom:24px}
.editor-preview .work-hero>.work-banner{height:100px}
.editor-preview .work-heading-layout{grid-template-columns:150px minmax(0,1fr);gap:24px;padding-inline:16px;margin-top:20px}
.editor-preview .work-hero .work-cover{width:150px;height:150px;margin-top:-60px;border-radius:16px}
.editor-preview .work-hero .work-hero-copy h1{font-size:38px;line-height:1.2}
.editor-preview .work-hero .work-hero-copy .work-annotation{margin-top:16px}
.editor-preview .publication-content{padding-inline:16px}
.editor-preview .work-reading-heading{top:0}
#preview-warning{font-size:14px;line-height:1.6;margin:0;padding:14px 20px;color:#dccbb0;background:#8c674018}
.drag-over{outline:2px dashed #b2a2ec;outline-offset:5px;border-radius:12px}
@media(max-width:1180px){.reader-page .publication-content{margin-inline:auto;max-width:780px}.reader-page.reading-focus .publication-content{margin-inline:auto}.reader-page .work-reading-heading{top:108px}}
@media(max-width:850px){.reader-page .work-reading-heading{top:113px}.reader-page .publication-content{padding-inline:24px}.admin-shell .admin-grid{grid-template-columns:minmax(0,1fr)}.admin-shell .admin-list{position:static;max-height:260px}.admin-shell .admin-editor{padding:24px}.editor-work-heading h2{font-size:24px}}
@media(max-width:650px){.reader-page .work-heading-layout{grid-template-columns:minmax(0,1fr);gap:22px;padding-inline:18px;margin-top:22px}.reader-page .work-hero .work-cover{width:200px;height:200px;margin-top:-70px}.reader-page .work-hero .work-hero-copy h1{font-size:34px;max-width:none}.reader-page .work-hero.poetry-hero .work-hero-copy h1{font-size:clamp(38px,9vw,48px)}.reader-page .work-hero .work-hero-copy .work-annotation{margin-top:18px}.reader-page .publication-content{padding-inline:18px}.reader-page .work-reading-heading{gap:12px;padding-block:9px}.reader-page .work-reading-heading .reader-menu-toggle{font-size:14px}.reader-page .related-publications>div{grid-template-columns:minmax(0,1fr)}.reader-page .work-about-full>.work-about-content{max-width:none}.editor-preview .work-hero .work-cover{width:150px;height:150px}.editor-preview .work-heading-layout{padding-inline:0}.editor-preview .publication-content{padding-inline:0}.editor-preview .work-hero .work-hero-copy h1{font-size:36px}}
@media(max-width:600px){.catalog-refinements>summary{display:flex;align-items:center;gap:4px;min-height:44px;padding:10px 0;cursor:pointer;color:#adbad1;font-size:14px;list-style:none}.catalog-refinements>summary::-webkit-details-marker{display:none}.catalog-refinements[open] .catalog-selects{padding-top:8px}.admin-shell .admin-editor{padding:18px}.editor-work-heading{flex-direction:column;gap:8px;margin-bottom:22px}.editor-tabs{margin-inline:-5px;gap:0}.editor-tabs>button{padding:10px;font-size:14px}.editor-save-bar{bottom:8px;margin:24px -10px -10px;padding:12px}.editor-save-bar .editor-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.editor-save-bar #save-draft{grid-column:1/-1}.editor-save-bar .button.primary{margin:0}.editor-theme-presets{gap:8px}.editor-theme-presets button{padding:8px 12px}.admin-editor #content{min-height:360px}}
@media(prefers-reduced-motion:no-preference){.editor-tabs>button,.reader-menu-toggle,.author-work-tools>summary{transition:background-color .15s,color .15s}}
.reader-page .work-hero .work-hero-copy .work-note-preview{margin:0}
#admin-refresh{margin-bottom:22px;font-size:14px}
.reader-page.reading-focus .author-work-tools{display:none}

/* Publication sections share a clear edge and the same spacing rhythm. */
.reader-page .publication-layout{padding-top:16px}
.publication-topbar{position:relative;z-index:5;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;min-height:34px;margin-bottom:14px;padding-bottom:8px;border-bottom:1px solid #bac6e724}
.reader-page .publication-topbar .publication-breadcrumb{margin:0;min-width:0;flex-wrap:wrap}
.reader-page .publication-topbar .author-work-tools{margin:0 0 0 auto;flex-shrink:0}
.publication-topbar .author-edit-menu{left:auto;right:0}
.publication-topbar .author-work-tools>summary{min-height:34px;padding:6px 11px;line-height:20px;border-radius:9px}
.publication-topbar .author-work-tools>summary:hover,.publication-topbar .author-work-tools[open]>summary{background:#bbc6ee10;border-color:#bac6e756;color:#e0e5f2}
.reader-page .publication-grid{border-top:1px solid #bac6e72a;border-bottom:1px solid #bac6e724;padding-block:32px}
.reader-page .work-hero .work-hero-copy .work-note-body{max-width:65ch}
.reader-page .work-about-full{display:grid;grid-template-columns:220px minmax(0,1fr);align-items:start;gap:32px;padding:32px;margin-top:32px;box-shadow:inset 0 1px 0 #ffffff24,0 16px 40px #0002}
.work-about-heading{display:flex;flex-direction:column;align-items:flex-start;gap:18px;padding:4px 0}
.work-about-mark{display:grid;place-items:center;width:48px;height:48px;border:1px solid color-mix(in srgb,currentColor 24%,transparent);border-radius:14px;background:linear-gradient(135deg,#ffffff26,#ffffff05);box-shadow:inset 0 1px 0 #ffffff2b}
.work-about-heading h2{font:500 22px/1.4 Inter,"Segoe UI",sans-serif;letter-spacing:-.025em;color:inherit;margin:0;text-wrap:balance}
.reader-page .work-about-full>.work-about-content{max-width:none;min-width:0;padding:4px 0 4px 32px;border-left:1px solid color-mix(in srgb,currentColor 22%,transparent);font-size:1rem;line-height:1.85}
.work-about-content>:not(figure){max-width:74ch}
.work-about-content>:first-child{margin-top:0}
.work-about-content figure{margin:24px 0}
.work-about-content :is(h2,h3){font-size:1.25rem;line-height:1.5;margin:28px 0 16px;color:inherit}
.work-about-content :is(ul,ol){padding-left:1.4em;margin-block:20px}
.work-about-content li+li{margin-top:8px}
.work-about-full:focus-visible{outline:2px solid #c5bfff;outline-offset:5px}
.reader-page .related-publications{margin-top:32px;padding-top:28px;border-top:1px solid #bac6e724}
.reader-page.reading-focus .publication-topbar{display:none}
.reader-page.reading-focus .publication-grid{border:0}
.editor-preview .publication-topbar{display:none}
@media(max-width:850px){
 .reader-page .work-about-full{grid-template-columns:180px minmax(0,1fr);gap:24px;padding:28px}
 .reader-page .work-about-full>.work-about-content{padding-left:24px}
}
@media(max-width:650px){
 .publication-topbar{gap:12px;padding-bottom:8px;margin-bottom:14px}
 .publication-topbar .author-work-tools>summary{padding:9px 11px}
 .reader-page .work-about-full{grid-template-columns:minmax(0,1fr);gap:22px;padding:24px 22px;margin-top:28px}
 .work-about-heading{flex-direction:row;align-items:center;gap:14px;padding:0}
 .work-about-mark{width:42px;height:42px;border-radius:12px;flex-shrink:0}
 .work-about-heading h2{font-size:21px}
 .reader-page .work-about-full>.work-about-content{padding:20px 0 0;border-left:0;border-top:1px solid color-mix(in srgb,currentColor 22%,transparent)}
}

/* Reading preferences live with the page tools, outside the text. */
.publication-tools{display:flex;align-items:center;gap:12px;margin-left:auto}
.reader-page .publication-tools .reader-menu-toggle{position:static;z-index:auto;display:grid;place-items:center;width:34px;height:34px;min-width:34px;padding:0;border:1px solid #bac6e72a;border-radius:9px;background:#bbacff07;color:#b5c1d8;box-shadow:none}
.reader-page .publication-tools .reader-menu-toggle:hover{background:#bbc6ee10;border-color:#bac6e756;color:#e0e5f2}
.reader-page .publication-tools .reader-menu-toggle:focus-visible{outline:2px solid #b5a7f7;outline-offset:3px}
.reader-page .publication-topbar .author-work-tools{padding-left:12px;border-left:1px solid #bac6e72a}
.reader-page.reading-focus .publication-topbar{display:flex;position:fixed;top:16px;right:24px;z-index:40;min-height:0;margin:0;padding:0;border:0}
.reader-page.reading-focus .publication-topbar .publication-breadcrumb{display:none}
.reader-page.reading-focus .publication-tools .reader-menu-toggle{background:#131a25f5}
.editor-preview .publication-topbar{display:flex;justify-content:flex-end;margin-bottom:18px;padding-bottom:12px}
@media(max-width:650px){.publication-tools{gap:10px}.reader-page .publication-topbar .author-work-tools{padding-left:10px}.reader-page .publication-grid{padding-block:24px}.reader-page.reading-focus .publication-topbar{right:18px}}

@media(pointer:coarse){.reader-page .publication-tools .reader-menu-toggle{width:42px;height:42px;min-width:42px}.publication-topbar .author-work-tools>summary{min-height:42px}}

/* A quiet bookmark, rather than a second reading toolbar. */
.reader-page #resume-reading{display:flex;align-items:center;gap:0;width:308px;max-width:calc(100vw - 32px);padding:5px 7px 5px 5px;border:1px solid #c4cbe723;border-radius:17px;background:linear-gradient(120deg,#ffffff06,#ffffff02),#111721e8;box-shadow:0 10px 32px #0005,inset 0 1px 0 #ffffff0d;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.reader-page #resume-reading[hidden]{display:none!important}
.reader-page #resume-confirm{position:relative;display:flex;align-items:center;gap:12px;flex:1;min-width:0;min-height:50px;padding:8px 12px;border:0;border-radius:12px;background:transparent;text-align:left;font-family:inherit;color:#e6e9f2;cursor:pointer;transition:background .2s}
.reader-page #resume-confirm:hover{background:#ffffff06}
.resume-book{display:grid;place-items:center;flex-shrink:0;width:28px;color:#b5aecf}
.resume-copy{display:grid;gap:3px;min-width:0}
.resume-copy strong{font-size:15px;font-weight:500;line-height:1.4;letter-spacing:-.015em}
#resume-position{font-size:13px;line-height:1.4;color:#8d99b0;font-variant-numeric:tabular-nums}
.reader-page #resume-dismiss{position:relative;display:grid;place-items:center;flex-shrink:0;width:32px;height:32px;min-height:32px;margin:0 0 0 6px;padding:0;border:0;border-radius:8px;background:transparent;color:#929eb5;cursor:pointer;transition:color .2s,background .2s}
.reader-page #resume-dismiss:hover{background:#ffffff07;color:#e6e9f2}
.reader-page #resume-dismiss::before{content:"";position:absolute;left:-4px;top:4px;bottom:4px;width:1px;background:linear-gradient(transparent,#ffffff16,transparent)}
.resume-close-mark{position:relative;width:12px;height:12px;pointer-events:none}
.resume-close-mark::before,.resume-close-mark::after{content:"";position:absolute;top:50%;left:0;width:12px;height:1.5px;border-radius:2px;background:currentColor;transform:translateY(-50%) rotate(45deg)}
.resume-close-mark::after{transform:translateY(-50%) rotate(-45deg)}
.reader-page #resume-reading button:focus-visible{outline:2px solid #b9b0df;outline-offset:2px}
@media(prefers-reduced-motion:no-preference){.reader-page #resume-reading:not([hidden]){animation:resume-bookmark-in .4s cubic-bezier(.16,1,.3,1)}@keyframes resume-bookmark-in{from{opacity:0;transform:translateX(-50%) translateY(10px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}}
.admin-shell :is(.admin-fields,.theme-colors){grid-template-columns:repeat(2,minmax(0,1fr))}
.admin-shell :is(.admin-top,.admin-heading,.admin-workspaces){flex-wrap:wrap}
.admin-shell .admin-heading>div{min-width:0}
.admin-shell .editor-work-heading>a{white-space:normal}
.admin-shell :is(#preview-dialog,#settings-preview-dialog,#collection-preview-dialog){overflow:hidden}
.admin-shell :is(#preview-dialog,#settings-preview-dialog,#collection-preview-dialog)[open]{display:flex;flex-direction:column}
.admin-shell :is(#preview-dialog,#settings-preview-dialog,#collection-preview-dialog)>header{height:auto;min-height:60px;flex:none;gap:16px}
.admin-shell :is(#preview-dialog,#settings-preview-dialog,#collection-preview-dialog) iframe{display:block;flex:1;min-height:0;height:auto}
.work-editor-body>section,.work-editor-body>div,.work-editor-header>div,.quick-theme-heading>div{min-width:0}
.quick-theme-preview strong{overflow-wrap:anywhere}
.work-editor-footer{flex-wrap:wrap}
.quick-meta-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:1000px){.admin-shell .admin-grid{grid-template-columns:minmax(0,1fr)}.admin-shell .admin-list{position:static;max-height:300px}}
@media(max-width:600px){.admin-shell :is(.admin-fields,.theme-colors){grid-template-columns:minmax(0,1fr)}.quick-meta-fields{grid-template-columns:minmax(0,1fr)}}
