/* Shared text-size controls. Scale type and text containers, not the artwork. */
:root { --text-scale: 1; }
.text-size-controls { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; }
.text-size-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: calc(26px * var(--text-scale)); height: calc(26px * var(--text-scale));
  padding: 0; border: 1px solid transparent; border-radius: 3px;
  background: transparent; color: var(--text-bright, #f0f0f0);
  font: inherit; font-size: calc(19px * var(--text-scale)); line-height: 1; cursor: pointer;
}
.text-size-button:hover:not(:disabled) { background: rgba(255,255,255,.1); border-color: var(--border-hi, #666); }
.text-size-button:disabled { opacity: .35; cursor: default; }
.text-size-status {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #8fc4ff; outline-offset: 2px;
}
/* Companion pages put the same controls at the right of their navigation. */
#menubar > .text-size-controls .text-size-button { height: calc(22px * var(--text-scale)); }

/* At larger settings, let navigation and headers wrap instead of clipping. */
.large-text #titlebar { height: auto; min-height: calc(36px * var(--text-scale)); padding-top: 4px; padding-bottom: 4px; }
.large-text .titlebar-center {
  position: static; transform: none; min-width: 0; flex: 1;
  justify-content: center; flex-wrap: wrap; gap: 4px 10px; padding: 0 12px;
}
.large-text .titlebar-actions { flex-shrink: 0; }
.large-text .tbar-btn { width: calc(26px * var(--text-scale)); height: calc(26px * var(--text-scale)); flex-shrink: 0; }
.large-text .tbar-btn svg { width: calc(14px * var(--text-scale)); height: calc(14px * var(--text-scale)); }
.large-text #menubar { height: auto; min-height: calc(24px * var(--text-scale)); flex-wrap: wrap; }
.large-text .menu-item { height: auto; min-height: calc(22px * var(--text-scale)); padding-top: 4px; padding-bottom: 4px; }
.large-text .panel-hdr { height: auto; min-height: calc(26px * var(--text-scale)); gap: 8px; padding-top: 5px; padding-bottom: 5px; }
.large-text .panel-title { overflow-wrap: anywhere; }
.large-text .panel-toggle { flex-shrink: 0; padding: 5px; }
.large-text #panel-metadata .panel-body,
.large-text #panel-description .panel-body { max-height: none; }
.large-text .meta-val { word-break: normal; overflow-wrap: anywhere; }
.large-text #doc-tab-bar, .large-text #edit-tab-bar { height: auto; min-height: calc(24px * var(--text-scale)); align-items: center; flex-wrap: wrap; }
.large-text .doc-tab { height: auto; min-height: calc(22px * var(--text-scale)); min-width: 0; max-width: 100%; padding-top: 4px; padding-bottom: 4px; flex-wrap: wrap; }
.large-text .doc-tab-name { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.large-text .zoom-btn { width: calc(22px * var(--text-scale)); height: calc(20px * var(--text-scale)); }
.large-text #statusbar, .large-text #works-footerbar { height: auto; min-height: calc(22px * var(--text-scale)); flex-wrap: wrap; padding-top: 3px; padding-bottom: 3px; gap: 6px 18px; }
.large-text #works-topbar, .large-text #submissions-topbar, .large-text #progress-topbar {
  height: auto; min-height: calc(40px * var(--text-scale)); flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px;
}
.large-text .works-filter { max-width: min(100%, calc(140px * var(--text-scale))); }
.large-text #works-search { width: min(100%, calc(220px * var(--text-scale))); }
.large-text .works-size-btn { width: calc(22px * var(--text-scale)); height: calc(22px * var(--text-scale)); }
.large-text .array-info, .large-text .layer-name { overflow-wrap: anywhere; }
.large-text .ext-link { overflow-wrap: anywhere; }
.large-text .array-eye, .large-text .layer-eye { width: calc(16px * var(--text-scale)); }
.large-text .tool-option-slider { min-width: 0; }
.large-text .tool-option-val { width: calc(32px * var(--text-scale)); }
.large-text .export-actions, .large-text .modal-actions { flex-wrap: wrap; }
.large-text .export-btn { height: auto; min-height: calc(26px * var(--text-scale)); padding: 5px 8px; white-space: normal; }
.large-text .modal-hdr { height: auto; min-height: calc(36px * var(--text-scale)); gap: 10px; padding-top: 5px; padding-bottom: 5px; }
.large-text .modal-box { max-height: calc(100vh - 32px); overflow-y: auto; }
.large-text #search-modal { max-height: calc(100vh - 100px); display: flex; flex-direction: column; }
.large-text .search-modal-bar { flex-wrap: wrap; }
.large-text #search-input { min-width: 0; }
.large-text .search-results { min-height: 0; }
.large-text .search-footer { flex-wrap: wrap; flex-shrink: 0; }
.large-text .prog-tl-tick { min-width: 0; white-space: nowrap; overflow: visible; }
.large-text .prog-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(140px * var(--text-scale))), 1fr)); }
.large-text .prog-table { table-layout: fixed; overflow-wrap: anywhere; }
.large-text body > #page .prog-table th { top: calc(24px * var(--text-scale)); }
.large-text .about-facts, .large-text .facts { grid-template-columns: minmax(100px, 1fr) minmax(0, 3fr); }
.large-text .about-facts dd, .large-text .facts dd { overflow-wrap: anywhere; }
