/* Readable text with wrapping, flexible controls and bounded sheets. */
body{font-size:17px;line-height:1.5}
:is(p,label,button,input,select,textarea,td,th,summary,small){font-size:max(14px,.9rem)!important;line-height:1.4!important}
:is(h2,h3){line-height:1.25;overflow-wrap:anywhere}
:is(h4,h5){font-size:max(17px,1rem)!important;line-height:1.35!important}
:is(button,input,select,textarea){box-sizing:border-box;max-width:100%}
button{white-space:normal;overflow-wrap:anywhere}
:is(p,label,small,td,th){overflow-wrap:anywhere}
.farm-cozy .farm-hud-box strong{font-size:clamp(18px,1.5vw,24px)!important;line-height:1.2}
.farm-cozy :is(.farm-panel-note,.farm-stock,.farm-product-category,.farm-ui-label){font-size:14px!important;line-height:1.4!important}
.farm-cozy :is(.farm-shop-item,.farm-inventory-item,.farm-worker-card){min-width:0;height:auto}
.farm-cozy :is(.farm-shop-detail,.farm-inventory-detail){min-width:0}
.farm-cozy :is(.farm-ui-panel,.farm-inventory-panel,.farm-progression-panel,.farm-fantasy-panel){max-height:calc(100dvh - 32px);overflow:auto;box-sizing:border-box}
.farm-confirm-dialog{box-sizing:border-box;width:min(540px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto}
.farm-confirm-dialog .farm-person-actions{display:flex;flex-wrap:wrap;gap:10px}
.farm-confirm-dialog .farm-person-actions button{flex:1 1 150px;min-height:48px}
.farm-cozy :is(.farm-mode-switch button,.farm-tool,.farm-camera-button){height:auto!important;min-height:44px!important;flex-shrink:0}
.farm-cozy .farm-command-bar .farm-toolbar{height:auto!important;min-height:50px!important}
.farm-cozy :is(.farm-message,.farm-toast-stack){height:auto!important;min-height:44px!important;max-height:90px!important;overflow:auto}
.farm-cozy .farm-toast{height:auto!important;min-height:40px!important}
/* Map labels stay inside their tile; full descriptions remain accessible. */
.farm-field .farm-tile{min-height:0!important;line-height:1!important}
.farm-field :is(.farm-tile-tag,.farm-cat-name,.farm-grade-badge){font-size:11px!important;line-height:1.2!important;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.farm-field :is(.farm-fish-shadow,.farm-world-gift){min-height:0}
@media(max-width:620px){.farm-cozy .farm-hud-box strong{font-size:18px!important}.farm-cozy .farm-mode-switch button{padding:6px 9px!important}.farm-cozy .farm-selection>span{white-space:normal!important;height:auto!important}}

.farm-field button{min-height:0!important}
.farm-cozy .farm-cat-bubble{max-height:min(65dvh,380px);overflow:auto;box-sizing:border-box}

.farm-cozy .farm-camera{flex-wrap:wrap!important;justify-content:flex-start!important;gap:6px!important}
.farm-cozy .farm-zoom-label{min-width:45px!important;flex-shrink:0;font-size:14px!important}

.farm-cozy :is(.farm-message,.farm-toast-stack){height:56px!important;min-height:56px!important;max-height:56px!important;overflow:auto}

.farm-cozy .farm-toast-stack{pointer-events:none!important}
.farm-cozy .farm-toast-stack button{pointer-events:auto}
.farm-cozy .farm-toast-stack{z-index:20!important}
