/* Magics Control Center v1.0.223
   Global readability layer.
   Loaded LAST to neutralize legacy 6px–10px typography without redesigning layout. */

html body{
  font-size:14px!important;
}

/* Core chrome */
html body .side-brand strong{font-size:13.5px!important}
html body .side-brand small{font-size:12.5px!important;line-height:1.55!important}
html body .nav-label{font-size:12.5px!important;line-height:1.5!important}
html body .side-nav a{font-size:13px!important}
html body .soon{font-size:12.5px!important}
html body .side-footer a{font-size:12.5px!important}
html body .eyebrow{font-size:12.5px!important;line-height:1.5!important}
html body .health-dot{font-size:12.5px!important}
html body .admin-chip strong{font-size:12.5px!important}
html body .admin-chip small{font-size:12.5px!important}
html body .top-title strong{font-size:15px!important}

/* Hero / cards / status */
html body .hero p,
html body .panel p{font-size:12.5px!important;line-height:1.85!important}
html body .stat-card small{font-size:12.5px!important}
html body .health-card b{font-size:12.5px!important}
html body .health-card small{font-size:12.5px!important;line-height:1.55!important}
html body .badge{font-size:12.5px!important;min-height:27px!important}
html body .timeline-item b{font-size:12.5px!important}
html body .timeline-item span,
html body .timeline-item time{font-size:12.5px!important;line-height:1.6!important}
html body .bar-row span,
html body .bar-row b{font-size:12.5px!important}
html body .metric-row span,
html body .secret-row span{font-size:12.5px!important}
html body .metric-row b,
html body .secret-row b{font-size:12.5px!important}

/* Forms / buttons */
html body button,
html body input,
html body select,
html body textarea{font-size:12.5px!important}
html body .ghost-btn,
html body .primary-btn{font-size:12.5px!important}
html body .mini-btn{font-size:12.5px!important;min-height:31px!important}
html body .form-grid label{font-size:12.5px!important}
html body .notice{font-size:12.5px!important;line-height:1.75!important}

/* Tables / lists */
html body th{font-size:12.5px!important}
html body td{font-size:12.5px!important}
html body .user-cell small,
html body .channel-card small,
html body .channel-copy small,
html body .telegram-table-wrap td small{font-size:12.5px!important;line-height:1.6!important}
html body .pub-card-head small{font-size:12.5px!important}
html body .pub-main>p{font-size:12.5px!important}
html body .pub-meta>span{font-size:12.5px!important;min-height:29px!important}
html body .pub-error{font-size:12.5px!important}
html body .pub-thumb-label{font-size:12.5px!important}
html body .pub-account small,
html body .pub-status-stack>small,
html body .pub-status-side small,
html body .pub-date-side span{font-size:12.5px!important}
html body .pub-actions .primary-btn,
html body .pub-actions .mini-btn{font-size:12.5px!important}
html body .table-wrap td::before{font-size:12.5px!important}

/* Generic semantic small copy across Admin.
   This is intentionally global because legacy Admin has many 6px-10px small tags. */
html body small{
  font-size:12.5px!important;
  line-height:1.6!important;
}

/* Magic Pricing / dynamic injected UI */
html body .mg145-kicker,
html body .mg145-mini-label{font-size:12.5px!important}
html body .mg145-panel-head p,
html body .mg145-note p{font-size:12.5px!important}
html body .mg145-price-card span,
html body .mg145-model span,
html body .mg145-table th,
html body .mg145-platform{font-size:12.5px!important}
html body .mg145-service{font-size:12.5px!important;line-height:1.55!important}
html body .mg145-tx-row b{font-size:12.5px!important}
html body .mg145-btn{font-size:12.5px!important}

/* Subscription Center / dynamically injected UI */
html body .sub146-kicker,
html body .sub146-build,
html body .sub146-tab,
html body .sub146-btn{font-size:12.5px!important}
html body .sub208-action-copy small{font-size:12.5px!important}
html body [class^="sub"] small,
html body [class*=" sub"] small{font-size:12.5px!important;line-height:1.6!important}

/* Page Manager */
html body .pm187-kicker{font-size:12.5px!important}
html body .pm187-build{font-size:12.5px!important}
html body .pm187-lang small{font-size:12.5px!important}
html body .pm187-side-head small{font-size:12.5px!important}
html body .pm187-page-btn small{font-size:12.5px!important}
html body .pm187-editor-tab{font-size:12.5px!important}
html body .pm187-meta{font-size:12.5px!important}
html body .pm187-field-head code{font-size:12.5px!important}
html body .pm187-field-head em{font-size:12.5px!important}
html body .pm187-savebar span{font-size:12.5px!important}
html body .pm187-css-target label{font-size:12.5px!important}
html body .pm187-lines{font-size:12.5px!important}
html body .pm187-code{font-size:12.5px!important}
html body .pm187-code-status{font-size:12.5px!important}
html body .pm187-core-warning{font-size:12.5px!important;line-height:1.75!important}
html body .pm187-scope-tabs{
  grid-template-columns:1.4fr repeat(4,minmax(0,1fr))!important;
}

/* Logs / modal / misc */
html body .json-view,
html body .log-view{font-size:12.5px!important;line-height:1.75!important}
html body .toast{font-size:12.5px!important}
html body .modal-head h3{font-size:13.5px!important}
html body .module-roadmap span{font-size:12.5px!important}

/* Login readability */
html body.login-body .login-card p{font-size:12.5px!important}
html body.login-body .login-card label{font-size:12.5px!important}
html body.login-body .login-card footer{font-size:12.5px!important}
html body.login-body .login-points span{font-size:12.5px!important}

/* Mobile: stay readable but not oversized. */
@media(max-width:700px){
  html body{font-size:13.5px!important}
  html body .top-title strong{font-size:14px!important}
  html body .pm187-scope-tabs{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html body .pm187-scope{font-size:12.5px!important;padding-inline:8px!important}
  html body th{font-size:12.5px!important}
  html body td{font-size:12.5px!important}
}

/* v1.0.226 — Users modal: single scroller, reliable close target, mobile-first sizing. */
html body #modal.mcc-user-admin-dialog.modal-ready{
  position:fixed!important;
  inset:0!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  left:0!important;
  transform:none!important;
  width:100vw!important;
  max-width:none!important;
  height:100dvh!important;
  max-height:none!important;
  margin:0!important;
  padding:clamp(12px,2vw,24px)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  isolation:isolate!important;
  pointer-events:none!important;
}
html body #modal.mcc-user-admin-dialog.modal-ready>.modal-card{
  width:min(720px,calc(100vw - 32px))!important;
  max-width:720px!important;
  height:auto!important;
  max-height:calc(100dvh - 32px)!important;
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
  overflow:hidden!important;
  pointer-events:auto!important;
}
html body #modal.mcc-user-admin-dialog.modal-ready>.modal-card>.modal-head{
  position:relative!important;
  top:auto!important;
  flex:0 0 auto!important;
  z-index:10!important;
}
html body #modal.mcc-user-admin-dialog.modal-ready #modalBody{
  flex:1 1 auto!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-y!important;
  scrollbar-gutter:stable!important;
}
html body #modal.mcc-user-admin-dialog.modal-ready .modal-head #modalClose{
  position:relative!important;
  z-index:20!important;
  flex:0 0 40px!important;
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  min-height:40px!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  pointer-events:auto!important;
  cursor:pointer!important;
}

@media(max-width:700px){
  html body #modal.mcc-user-admin-dialog.modal-ready{
    padding:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom))!important;
    align-items:flex-end!important;
  }
  html body #modal.mcc-user-admin-dialog.modal-ready>.modal-card{
    width:100%!important;
    max-width:100%!important;
    max-height:calc(100dvh - 12px)!important;
    border-radius:20px 20px 14px 14px!important;
  }
  html body #modal.mcc-user-admin-dialog.modal-ready>.modal-card>.modal-head{
    padding:12px 14px!important;
  }
  html body #modal.mcc-user-admin-dialog.modal-ready #modalBody{
    padding:14px 12px calc(16px + env(safe-area-inset-bottom))!important;
  }
  html body #modal.mcc-user-admin-dialog.modal-ready #userForm,
  html body #modal.mcc-user-admin-dialog.modal-ready #tokenForm{
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
  }
  html body #modal.mcc-user-admin-dialog.modal-ready #userForm>.full,
  html body #modal.mcc-user-admin-dialog.modal-ready #tokenForm>.full{
    grid-column:1!important;
  }
  html body #modal.mcc-user-admin-dialog.modal-ready .modal-head #modalClose{
    flex-basis:42px!important;
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    min-height:42px!important;
  }
}
