/* The same operating screens become stacked records and touch controls on phones. */
.app-shell,.main-stage,.page-frame,.platform-shell,.platform-grid,.content-grid,.finance-grid,.split-grid,.panel,.realm-panel,.realm-card{min-width:0}
.panel-head,.head-actions,.inline-actions,.platform-head,.business-next{flex-wrap:wrap}
.page-head h1,.merchant-control-head h1,.resource-link,.tenant-card,.manual-reference,.identity-chip p{overflow-wrap:anywhere}
.table-wrap{max-width:100%;overscroll-behavior-x:contain}
.table-wrap:focus-visible{outline:2px solid var(--tenant-primary);outline-offset:3px}
.menu-scrim[hidden],.sidebar-close{display:none}
.menu-scrim{position:fixed;inset:0;z-index:38;border:0;border-radius:0;background:#06111cb3;padding:0;cursor:pointer}
.sidebar{overflow-y:auto;overscroll-behavior:contain}
.sidebar .rail-brand{flex-shrink:0}
.sidebar .side-nav,.sidebar .sidebar-foot{flex-shrink:0}
input,select,textarea{max-width:100%}
@media(max-width:1100px){
  .content-grid,.finance-grid,.split-grid{grid-template-columns:minmax(0,1fr)}
  .realm-shell{grid-template-columns:minmax(0,1fr) minmax(340px,.86fr)}
  .realm-copy h1{font-size:clamp(34px,4.8vw,56px)}
}
@media(max-width:980px){
  .realm-shell{display:block;min-height:100dvh}
  .realm-thesis{min-height:0;padding:24px max(24px,calc((100vw - 520px)/2)) 22px}
  .realm-brand{max-width:100%}
  .realm-seal,.realm-thesis .boundary-register{display:none}
  .realm-copy{margin:24px 0 0}
  .realm-copy h1{font-size:30px;line-height:1.35;margin-bottom:12px}
  .realm-copy h1 br{display:none}
  .realm-copy>p:last-child{font-size:13px;line-height:1.75;margin-bottom:0}
  .realm-panel{padding:22px 20px 36px;min-height:0}
  .realm-panel>*{width:min(100%,520px);margin-left:auto;margin-right:auto}
  .realm-card{padding:24px}
  .realm-card h2{font-size:25px}
}
@media(max-width:760px){
  body.menu-open{overflow:hidden}
  .sidebar{height:100dvh;max-height:100dvh;padding-top:max(24px,env(safe-area-inset-top));padding-bottom:max(20px,env(safe-area-inset-bottom))}
  .sidebar-close{display:grid;place-items:center;position:absolute;z-index:3;top:12px;right:10px;width:44px;height:44px;border:1px solid #ffffff38;border-radius:8px;background:transparent;color:#fff;font-size:24px;line-height:1}
  .sidebar .rail-brand{padding-right:35px}
  .mobile-bar{height:auto;min-height:60px;padding-top:env(safe-area-inset-top);gap:12px}
  .mobile-bar strong{min-width:0;overflow-wrap:anywhere;text-align:right;font-size:14px}
  .menu-button{min-width:64px;min-height:44px;flex:none}
  .sidebar .side-nav a{min-height:48px}
  .sidebar-foot .text-button{min-height:44px}
  .page-head h1,.merchant-control-head h1{font-size:28px;line-height:1.35}
  .page-frame,.platform-shell{width:calc(100% - 28px);max-width:700px;padding-top:24px}
  .head-actions{gap:8px;width:100%;justify-content:flex-start}
  .head-actions>a,.head-actions>form{flex:1 1 140px}
  .head-actions>form>button{width:100%}
  .primary-button,.small-button,.realm-card button,.action-form button,.transition-form button{min-height:44px;white-space:normal;text-align:center}
  .realm-thesis{padding:22px 18px 20px}
  .realm-copy{margin-top:20px}
  .realm-copy h1{font-size:27px}
  .realm-panel{padding:16px 14px 28px}
  .realm-card{padding:22px 20px}
  .realm-card h2{font-size:23px}
  .realm-card input,.realm-card select,.realm-card textarea,.page-frame input:not([type=checkbox]):not([type=radio]),.page-frame select,.page-frame textarea,.platform-shell input:not([type=checkbox]):not([type=radio]),.platform-shell select{font-size:16px;min-height:44px}
  .realm-copy .eyebrow{font-size:10px;letter-spacing:.08em}
  .panel{padding:20px 16px}
  .table-panel{padding:0}
  .table-panel>.panel-head{padding:20px 16px}
  .business-next,.manual-entry{align-items:flex-start;flex-direction:column}
  .business-next .head-actions{width:100%}
  .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .metric{min-height:116px;padding:18px 14px}
  .metric strong{font-size:clamp(22px,5.5vw,32px);overflow-wrap:anywhere}
  .metric span,.metric small{font-size:12px}
  .form-row,.compensation-form{grid-template-columns:minmax(0,1fr)}
  .form-row>label,.form-panel label,.refund-form input{min-width:0}
  .member-form,.transition-form,.inline-actions{gap:10px}
  .member-form>*,.transition-form>*{max-width:100%}
  .manual-search{flex-wrap:wrap}
  .manual-search label{flex-basis:100%}
  .manual-search button{min-height:44px;width:100%}
  .status-seal{max-width:100%;white-space:normal}
}
@media(max-width:600px){
  .table-wrap .responsive-records{min-width:0;width:100%;white-space:normal}
  .responsive-records thead{display:none}
  .responsive-records,.responsive-records tbody,.responsive-records tr,.responsive-records td{display:block;width:100%}
  .responsive-records tr{padding:14px 16px;border-bottom:1px solid var(--line)}
  .responsive-records td{display:grid;grid-template-columns:minmax(72px,.65fr) minmax(0,1.35fr);gap:6px 12px;align-items:start;padding:9px 0!important;border:0;text-align:left;white-space:normal;overflow-wrap:anywhere}
  .responsive-records td::before{content:attr(data-label);grid-column:1;grid-row:1 / span 10;color:var(--muted);font-size:12px;font-weight:500}
  .responsive-records td>*{grid-column:2;min-width:0}
  .responsive-records td[colspan]{display:block;padding:20px 0!important}
  .responsive-records td[colspan]::before{display:none}
  .responsive-records td .transition-form{margin:0;min-width:0;width:100%}
  .responsive-records td .small-button{width:100%;display:inline-flex;align-items:center;justify-content:center}
  .responsive-records .state,.responsive-records .game-tag{justify-self:start;max-width:100%}
}
@media(max-width:360px){.metric-grid{grid-template-columns:minmax(0,1fr)}.realm-card{padding:20px 16px}.realm-copy h1{font-size:25px}.head-actions>a,.head-actions>form{flex-basis:100%}}
@media(prefers-reduced-motion:reduce){.sidebar{transition:none}}
