/* One root scale; authored rem typography also covers dynamically created UI.
   Physical map units, video dimensions and avatar art never use this scale. */
html { font-size:calc(100% * var(--vo-text-scale,1)); }
body { font-size:1rem; }
button,input,select,textarea { font-family:inherit;font-size:inherit; }

/* Text-size controls have one semantic state and one visual owner.
   Palette files intentionally do not style this group. */
.accessibility-choice {
 display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,7em),1fr));gap:6px;
}
.accessibility-choice button {
 min-width:0;min-height:2.5em;height:auto;padding:.55em .65em;
 border:1px solid var(--line,#58615e);border-radius:8px;
 background:var(--raise,#303433);color:var(--fg,#f4f5ef);
 font-size:.75rem;line-height:1.35;white-space:normal;overflow-wrap:anywhere;
}
.accessibility-choice button:hover { background:var(--raise-2,#404843); }
.accessibility-choice button[aria-pressed="true"] {
 background:var(--accent-soft,#30402d);border-color:var(--accent,#9bcb60);
 color:var(--fg,#f4f5ef);box-shadow:inset 0 0 0 1px var(--accent,#9bcb60);
}
.accessibility-choice button:focus-visible { outline:2px solid var(--accent,#9bcb60);outline-offset:2px; }
.accessibility-row-head { flex-wrap:wrap; }
.accessibility-row-head span { flex:none;font-variant-numeric:tabular-nums; }

/* Intrinsic sizing: let words wrap instead of multiplying all panel dimensions. */
:is(.floating-rail,.xm-mkt-dialog,.xm-mkt-settings-area,.xm-mkt-settings-pane,
 .settings-popover,.admin-v66-pane,.admin-v66-nav,.calendar-box,.calendar-board,
 .profile-box,.construction-inspector,.construction-catalog,.self-panel,
 .xm-lab-rec-library,.xm-browser-rec-library,.vo-office-hours-popover) {
 min-width:0;overflow-wrap:anywhere;max-inline-size:calc(100vw - 16px);
}
:is(.floating-rail,.admin-v66-pane,.calendar-box,.profile-box,.construction-inspector,
 .xm-lab-rec-library,.xm-browser-rec-library,.xm-mkt-modal,.settings-popover)
 :is(button,label,summary,[role="tab"]) { overflow-wrap:anywhere; }
:is(.accessibility-theme,.directory-actions,.calendar-actions,.profile-actions,
 .admin-v66-subnav,.device-actions,.notification-actions,.v66-section-actions) { flex-wrap:wrap; }
:is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea) {
 max-inline-size:100%;min-inline-size:0;
}
:is(.directory-name,.directory-meta,.directory-status,.v984-row-copy,
 .v984-general-copy,.chat-msg-bubble,.profile-detail) { overflow-wrap:anywhere; }
.xm-mkt-modal .audio-pro-title { flex-wrap:wrap; }
.xm-mkt-settings-pane { min-height:0; }
.xm-mkt-settings-nav button { line-height:1.3;overflow-wrap:anywhere; }
.accessibility-theme button { white-space:normal;line-height:1.35; }

/* Enlarged type uses only the space it needs. The default pixel layout remains
   the normal-size reference; no transform/zoom is applied to an interface root. */
html[data-vo-text-scale="115"],html[data-vo-text-scale="130"] {
 & :is(.directory-item,.calendar-head,.chat-mode-tabs,.flat-personas-trigger,
  .flat-personas-row,.xm-personas-summary,.xm-personas-switch) {
  height:auto;min-height:min-content;white-space:normal;
 }
 & :is(.directory-meta,.directory-status,.v984-row-copy b,.v984-row-copy small,
  .v984-general-copy b,.v984-general-copy small) { white-space:normal;text-overflow:clip; }
 & :is(.admin-v66-nav,.construction-inspector,.calendar-form) :is(button,label) {
  white-space:normal;line-height:1.35;
 }
}

/* SVG label backgrounds grow around their letters; furniture and collision
   coordinates remain unchanged. Font sizes themselves are authored in rem. */
#office .avatar .tag { height:auto;line-height:1.3;white-space:normal;overflow-wrap:anywhere;max-width:18rem; }
#office .world-sign rect:nth-of-type(-n+2) {
 transform-box:fill-box;transform-origin:left center;scale:var(--vo-text-scale,1);
}
#office .team-zone-badge rect {
 transform-box:fill-box;transform-origin:center;scale:var(--vo-text-scale,1);
}

@media(max-width:700px) {
 .accessibility-choice { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .xm-mkt-dialog-body { grid-template-columns:minmax(0,1fr); }
 .xm-mkt-settings-nav { flex-wrap:wrap; }
 .xm-mkt-settings-nav button { flex:1 1 40%; }
 :is(.calendar-actions,.profile-actions,.directory-tools) { min-width:0; }
}
