/* Shared control metrics. Text navigation follows the capacitor reference.
   Do not apply fixed sizes to cards, illustrated controls, or diagram hotspots. */
:root{--ui-control-font:14px;--ui-control-height:44px;--ui-tool-height:40px}
#app .ui-page-header button.ui-header-action{
 font-family:Tahoma,Arial,sans-serif!important;font-size:var(--ui-control-font)!important;
 font-weight:400;line-height:normal!important;min-height:var(--ui-control-height)!important;
 height:var(--ui-control-height);padding:10px 13px!important;flex-shrink:0;white-space:nowrap;
}
#app .ui-page-header button.ui-header-action.section-home-icon,#app .ui-page-header button.ui-header-action.fullscreen-icon{
 width:44px!important;min-width:44px!important;flex:0 0 44px!important;padding:9px!important;
}
#app .ui-page-header button.ui-header-action.fullscreen-icon{font-size:22px!important;line-height:1!important;padding:6px!important}
#app .ui-page-header{flex-shrink:0;min-width:0}
#app .ui-page-header h1{font-size:22px;line-height:1.4;min-width:0}
#app .ui-page-header small{font-size:12px}
#app .lab-header:not(.lesson-header){height:54px;padding-block:5px}
#app .lab-header:not(.lesson-header)+.focused-work{height:calc(var(--official-view,100dvh) - 54px)}
#app .lab-header.lesson-header{min-height:54px}

/* Calculator screens share one action scale; readings retain their large type. */
#app .rc.rc-compact{margin:0;overflow-y:auto}
#app .rc .rc-toolbar button,#app .rc .rc-chart-head button{font-size:14px;min-height:44px;padding:10px 13px}
#app .rc .rc-controls button{font-size:16px;min-height:44px}
#app .rc .rc-choices b{font-size:22px;line-height:1.5;margin-bottom:6px}
#app .rc .rc-choices span{font-size:14px;line-height:1.6}
#app .rc .rc-choices button{min-width:0}
#app .rc .rc-quiz-settings select{font-size:16px;min-height:44px}

/* Same-role toolbars: do not shrink functional labels to 10–11px on phones. */
#app .al-toolbar button,#app .al-properties .actions button,#app .al-serial button,
#app .focused-work .workspace-head button,#app .focused-work .book-banner button,
#app .lesson-toolbar-actions button,#app .quick-actions button,#app .component-actions button,
#app .g6-tabs button,#app .g7-tabs button,#app .g6-stage-actions button,
#app .g6-controls button,#app .g7-controls button,#app .g7-toolhead button,
#app .g6-footer button,#app .dc-tools button,#app .dc-controls>button,
#app .wood-lab>nav button,#app .wood-selection button,
#app .df-help button,#app .df-footer button,#app .df-camera button,
#app .sw-actions button,#app .sh-scene-tools button,#app .pg-toolbar button,
#app .qa-timer button,#app .qa-answer button{
 font-size:14px;line-height:1.4;min-height:var(--ui-tool-height);padding:7px 10px;
}
#app .lab-control-nav button{font-size:14px!important;min-height:40px!important;padding:7px 10px!important}
#app .df-tools button b,#app .df-fields label,#app .df-camera select,
#app .g6-controls label,#app .g7-controls label,#app .wood-selection label{font-size:14px;line-height:1.5}
#app .g7-parts span{font-size:13px;line-height:1.5}
#app .g7-parts small{font-size:12px;line-height:1.5}
#app .dc-room-lab .dc-furniture-option span{font-size:13px;line-height:20px;flex:0 0 20px}
#app .dc-room-lab .dc-furniture-option small{font-size:12px;line-height:18px;flex:0 0 18px}
#app .school-tools button,#app .school-subject-back,#app #curriculum-back{font-size:14px;min-height:44px}
#app .school-tools .fullscreen-icon{font-size:22px!important;min-width:44px;width:44px;height:44px}

/* Reader/dialog actions use the same scale even outside the main app host. */
.application-guide header button,.application-guide-navigation button{font-size:14px;min-height:44px;padding:10px 13px}
#app .dc-perspective .pg-header button{font-size:14px;min-height:44px;padding:10px 13px}
#app .dc-walk .dc-perspective{font-family:Tahoma,Arial,sans-serif}
#app .dc-walk>header button{font-size:14px;min-height:44px;padding:10px 13px}

@media(max-width:700px){
 #app .ui-page-header h1{font-size:18px}
 #app .ui-page-header{gap:6px}
 #app .ui-page-header:not(.lab-header){display:flex;flex-wrap:wrap;align-items:center}
 #app .ui-page-header:not(.lab-header)>.ui-header-title{flex:1 0 100%!important;order:2;text-align:center}
 #app .ui-page-header .application-header-actions{margin-inline-start:auto}
 #app .rc .rc-choices b{font-size:20px}
 #app .rc .rc-choices span{font-size:14px}
 #app .rc header:has(.calculator-navigation){flex-wrap:wrap}
 #app .rc header:has(.calculator-navigation)>h1,
 #app .rc header:has(.calculator-navigation)>div:not(.calculator-navigation){order:3;flex-basis:100%}
 #app .rc header>.fullscreen-icon{margin-inline-start:auto}
 #app .al>header{flex-wrap:wrap}
 #app .al>header h1{flex:1;min-width:100px}
}
@media(orientation:landscape) and (max-height:600px){
 #app .ui-page-header h1{font-size:16px}
 #app .rc .rc-choices b{font-size:18px}
 #app .df-help{flex-wrap:wrap}
 #app .sh-work .sw-head{flex-wrap:wrap}
}
