/* Mobile layout corrections. */
.match-preview-players{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
.match-preview-players>*{min-width:0}
@media(max-width:760px){
  .shell,.shell>main,.view,.view>.card,.page,.admin-section{min-width:0;max-width:100%}
  .view>.card{overflow-wrap:break-word}

  .match-preview-modal{padding:8px;align-items:start;overflow-y:auto;overscroll-behavior:contain}
  .match-preview-dialog{width:100%;max-width:100%;max-height:calc(100dvh - 16px);padding:12px;overflow-y:auto;box-sizing:border-box}
  .match-preview-head{gap:8px;min-width:0}
  .match-preview-head>div{min-width:0;flex:1}
  .match-preview-head h2{font-size:20px;line-height:1.2;overflow-wrap:anywhere}
  .match-preview-head small{font-size:11px;line-height:1.5}
  .match-preview-head>button{flex:0 0 auto;padding:8px 11px;font-size:12px}
  .match-preview-players{grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr);gap:5px;margin:12px 0}
  .match-preview-players>*{min-width:0;max-width:100%}
  .match-preview-player{padding:8px 6px;gap:7px;border-radius:12px;align-content:start}
  .match-preview-player-head{display:flex;flex-direction:column;gap:4px;min-width:0}
  .match-preview-player-head>div{width:100%;min-width:0}
  .match-preview-player-head h3{font-size:12px;white-space:normal;overflow:visible;line-height:1.3}
  #matchPreviewModal .avatar-name-group{display:flex!important;flex-direction:column;gap:4px;min-width:0;min-height:0;align-items:center!important;width:100%;overflow:visible}
  #matchPreviewModal .avatar-name-group>.avatar-small{width:64px!important;height:70px!important;flex:0 0 70px!important}
  #matchPreviewModal .player-name-link,#matchPreviewModal .player-human-name,#matchPreviewModal .player-ai-name{white-space:normal!important;overflow-wrap:anywhere;text-align:center;line-height:1.3}
  .match-preview-player-head small{font-size:9px;line-height:1.4}
  .match-preview-vs{font-size:11px;text-align:center}
  .match-preview-player-kpis{grid-template-columns:minmax(0,1fr);gap:5px}
  .match-preview-player-kpis span{min-width:0;padding:6px 4px;font-size:9px;line-height:1.4;overflow-wrap:anywhere}
  .match-preview-player-kpis b{font-size:11px}
  .match-preview-average{padding:8px 4px;min-width:0}
  .match-preview-average>span{font-size:8px;white-space:normal;line-height:1.4}
  .match-preview-average>strong{font-size:24px}
  .match-preview-average>small{font-size:9px}
  .match-preview-table>div{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) minmax(0,1fr);font-size:10px;overflow-wrap:anywhere}
  .match-preview-path,.match-preview-path-player{min-width:0}
  .match-preview-path-grid{grid-template-columns:minmax(0,1fr)}

  .avatar-dialog{width:calc(100% - 16px);max-width:calc(100% - 16px);max-height:calc(100dvh - 16px);padding:12px;overflow:auto}
  .avatar-dialog .avatar-editor{grid-template-columns:minmax(0,1fr);gap:18px}
  .avatar-dialog .avatar-preview{position:static;padding:12px;min-width:0}
  .avatar-dialog .avatar-preview [data-portrait]{max-width:180px;margin-bottom:10px}
  .avatar-dialog .avatar-mini-row{display:none}
  .avatar-dialog-head{align-items:start;gap:8px}
  .avatar-dialog-head h2{font-size:18px;min-width:0;margin:4px 0}
  .avatar-dialog-head button{flex-shrink:0;padding:8px}
  .avatar-options{min-width:0}
  .avatar-save{flex-wrap:wrap;gap:10px}
  .avatar-save>div{flex:1;justify-content:flex-end}

  .training-head,.equipment-builder-head,.tactics-head,.friendly-head,.clubs-head,.nations-cup-head,.bank-head,.ranking-head,.training-ranking-head,.manual-head,.suggestions-head{min-width:0;flex-wrap:wrap;gap:10px}
  .training-head>*,.equipment-builder-head>*,.friendly-head>*,.clubs-head>*,.nations-cup-head>*,.bank-head>*,.ranking-head>*{min-width:0;max-width:100%}
  .training-budget,.equipment-budget,.bank-balance,.registration-countdown,.schedule-readonly{min-width:0;max-width:100%}
  .table-wrap,.table-scroll,.ranking-table-wrap,.bracket-scroll{max-width:100%;min-width:0;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  .view input:not([type=checkbox]):not([type=radio]):not([type=range]),.view select,.view textarea,.avatar-dialog select{min-width:0;max-width:100%;font-size:16px}
  .admin-tabs,.ranking-tabs,.tactics-tabs,.tour-tabs,.tournament-tabs,.race-subtabs{max-width:100%;min-width:0;flex-wrap:wrap;gap:5px}
  .admin-tabs button{font-size:11px;padding:8px 10px}
  .messages-layout,.message-thread,.message-contacts,.chat-compose{min-width:0;max-width:100%}
  .message-body,.chat-message,.notification-item{overflow-wrap:anywhere}
  .home-pending-request{flex-wrap:wrap}
  .home-pending-request strong{min-width:0;flex:1 1 160px}
  .referral-share,.referral-settings,.insights-filters{min-width:0;max-width:100%}
  .referral-share input{min-width:0;width:100%}
  .archive-overlay{padding:8px;padding-bottom:max(8px,env(safe-area-inset-bottom))}
  .archive-sheet{min-width:0;max-width:100%;overflow-wrap:anywhere}
  .archive-sheet table{table-layout:fixed;overflow-wrap:anywhere}
  .view{padding-bottom:calc(65px + env(safe-area-inset-bottom))}
}
@media(max-width:360px){
  .match-preview-dialog{padding:9px}
  #matchPreviewModal .avatar-name-group>.avatar-small{width:52px!important;height:60px!important;flex-basis:60px!important}
}
@media(max-width:760px){
  .view :where(section,article,details,header,form,fieldset){min-width:0;max-width:100%}
  .view :where([class*="grid"])>*{min-width:0}
  .world-title-page,.world-title-grid,.clubs-grid,.club-profile-columns{grid-template-columns:minmax(0,1fr)}
  .world-title-page>*,.world-title-page-head>*,.world-title-champion-card>*,.world-title-vacant>*,.club-panel>*{min-width:0;max-width:100%}
  .world-title-belt-stage svg{width:100%;max-width:230px;height:auto}
  .club-panel select,.club-panel input,.club-panel textarea{width:100%;min-width:0;max-width:100%;box-sizing:border-box}
  .admin-tabs{flex-wrap:wrap!important;overflow-x:visible;gap:5px}
  .match-preview-player-head{min-height:170px;justify-content:flex-start}
  .match-preview-average{min-height:88px;display:grid;align-content:center;gap:2px}
}

@media(max-width:760px){
 .club-panel input:not([type=checkbox]):not([type=radio]),.club-panel select,.club-panel textarea{border:1px solid var(--line);border-radius:9px;background:#071b2d;color:var(--text);padding:9px 10px}
}
/* Long names must not restore the minimum width of a comparison column. */
.match-preview-player-head>div{flex:1;min-width:0;max-width:100%}
.match-preview-player-head h3{white-space:normal;overflow-wrap:anywhere}
#matchPreviewModal .avatar-name-group>.player-name-link{min-width:0;white-space:normal!important;overflow-wrap:anywhere}

/* Profile identity stays beside the portrait; secondary details use the full width. */
@media(max-width:760px){
  .profile-hero{padding:14px!important;border-radius:16px!important;gap:14px!important}
  .profile-hero>.avatar-profile-layout{display:grid!important;grid-template-columns:96px minmax(0,1fr);gap:12px!important;width:100%;align-items:start!important}
  .profile-hero .avatar-profile-copy{display:contents}
  .profile-heading{grid-column:2;grid-row:1;min-width:0;align-self:center}
  .profile-hero .avatar-profile-layout>.avatar-profile-card{grid-column:1;grid-row:1;width:96px!important;max-width:96px;min-width:0;gap:6px;align-self:start!important}
  .profile-hero .avatar-profile-portrait{width:96px!important;height:168px!important;min-height:0!important;max-height:168px!important;flex:none}
  .profile-heading>.tag{display:inline-block;font-size:9px!important;line-height:1.3;padding:5px 8px!important;border-radius:6px;letter-spacing:.03em;white-space:normal}
  .profile-hero .profile-name-title{font-size:24px!important;line-height:1.15;margin:8px 0!important;overflow-wrap:anywhere}
  .profile-hero .profile-identity-line{display:flex;flex-wrap:wrap;align-items:center;gap:5px 10px;margin:8px 0;font-size:12px;line-height:1.4}
  .profile-identity-line>span+span:before{display:none}
  .profile-identity-line .profile-presence{width:100%;font-size:11px;align-items:flex-start;line-height:1.45;gap:6px}
  .profile-presence .presence-dot{margin-top:4px!important;width:7px;height:7px;flex:0 0 7px}
  .profile-connection-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
  .profile-connection-full{display:none}.profile-connection-short{display:inline}
  .profile-heading .profile-member-since{font-size:10px;line-height:1.45;margin-top:7px}
  .profile-header-details{grid-column:1/-1;min-width:0;width:100%}
  .profile-header-details .profile-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px;margin:0 0 12px!important}
  .profile-header-details .profile-actions button{display:flex;align-items:center;justify-content:center;min-width:0;width:100%;min-height:44px;padding:8px 5px!important;font-size:11px!important;line-height:1.3;border-radius:8px!important;white-space:normal;word-break:normal}
  .profile-header-details .profile-membership-badges{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:0 0 12px;align-items:stretch}
  .profile-header-details .doubles-partner-badge{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:7px;padding:10px!important;min-width:0;width:100%;border-left-width:2px}
  .profile-header-details .doubles-partner-badge .section-kicker{font-size:9px;line-height:1.4;letter-spacing:.04em}
  .profile-header-details .doubles-partner-badge strong{font-size:12px;line-height:1.4;min-width:0;max-width:100%;flex-wrap:wrap;gap:4px}
  .profile-header-details .doubles-partner-badge .player-name-link{font-size:12px!important;white-space:normal;overflow-wrap:anywhere;text-align:left;padding:0!important;min-height:0!important}
  .profile-header-details .doubles-partner-badge button[data-doubles-open]{font-size:10px;padding:6px 8px!important;min-height:30px;border-radius:7px;margin:0;margin-top:auto}
  .profile-header-details .profile-club-logo{width:24px;height:24px}
  .profile-header-details .profile-rivalry-badges{gap:6px;margin:0}
  .profile-header-details .rivalry-badge{font-size:10px;line-height:1.4;padding:6px 8px;border-radius:7px;max-width:100%;white-space:normal}
  .profile-header-details .profile-edit-details{margin:0 0 12px;max-width:100%}
  .profile-hero>.profile-level{width:100%;display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;text-align:left;padding-top:12px;border-top:1px solid #ffffff19}
  .profile-hero>.profile-level strong{font-size:28px!important;margin:0}
  .profile-hero>.profile-level span,.profile-hero>.profile-level small{font-size:11px}
  .profile-hero>.profile-level small:last-child{flex-basis:100%}
  .profile-hero .avatar-profile-card button{font-size:10px;white-space:normal;padding:6px!important;border-radius:6px;max-width:100%}
  .profile-hero .avatar-profile-card a[data-avatar-download]{font-size:9px}
}
@media(max-width:359px){
  .profile-hero>.avatar-profile-layout{grid-template-columns:80px minmax(0,1fr);gap:10px!important}
  .profile-hero .avatar-profile-layout>.avatar-profile-card,.profile-hero .avatar-profile-portrait{width:80px!important;max-width:80px}
  .profile-hero .avatar-profile-portrait{height:150px!important;max-height:150px!important}
  .profile-hero .profile-name-title{font-size:21px!important}
  .profile-header-details .profile-membership-badges{grid-template-columns:1fr}
}
@media(max-width:760px){
  .profile-membership-badges .avatar-small{display:none!important}
  .profile-membership-badges .avatar-name-group{gap:0!important;min-height:0}
}

/* Grupos de Copa: una fila por selección, sin heredar las tarjetas de historial. */
@media(max-width:760px){
 .nations-cup-page .nc-group-table .table-wrap{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}
 .nations-cup-page .nc-group-table .table-wrap table{display:table!important;width:100%;min-width:290px!important;border-collapse:collapse;table-layout:auto}
 .nations-cup-page .nc-group-table .table-wrap thead{display:table-header-group!important}
 .nations-cup-page .nc-group-table .table-wrap tbody{display:table-row-group!important}
 .nations-cup-page .nc-group-table .table-wrap tr{display:table-row!important;border:0;border-radius:0;padding:0;background:transparent}
 .nations-cup-page .nc-group-table .table-wrap td,.nations-cup-page .nc-group-table .table-wrap th{display:table-cell!important;vertical-align:middle;padding:8px 4px!important;font-size:10px;text-align:center;white-space:nowrap!important;overflow-wrap:normal;border-bottom:1px solid #29495f!important}
 .nations-cup-page .nc-group-table .table-wrap td:nth-child(2),.nations-cup-page .nc-group-table .table-wrap th:nth-child(2){text-align:left;min-width:85px;white-space:normal!important}
 .nations-cup-page .nc-group-table td::before{display:none!important}
 .nc-group-table .nations-team-name{display:inline-flex;align-items:center;gap:5px}
 .nc-group-table .wtm-flag{width:18px;height:13px;flex-shrink:0}
}
@media(max-width:760px){
 .nations-cup-page .nations-tabs{flex-wrap:wrap!important;overflow:visible!important;gap:5px}
 .nations-cup-page .nations-tabs button{font-size:9px;padding:8px 10px;white-space:normal;min-height:32px}
 .notification-head{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
 .notification-row{min-width:0}
 .notification-row>div{min-width:0;max-width:100%}
 .server-status-grid{grid-template-columns:repeat(2,minmax(0,1fr));min-width:0;max-width:100%}
 .server-status-grid>div{min-width:0;overflow-wrap:anywhere}
}
@media(max-width:420px){
 .notification-row{grid-template-columns:minmax(0,1fr)!important;flex-wrap:wrap}
 .notification-row>div:last-child{display:flex;flex-wrap:wrap;gap:6px}
 .notification-row button{max-width:100%;white-space:normal}
 .server-status-grid{grid-template-columns:minmax(0,1fr)!important}
}
@media(max-width:420px){
 .nations-cup-page .nc-group-table .table-wrap table{min-width:0!important;table-layout:fixed}
 .nations-cup-page .nc-group-table .table-wrap td,.nations-cup-page .nc-group-table .table-wrap th{font-size:9px;padding:8px 2px!important}
 .nations-cup-page .nc-group-table .table-wrap th:first-child{width:6%}
 .nations-cup-page .nc-group-table .table-wrap th:nth-child(2){width:35%}
 .nations-cup-page .nc-group-table .table-wrap th:nth-child(3),.nations-cup-page .nc-group-table .table-wrap th:nth-child(4),.nations-cup-page .nc-group-table .table-wrap th:nth-child(5){width:8%}
 .nations-cup-page .nc-group-table .table-wrap th:nth-child(6){width:22%}
 .nations-cup-page .nc-group-table .table-wrap th:nth-child(7){width:13%}
 .nations-cup-page .nc-group-table .table-wrap td:nth-child(2),.nations-cup-page .nc-group-table .table-wrap th:nth-child(2){min-width:0}
 .nc-group-table .wtm-flag{width:15px;height:11px}
}

@media(max-width:760px){.nations-cup-page .nc-group-nation{display:flex!important;align-items:center;gap:4px;min-width:0}.nations-cup-page .nc-group-nation>b{display:block;min-width:0;flex:1;line-height:1.35;overflow-wrap:anywhere}.nations-cup-page .nc-group-nation>.wtm-flag{display:inline-block;flex:0 0 auto}}
/* Club crest controls: keep file inputs inside narrow panels and table cells. */
#clubLogoFile,[data-admin-crest-file]{max-width:100%;width:220px;min-width:0;font-size:12px;}
[data-admin-crest-save],[data-admin-crest-remove]{margin:4px 4px 4px 0;}
/* Doubles in Match Center: keep both partners on the same row on phones. */
@media(max-width:700px){
  .center-doubles-player .center-player-name{display:grid!important;grid-template-columns:minmax(0,1fr) 7px minmax(0,1fr);align-items:center;gap:3px!important;width:100%;min-width:0}
  .center-doubles-player .center-doubles-member{display:flex!important;align-items:center;min-width:0;max-width:100%;white-space:normal;gap:3px}
  .center-doubles-player .center-doubles-member>.wtm-flag{width:13px;height:10px;flex:0 0 13px}
  .center-doubles-player .avatar-name-group{display:flex!important;flex:1;min-width:0;min-height:30px;gap:3px!important}
  .center-doubles-player .avatar-name-group>.avatar-small{width:24px!important;height:30px!important;flex:0 0 24px!important;margin:0!important}
  .center-doubles-player .player-name-with-belt{min-width:0;max-width:100%}
  .center-doubles-player .player-name-link,.center-doubles-player .player-human-name,.center-doubles-player .player-ai-name{font-size:11px!important;line-height:1.2!important;white-space:normal!important;overflow-wrap:anywhere;min-width:0;max-width:100%;padding:0!important;text-align:left}
  .center-doubles-player .center-doubles-separator{text-align:center;font-size:11px;align-self:center}
}
@media(max-width:360px){
  .center-doubles-player .avatar-name-group>.avatar-small{width:20px!important;height:26px!important;flex-basis:20px!important}
  .center-doubles-player .player-name-link,.center-doubles-player .player-human-name,.center-doubles-player .player-ai-name{font-size:10px!important}
}
.set-stats-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 12px}.equipment-next{border:1px solid #315367;padding:14px;border-radius:10px;margin:18px 0}.equipment-next summary{cursor:pointer;font-weight:700}.equipment-next-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px}.equipment-next-grid input{width:100%;min-width:0}.equipment-next-grid label{min-width:0}
.set-stats-tabs button.primary{background:#d7ee3f!important;color:#102231!important;border-color:#d7ee3f!important}.equipment-next-grid input{box-sizing:border-box;background:#071c27;color:#eef5fa;border:1px solid #315367;border-radius:7px;padding:8px;min-height:36px}

/* v113: persistent compact header; keep overlays above it. */
#app .topbar{position:fixed!important;inset:0 0 auto!important;width:100%;z-index:30;display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;gap:16px!important;padding:12px 100px 12px 24px!important;background:#061524!important;border-bottom:1px solid #25465c!important;box-shadow:0 4px 18px #0003}
#app{padding-top:var(--wtm-topbar-height,88px)}
#app .topbar-brand{min-width:0;gap:10px!important}
#app .topbar-logo{width:40px!important;height:40px!important;flex:none}
#app .topbar .eyebrow{font-size:10px!important;letter-spacing:.18em!important}
#app .topbar .brand{font-size:16px!important;margin-top:3px!important}
#app .week-pill{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:4px!important;grid-column:2!important;grid-row:1!important;border:0!important;border-left:2px solid var(--lime)!important;border-radius:0!important;padding:3px 20px!important;background:transparent!important}
#app .season-week-title{font-size:13px!important;line-height:1.3!important;white-space:nowrap!important}
#app .season-week-countdown{font-size:11px!important;line-height:1.3!important;white-space:nowrap!important;font-variant-numeric:tabular-nums}
#app .manager{display:block!important;grid-column:3;grid-row:1;justify-self:end;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:8px 12px!important;font-size:12px}
.admin-week-action{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0 20px}
@media(max-width:1099px){
 #app .topbar{grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;padding:9px 80px 9px 12px!important}
 #app .week-pill{grid-column:1/-1!important;grid-row:2!important;align-items:flex-start;padding:5px 0 2px 9px!important;gap:2px!important}
 #app .manager{grid-column:2;grid-row:1;font-size:10px!important;padding:6px 8px!important;max-width:130px}
 #app .topbar .eyebrow{font-size:8px!important;letter-spacing:.09em!important}
 #app .topbar .brand{font-size:13px!important}
 #app .topbar-logo{width:32px!important;height:32px!important}
 #app .season-week-title{font-size:12px!important;white-space:normal!important}
 #app .season-week-countdown{font-size:10px!important;white-space:normal!important}
 .language-switch-fixed{position:fixed!important;top:13px!important;right:8px!important;transform:scale(.82)!important;transform-origin:right top!important}
}
@media(max-width:370px){#app .topbar-brand .eyebrow{font-size:6px!important}#app .manager{max-width:85px!important;font-size:9px!important}#app .topbar-brand{gap:6px!important}#app .topbar .brand{font-size:11px!important}}

#randomTrainingStatus:empty{display:none}#randomTrainingStatus{font-size:12px;line-height:1.45;margin-top:10px;overflow-wrap:anywhere}#randomTrainingStatus.bad{color:var(--danger)}
/* v160: honours readable in portrait, with titles next to each player */
.friendly-palmares-mobile{display:none}
@media(max-width:700px){
 .friendly-palmares-section .friendly-palmares-leader-table{display:none!important}
 .friendly-palmares-mobile{display:grid;gap:10px;min-width:0;width:100%}
 .friendly-palmares-player-card{min-width:0;border:1px solid var(--line);border-radius:14px;background:var(--panel2);padding:12px}
 .friendly-palmares-player-card header{display:grid;grid-template-columns:24px minmax(0,1fr) 54px;align-items:center;gap:8px}
 .friendly-palmares-rank{font-size:12px;color:var(--muted);font-weight:800}
 .friendly-palmares-player-name{min-width:0;overflow-wrap:anywhere}
 .friendly-palmares-player-name .player-name-link{white-space:normal!important;overflow-wrap:anywhere;text-align:left;max-width:100%}
 .friendly-palmares-title-count{display:grid;text-align:center;color:#ffd34e;min-width:0}
 .friendly-palmares-title-count strong{font-size:24px;line-height:1.1}
 .friendly-palmares-title-count span{font-size:10px;font-weight:800}
 .friendly-palmares-player-card footer{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px;margin-top:10px;padding-top:8px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}
 .friendly-palmares-player-card footer b{color:var(--text);margin-left:4px}
}
/* v160: common safeguards for all 30 views and their loaded subpanels. */
.mobile-table-hint{margin:6px 0 12px;color:var(--muted);font-size:12px;line-height:1.4}
.mobile-table-scroll{max-width:100%;min-width:0;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
@media(max-width:760px){
 #app .shell{width:100%;padding-inline:12px}
 .view>.page,.view>.card.page{padding-inline:12px}
 .view :where(fieldset,label,.actions,.inline-actions,.section-head,.page-head){min-width:0;max-width:100%}
 .view fieldset{min-inline-size:0}
 .view :where(.actions,.inline-actions,.page-head,.section-head){flex-wrap:wrap;gap:8px}
 .view :where(input,select,textarea){box-sizing:border-box;max-inline-size:100%}
 .auth-form input,.account-security-dialog input,.account-security-dialog select{font-size:16px;min-width:0;max-width:100%}
 .view :where(.primary,.compact,.tab,.tactic-risk-buttons button,.tour-tabs button,.ranking-tabs button,.admin-tabs button,.nations-tabs button,.club-tabs button){min-height:40px;white-space:normal;line-height:1.3}
 .view .player-name-link{max-width:100%;white-space:normal;overflow-wrap:anywhere}
 .view :where(h1,h2,h3,p,summary){overflow-wrap:anywhere}
 .sponsor-grid,.tournament-selection-grid,.admin-security-groups{grid-template-columns:minmax(0,1fr)}
 .admin-country-player{grid-template-columns:62px minmax(0,1fr) 48px!important;gap:7px;min-width:0}
 .admin-country-player>:nth-child(4){grid-column:2/-1;justify-self:start}
 .admin-country-player>span{min-width:0;white-space:normal;overflow-wrap:anywhere}
 .admin-country-player.head>:last-child{display:none}
 .table-wrap,.table-scroll,.ranking-table-wrap,.mobile-table-scroll{width:100%;box-sizing:border-box}
 .view :where(.manual-content img,.paper-article img,.news-article img){max-width:100%;height:auto}
 .view :where(.manual-content pre,.manual-content code,.archive-sheet pre){max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere}
 dialog{box-sizing:border-box;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:auto;overscroll-behavior:contain}
 .modal-dialog,.training-payment-dialog,.player-challenge-dialog,.security-dialog{box-sizing:border-box;min-width:0;max-width:100%;max-height:calc(100dvh - 20px);overflow-y:auto;overscroll-behavior:contain}
 .mobile-table-scroll:focus-visible,.table-wrap:focus-visible{outline:2px solid var(--lime);outline-offset:2px}
}
@media(min-width:761px){.mobile-table-hint{display:none}}

/* v161: intrinsic grid widths must not expand portrait pages. */
@media(max-width:760px){
 #app .shell{min-width:0;max-width:100%;margin-inline:0}
 .view>.card.page{width:100%;min-width:0}
 .friendly-main-tabs,.training-ranking-tabs{grid-template-columns:repeat(2,minmax(0,1fr));width:100%;min-width:0}
 .friendly-main-tabs>button,.training-ranking-tabs>button{min-width:0;max-width:100%;width:100%;white-space:normal;overflow-wrap:anywhere;padding:10px 8px;line-height:1.3;min-height:44px}
 #friendlyContent,.friendly-palmares-section,.friendly-palmares-records,.friendly-palmares-records>article,.friendly-palmares-player-card,.friendly-palmares-player-card>header{min-width:0;max-width:100%}
 .friendly-palmares-records{grid-template-columns:minmax(0,1fr)}
 .friendly-palmares-records>article>*{min-width:0;max-width:100%;overflow-wrap:anywhere}
 .friendly-palmares-player-name .friendly-player-line,.friendly-palmares-records .friendly-player-line{display:flex;max-width:100%;min-width:0;align-items:center}
 .friendly-palmares-player-name .player-name-with-belt,.friendly-palmares-records .player-name-with-belt{display:flex;flex:1 1 0;min-width:0;max-width:100%;overflow:visible;flex-wrap:wrap}
 .friendly-palmares-player-name .player-name-link,.friendly-palmares-records .player-name-link{flex:1 1 0;min-width:0;white-space:normal!important;overflow-wrap:anywhere;overflow:visible;text-overflow:clip;text-align:left;line-height:1.4}
 .friendly-palmares-player-name .wtm-country-inline,.friendly-palmares-records .wtm-country-inline{flex:0 0 auto}
 .friendly-status{grid-template-columns:repeat(3,minmax(0,1fr))!important;min-width:0}
 .friendly-status>span{min-width:0;white-space:normal;flex-wrap:wrap;overflow-wrap:anywhere}
 /* Same intrinsic-width pattern in rankings, profiles, calendars and admin. */
 .training-record-cards,.friendly-completed-grid,.tournament-history-kpis,.calendar-filters,.notification-category-grid,.admin-user-summary,.profile-stat-grid,.bank-summary,.surface-stats-grid{min-width:0;max-width:100%}
 .training-record-cards>*,.friendly-completed-grid>*,.tournament-history-kpis>*,.calendar-filters>*,.notification-category-grid>*,.admin-user-summary>*,.profile-stat-grid>*,.bank-summary>*,.surface-stats-grid>*{min-width:0;max-width:100%;overflow-wrap:anywhere}
 .training-record-cards,.friendly-completed-grid{grid-template-columns:minmax(0,1fr)}
 .calendar-period-nav{grid-template-columns:auto minmax(0,1fr) auto;min-width:0}
 .calendar-period-nav>*,.competition-calendar-row>*{min-width:0;overflow-wrap:anywhere}
 .ranking-tabs>button,.tactics-tabs>button,.tour-tabs>button,.tournament-tabs>button,.race-subtabs>button,.admin-tabs>button{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
}
@media(max-width:360px){
 .friendly-main-tabs,.training-ranking-tabs{grid-template-columns:minmax(0,1fr)}
 .friendly-palmares-player-card>header{grid-template-columns:20px minmax(0,1fr) 48px;gap:5px}
}

.mail-admin-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px;align-items:end;margin:16px 0}.mail-admin-form label{display:grid;gap:6px;min-width:0}.mail-admin-form input:not([type=checkbox]),.mail-admin-form select{width:100%;min-width:0}.mail-admin-form .actions{flex-wrap:wrap}.mail-preview-frame{display:block;width:100%;height:640px;max-height:75dvh;border:1px solid #315367;background:white;margin:12px 0}#inactivityMailAdmin{min-width:0;overflow-wrap:anywhere}#inactivityMailAdmin table{min-width:550px}
/* English labels can be wider than the original Spanish captions. */
html[lang="en"] .calendar-week-nav button.current:after{content:'NOW'}
@media(max-width:760px){
 html[lang="en"] .section-kicker{white-space:normal!important;overflow-wrap:anywhere;line-height:1.4}
 html[lang="en"] .friendly-tour-meta span{white-space:normal!important;overflow-wrap:anywhere;line-height:1.35}
 html[lang="en"] .registration-entrants-title{flex-wrap:wrap;min-width:0}
 html[lang="en"] .club-main-tabs button,html[lang="en"] .club-subtabs button,html[lang="en"] .tactics-tabs button{max-width:100%;white-space:normal;overflow-wrap:anywhere}
}

/* Rankings remain tables: one row per entrant, with horizontal scrolling. */
@media(max-width:760px){
 #rankingList,#rankingLiveList,#rankingDoublesPanel .table-wrap,#view-race .table-wrap,#friendlyContent .table-wrap{max-width:100%;min-width:0;overflow-x:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
 #rankingList table,#rankingLiveList table,#rankingDoublesPanel table,table.race-table,table.friendly-ranking-table{display:table!important;table-layout:auto!important;width:100%;min-width:760px!important}
 #rankingLiveList table,#rankingDoublesPanel table.live-ranking-table{min-width:1120px!important}
 table.race-table{min-width:900px!important}
 table.friendly-ranking-table{min-width:850px!important}
 #rankingList :is(th,td),#rankingLiveList :is(th,td),#rankingDoublesPanel :is(th,td),.race-table :is(th,td),.friendly-ranking-table :is(th,td){white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;padding:8px 10px!important;vertical-align:middle}
 #rankingList td:nth-child(2),#rankingLiveList td:nth-child(3),#rankingDoublesPanel table:not(.live-ranking-table) td:nth-child(2),#rankingDoublesPanel .live-ranking-table td:nth-child(3),.friendly-ranking-table td:nth-child(2){min-width:210px!important}
 .race-table td:has(.dc-pair-member){min-width:280px!important}
 #rankingList :is(.player-name-link,.player-human-name,.player-ai-name,.player-name-with-belt),#rankingLiveList :is(.player-name-link,.player-human-name,.player-ai-name,.player-name-with-belt),#rankingDoublesPanel :is(.player-name-link,.player-human-name,.player-ai-name,.player-name-with-belt),.race-table :is(.player-name-link,.player-human-name,.player-ai-name,.player-name-with-belt),.friendly-ranking-table :is(.player-name-link,.player-human-name,.player-ai-name,.player-name-with-belt){white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;max-width:none!important;word-break:normal!important;overflow-wrap:normal!important}
 .race-table .dc-pair-member{display:inline-block;white-space:nowrap!important}
 .race-table .finals-math{white-space:nowrap!important}
 .ranking-tabs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}
 .ranking-tabs>button{width:100%;min-width:0!important;white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important}
}
/* Privacy and moderation controls remain compact on every screen size. */
.privacy-safety-dialog{width:min(580px,92vw);max-height:88dvh;box-sizing:border-box;border:1px solid #3a586d;border-radius:15px;background:#0b2236;color:#ecf3fa;padding:20px;overflow:auto}.privacy-safety-dialog::backdrop{background:#0009}.privacy-safety-dialog form{display:grid;gap:12px}.privacy-safety-dialog label{display:block;line-height:1.5}.privacy-safety-dialog input:not([type=checkbox]),.privacy-safety-dialog textarea{display:block;box-sizing:border-box;width:100%;max-width:100%;padding:10px;margin-top:5px;color:#fff;background:#071827;border:1px solid #506c80;border-radius:8px;font:inherit}.privacy-safety-dialog nav{display:flex;flex-wrap:wrap;gap:10px}.privacy-safety-dialog a,.wtm-legal-links a{color:#8fdbff}.privacy-rules-scroll{max-height:48dvh;overflow:auto;line-height:1.5}.safety-actions{display:inline-flex;flex-wrap:wrap;gap:4px;align-items:center}.safety-actions button{background:transparent;color:inherit;border:1px solid #8095a555;border-radius:6px;font:inherit;font-size:10px;padding:3px 6px;min-height:24px;cursor:pointer}.chat-message>.safety-actions,.message-bubble>.safety-actions{margin-top:3px;opacity:.85}.message-thread-head>.safety-actions{margin-left:auto;flex:0 1 auto}.wtm-legal-links{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;padding:15px;font-size:11px}#privacySafetyAdmin{min-width:0;max-width:100%}#privacySafetyAdmin td p{max-width:340px;white-space:pre-wrap;overflow-wrap:anywhere}#privacySafetyAdmin form{display:flex;flex-wrap:wrap;gap:10px;align-items:center}#privacySafetyAdmin label{display:block}
.auth-form .registration-rules{display:block;font-size:12px;line-height:1.5}.auth-form .registration-rules input[type=checkbox]{width:auto;display:inline-block;vertical-align:middle;margin-right:7px}.registration-rules a{color:#83dcff}

/* 189: One discreet action button; the dialog cannot be clipped by chat scrollers. */
.safety-actions .safety-more{border:0;background:transparent;min-width:32px;min-height:32px;padding:0 5px;font-size:23px;line-height:1;color:inherit;opacity:.75}.safety-actions .safety-more:hover,.safety-actions .safety-more:focus-visible{opacity:1;background:#8095a522}.safety-actions .safety-more:focus-visible{outline:2px solid #ffd34e;outline-offset:2px}.safety-menu-dialog{width:min(320px,90vw)}.safety-menu-options{display:grid;gap:8px}.safety-menu-options button{width:100%;min-height:44px;padding:10px 14px;text-align:left;border:1px solid #506c80;border-radius:8px;background:#112e46;color:#fff;font:inherit}.safety-menu-options button[data-close]{text-align:center;background:transparent}

/* 191: historical draw appears directly inside its tab. */
.history-inline-draw{min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}.history-inline-draw .bracket-board{display:flex;gap:12px;align-items:flex-start}.history-inline-draw .round-col{flex:0 0 270px}.history-inline-draw .bracket-nav{display:flex;justify-content:space-between;gap:8px;margin-bottom:10px}.history-inline-draw.list-mode .bracket-list-board{min-width:720px}.history-inline-draw.list-mode{overflow-x:auto!important}.history-inline-draw .finals-groups{min-width:min(100%,580px)}

/* v191: compact records scroll inside their own section. */
.chat-message-meta191{display:flex;flex-direction:row;align-items:center;flex:0 0 auto;gap:4px;margin-left:8px;white-space:nowrap}
.chat-message-meta191 .safety-actions{display:inline-flex;align-items:center;margin:0}
.chat-message-meta191 .safety-more{font-size:18px;min-height:24px;min-width:28px;padding:0 3px;opacity:.65}
:is(.compact-table191,#worldTitleContent .table-wrap,#clubsContent .table-wrap,.dc-tournament-body .table-wrap){max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain}
:is(.compact-table191,#worldTitleContent .table-wrap,#clubsContent .table-wrap,.dc-tournament-body .table-wrap) table{width:max-content!important;min-width:100%;table-layout:auto!important}
:is(.compact-table191,#worldTitleContent .table-wrap,#clubsContent .table-wrap,.dc-tournament-body .table-wrap) :is(th,td){white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;padding:9px 12px!important;vertical-align:middle}
:is(.compact-table191,#worldTitleContent,#clubsContent .table-wrap,.dc-tournament-body .table-wrap) :is(.player-name-link,.player-human-name,.player-ai-name,.player-name-with-belt,.dc-pair-member){white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;max-width:none!important;overflow:visible!important;text-overflow:clip!important;display:inline-flex;align-items:center}
.finals-group{min-width:0;max-width:100%}
.dc-draw-columns{display:flex;gap:14px;overflow-x:auto;max-width:100%;align-items:flex-start}
.dc-draw-columns>section{flex:0 0 max-content;min-width:300px}

.dc-draw-board.friendly-bracket-scroll{display:flex!important;gap:16px;overflow-x:auto;max-width:100%;align-items:flex-start}
.dc-draw-board.friendly-bracket-scroll>.friendly-round{flex:0 0 auto!important;width:max-content!important;min-width:320px;max-width:none!important}
.dc-draw-board .friendly-match{width:auto;min-width:300px}
.dc-draw-board :is(.friendly-player,.dc-pair-member){white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;max-width:none!important}
.dc-draw-board .friendly-player{display:flex;align-items:center;gap:5px}
.dc-draw-board .friendly-match-foot{display:flex;gap:20px;justify-content:space-between}

:is(.compact-table191,#worldTitleContent .table-wrap,#clubsContent .table-wrap,.dc-tournament-body .table-wrap) td :is(small,.seed){display:inline-block!important;vertical-align:middle;margin:0 4px}
.dc-draw-board .friendly-player :is(.player-name-link,.player-human-name,.player-ai-name,.player-name-with-belt){max-width:none!important;overflow:visible!important;text-overflow:clip!important;white-space:nowrap!important;word-break:normal!important;flex-shrink:0}
.dc-tournament-body,.tournament-history-panel{min-width:0;max-width:100%}

#generalChatForm{grid-template-columns:minmax(0,1fr) auto auto;align-items:end}#generalChatRoom{max-width:135px;min-width:0;font:inherit;font-size:12px;color:var(--text,#fff);background:#102b40;border:1px solid var(--line,#36536a);border-radius:9px;padding:8px 6px;height:38px}#generalChatRoom:focus-visible{outline:2px solid var(--lime,#ddf000);outline-offset:2px}@media(max-width:480px){#generalChatForm{grid-template-columns:minmax(0,1fr) auto}#generalChatInput{grid-column:1/-1}#generalChatRoom{max-width:150px;justify-self:start}#generalChatForm>button{justify-self:end}}

/* v193: series details retain full player names and scores on narrow screens. */
#clubsContent .club-series-detail{min-width:0;max-width:100%;box-sizing:border-box}
#clubsContent .club-series-table-scroll{display:block;min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
#clubsContent .club-series-matches-table{width:max-content!important;min-width:100%;table-layout:auto!important}
#clubsContent .club-series-matches-table :is(th,td){white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;vertical-align:middle;padding:9px 12px!important}
#clubsContent .club-series-matches-table :is(th,td):is(:nth-child(4),:nth-child(5)){min-width:200px!important}
#clubsContent .club-series-matches-table :is(.player-name-with-belt,.player-name-link,.player-human-name,.player-ai-name){display:inline-flex!important;align-items:center;flex-wrap:nowrap!important;flex-shrink:0;max-width:none!important;width:auto!important;white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;overflow:visible!important;text-overflow:clip!important}
#clubsContent .club-series-matches-table :is(.club-match-result-link,.score-inline,.score-set){white-space:nowrap!important;flex-wrap:nowrap!important;max-width:none!important;word-break:normal!important;overflow-wrap:normal!important}

/* 198: club identity lives in the series header; no horizontal scroller. */
.center-club-players-compact{width:100%;min-width:0;max-width:100%}
.center-club-players-compact .center-player{grid-template-columns:20px minmax(0,1fr) auto!important;gap:5px!important;min-height:32px!important;padding:2px 0}
.center-club-players-compact .center-player-name{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:3px!important;min-width:0!important;overflow:visible!important}
.center-club-players-compact .center-player-name .player-name-with-belt{min-width:0!important;max-width:100%!important}
.center-club-players-compact .center-player-name .player-name-link,.center-club-players-compact .center-player-name .player-human-name,.center-club-players-compact .center-player-name .player-ai-name{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;word-break:normal!important;overflow-wrap:anywhere!important;font-size:11px!important}
.center-club-players-compact .center-player-name .avatar-name-group{min-width:0!important;max-width:100%!important;min-height:26px!important;gap:4px!important}
.center-club-players-compact .avatar-name-group>.avatar-small{width:22px!important;height:26px!important;flex:0 0 22px!important}
.center-club-players-compact .center-serve{margin:0!important;font-size:7px!important;white-space:nowrap}
.center-club-players-compact .center-set-scores{min-width:0!important;gap:4px!important;white-space:nowrap;flex-wrap:nowrap!important;font-size:12px!important}

/* Compact message header: identity, rank, timestamp and actions share one row. */
@media(max-width:600px){
 .chat-message .chat-message-head{display:flex;align-items:center;flex-wrap:nowrap;gap:6px;min-width:0}
 .chat-message .chat-message-head>button[data-player-profile]{display:flex;align-items:center;justify-content:flex-start;flex:1 1 auto;min-width:0;gap:4px;font-size:12px;line-height:1.25;white-space:nowrap;text-align:left;padding:0}
 .chat-message .chat-author-name207{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .chat-message .chat-message-head .chat-rank{flex:0 0 auto;white-space:nowrap;margin-left:2px;font-size:10px}
 .chat-message .chat-message-head .presence-dot{flex-shrink:0}
 .chat-message .chat-message-meta191{flex:0 0 auto;margin-left:0;gap:3px;white-space:nowrap}
 .chat-message .chat-message-meta191 small{font-size:10px;white-space:nowrap}
 .chat-message .chat-message-meta191 .safety-actions{flex-wrap:nowrap}
 .chat-message .chat-message-meta191 .safety-more{min-width:22px;padding:0 2px}
}

.capture-previews207,.capture-links207{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0}.capture-previews207>div{display:grid;gap:5px}.capture-previews207 img{max-width:140px;max-height:110px;object-fit:contain}.capture-picker207 small{display:block;color:var(--muted)}.capture-dialog207{max-width:94vw;max-height:94dvh;background:#071827;color:white;border:1px solid #36566e;border-radius:12px;padding:12px}.capture-dialog207::backdrop{background:#000b}.capture-dialog207 img{display:block;max-width:86vw;max-height:80dvh;object-fit:contain}.private-delete207{display:flex;gap:7px;flex-wrap:wrap;margin:6px 0}.private-delete207 button{font-size:10px;padding:3px 6px;background:transparent;color:inherit;border:1px solid #8095a555;border-radius:5px;cursor:pointer}

@media(max-width:600px){.chat-message-head .wtm-support-star{flex:0 0 auto;white-space:nowrap}}
