:root{--font-overall:1;--font-project:1;--font-status:1;--font-menu:1;--font-title:1;--font-body:1;--font-section:var(--font-body)}
/* Each explicit px font is scaled once; inherited text keeps its parent's scale. */
:is(button,.tabs,.sidebar,.mobile-bottom,.mobile-menu-item,.font-settings-actions){--font-section:var(--font-menu)}
:is(h1,h2,h3,h4,.order-title,.memo-card h3,.mobile-recent b,.font-preview h3){--font-section:var(--font-title)}
:is(.project-list button,.project-directory-name,.mobile-project-card h3,.font-preview-project){--font-section:var(--font-project)}
:is(.badge,.workflow-status,.directory-status,.presence-status,.mobile-project-label,.mobile-work-mark,.direct-read-state,.font-preview-status){--font-section:var(--font-status)}
:is(p,.message p,.memo-body,.notice-body,.search-snippet,.forum-post-card p,.font-preview p,textarea){--font-section:var(--font-body)}
.font-settings{max-width:640px;min-width:0}.font-sliders label{margin:16px 0}.font-sliders label>span{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.font-sliders output{font-variant-numeric:tabular-nums;color:var(--primary)}.font-sliders input[type=range]{width:100%;padding:0;min-height:44px;accent-color:var(--primary)}
.font-preview{border:1px solid var(--border);border-radius:12px;padding:12px;margin-top:20px}.font-preview-projects{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}.font-preview article{min-width:0;border:1px solid var(--border);border-radius:8px;padding:8px}.font-preview-project{display:block;font-size:calc(14px * var(--font-overall) * var(--font-project))}.font-preview-status{display:block;margin:8px 0;font-size:calc(11px * var(--font-overall) * var(--font-status))}.font-preview p{font-size:calc(13px * var(--font-overall) * var(--font-body));line-height:1.6}.font-settings-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end;margin-top:16px}
/* Growing text gains height instead of overlapping adjacent cells. */
:is(.mobile-shortcuts b,.mobile-bottom button,.mobile-bottom span,.mobile-menu-item,.mobile-project-card,.project-directory-name,.project-directory-name>span,.mobile-recent b,.primary,.secondary,.danger,.tabs button,.company-board,.font-preview){white-space:normal;overflow-wrap:anywhere;word-break:normal;text-overflow:clip;min-width:0;line-height:1.5}
.mobile-recent b{overflow:visible}.mobile-shortcuts button,.mobile-bottom button{height:auto}.mobile-menu-item>span{min-width:0}.mobile-dashboard-section>header,.mobile-work-card footer,.mobile-project-card footer,.topbar,.project-actions,.toolbar{flex-wrap:wrap;height:auto}.topbar{min-height:72px}.mobile-bottom{align-items:stretch}.mobile-bottom button{padding:8px 2px}.mobile-bottom button span{max-width:100%}.font-preview h3{font-size:calc(16px * var(--font-overall) * var(--font-title))}
@media(max-width:760px){.mobile-project-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.mobile-project-card{padding:10px 8px}.mobile-project-card footer{gap:4px}.mobile-project-card footer small{min-width:0}.project-directory-table td{white-space:normal;overflow-wrap:anywhere}.tabs{flex-wrap:wrap}.font-settings{overflow-wrap:anywhere}input:not([type=range]):not([type=checkbox]):not([type=radio]):not([type=color]),textarea,select{font-size:max(16px,calc(16px * var(--font-overall) * var(--font-body)))}.page{padding-bottom:calc(130px * var(--font-overall) * var(--font-menu) + env(safe-area-inset-bottom))}}

body{font-size:calc(16px * var(--font-overall) * var(--font-body))}
.company-board{font-size:calc(16px * var(--font-overall) * var(--font-menu))}
.project-directory-name{font-size:calc(14px * var(--font-overall) * var(--font-project))}
