/* V30.24 Production UI Audit + Alignment Lock
   Additive polish layer: spacing, centered controls, safe mobile stacking, and consistent global Phone sizing. */
:root{
  --fp-page-gutter:clamp(16px,2.5vw,32px);
  --fp-section-gap:clamp(16px,2vw,28px);
  --fp-card-pad:clamp(14px,1.7vw,22px);
  --fp-radius-lg:22px;
  --fp-radius-md:16px;
  --fp-focus-ring:0 0 0 3px rgba(214,178,94,.38);
  --fp-phone-size:64px;
  --fp-phone-right:28px;
  --fp-phone-bottom:28px;
  --fp-phone-width:min(390px,92vw);
  --fp-phone-height:min(760px,82vh);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{min-width:320px;overflow-x:hidden}
img,svg,video,canvas{max-width:100%;height:auto}
button,input,select,textarea{font:inherit}
button,[role="button"],.btn,.button,.fp-btn,.fp-action,.action-btn,.primary-btn,.secondary-btn,.ghost-btn,a[class*="btn"],a[class*="button"]{
  display:inline-flex;
  align-items:center!important;
  justify-content:center!important;
  gap:.55rem;
  text-align:center!important;
  line-height:1.15;
  min-height:42px;
  padding:.72rem 1rem;
  border-radius:max(12px,inherit);
  white-space:normal;
  max-width:100%;
  cursor:pointer;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:0;box-shadow:var(--fp-focus-ring)!important}
.fp-page,.page,.portal-page,.workspace,.shell,.content,.main,.container,.office-shell,.lobby-shell,.hq-shell,.war-shell,.trade-shell,.salary-shell,.scouting-shell{
  width:min(1440px,calc(100vw - (var(--fp-page-gutter) * 2)));
  margin-left:auto;
  margin-right:auto;
}
.fp-page-wide,.workspace-wide,.full-bleed-safe{width:min(1680px,calc(100vw - (var(--fp-page-gutter) * 2)));margin-left:auto;margin-right:auto}
.card,.panel,.fp-card,.glass-card,.module,.widget,.tile,.office-card,.league-card,.trade-card,.news-card,.stat-card,.import-card,.side-card{
  border-radius:var(--fp-radius-lg);
}
.card:not(.phone-panel),.panel:not(.phone-panel),.fp-card,.glass-card,.module,.widget,.tile,.office-card,.league-card,.trade-card,.news-card,.stat-card,.import-card,.side-card{
  padding:var(--fp-card-pad);
}
.grid,.cards,.fp-grid,.card-grid,.dashboard-grid,.module-grid,.stat-grid,.league-grid,.import-card-grid,.fp-data-grid{
  display:grid;
  gap:var(--fp-section-gap);
  align-items:stretch;
}
.toolbar,.actions,.button-row,.cta-row,.controls,.filter-row,.modal-actions,.form-actions,.office-actions,.league-actions,.trade-actions,.offer-actions,.top-actions,.asset-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:.75rem;
}
.toolbar.is-left,.actions.is-left,.controls.is-left,.top-actions.is-left{justify-content:flex-start}
.toolbar.is-right,.actions.is-right,.controls.is-right,.top-actions.is-right{justify-content:flex-end}
.header,.page-header,.section-header,.panel-header,.panel-head,.card-header,.modal-header,.league-header,.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
}
.header > *, .page-header > *, .section-header > *, .panel-header > *, .panel-head > *, .card-header > *, .modal-header > *, .topbar > *{min-width:0}
.empty,.loading,.fp-empty,.status-empty{text-align:center;margin-inline:auto;max-width:720px}
table{width:100%;border-collapse:collapse}
.table-wrap,.fp-table-wrap,.scroll-table{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:var(--fp-radius-md)}
input,select,textarea{max-width:100%}
.modal,.fp-modal,.dialog,.drawer{max-width:calc(100vw - 24px)}
.fp-standard-avatar,.player-avatar,.avatar{object-fit:cover;flex:0 0 auto}
[class*="corner"],[class*="floating"].button,[class*="floating"] .btn{max-width:calc(100vw - 32px)}
/* V30.24 canonical Phone lock: identical size, bottom/right anchor, and centered open shell on every page. */
.rfl-phone-fab,.phone-fab{
  position:fixed!important;
  right:var(--fp-phone-right)!important;
  bottom:var(--fp-phone-bottom)!important;
  width:var(--fp-phone-size)!important;
  height:var(--fp-phone-size)!important;
  min-width:var(--fp-phone-size)!important;
  min-height:var(--fp-phone-size)!important;
  max-width:var(--fp-phone-size)!important;
  max-height:var(--fp-phone-size)!important;
  padding:0!important;
  border-radius:22px!important;
  z-index:40000!important;
  display:grid!important;
  place-items:center!important;
  text-align:center!important;
}
.rfl-phone-shell,.phone-panel{
  position:fixed!important;
  left:50%!important;
  top:50%!important;
  right:auto!important;
  bottom:auto!important;
  width:var(--fp-phone-width)!important;
  max-width:var(--fp-phone-width)!important;
  max-height:var(--fp-phone-height)!important;
  z-index:40010!important;
  margin:0!important;
}
.rfl-phone-shell{
  height:var(--fp-phone-height)!important;
  transform:translate(-50%,120%) scale(.96)!important;
  opacity:0!important;
  pointer-events:none!important;
}
.rfl-phone-shell.active{transform:translate(-50%,-50%) scale(1)!important;opacity:1!important;pointer-events:auto!important}
.phone-panel{transform:translate(-50%,-50%)!important;display:none}
.phone-panel.open{display:block!important}
.phone-dock{display:none!important}
@media (max-width:900px){
  :root{--fp-page-gutter:12px;--fp-section-gap:12px;--fp-card-pad:14px;--fp-phone-size:56px;--fp-phone-right:18px;--fp-phone-bottom:18px;--fp-phone-width:calc(100vw - 24px);--fp-phone-height:calc(100vh - 48px)}
  .fp-page,.page,.portal-page,.workspace,.shell,.content,.main,.container,.office-shell,.lobby-shell,.hq-shell,.war-shell,.trade-shell,.salary-shell,.scouting-shell{width:min(100% - 24px,100%)}
  .header,.page-header,.section-header,.panel-header,.panel-head,.card-header,.modal-header,.league-header,.topbar{justify-content:center;text-align:center}
  .toolbar,.actions,.button-row,.cta-row,.controls,.filter-row,.modal-actions,.form-actions,.office-actions,.league-actions,.trade-actions,.offer-actions,.top-actions{justify-content:center;width:100%}
  button,[role="button"],.btn,.button,.fp-btn,.fp-action,.action-btn,.primary-btn,.secondary-btn,.ghost-btn,a[class*="btn"],a[class*="button"]{min-height:44px;padding:.78rem 1rem}
  .rfl-phone-shell{height:var(--fp-phone-height)!important}
  .phone-panel{max-height:var(--fp-phone-height)!important}
}
@media (max-width:560px){
  .toolbar > *, .actions > *, .button-row > *, .cta-row > *, .controls > *, .filter-row > *, .modal-actions > *, .form-actions > *, .office-actions > *, .league-actions > *, .trade-actions > *, .offer-actions > *{width:100%;max-width:420px}
  button:not(.rfl-phone-fab):not(.phone-fab),[role="button"],.btn,.button,.fp-btn,.fp-action,.action-btn,.primary-btn,.secondary-btn,.ghost-btn,a[class*="btn"],a[class*="button"]{width:100%;max-width:420px}
  .card,.panel,.fp-card,.glass-card,.module,.widget,.tile,.office-card,.league-card,.trade-card,.news-card,.stat-card,.import-card,.side-card{border-radius:18px}
}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}
