/* Shared phone ergonomics. Desktop-only games do not load this stylesheet. */
@media(max-width:900px), (pointer:coarse){
  .btn, .seg button, .tabs button, .again-x, select{min-height:44px!important;min-width:44px}
  input[type=text],input[type=number],input[type=search],textarea,select{font-size:16px}
  input,select,textarea{max-width:100%}
  .share{flex-wrap:wrap;min-width:0}.share code{min-width:0;overflow-wrap:anywhere}
  .sheet{max-height:calc(100dvh - 16px)}
  .sheetbody{min-height:0;overflow-y:auto;overscroll-behavior:contain}
  .dock{min-height:0;max-height:65dvh;overflow-y:auto;overscroll-behavior:contain}
  button:focus-visible,a:focus-visible,[role=button]:focus-visible{outline:3px solid var(--gold-2,var(--gold,#f3d48a));outline-offset:3px}
}
@media(orientation:landscape) and (max-height:540px){
  .dock{max-height:55dvh}
  body[data-phone-game=lodestone] .mine{align-self:stretch;min-height:0;overflow-y:auto;max-height:100%;margin-bottom:0}
  body[data-phone-game=lodestone] #table{grid-template-rows:auto minmax(70px,28dvh) minmax(0,1fr)}
  body[data-phone-game=marvels] #table{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,42%);grid-template-rows:auto minmax(0,1fr);gap:0 10px}
  body[data-phone-game=marvels] .bar{grid-column:1/-1}
  body[data-phone-game=marvels] .scroll{grid-column:1;grid-row:2;min-height:0}
  body[data-phone-game=marvels] .dock{grid-column:2;grid-row:2;min-height:0;max-height:100%;margin:0;overflow-y:auto;--hw:78px}
  body[data-phone-game=marvels] .opps{max-height:120px}
}
@media(max-width:900px), (pointer:coarse){
  .page{overflow-x:hidden}
  body[data-phone-game=bluff] .hand{gap:10px;overflow-x:auto;padding:14px 4px 6px;--cw:60px;touch-action:auto}
  body[data-phone-game=bluff] .hrow{justify-content:flex-start;gap:8px;width:max-content;min-width:100%}
  body[data-phone-game=bluff] .hrow .hc+.hc{margin-left:0}
  body[data-phone-game=bluff] .hrow+.hrow{margin-top:0}
  body[data-phone-game=bluff] .hc{transform:none}
  body[data-phone-game=bluff] .hc.on{transform:translateY(-6px)}
}
@media(orientation:landscape) and (max-height:540px){
  .page:has(#link)>.row:has([data-act=rules]){position:static!important;flex-shrink:0}
}
@media(max-width:900px), (pointer:coarse){
  /* Safari's native menu styling otherwise ignores the minimum target height. */
  select{-webkit-appearance:none;appearance:none;min-height:44px!important;padding:10px 32px 10px 12px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23b9c3c8' stroke-width='2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}
}
