/* Portrait phones use content-sized rows: no clipped names, hidden keypad or overlapping footer.
   Loaded after tournament, legacy and sponsor styles; landscape tablet layout is retained. */
@media(max-width:700px) and (orientation:portrait){
 body.scorer-playing{height:auto!important;min-height:100vh;min-height:100svh;overflow:auto!important;overscroll-behavior-y:auto}
 body.scorer-playing .app{display:flex!important;flex-direction:column;width:100%;min-width:0;max-width:100%;height:auto!important;max-height:none!important;min-height:100svh;overflow:visible!important;gap:8px;padding:8px max(8px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));align-content:start}
 body.scorer-playing .app>header{display:flex!important;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px;height:auto!important;min-height:36px;max-height:none!important;margin:0!important;padding:0;flex:none}
 body.scorer-playing .app>header h1{font:700 15px/1.2 system-ui,sans-serif!important;letter-spacing:0;text-transform:none;white-space:normal;flex:1;min-width:100px;margin:0}
 body.scorer-playing .app>header a,body.scorer-playing .app>header button{min-height:36px;padding:7px;font-size:11px}
 body.scorer-playing:not(.turnier-connected) .app>header .board-device-badge{display:none}
 body.scorer-playing .turnier-link-panel{margin:0;padding:8px;flex:none}
 body.scorer-playing #gameScreen:not(.hidden){display:flex!important;flex-direction:column;flex:none!important;height:auto!important;min-height:0;overflow:visible!important;gap:8px;grid-row:auto}
 body.scorer-playing #gameScreen .game-toolbar{display:flex;flex-direction:column;align-items:stretch;gap:6px;min-height:0;margin:0;flex:none}
 body.scorer-playing #gameSummary{white-space:normal;font-size:12px;line-height:1.35}
 body.scorer-playing #gameScreen .toolbar-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));width:100%;gap:5px}
 body.scorer-playing #gameScreen .toolbar-actions button{min-height:40px!important;height:auto!important;font-size:10px!important;white-space:normal;padding:5px 3px!important;line-height:1.2}
 body.scorer-playing #gameScreen .layout,body.scorer-playing #gameScreen .layout>div{display:flex!important;flex-direction:column;height:auto!important;max-height:none;min-height:0;overflow:visible!important;gap:8px;margin:0;position:static}
 body.scorer-playing #gameScreen .players{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto!important;height:auto!important;min-height:0!important;overflow:visible!important;gap:7px;margin:0}
 body.scorer-playing #gameScreen .players.solo{grid-template-columns:1fr}
 body.scorer-playing #gameScreen .players .player{height:auto!important;min-height:160px;overflow:visible;justify-content:flex-start!important;padding:10px 7px!important;gap:6px;position:relative}
 body.scorer-playing #gameScreen .players .player .name{display:block;width:100%;white-space:normal;overflow:visible;text-overflow:clip;font-size:14px!important;line-height:1.3;min-height:36px;overflow-wrap:anywhere}
 body.scorer-playing #gameScreen .player-photo{width:20px;height:20px;vertical-align:middle;margin-right:4px}
 body.scorer-playing #gameScreen .players .score{font-size:clamp(46px,17vw,82px)!important;line-height:1;margin:0;letter-spacing:-2px}
 body.scorer-playing #gameScreen .players .mini{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;font-size:10px;line-height:1.3;width:100%}
 body.scorer-playing #gameScreen .mini span{min-width:0;padding:4px 1px;white-space:normal}
 body.scorer-playing #gameScreen .players .records,body.scorer-playing #gameScreen .players .checkout{font-size:10px;line-height:1.35;white-space:normal;overflow-wrap:anywhere}
 body.scorer-playing #gameScreen .scoring-panel{display:flex;flex-direction:column;flex:none;height:auto!important;max-height:none;min-height:0;overflow:visible!important;padding:10px;gap:8px;margin:0}
 body.scorer-playing #gameScreen .scoring-panel h2{font-size:15px;line-height:1.3;white-space:normal}
 body.scorer-playing #gameScreen .entry-controls,body.scorer-playing #gameScreen .total-entry{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;height:auto;min-height:0;margin:0}
 body.scorer-playing #gameScreen .swap-start{height:auto;min-height:40px;margin:0;font-size:13px;padding:8px}
 body.scorer-playing #gameScreen .total-entry input{height:44px;min-height:44px;font-size:18px;padding:9px}
 body.scorer-playing #gameScreen .score-entry-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 body.scorer-playing #gameScreen .score-entry-actions button{height:auto;min-height:44px;font-size:13px;padding:8px 3px}
 body.scorer-playing #gameScreen .input-area{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto;height:auto!important;min-height:0;overflow:visible;position:relative;gap:6px}
 body.scorer-playing #gameScreen .input-area:has(.score-presets:not([hidden]):not(.hidden)){grid-template-columns:minmax(0,1.4fr) minmax(0,1fr)}
 body.scorer-playing #gameScreen .score-keypad{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,minmax(46px,auto));height:auto!important;min-height:150px;gap:5px}
 body.scorer-playing #gameScreen .score-keypad button{height:auto;min-height:46px;font-size:20px;padding:5px}
 body.scorer-playing #gameScreen .score-keypad .key-submit{font-size:12px}
 body.scorer-playing #gameScreen .score-presets{height:auto!important;min-height:150px;padding:5px;gap:5px}
 body.scorer-playing #gameScreen .score-presets button{min-height:40px;height:auto;font-size:17px}
 body.scorer-playing #gameScreen .finish-darts{grid-column:1/-1;height:auto;min-height:150px;position:relative;overflow:visible}
 body.scorer-playing #gameScreen .variant-panel{grid-column:1/-1;height:auto;max-height:none;overflow:auto}
 body.scorer-playing #gameScreen .scoring-footer{display:flex;flex-direction:column;align-items:stretch;position:static;height:auto;min-height:0;gap:8px;margin:0}
 body.scorer-playing #gameScreen .actions{display:flex;flex-wrap:wrap;position:static;margin:0;gap:6px}
 body.scorer-playing #gameScreen .actions button{position:static;min-height:42px;height:auto;font-size:12px;padding:8px}
 body.scorer-playing #gameScreen .status{position:static;white-space:normal;font-size:12px;line-height:1.4;overflow:visible}
 body.scorer-playing #gameScreen>.playing-sponsors{position:static;flex:none;align-self:stretch;margin:0;padding:0;min-height:0}
 body.scorer-playing .playing-sponsor svg{height:28px}
}
