/* App-wide modern parchment typography and controls. Shared roles, not screen density hacks. */
:root{--ui-body:16px;--ui-meta:14px;--ui-control:14px;--ui-heading:20px;--t0:14px;--t1:16px;--t2:16px;--t3:20px;--t4:24px;--tap:44px}
html{font-size:16px}
body{font-size:var(--ui-body);line-height:1.55}
button,input,select,textarea{font-family:var(--font-ui)}
button{font-size:var(--ui-control)}
:is(.button,.seg-btn,.combat-tab-btn,.fchip,.rail-btn,.rail-icon-btn,.map-bar-btn,.map-tool-btn){font-size:var(--ui-control)!important;font-weight: var(--fw-emph);line-height:1.4;min-height:44px!important;border-radius:10px;padding:9px 14px;max-width:100%}
:is(.button,.seg-btn,.combat-tab-btn,.fchip) :is(span,b,small){font-size:inherit!important}
.button{white-space:normal;overflow-wrap:anywhere;box-shadow:none}
:is(.seg,.combat-tab-bar){border-radius:12px;gap:6px}
:is(.seg-btn,.combat-tab-btn,.fchip){border-radius:10px;white-space:nowrap}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea{font-size:var(--ui-body)!important;line-height:1.5;min-height:44px}
input[type=checkbox],input[type=radio]{accent-color:var(--lagoon-deep)}
:is(.modal,.screen,.player-panel) :is(p,.loot-note,.npc-notes,.quest-notes,.handout-notes,.org-notes,.action-effect,.action-linked-note,.action-bullets){font-size:var(--ui-body);line-height:1.65;overflow-wrap:anywhere}
:is(.row-sub,.lrow-sub,.hint,.field-hint,.loot-meta,.metric .label,.metric .note,.rule-note,.subtitle,.chip){font-size:var(--ui-meta);line-height:1.5}
:is(.lrow-title,.row-title,.action-card h3){font-size:16px;line-height:1.4;font-weight: var(--fw-head)}
:is(.screen-title h2,.section-title h2,.modal h2){font-size:var(--ui-heading);line-height:1.3;font-weight: var(--fw-emph);letter-spacing:0}
label{font-size:var(--ui-meta);line-height:1.5}
:is(.form-actions,.list-actions,.button-row){gap:8px;flex-wrap:wrap}
:is(button,summary,input,select,textarea,[contenteditable=true]):focus-visible{outline:3px solid #28716b;outline-offset:2px}
:is(.stepper-btn,.modal-close,.modal-back,.navbtn,.icon-button){min-height:44px!important;min-width:44px}
.navbtn{font-size:14px;line-height:1.3}
/* Keep graphical map pins, dice, stat values and piano keys at their authored
   dimensions. Their supporting text inherits the readable metadata floor. */
@media(max-width:480px){.button{padding:9px 12px}.screen-title,.section-title{flex-wrap:wrap;gap:8px}}
small{font-size:var(--ui-meta);line-height:1.5}
.component-ac :is(.ac-label,.ac-value){font-size:14px;line-height:1.2}
.component-ac{min-width:44px;min-height:44px}
.favour-stop-label{font-size:14px;white-space:normal;overflow:visible;line-height:1.3;overflow-wrap:anywhere}
.favour-stop-icon{font-size:16px}
/* Custom action controls share the touch minimum too; artwork indicators and
   piano keys retain their specialised geometry. */
button:not(.profile-photo-dot):not(.skuttles-key){min-height:44px!important}
.duty-chip{border-radius:10px;font-size:14px!important;padding:9px 12px;line-height:1.4;font-weight: var(--fw-emph)}
summary{font-size:14px;line-height:1.5;min-height:44px;cursor:pointer}
summary :is(span,b,small){font-size:inherit}

/* Chart controls need room for their glyphs instead of text-button padding. */
.map-editor-bar .map-bar-btn{width:44px;height:44px;min-width:44px;flex-shrink:0;padding:0}
.map-editor-bar .map-bar-btn svg{width:24px;height:24px;flex-shrink:0}
.map-editor-bar .map-bar-count{font-family:inherit;font-size:14px;font-weight: var(--fw-body);line-height:1;min-width:20px;height:20px}
