:root { --reader-width:480px; --sheet-height:42dvh; }
.page { overflow-anchor:none; }
#topic-index { position:sticky; top:1rem; align-self:start; }
#active-filters { display:flex; gap:8px; flex-wrap:wrap; margin:-12px 0 24px; }
#active-filters[hidden] { display:none; }
#active-filters button { background:#edf4ef; color:#17412c; border:1px solid #cddbd1; padding:8px 12px; border-radius:6px; font-size:.8125rem; line-height:1.5; min-height:40px; max-width:100%; overflow-wrap:anywhere; text-align:left; }
mark { background:#fbe3ce; color:#17201b; border-radius:2px; }
.search-excerpt { display:block; font-size:.8125rem; line-height:1.6; color:#405648; margin-top:8px; overflow-wrap:anywhere; }
.catalog-view .search-excerpt { grid-column:2; grid-row:4; }
.recent-grid.rack-view .material .search-excerpt { display:none; }
#prompt-editor[hidden] { display:none; }
.prompt-fields { margin:20px 0 28px; border:1px solid #d3ded7; border-radius:8px; }
.prompt-fields > summary { padding:14px 16px; cursor:pointer; color:#17412c; font-size:.9375rem; font-weight:600; }
.prompt-fields[open] > summary { border-bottom:1px solid #d3ded7; }
.prompt-fields > .muted,.variable-status { font-size:.8125rem; line-height:1.6; padding:0 16px; }
.variable-fields { display:grid; gap:8px; padding:8px 16px; }
.variable-fields label { font-size:.8125rem; line-height:1.5; color:#405648; margin-top:8px; }
.variable-fields textarea { font:400 1rem/1.5 'Poppins',sans-serif; color:#17201b; background:#fff; border:1px solid #bccdc2; border-radius:6px; width:100%; resize:vertical; padding:10px 12px; min-height:68px; }
.variable-fields textarea:focus-visible { outline:2px solid #9e431d; outline-offset:2px; }
.reset-variables { min-height:44px; font-size:.8125rem; padding:8px 16px; background:transparent; }
#prompt-editor h3 { font-size:1.0625rem; line-height:1.4; font-weight:600; letter-spacing:-.015em; margin:1.75rem 0 .625rem; }
.prompt-preview,.original-prompt pre { font:400 1rem/1.7 'Poppins',sans-serif; white-space:pre-wrap; overflow-wrap:anywhere; margin:12px 0 24px; }
.original-prompt { border-top:1px solid #dce5de; border-bottom:1px solid #dce5de; padding:14px 0; margin-top:24px; font-size:.875rem; }
.original-prompt summary { cursor:pointer; }
.original-prompt button { padding:10px 12px; min-height:44px; font-size:.875rem; display:inline-flex; align-items:center; gap:8px; border:1px solid #d3ded7; border-radius:6px; }
.original-prompt svg { width:17px; height:17px; }
#reader-size { display:none; }
#reader-resize { display:none; }
#detail-actions { align-items:center; }
.stand-publication.shelf-selected .publication-face { outline:1px solid rgb(255 190 108 / .65); }
.scene-hotspot[aria-pressed=true] { color:#9e431d; }
@media(min-width:1250px) {
 .resource-reader { width:var(--reader-width); max-width:calc(100vw - 600px); }
 body.reader-open .page { width:calc(100% - var(--reader-width) - 24px); }
 #reader-resize { display:block; position:fixed; right:calc(var(--reader-width) + 4px); top:12px; bottom:12px; width:16px; cursor:ew-resize; touch-action:none; z-index:30; }
 #reader-resize::after { content:''; position:absolute; inset:42% 7px; background:#c4d1c8; border-radius:2px; }
 #reader-resize:hover::after,#reader-resize:focus-visible::after { background:#b44d22; }
 .resizing-reader,.resizing-reader * { cursor:ew-resize !important; user-select:none; }
 body.reader-open .category-toolbar form { width:min(100%,22rem); }
}
@media(max-width:1249px) {
 .resource-reader { height:var(--sheet-height); max-height:90dvh; }
 body.reader-open .page { padding-bottom:calc(var(--sheet-height) + 2rem); }
 #reader-size { display:inline-flex; align-items:center; justify-content:center; font-size:.8125rem; min-height:44px; padding:8px; color:#17412c; touch-action:none; cursor:ns-resize; }
 .dialog-top { gap:8px; }
 #detail-kind { flex:1; }
 #close-detail { padding-left:8px; }
}
@media(max-width:800px) { #topic-index { position:static; } }
@media(prefers-reduced-motion:reduce) { .stand-publication .publication-face { transition:none; } }
.publication-face::after,.material::before { background-image:none; }
.textures-ready .publication-face::after,.textures-ready .material::before { background-image:url('matte-paper.webp'); }
