/* Compact, single-component presentation for textbook figures. */
:root { background: #fff; }
body.book-mode { margin: 0; background: #fff; overflow-x: hidden; }
.book-mode main { max-width: none; margin: 0; padding: 0; }
.book-heading { min-height: 46px; padding: 10px 14px; display: flex; gap: 12px; align-items: baseline; justify-content: space-between; }
.book-heading h1 { margin: 0; font-family: inherit; font-size: 17px; font-weight: 600; letter-spacing: 0; line-height: 1.5; }
.book-heading span { color: #68766b; font-size: 11px; line-height: 1.5; }
.book-mode .workspace { display: grid; grid-template-columns: minmax(0, 1fr) 235px; border: 1px solid #d4dcd3; border-radius: 8px; overflow: hidden; background: #fff; }
.book-mode .scene, .book-mode.detail-mode .scene { position: relative; top: auto; height: 500px; border-radius: 0; box-shadow: none; }
.book-mode aside { height: 500px; max-height: none; padding: 20px 15px; border-left: 1px solid #d4dcd3; border-top: 0; overflow: visible; }
.book-mode .work-heading { margin: 0; padding: 0; border: 0; }
.book-mode .work-heading h2 { margin: 0; font-size: 13px; line-height: 1.5; }
.book-mode .work-heading button { padding: 5px 9px; font-size: 11px; }
.book-mode .steps { margin: 17px 0 14px; gap: 4px; }
.book-mode .steps button { min-height: 37px; font-size: 11px; padding: 5px 3px; }
.book-mode .range-label { margin: 13px 0 19px; font-size: 11px; }
.book-mode .range-label input { margin-top: 12px; }
#bookStateText { font-size: 13px; line-height: 1.85; margin: 0 0 20px; min-height: 122px; }
.book-cutaway { display: block; padding-top: 15px; border-top: 1px solid #e3e7df; font-size: 12px; }
.book-cutaway input { accent-color: #315f59; vertical-align: -1px; }
.book-scope { margin: 19px 0 0; color: #727d70; font-size: 11px; line-height: 1.7; }
.book-mode .scene-tools { left: 12px; bottom: 12px; gap: 5px; }
.book-mode .scene-tools button, .book-mode .scene-tools label { padding: 6px 8px; font-size: 11px; }
.book-mode .part-label { max-width: 145px; font-size: 10px; }
/* The shared miniature renderer needs nonzero dimensions, but has no book layout footprint. */
.book-mode #locator { position: absolute; left: -10000px; right: auto; top: 0; width: 190px; height: 100px; visibility: hidden; pointer-events: none; border: 0; }
.book-mode #locatorCanvas { width: 190px; height: 100px; }
.book-mode #locator button, .book-mode #locatorName, .book-mode .runtime-hosts { display: none !important; }
@media (max-width: 780px) {
  .book-heading { padding: 10px 11px; gap: 6px; }
  .book-heading h1 { font-size: 16px; }
  .book-heading span { font-size: 10px; }
  .book-mode .workspace, .book-mode.detail-mode .workspace { display: block; overflow: hidden; }
  .book-mode .scene, .book-mode.detail-mode .scene { height: 460px; position: relative; }
  .book-mode aside { height: auto; max-height: none; padding: 15px 17px; border-left: 0; border-top: 1px solid #d4dcd3; }
  .book-mode .steps { margin: 12px 0; }
  .book-mode .steps button { min-height: 32px; }
  .book-mode .range-label { margin: 10px 0 13px; }
  #bookStateText { min-height: 0; margin-bottom: 12px; font-size: 12px; }
  .book-cutaway { padding-top: 11px; }
  .book-scope { margin-top: 10px; font-size: 10px; }
  .book-mode .part-label { max-width: 116px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
