:root{--nrmt-readable-scale:var(--nrmt-panel-scale,1);--nrmt-mobile-action-height:76px;--nrmt-mobile-footer-height:clamp(176px,28vh,242px)}

/* O controle de escala agora altera texto e alvos de toque, não só a geometria. */
body.nrmt-responsive-shell .nrmt-bi-panel{font-size:clamp(10px,calc(10px * var(--nrmt-readable-scale)),15px)}
body.nrmt-responsive-shell .nrmt-bi-panel>header{height:clamp(30px,calc(28px * var(--nrmt-readable-scale)),42px);font-size:clamp(10px,calc(10px * var(--nrmt-readable-scale)),15px)}
body.nrmt-responsive-shell .nrmt-bi-panel>header span,
body.nrmt-responsive-shell .nrmt-bi-panel>header small,
body.nrmt-responsive-shell .nrmt-bi-panel>header button,
body.nrmt-responsive-shell .nrmt-bi-stat,
body.nrmt-responsive-shell .nrmt-bi-toggle,
body.nrmt-responsive-shell .nrmt-bi-party-info span,
body.nrmt-responsive-shell .nrmt-bi-slot b{font-size:clamp(9px,calc(8px * var(--nrmt-readable-scale)),13px)!important;line-height:1.3}
body.nrmt-responsive-shell .nrmt-bi-party-info strong,
body.nrmt-responsive-shell .nrmt-bi-progress b{font-size:clamp(10px,calc(9px * var(--nrmt-readable-scale)),14px)!important}

/* Coleção e demais janelas tinham textos de 4 a 8px. */
body.nrmt-responsive-shell .nrmt-ninja-window small,
body.nrmt-responsive-shell .nrmt-ninja-window em,
body.nrmt-responsive-shell .nrmt-ninja-window p,
body.nrmt-responsive-shell .nrmt-ninja-window span,
body.nrmt-responsive-shell .nrmt-ninja-window button,
body.nrmt-responsive-shell .nrmt-ninja-window input,
body.nrmt-responsive-shell .nrmt-ninja-window select{font-size:clamp(9px,calc(8px * var(--nrmt-readable-scale)),13px)!important;line-height:1.4!important}
body.nrmt-responsive-shell .nrmt-ninja-window b,
body.nrmt-responsive-shell .nrmt-ninja-window strong{font-size:clamp(10px,calc(9px * var(--nrmt-readable-scale)),15px)!important;line-height:1.35!important}
body.nrmt-responsive-shell .nrmt-ninja-window h1,
body.nrmt-responsive-shell .nrmt-ninja-window h2{font-size:clamp(17px,calc(16px * var(--nrmt-readable-scale)),24px)!important}
body.nrmt-responsive-shell .nrmt-ninja-card{min-height:112px;grid-template-columns:82px minmax(0,1fr);padding:10px}
body.nrmt-responsive-shell .nrmt-ninja-card__portrait{width:80px;height:88px}
body.nrmt-responsive-shell .nrmt-ninja-detail-stats span{min-height:48px;display:grid;align-content:center}
body.nrmt-responsive-shell .nrmt-ninja-jutsus>span{min-height:48px;grid-template-columns:36px 1fr;padding:7px}
body.nrmt-responsive-shell .nrmt-ninja-jutsus img{width:34px;height:34px}

.xp-config-window .nrmt-display-settings__title b,
.xp-config-window .nrmt-display-settings__modes b,
.xp-config-window .nrmt-display-settings__range b{font-size:11px!important}
.xp-config-window .nrmt-display-settings__title small,
.xp-config-window .nrmt-display-settings__modes small,
.xp-config-window .nrmt-display-settings__footer small{font-size:9px!important;line-height:1.35}
.xp-config-window .nrmt-display-settings__modes button{min-height:58px!important}

#nrmt-save-status{position:fixed;z-index:1000005;right:14px;bottom:14px;max-width:min(360px,calc(100vw - 28px));padding:10px 14px;border:1px solid #b88722;background:#091012f2;color:#f2d183;font:700 11px/1.35 Arial,sans-serif;letter-spacing:.04em;box-shadow:0 10px 28px #0009;opacity:0;transform:translateY(10px);pointer-events:none;transition:.18s}
#nrmt-save-status.is-visible{opacity:1;transform:none}#nrmt-save-status.is-success{border-color:#2c9a65;color:#8df0ba}#nrmt-save-status.is-error{border-color:#a53a42;color:#ffadb3}

/* Celular: equipe continua na lateral; mochila, auto-venda e helper viram footer rolável. */
body.nrmt-display-mobile{--bi-bottom:calc(var(--nrmt-mobile-footer-height) + var(--nrmt-mobile-action-height) + 12px)!important}
body.nrmt-display-mobile .nrmt-bi-rail--left,
body[data-nrmt-display-preference="mobile"] .nrmt-bi-rail--left{display:flex!important;left:4px!important;top:calc(var(--bi-top) + 4px)!important;bottom:calc(var(--bi-bottom) + 4px)!important;width:clamp(118px,34vw,148px)!important;overflow:auto!important}
body.nrmt-display-mobile .nrmt-bi-rail--left .nrmt-bi-panel,
body[data-nrmt-display-preference="mobile"] .nrmt-bi-rail--left .nrmt-bi-panel{width:100%!important}
body.nrmt-display-mobile .nrmt-bi-rail--right,
body[data-nrmt-display-preference="mobile"] .nrmt-bi-rail--right{display:flex!important;flex-direction:row!important;align-items:stretch!important;gap:6px!important;left:4px!important;right:4px!important;top:auto!important;bottom:calc(var(--nrmt-mobile-action-height) + 8px)!important;width:auto!important;height:var(--nrmt-mobile-footer-height)!important;padding:4px!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x proximity;z-index:9550!important;background:#0b0f11e8;border:1px solid #343a3d;border-radius:4px;box-sizing:border-box}
body.nrmt-display-mobile .nrmt-bi-rail--right>.nrmt-bi-panel,
body[data-nrmt-display-preference="mobile"] .nrmt-bi-rail--right>.nrmt-bi-panel{flex:0 0 clamp(240px,78vw,340px)!important;width:clamp(240px,78vw,340px)!important;max-height:100%!important;overflow:auto!important;scroll-snap-align:start}
body.nrmt-display-mobile .nrmt-bi-actionbar{display:flex!important;left:4px!important;right:4px!important;bottom:4px!important;height:var(--nrmt-mobile-action-height)!important;padding:5px!important;overflow-x:auto!important;overflow-y:hidden!important;z-index:9600!important}
body.nrmt-display-mobile canvas{left:clamp(122px,35vw,153px)!important;top:var(--bi-top)!important;width:calc(100vw - clamp(122px,35vw,153px))!important;height:calc(100vh - var(--bi-top) - var(--bi-bottom))!important;transform:none!important;clip-path:none!important}
body.nrmt-display-mobile .nrmt-chat-window{left:4px!important;right:4px!important;bottom:calc(var(--bi-bottom) + 4px)!important;width:auto!important;max-width:none!important;height:min(150px,24vh)!important;min-height:0!important}
body.nrmt-display-mobile #nrmt-save-status,
body.nrmt-display-mobile #nrmt-combat-sync-status{right:8px!important;bottom:calc(var(--bi-bottom) + 8px)!important;max-width:calc(100vw - 16px)!important}

@media(max-width:520px){
  body.nrmt-display-mobile{--nrmt-mobile-footer-height:190px;--nrmt-mobile-action-height:70px}
  body.nrmt-display-mobile .nrmt-bi-rail--right>.nrmt-bi-panel{flex-basis:84vw!important;width:84vw!important}
  body.nrmt-display-mobile .nrmt-bi-slots{grid-template-columns:repeat(4,34px)!important}
  body.nrmt-display-mobile .nrmt-bi-slot{width:34px!important;height:34px!important}
  body.nrmt-display-mobile .nrmt-bi-slot img{width:30px!important;height:30px!important}
}
