/* Phone-specific presentation. Tablet and desktop layouts are unchanged. */
.runnerAwaitingSelection #sessionDetailsCard,.runnerAwaitingSelection #sessionPartnershipsCard,.runnerAwaitingSelection .tournamentWelcomeCard,.runnerAwaitingSelection #generate,.runnerAwaitingSelection #recalculate,.runnerAwaitingSelection #notice,.runnerAwaitingSelection #rounds,.runnerAwaitingSelection #standings,.runnerAwaitingSelection #uploadSession{display:none!important}
.runnerAwaitingSelection nav button[data-tab="rounds"],.runnerAwaitingSelection nav button[data-tab="standings"]{opacity:.45}
.keypad,.keypad button{touch-action:manipulation}
.keypad button{-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}

@media(max-width:600px){
  body{padding-bottom:0}
  header{min-height:0;padding:7px 9px 6px;gap:5px 8px}
  header .brand img{width:142px;max-height:34px}
  header nav{position:static;z-index:auto;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;width:100%;padding:4px 0 0;background:var(--navy);border-top:1px solid #29445f;overflow:visible}
  header nav button{min-width:0;padding:8px 2px;font-size:10px;text-align:center;white-space:nowrap}
  .headerTools{justify-self:end}
  .displaySettingsToggle{display:grid!important;place-items:center}
  #appClock{font-size:15px;min-width:44px}
  main{width:100%;padding:12px 8px 20px}
  .hero,.title{margin-bottom:15px}
  .hero h1,.title h1{font-size:31px;letter-spacing:-1.2px}
  .card{padding:15px;border-radius:13px}
  input,select{font-size:16px}
  .row,.row.three{grid-template-columns:1fr}
  .player.simple{grid-template-columns:minmax(0,1fr) 82px 42px!important}
  .player.simple>input{grid-column:1!important;grid-row:1!important}
  .player.simple>button:not(.playerRemove){grid-column:2!important;grid-row:1!important}
  .player.simple>.playerRemove{grid-column:3!important;grid-row:1!important}
  .player:not(.simple){grid-template-columns:minmax(0,1fr) 88px 42px!important}
  .player:not(.simple)>input{grid-column:1!important;grid-row:1!important}
  .player:not(.simple)>button:not(.playerRemove){grid-column:2!important;grid-row:1!important}
  .player:not(.simple)>.playerRemove{grid-column:3!important;grid-row:1!important}
  .player:not(.simple)>select:nth-of-type(1){grid-column:1!important;grid-row:2!important}
  .player:not(.simple)>select:nth-of-type(2){grid-column:2/4!important;grid-row:2!important}
  .player>input,.player>select,.player>button{min-width:0;margin:0!important}
  #rounds.tab.active{padding-bottom:4px}
  #rounds>.title{display:none}
  .phoneRoundNav{display:grid;grid-template-columns:46px 1fr 46px;gap:6px;align-items:center;margin:0 0 7px}
  .phoneRoundNav>button{min-height:42px;padding:5px;border:1px solid #ccd8e1;border-radius:10px;background:#fff;color:var(--navy);font-size:25px;font-weight:900}
  .phoneRoundNav>button:disabled{opacity:.32}
  .phoneRoundNav>b{text-align:center;font-size:16px;color:var(--navy)}
  .phoneRoundNav>#phoneRoundTools{grid-column:1/4;min-height:30px;padding:4px;font-size:12px;background:#eaf0f4}
  .roundActions{display:none;grid-template-columns:1fr;gap:7px;margin:0 0 7px}
  #rounds.phoneToolsOpen .roundActions{display:grid}
  .roundActions .secondary,.roundActions .dangerSecondary{width:100%;margin:0;padding:11px 8px}
  #roundList .roundScreen{display:none;margin:0;height:calc(100dvh - 108px - 82px - 18px);min-height:320px;max-height:none;padding:8px;overflow:hidden}
  #roundList .roundScreen.phoneRoundActive{display:flex;flex-direction:column}
  .roundScreen .roundHead{flex:0 0 auto;margin-bottom:5px;padding:6px;gap:4px}
  .roundScreen .roundHead b{font-size:14px;overflow-wrap:anywhere}
  .roundScreen .roundHead>span{font-size:10px}
  #roundList .roundScreen.phoneRoundActive{min-height:240px}
  .roundScreen .match{display:flex;flex-direction:column;flex:1 1 0;min-height:0;align-items:stretch;padding:6px 8px;margin:3px 0}
  .roundScreen .match .court{font-size:9px}
  .roundScreen .match .teams{width:100%;align-self:center;flex:1;min-height:0}
  .roundScreen .sit{flex:0 0 auto;margin-top:4px;padding:5px 7px;font-size:10px}
  .roundScreen .sit button,.roundScreen .sit span{padding:3px 5px;font-size:10px}
  .roundScreen .editRoundPlayers,.roundScreen .insertManual{display:none}
  #rounds.phoneToolsOpen .roundScreen .editRoundPlayers,#rounds.phoneToolsOpen .roundScreen .insertManual{display:block;flex:0 0 auto;padding:6px;margin-top:4px;font-size:11px}
  #rounds>button:not(.hide){margin-top:6px;min-height:38px;padding:7px}
  .teams{grid-template-columns:minmax(0,1fr) 31px 13px 31px minmax(0,1fr);gap:3px}
  .teams span{min-width:0;font-size:12px;line-height:1.2;overflow-wrap:anywhere;text-align:left}
  .teams span:last-child{text-align:right}
  .tapMatch .teams strong{font-size:19px}
  .modal{padding:6px;align-items:stretch}
  .scoreSheet{width:100%;max-height:100%;border-radius:14px;padding:12px;overscroll-behavior:contain}
  .scoreTop h2{margin-bottom:8px}
  .scoreSides{grid-template-columns:1fr;gap:9px;margin-bottom:10px}
  .scorePanel{padding:9px}
  .scorePanel>b{min-height:0;margin-bottom:4px;font-size:13px}
  .bigScore{height:43px;font-size:36px;line-height:43px}
  .keypad{gap:5px}
  .keypad button{min-height:42px;padding:7px 4px;font-size:20px}
  .scoreSheet>.primary{position:sticky;bottom:0;min-height:50px;margin-top:2px}
  .manualSheet,.withdrawSheet,.sitterSheet,.memberPickerSheet,.confirmSheet{width:100%;max-width:none;max-height:100%;border-radius:14px;padding:14px}
  .manualFooter{grid-template-columns:1fr}
  .memberRow{grid-template-columns:minmax(0,1fr) 86px 68px;padding:10px 8px}
  .tableWrap{margin-left:-2px;margin-right:-2px}
}

@media(orientation:landscape) and (max-height:600px){
  .modal{padding:3px;align-items:stretch}
  .scoreSheet{display:flex;flex-direction:column;width:100%;height:100dvh;max-height:100dvh;padding:7px 10px;border-radius:10px;overflow:hidden}
  .scoreTop{min-height:31px;align-items:center}
  .scoreTop small{font-size:8px}
  .scoreTop h2{font-size:18px;line-height:1;margin:1px 0 3px}
  .scoreTop button{width:30px;height:30px;font-size:19px}
  .scoreSides{grid-template-columns:1fr 1fr;gap:8px;min-height:0;flex:1;margin-bottom:6px}
  .scorePanel{display:flex;flex-direction:column;min-height:0;padding:5px 8px}
  .scorePanel>b{min-height:18px;margin:0;font-size:11px;line-height:18px}
  .bigScore{height:30px;font-size:27px;line-height:30px}
  .keypad{grid-template-columns:repeat(6,1fr);gap:4px;flex:1;min-height:0}
  .keypad button{min-height:30px;height:auto;padding:2px;font-size:17px}
  .scoreSheet>.primary{position:static;flex:0 0 39px;min-height:39px;padding:6px;font-size:15px}
}

@media(max-width:380px){
  header .brand img{width:122px}
  #appClock{font-size:13px}
  .hero h1,.title h1{font-size:27px}
  .teams span{font-size:11px}
  .keypad button{min-height:39px}
}
