/* One shared phone scorer for members, guests and administrators. */
@media(max-width:700px) and (orientation:portrait){
 body.scorer-playing .app{gap:6px;padding:6px max(6px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))}
 body.scorer-playing .app>header{gap:4px}
 body.scorer-playing .app>header h1{order:-1;flex:1 0 100%;min-width:0;text-align:center;font-size:14px!important;line-height:1.15}
 body.scorer-playing .app>header a,body.scorer-playing .app>header button{min-width:0;min-height:30px;height:auto;padding:5px 6px;font-size:10px;line-height:1.2;text-align:center}
 body.scorer-playing .app>header .page-back,body.scorer-playing .app>header .profile-return-button,body.scorer-playing .app>header .home-link{flex:1}
 body.scorer-playing #gameScreen:not(.hidden){gap:6px}
 body.scorer-playing #gameScreen .game-toolbar{gap:4px}
 body.scorer-playing #gameSummary{font-size:10px;line-height:1.2}
 body.scorer-playing #gameScreen .toolbar-actions{gap:3px}
 body.scorer-playing #gameScreen .toolbar-actions button{min-height:32px!important;padding:4px 2px!important;font-size:9px!important;line-height:1.1;overflow-wrap:normal}
 body.scorer-playing #gameScreen .layout>div{gap:6px}
 body.scorer-playing #gameScreen .players{gap:5px}
 body.scorer-playing #gameScreen .players .player{min-height:136px;padding:7px 5px!important;gap:4px;overflow:hidden}
 body.scorer-playing #gameScreen .players .player .name{font-size:clamp(12px,3.8vw,18px)!important;line-height:1.15;min-height:29px;overflow-wrap:anywhere}
 body.scorer-playing #gameScreen .player-photo{width:17px;height:17px;margin-right:2px}
 body.scorer-playing #gameScreen .players .score{font-size:clamp(48px,17vw,82px)!important;line-height:1;letter-spacing:-2px}
 body.scorer-playing #gameScreen .players .mini{font-size:9px;gap:2px;line-height:1.15}
 body.scorer-playing #gameScreen .mini span{padding:3px 1px}
 body.scorer-playing #gameScreen .players .records{font-size:9px;line-height:1.15}
 body.scorer-playing #gameScreen .players .finish-route{left:4px;width:24%;padding:4px 1px;font-size:clamp(11px,3vw,17px);line-height:1.15;white-space:pre-line;overflow-wrap:normal}
 body.scorer-playing #gameScreen .players .player:has(.finish-route) .score{font-size:clamp(36px,13vw,64px)!important}
 body.scorer-playing #gameScreen .scoring-panel{padding:7px;gap:6px}
 body.scorer-playing #gameScreen .scoring-panel h2{font-size:13px;line-height:1.15}
 body.scorer-playing #gameScreen .entry-controls{gap:5px}
 body.scorer-playing #gameScreen .swap-start{min-height:30px;padding:5px;font-size:11px}
 body.scorer-playing #gameScreen .total-entry{grid-template-columns:minmax(65px,1fr) minmax(0,2.4fr);align-items:end;gap:5px}
 body.scorer-playing #gameScreen .total-entry .field{font-size:10px;gap:2px}
 body.scorer-playing #gameScreen .total-entry input{min-height:36px;height:36px;padding:5px;font-size:20px;text-align:center}
 body.scorer-playing #gameScreen .score-entry-actions{gap:3px}
 body.scorer-playing #gameScreen .score-entry-actions button{min-width:0;min-height:36px;height:36px;padding:3px 1px;font-size:clamp(9px,2.6vw,12px);white-space:nowrap}
 body.scorer-playing #gameScreen .input-area:has(.score-presets:not([hidden]):not(.hidden)){grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:5px}
 body.scorer-playing #gameScreen .score-keypad{min-width:0;min-height:142px;grid-template-rows:repeat(3,minmax(44px,1fr));gap:4px}
 body.scorer-playing #gameScreen .score-keypad button{min-width:0;min-height:44px;display:flex;align-items:center;justify-content:center;padding:2px;line-height:1;overflow:hidden;font-size:24px}
 body.scorer-playing #gameScreen .score-keypad .key-submit{font-size:clamp(8px,2.15vw,13px);letter-spacing:-.2px}
 body.scorer-playing #gameScreen .score-keypad button[data-key="back"]::after{width:25px;height:21px}
 body.scorer-playing #gameScreen .score-presets{min-width:0;min-height:142px;gap:4px;padding:4px}
 body.scorer-playing #gameScreen .score-presets h3{font-size:10px;line-height:1.1}
 body.scorer-playing #gameScreen .score-presets-grid{gap:3px}
 body.scorer-playing #gameScreen .score-presets button{min-width:0;min-height:35px;font-size:clamp(13px,3.9vw,20px);padding:1px}
 body.scorer-playing #gameScreen .scoring-footer{gap:4px}
 body.scorer-playing #gameScreen .actions button{min-height:30px;padding:5px 7px;font-size:10px}
 body.scorer-playing .playing-sponsor svg{height:22px}
 body.scorer-playing .turnier-link-panel{font-size:11px;padding:6px}
 body.scorer-playing #gameScreen .players.many .player{min-height:112px}
 body.scorer-playing #gameScreen .players.many .score{font-size:clamp(36px,12vw,56px)!important}
}

/* Give the finish route its own cell; never cover stats or shrink one score. */
@media(max-width:700px) and (orientation:portrait){
 body.scorer-playing #gameScreen .players .player{display:grid;grid-template-columns:minmax(0,.28fr) minmax(0,.72fr);grid-template-rows:minmax(30px,auto) minmax(82px,1fr) auto auto;align-items:center;align-content:stretch;justify-items:center;column-gap:3px;row-gap:4px;min-height:148px}
 body.scorer-playing #gameScreen .players .player .name{grid-column:1/-1;grid-row:1;min-height:0;align-self:start;text-align:center}
 body.scorer-playing #gameScreen .players .player .score{grid-column:1/-1;grid-row:2;align-self:center;justify-self:center;font-size:clamp(48px,17vw,82px)!important;line-height:1;min-width:0;max-width:100%;margin:0}
 body.scorer-playing #gameScreen .players .player:has(.finish-route) .score{grid-column:2;font-size:clamp(48px,17vw,82px)!important;letter-spacing:-2px}
 body.scorer-playing #gameScreen .players .player .mini{grid-column:1/-1;grid-row:3;align-self:end}
 body.scorer-playing #gameScreen .players .player .records{grid-column:1/-1;grid-row:4;align-self:end;min-width:0;text-align:center}
 body.scorer-playing #gameScreen .players .player .checkout:not(.finish-route){grid-column:1/-1;grid-row:5}
 body.scorer-playing #gameScreen .players .player .finish-route{position:static;grid-column:1;grid-row:2;transform:none;align-self:center;justify-self:stretch;width:auto;min-width:0;max-width:100%;margin:0;padding:5px 1px;font-size:clamp(11px,3.2vw,17px);line-height:1.2;white-space:pre-line;border-radius:7px}
 body.scorer-playing #gameScreen .players .player .finish-route::before{font-size:clamp(5px,1.4vw,8px);letter-spacing:0;margin-bottom:3px}
 body.scorer-playing #gameScreen .players.many .player{grid-template-rows:minmax(28px,auto) minmax(64px,1fr) auto auto;min-height:128px}
 body.scorer-playing #gameScreen .players.many .player .score,body.scorer-playing #gameScreen .players.many .player:has(.finish-route) .score{font-size:clamp(36px,12vw,56px)!important}
}
