/* Phone and touch layout; shared by solo tournaments and live friend challenges. */
.mobile-positions,.mobile-card-hint{display:none}
.game-grid>*,.tournament>*,.live-setup-grid>*,.live-scoreboard>*{min-width:0}
.live-settings .tag,.pool-badge,.live-error,#liveCopyStatus{overflow-wrap:anywhere}
button,a,input,select{touch-action:manipulation}
dialog{max-height:90vh;max-height:90dvh;overflow:auto;overscroll-behavior:contain}
@media(max-width:1050px){.game-grid{grid-template-columns:minmax(0,1fr)}}
@media(pointer:coarse){
 .primary,.quiet,.position-buttons button,.live-compare button,.tabs button,#language{min-height:44px}
 .position-buttons button,.live-compare button,.tabs button{min-width:44px}
 .live-gens label,.live-check{min-height:44px}
 .card:hover,.mode-option:hover,.level-option:hover{transform:none}
}
@media(max-width:650px){
 header{padding:12px max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left));gap:8px}
 .brand{font-size:18px}.header-right{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;margin:0;gap:6px}
 .header-right .quiet,#language{min-height:44px;font-size:12px;padding:10px 8px;white-space:normal;line-height:1.35}
 #language{font-size:16px;max-width:none;width:100%}#friendsBtn{grid-column:1/-1;grid-row:1}
 main{padding:20px max(12px,env(safe-area-inset-right)) 24px max(12px,env(safe-area-inset-left))}
 footer{padding-bottom:calc(24px + env(safe-area-inset-bottom))}
 .intro{margin-bottom:22px}.intro h1{font-size:40px}.steps{flex-wrap:wrap;gap:12px}
 .primary{min-height:48px;max-width:100%;white-space:normal;line-height:1.45;font-size:13px}
 .quiet{min-height:44px;font-size:12px}.note,.hint,.reel-note{font-size:12px}
 .game-grid,.tournament{grid-template-columns:minmax(0,1fr);gap:20px}
 .panel-head,html[lang="es"] .panel-head{padding:16px 12px;gap:10px}.panel-head h2{font-size:23px}.panel-head .tag{overflow-wrap:anywhere}
 .pitch-wrap,.squad-view .pitch-wrap{padding:14px 10px}
 .pitch,.squad-view .pitch{min-height:440px;max-width:420px;aspect-ratio:auto}
 .slot{width:18%;min-width:44px;height:70px;justify-content:center;gap:0}
 .slot img,.squad-view .slot img{width:44px;height:44px;flex-shrink:0}
 .slot small,.slot.filled small,.squad-view .slot.filled small{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;line-height:12px;margin-top:0;padding:1px 2px}
 .slot em{font-size:8px;line-height:11px;white-space:nowrap}.slot-mark{flex-shrink:0}
 .pitch-bottom{padding:14px 12px;font-size:10px;gap:8px}
 .mobile-positions{display:block;margin:14px 0 16px}
 .mobile-positions p{font-size:13px;margin:0 0 9px;color:var(--white)}
 .mobile-positions>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
 .mobile-positions button{min-height:44px;min-width:0;border:1px solid var(--line);border-radius:7px;background:#172630;color:var(--white);font-size:12px;font-weight:700;padding:8px 4px}
 .mobile-positions button.selected{background:var(--lime);color:#17211a;border-color:var(--lime)}
 .mobile-positions button:disabled{opacity:.45}
 .draft-top{gap:12px;align-items:flex-start;flex-wrap:wrap}.draft-top h2{font-size:26px}.round{white-space:nowrap}
 .mobile-card-hint{display:block;font-size:12px;color:var(--lime);margin:14px 0 8px}
 .cards{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding:3px;padding:4px 3px 12px;max-width:100%;scrollbar-width:thin;scrollbar-color:var(--lime) var(--panel)}
 .cards .card{flex:0 0 82%;min-width:0;padding:16px;scroll-snap-align:start;scroll-snap-stop:always}
 .cards .card.chosen{padding:15px}.card img{height:108px}.card h3{font-size:28px;overflow-wrap:anywhere}
 .card .type{font-size:10px;padding:5px 7px}.card .stat{font-size:12px;margin-top:10px}.card .best{font-size:11px}.card .fit span{font-size:11px}.card .hidden-intel p{font-size:12px}
 .commit{display:flex;flex-direction:column;align-items:stretch;padding:14px}.commit strong{overflow-wrap:anywhere;font-size:14px}.commit small{font-size:12px}.commit .primary{width:100%}
 .roulette-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-height:420px;max-height:min(420px,60dvh);gap:10px}
 .roulette-choice{padding:12px 8px;gap:8px}.roulette-choice>img{width:72px;height:64px}.roulette-choice>strong{font-size:13px}.roulette-choice .type{font-size:9px;letter-spacing:.3px;padding:4px 5px}
 .reels{grid-template-columns:minmax(0,1fr) 12px minmax(0,1fr);gap:6px}.reel-value,.generation-reel .reel-value{font-size:20px;white-space:normal;text-align:center;line-height:1.05;overflow-wrap:normal}
 .roulette-label{flex-wrap:wrap}.roulette-label .tag,.roulette-label .eyebrow{font-size:10px}.reel-label{font-size:11px}.pool-heading{gap:8px;flex-wrap:wrap}.pool-heading>span{font-size:12px}
 .player-heading{gap:10px}.player-heading>div{min-width:0}.player-heading h3{overflow-wrap:anywhere}.player-heading>img{flex-shrink:0}
 .position-buttons button,.live-compare .quiet{min-height:44px;min-width:44px;font-size:12px}.position-result{gap:10px}.position-result>div{min-width:0}
 .candidate-stats span{font-size:10px}.candidate-stats b{font-size:18px}
 .level-picker{padding:20px 14px}.legendary-setting{flex-wrap:wrap;padding:14px}.legendary-setting>div{flex:1 1 170px}.legendary-toggle{min-height:48px;margin-left:auto}
 .generation-option .eyebrow{font-size:10px;letter-spacing:.5px}.generation-title h3{font-size:23px}.generation-title{gap:4px}
 .formation-option h3{font-size:23px;overflow-wrap:anywhere}.formation-option p{font-size:12px}
 .live-setup-grid{grid-template-columns:minmax(0,1fr)}.live-box{padding:16px}.live-label input,.live-label select{min-width:0;font-size:16px;max-width:100%}
 .live-gens{min-width:0;padding:12px;gap:8px;grid-template-columns:repeat(2,minmax(0,1fr))}.live-gens label,.live-check{min-height:44px;font-size:13px}.live-gens input,.live-check input{flex-shrink:0}
 .live-players{gap:8px}.live-player{padding:12px 10px}.live-player .eyebrow{font-size:9px;letter-spacing:1px}
 .live-settings{gap:7px}.live-settings .tag{max-width:100%;font-size:11px;letter-spacing:.3px}
 .live-toolbar{gap:6px}.live-toolbar .quiet{padding:8px;font-size:12px}.live-actions{align-items:stretch}.live-actions>button{flex:1 1 180px}
 .live-scoreboard{grid-template-columns:repeat(2,minmax(0,1fr))}.live-scoreboard>div>span{font-size:14px}.live-scoreboard small{font-size:10px;letter-spacing:0;line-height:1.5}
 .live-report{padding:16px 12px}.live-code{gap:10px}.live-code>strong{font-size:24px;letter-spacing:2px;overflow-wrap:anywhere}
 dialog,#challenges{width:calc(100% - 20px);max-width:calc(100% - 20px);padding:20px 14px;max-height:90vh;max-height:90dvh}
 dialog h2{font-size:32px;overflow-wrap:anywhere}dialog .close{min-height:44px}.backup-actions>*{width:100%}
 .table-wrap{padding:8px;max-width:100%}.tabs{padding:12px;gap:6px}.tabs button{min-height:44px;min-width:44px}.match-row{padding:14px 12px}.match-row span{min-width:0;overflow-wrap:anywhere}
 .ready{padding:20px 14px}.metric{padding:12px 8px;font-size:9px}.cup-banner{padding:20px 14px}.cup-banner .primary{width:100%}
}
@media(max-width:370px){.generation-options,.formation-options{grid-template-columns:minmax(0,1fr)}.reel-value,.generation-reel .reel-value{font-size:18px}.live-setup-grid{gap:14px}}

/* Compact three-choice drafting: field and every candidate stay together. */
@media(max-width:650px){
 body:has(.cards) .intro,body:has(.cards) footer,body:has(.cards) .level-badge{display:none}
 body:has(.cards) header{height:44px;min-height:44px;padding:0 10px;flex-wrap:nowrap;gap:4px}
 body:has(.cards) .brand{font-size:14px;white-space:nowrap}
 body:has(.cards) .brand small,body:has(.cards) .ball,body:has(.cards) .status,body:has(.cards) #friendsBtn,body:has(.cards) #challengesBtn{display:none}
 body:has(.cards) .header-right{display:flex;width:auto;gap:0}
 body:has(.cards) #language{width:74px;font-size:12px;padding:4px}
 body:has(.cards) .header-right .quiet{padding:4px;font-size:10px}
 body:has(.cards) main{padding:6px max(8px,env(safe-area-inset-right)) 8px max(8px,env(safe-area-inset-left))}
 .game-grid:has(.cards){gap:6px}
 .game-grid:has(.cards) .panel-head{padding:4px 8px;min-height:25px}
 .game-grid:has(.cards) .panel-head h2{font-size:17px}
 .game-grid:has(.cards) .panel-head .tag{font-size:9px;letter-spacing:0}
 .game-grid:has(.cards) .pitch-wrap{padding:4px 8px}
 .game-grid:has(.cards) .pitch{height:clamp(240px,32dvh,270px);min-height:240px;max-width:none;aspect-ratio:auto}
 .game-grid:has(.cards) .slot{width:14%;min-width:40px;height:38px;gap:0}
 .game-grid:has(.cards) .slot-mark{width:23px;height:23px;font-size:15px}
 .game-grid:has(.cards) .slot img{width:26px;height:26px}
 .game-grid:has(.cards) .slot small{font-size:9px;line-height:11px;padding:0}
 .game-grid:has(.cards) .slot.filled small{display:none}
 .game-grid:has(.cards) .slot em{font-size:9px;line-height:11px}
 .game-grid:has(.cards) .pitch-bottom{padding:4px 8px;font-size:9px}
 .game-grid:has(.cards) .player-panel,.game-grid:has(.cards) .live-report,.game-grid:has(.cards) .mobile-positions,.game-grid:has(.cards) .mobile-card-hint,.game-grid:has(.cards) .draft-top,.game-grid:has(.cards) section>.note{display:none}
 .game-grid:has(.cards) .hint{margin:0 0 4px;font-size:10px;line-height:1.3}
 .cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;overflow:visible;scroll-snap-type:none;padding:0;max-width:none}
 .cards .card,.cards .card.chosen{display:block;min-width:0;width:100%;padding:6px;border:1px solid #344450;border-radius:7px;text-align:left}
 .cards .card.chosen{border-color:var(--lime);box-shadow:inset 0 0 0 1px var(--lime)}
 .cards .card-id{font-size:9px;line-height:11px}
 .cards .card img{height:48px;width:100%;margin:0;object-fit:contain}
 .cards .card h3{font-family:Arial,sans-serif;font-size:12px;line-height:14px;min-height:28px;margin:2px 0;overflow-wrap:anywhere}
 .cards .types{gap:2px;min-height:28px;align-content:start}
 .cards .type{font-size:8px;line-height:10px;padding:2px 3px;letter-spacing:0}
 .cards .fit{margin:3px 0;padding:2px 0;gap:2px}
 .cards .fit strong{font-size:22px;line-height:24px}
 .cards .fit span{font-size:9px;letter-spacing:0}
 .cards .stat{font-size:11px;line-height:16px;margin:0;gap:2px}
 .cards .best{font-size:9px;line-height:12px;margin:4px 0 0;padding-top:3px}
 .cards .hidden-intel{padding:8px 0;min-height:0}
 .cards .hidden-intel span{font-size:24px}
 .cards .hidden-intel p{font-size:10px;line-height:1.3}
 .game-grid:has(.cards) .commit{margin-top:6px;padding:0;border:0;background:none;gap:0}
 .game-grid:has(.cards) .commit>div,.game-grid:has(.cards) .commit>strong{display:none}
 .game-grid:has(.cards) .commit .primary{min-height:44px;padding:9px;font-size:13px}
 body:has(.live-classic) .live-settings,body:has(.live-classic) .live-players{display:none}
 body:has(.live-classic) .live-toolbar{margin:0 0 4px;gap:4px}
 body:has(.live-classic) .live-toolbar .quiet{min-height:32px;padding:4px}
 body:has(.live-classic) .live-toolbar .tag{font-size:8px}
}
