.mobile-account-close,.mobile-settings,.mobile-bottom-nav,.mobile-top-tabs,.mobile-signout{display:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.page-head-actions{justify-content:flex-end}
.page-swipe-track{position:relative}
.page-swipe-preview{display:none}
.mobile-top-tabs{position:relative;isolation:isolate}
.mobile-top-tab-highlight{position:absolute;z-index:-1;left:4px;top:4px;bottom:4px;border-radius:8px;background:var(--accent-blue-soft)}
.mobile-top-tabs:has(.mobile-top-tab-highlight) button.active{background:transparent;box-shadow:none}

@media (max-width:760px){
  .main-area{overflow-x:clip}
  .page-swipe-viewport{overflow:clip;min-height:calc(100dvh - 130px - env(safe-area-inset-bottom))}
  .page-swipe-track.page-swipe-animating{pointer-events:none;will-change:transform}
  main.page-swipe-preview{display:block;position:absolute;left:0;top:0;width:100%;height:calc(100dvh - 130px - env(safe-area-inset-bottom));overflow:hidden;pointer-events:none}
  .page-swipe-same-group .mobile-top-tabs{visibility:hidden}
  .page-swipe-track.page-swipe-animating #main .mobile-top-tabs{z-index:1}
  .sidebar{display:none}
  .mobile-menu{display:none}
  .topbar{position:sticky;top:0;z-index:5;gap:8px;padding:0 14px}
  .topbar .icon-btn{width:42px;height:42px;flex:none}
  .mobile-account-close:not([hidden]),.mobile-settings:not([hidden]){display:grid;place-items:center;font-size:22px}
  .top-actions{min-width:0;max-width:100%;margin-left:auto}
  #leagueSelect{min-width:0;max-width:min(43vw,180px);height:42px;text-overflow:ellipsis;font-size:12px}
  main{min-width:0;padding:22px 14px calc(96px + env(safe-area-inset-bottom))}
  body.mobile-accounts main{padding-bottom:calc(42px + env(safe-area-inset-bottom))}
  .mobile-bottom-nav:not([hidden]){display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;left:0;right:0;bottom:0;z-index:12;min-height:calc(68px + env(safe-area-inset-bottom));padding:6px 5px calc(6px + env(safe-area-inset-bottom));border-top:1px solid #e9e4f0;background:#fff;box-shadow:0 -6px 22px #2118360c}
  .mobile-bottom-nav button{display:flex;min-width:0;min-height:56px;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:3px 1px;border:0;border-radius:10px;background:transparent;color:#8a819a;font-weight:700}
  .mobile-bottom-nav button span{font-size:21px;line-height:1}
  .mobile-bottom-nav button small{font-size:10px;white-space:nowrap}
  .mobile-bottom-nav button.active{background:#f0ebff;color:#6b47cf}
  .mobile-top-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin-bottom:18px;padding:4px;border:1px solid #e8e1f2;border-radius:12px;background:#f0ecf7}
  .mobile-top-tabs button{min-width:0;min-height:42px;padding:7px 8px;border:0;border-radius:8px;background:transparent;color:#857993;font-size:12px;font-weight:700}
  .mobile-top-tabs button.active{background:#fff;color:#6a47cf;box-shadow:0 2px 8px #24123d13}
  .mobile-top-tabs-three{grid-template-columns:repeat(3,minmax(0,1fr))}
  .page-head{flex-direction:column;align-items:stretch;gap:13px;margin-bottom:18px}
  .page-title{font-size:clamp(23px,6vw,29px);overflow-wrap:anywhere}
  .subhead{font-size:12px;line-height:1.45}
  .head-actions{display:flex;flex-wrap:wrap;gap:8px}
  .head-actions button{min-height:42px}
  .grid{gap:12px}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .stat-card{min-width:0;min-height:105px;padding:14px}
  .stat-value{font-size:clamp(17px,4.8vw,23px);line-height:1.15;overflow-wrap:anywhere}
  .stat-foot{line-height:1.35}
  .panel{min-width:0}
  .panel-head{gap:8px;padding:15px}
  .panel-head small{text-align:right}
  .panel-body{padding:15px}
  .empty-state{padding:34px 16px;line-height:1.45}
  .quick-row .amount{flex:none;font-size:10px;max-width:42%;overflow-wrap:anywhere}
  .primary,.secondary,.link-button{min-height:42px;font-size:12px}
  .action-card{min-height:96px;padding:15px}
  .player-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .player-card{min-width:0;padding:13px}
  .player-card .card-metrics{gap:8px}
  .player-card .card-metrics>div{min-width:0}
  .player-card .card-metrics strong{font-size:12px;overflow-wrap:anywhere}
  .scouting-player-top .scout-toggle{flex:none;width:44px;height:44px}
  .toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .toolbar .search{grid-column:1/-1;min-width:0;width:100%}
  .toolbar select{min-width:0;width:100%}
  .player-database-toolbar{width:100%;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px}
  .player-database-toolbar .search{grid-column:1/-1}
  .player-database-toolbar #positionFilter{grid-column:1;width:100%;min-width:0;padding-inline:7px;font-size:12px;text-overflow:ellipsis}
  .player-database-toolbar .player-sort-controls{display:contents}
  .player-database-toolbar #sortFilter{grid-column:2;width:100%;min-width:0;padding-inline:7px;font-size:12px;text-overflow:ellipsis}
  .player-database-toolbar .player-sort-direction{grid-column:3;width:100%;min-width:44px;min-height:44px;padding:6px}
  .toolbar input,.toolbar select,.field input{min-height:44px;font-size:16px}
  .manager-list-head{display:none}
  .manager-list{display:grid;gap:10px;padding:12px}
  .manager-row{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:5px 10px;padding:12px;border:1px solid #eeeaf3;border-radius:10px}
  .manager-avatar{grid-column:1;grid-row:1}
  .manager-name{grid-column:2;grid-row:1;min-width:0;margin:0}
  .manager-rank{grid-column:3;grid-row:1;text-align:right;align-self:center}
  .manager-row .manager-stat:nth-of-type(4){grid-column:2;grid-row:2}
  .manager-row .manager-stat:nth-of-type(5){display:block;grid-column:3;grid-row:2;text-align:right}
  .manager-open{display:none}
  .live-summary{align-items:flex-start;flex-wrap:wrap}
  .live-player-row{grid-template-columns:minmax(0,1fr) auto;gap:3px 8px;padding:11px 0}
  .live-player-identity{grid-column:1;grid-row:1}
  .live-player-row>strong{grid-column:2;grid-row:1;align-self:center;white-space:nowrap}
  .live-player-row>small{grid-column:1/-1;grid-row:2;padding-left:41px;white-space:normal;line-height:1.35}
  .market-card{padding:14px}
  .market-figures strong,.market-modal-summary strong{overflow-wrap:anywhere}
  .market-footer{align-items:center;flex-wrap:wrap}
  .squad-action-row{display:block;margin:0;padding:0}
  .squad-action-row .squad-row{display:block;width:100%;padding:0 56px 0 0}
  .squad-row .squad-figure:last-child{display:block}
  .squad-figure strong{white-space:normal;overflow-wrap:anywhere;font-size:11px}
  .squad-action-row .secondary{width:100%;margin:0 0 5px;min-height:36px}
  .saved-pitch{min-width:0;width:100%;min-height:330px;padding:16px 5px;gap:8px}
  .saved-pitch-row{display:grid;grid-template-columns:repeat(var(--pitch-players),minmax(0,1fr));gap:2px;width:min(100%,var(--pitch-width));min-width:0;margin-inline:auto}
  .saved-pitch-player,.saved-pitch-empty{max-width:none;font-size:8px;min-width:0}
  .lineup-toolbar,.lineup-picker-head{flex-wrap:wrap}
  .lineup-choices{grid-template-columns:1fr}
  .account-actions{flex-wrap:wrap}
  .account-actions button{min-height:42px}
  .mobile-signout{display:block;width:100%;margin-top:18px}
}
@media(max-width:360px){
  .player-database-toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 40px;gap:6px}
  .player-database-toolbar .player-sort-direction{min-width:40px;min-height:44px}
}

:root{color-scheme:dark}
body{background:#0f0f11;color:#f1eff4}
.main-area{background:#0f0f11}
.topbar{background:#151517;border-color:#29282c}
.breadcrumb{color:#8f8b95}.breadcrumb strong{color:#f1eff4}.breadcrumb span{color:#514e55}
.mode-badge{background:#2b214b;color:#b9a2ff}
#leagueSelect,.icon-btn{background:#1b1b1e;border-color:#343238;color:#e7e3eb}
.page-title{color:#f4f1f5}.subhead{color:#99959d}.eyebrow{color:#aa8cff}
.primary{background:#7654e8}.secondary{background:#1c1b1f;border-color:#39363e;color:#d7d2dc}
.stat-card,.panel,.player-card,.market-card{background:#171719;border-color:#2a292d;box-shadow:0 8px 30px #00000026}
.panel-head{border-color:#2a292d}.panel-head small,.stat-top,.stat-foot,.chart-labels,.chart-edge-labels small{color:#908c95}
.panel h2,.stat-value,.chart-edge-labels strong,.quick-row strong,.player-card h3,.card-metrics strong{color:#f1eef4}
.stat-icon,.player-icon{background:#282041;color:#b69cff}
.chart-edge-labels,.quick-row small,.player-card small,.card-metrics span{color:#96919a}
.empty-chart{background:repeating-linear-gradient(0deg,#171719,#171719 47px,#202024 48px);color:#9b969f}
.quick-row{border-color:#2a292d}.action-card{background:#171719;border-color:#2a292d;color:#f1eef4}.action-card small{color:#96919f}
.toolbar .search,.toolbar select,.search,.segmented{background:#1b1b1e;border-color:#343238;color:#e8e4eb}
.segmented button{color:#95909a}.segmented button.active{background:#30255a;color:#c1adff}
.data-table th{background:#1d1c20;color:#96919a}.data-table td{border-color:#2a292d;color:#ddd8e1}.data-table tr:hover td{background:#211d2a}
.name-cell small,.table-footer,.name-cell .muted{color:#96919f}.pos-pill{background:#2a2245;color:#b9a2ff}
.notice{background:#2a2145;color:#bba9df}.notice strong{color:#d0c0ff}.empty-state{color:#9b969f}.empty-state strong{color:#f1eef4}
.detail-metric,.detail-metric-button{background:#211f25;color:#f1eef4}.detail-metric span{color:#a49da9}.detail-metric-button:hover{background:#2a2540}
.modal-backdrop{background:#08080bd9}.modal{background:#171719;color:#f1eef4}.modal-header{border-color:#2b292e}.modal-header p,.login-help{color:#96919a}.modal-close{background:#28262b;color:#d9d4dd}.field{color:#bcb5c5}.field input{background:#1c1b1f;border-color:#39363e;color:#f1eef4}.field input::placeholder{color:#77727b}
.performance-season{background:#141416;border-color:#2a292d}.performance-summary div{border-color:#2a292d}.performance-season-header button{background:#1b1a1e;border-color:#343238;color:#e9e6eb}
.lineup-groups,.lineup-group{border-color:#2a292d}.lineup-group>strong,.lineup-toolbar,.lineup-meta{color:#9d92b4}.lineup-player,.lineup-choice{background:#211e28;border-color:#39333f;color:#eee9f2}.lineup-player:hover,.lineup-choice.chosen{border-color:#7654e8;background:#2c2450}.lineup-choice small,.lineup-choice-metric{color:#9b949f}.lineup-picker select,.lineup-toolbar select{background:#1c1b1f;border-color:#39363e;color:#e7e2eb}
.saved-pitch{background:repeating-linear-gradient(0deg,#1d3429 0,#1d3429 56px,#1a3026 56px,#1a3026 112px);border-color:#315e45}.saved-pitch:before{border-color:#ffffff35}.saved-pitch-player,.saved-pitch-empty{color:#e4e0e7}.saved-pitch-empty{border-color:#4b715c;color:#9ab4a2}
.live-summary,.account-status,.market-modal-summary,.history-net,.player-update{background:#211f25;border-color:#39343f;color:#d6d0dc}.live-summary small,.account-status span,.market-note,.player-update p{color:#9d969f}.live-score{background:#2a2245;color:#c2adff}.live-player-list,.live-player-row,.market-figures,.market-footer,.history-table-wrap td,.history-table-wrap th{border-color:#2a292d}.live-player-row small,.market-footer small,.market-footer strong,.market-figures span,.market-modal-summary span,.history-table-wrap th,.history-net span,.history-net small{color:#96919a}.squad-row,.manager-row{color:#e4dfe8;border-color:#2a292d}.squad-row:hover,.manager-row:hover{background:#211d29}.manager-list-head{background:#1d1c20;color:#96919a}.market-card .card-top small,.market-figures strong,.history-table-wrap td{color:#eee9f2}.offer-row,.sale-offer,.opponent-row{background:#1c1b1f;border-color:#39363e;color:#e7e2eb}.lineup-slot.selected{background:#30255a}.lineup-plus,.opponent-venue{color:#c0adff}.history-switch{background:#1d1c20;border-color:#343238}.history-switch button{color:#96919a}.history-switch button.active{background:#30255a;color:#c0adff;box-shadow:none}
.manager-row{background:#171719}.manager-row:hover{background:#211d29}.manager-avatar{background:#2a2245;color:#c1adff}.manager-stat strong{color:#eee9f2}
.mobile-bottom-nav{background:#151517;border-color:#2c2a30;box-shadow:0 -8px 24px #0000003d}.mobile-bottom-nav button{color:#96919f}.mobile-bottom-nav button.active{background:#30255a;color:#c1adff}.mobile-top-tabs{background:#211e28;border-color:#39333f}.mobile-top-tabs button{color:#96919f}.mobile-top-tabs button.active{background:#30255a;color:#c1adff;box-shadow:none}
.table-footer{border-color:#2a292d}.scout-toggle{background:#28262b;border-color:#39363e;color:#aaa3ad}.scout-toggle.is-scouted{background:#463719;border-color:#806621;color:#e3b93d}

@media (max-width:760px){
  .table-wrap{overflow:visible}
  .data-table,.data-table tbody{display:block;width:100%;min-width:0}
  .data-table thead{display:none}
  .data-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 10px;margin:10px;border:1px solid #eeeaf3;border-radius:10px;padding:10px;cursor:pointer}
  .data-table td{display:block;min-width:0;padding:7px 3px;border:0;white-space:normal;overflow-wrap:anywhere;font-size:12px}
  .data-table td:first-child{grid-column:1/-1;padding-bottom:10px;border-bottom:1px solid #f0eef3}
  .data-table td:last-child{grid-column:2;padding-top:5px;text-align:right;align-self:center}
  .data-table td[data-label]::before{content:attr(data-label);display:block;margin-bottom:4px;color:#9e97ac;font-size:10px;font-weight:700}
  .data-table td[colspan]{grid-column:1/-1;border:0;text-align:center}
  .data-table .name-cell>div{min-width:0}
  .data-table .name-cell strong{white-space:normal;overflow-wrap:anywhere}
  .data-table .link-button{width:100%;text-align:right;padding:0}
  .table-footer{line-height:1.4}
  .modal-backdrop{align-items:flex-end;padding:0}
  .modal,.modal.large{width:100%;max-height:94dvh;border-radius:16px 16px 0 0}
  .modal{scrollbar-width:none;-ms-overflow-style:none}
  .modal::-webkit-scrollbar{display:none}
  .modal-backdrop.overlay-swipe-closing{pointer-events:none;animation:player-backdrop-out 240ms ease-in forwards}
  .overlay-swipe-closing .modal{animation:player-sheet-out 240ms ease-in forwards}
  @keyframes player-backdrop-out{to{background:#17132900}}
  @keyframes player-sheet-out{to{transform:translateY(100%)}}
  .modal-header{position:sticky;top:0;z-index:1;align-items:center;gap:8px;padding:15px;background:#fff}
  .modal-header .detail-head{min-width:0;gap:9px}
  .modal-header .detail-head>div{min-width:0}
  .modal-header .detail-head .player-icon{width:44px;height:44px;font-size:16px}
  .modal-header h2{font-size:17px;overflow-wrap:anywhere}
  .modal-content{padding:16px 16px calc(22px + env(safe-area-inset-bottom))}
  .modal-close,.modal-header-actions .scout-toggle{width:42px;height:42px;flex:none}
  .modal[data-player-overlay] .player-overlay-action{width:32px;height:32px;min-width:32px;min-height:32px}
  .modal[data-player-overlay] .player-overlay-action img{width:16px;height:16px}
  .modal-header-actions{gap:5px}
  .detail-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .detail-grid-third{grid-column:span 1}
  .detail-metric{min-width:0;padding:11px}
  .detail-metric strong{font-size:13px;overflow-wrap:anywhere}
  .market-modal-summary{gap:10px;padding:12px}
  .market-modal-summary>div{min-width:0}
  .offer-row{align-items:flex-start;flex-wrap:wrap}
  .history-pagination{flex-wrap:wrap}
  #toast{left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));text-align:center}

  /* Larger type and player photos throughout the mobile layout. */
  body{font-size:14px}
  #leagueSelect{font-size:14px}
  .mobile-bottom-nav button small{font-size:11px}
  .mobile-top-tabs button{font-size:14px}
  .page-title{font-size:clamp(25px,6vw,30px)}
  .eyebrow,.stat-top,.stat-foot,.panel-head small,.chart-labels{font-size:12px}
  .subhead,.notice,.empty-state,.action-card small,.quick-row small{font-size:13px}
  .section-heading{font-size:18px}
  .primary,.secondary,.link-button,.segmented button{font-size:14px}
  .action-card strong,.quick-row strong,.quick-row .amount{font-size:13px}
  .player-icon{width:80px;height:80px;font-size:24px}
  .player-icon img{transform:scale(1.75);transform-origin:center 12%}
  .player-card .player-icon,.market-card .player-icon{width:108px;height:108px;font-size:30px}
  .quick-row .player-icon,.name-cell .player-icon,.squad-identity .player-icon{width:88px;height:88px}
  .quick-row{flex-wrap:wrap}
  .quick-row .amount{flex-basis:100%;max-width:none;text-align:right}
  .player-card h3,.market-card h3{font-size:15px}
  .player-card small,.market-card .card-top small,.name-cell small,.squad-identity small{font-size:11px}
  .card-metrics span,.market-figures span,.market-modal-summary span,.squad-figure small{font-size:11px}
  .player-card .card-metrics strong,.market-figures strong,.market-modal-summary strong,.squad-figure strong{font-size:14px}
  .data-table td{font-size:14px}
  .data-table td[data-label]::before,.table-footer,.pos-pill{font-size:11px}
  .name-cell strong,.squad-identity strong{font-size:14px}
  .manager-name strong,.manager-stat strong,.manager-rank{font-size:14px}
  .manager-name small,.manager-stat small{font-size:11px}
  .manager-avatar{width:40px;height:40px;font-size:12px}
  .manager-row{grid-template-columns:40px minmax(0,1fr) auto}
  .live-summary,.live-player-row,.live-player-row strong,.live-player-identity strong{font-size:13px}
  .live-kicker,.live-warning,.live-score,.live-player-row small{font-size:11px}
  .live-player-identity .player-icon{width:76px;height:76px}
  .live-player-row>small{padding-left:85px}
  .market-footer small,.market-footer strong,.market-note,.offer-row{font-size:12px}
  .lineup-group>strong,.lineup-formation,.lineup-meta,.lineup-player,.lineup-toolbar,.lineup-picker-head{font-size:13px}
  .lineup-player .player-icon{width:64px;height:64px;font-size:18px}
  .saved-pitch{min-height:420px}
  .saved-pitch-player,.saved-pitch-empty{font-size:10px}
  .saved-pitch-player .player-icon{width:min(32px,calc(100% - 4px));height:auto;aspect-ratio:1}
  .lineup-choice .player-icon{width:72px;height:72px}
  .lineup-choice strong,.lineup-picker>strong{font-size:13px}
  .lineup-choice small,.lineup-picker-head select{font-size:11px}
  .modal-header:has(.detail-head){flex-wrap:wrap;align-items:center}
  .modal-header .detail-head{order:2;width:100%;gap:12px}
  .modal-header:has(.detail-head)>.modal-close,.modal-header .modal-header-actions{order:1;margin-left:auto}
  .modal-header .detail-head .player-icon{width:108px;height:108px;font-size:30px}
  .modal[data-player-overlay] .modal-header:has(.detail-head){flex-wrap:nowrap}
  .modal[data-player-overlay] .modal-header .detail-head{order:0;width:100%;gap:9px}
  .modal[data-player-overlay] .modal-header .detail-head .player-icon{width:90px;height:auto;min-height:90px;font-size:24px}
  .modal[data-player-overlay] .modal-header .modal-header-actions{order:0;margin-left:auto;gap:3px}
  .modal-header h2{font-size:19px}
  .modal-header p,.field,.login-help,.detail-metric span,.history-net span,.history-net small,.history-table-wrap th,.history-pagination small{font-size:11px}
  .detail-metric strong,.history-net strong{font-size:15px}
  .history-table-wrap table,.history-pagination .secondary{font-size:12px}
  .offer-row,.sale-confirm,.account-description,.account-status,.account-check,.sale-offer strong,.sale-offer small{font-size:13px}
  .metric-line,#toast{font-size:13px}
}

@media (max-width:700px){
  .player-cards{grid-template-columns:1fr}
}

@media (max-width:430px){
  .top-actions .avatar{display:none}
  #leagueSelect{max-width:min(48vw,170px)}
  .actions-grid,.player-cards{grid-template-columns:1fr}
  .head-actions button{flex:1 1 auto}
  .market-footer .secondary{width:100%}
  .account-actions button{flex:1 1 100%}
  .stat-card{padding:12px}
  .stat-value{font-size:19px}
}

@media (max-width:760px){
  .data-table tr{border-color:#2a292d}
  .data-table td:first-child{border-bottom-color:#2a292d}
  .data-table td[data-label]::before{color:#96919a}
  .modal-header{background:#171719;border-color:#2b292e}
}

.forecast-image{border-color:#343238;background:#171719;filter:brightness(.78) contrast(1.04) saturate(.95)}
.mobile-bottom-nav:not([hidden]){background:#151517;border-top-color:#2c2a30;box-shadow:0 -8px 24px #0000003d}
.mobile-bottom-nav button.active{background:#30255a;color:#c1adff}
.activity-card{background:#1c1b1f;border-color:#343238}.activity-content p{color:#eee9f2}.activity-subtitle,.activity-meta{color:#96919a}.activity-avatar{background:#30255a;color:#c1adff}.activity-more{background:#211e28;border-color:#39333f;color:#c1adff}
