/* Compact menu cards for phones and short tablet windows. */
@media (max-width:1000px) and (max-height:600px), (max-width:600px) {
  #s-title{align-content:start;overflow-y:auto;padding:60px max(16px,env(safe-area-inset-right)) 14px max(16px,env(safe-area-inset-left))!important}
  #s-title .tt-right{display:none}
  #s-title .tt-left{display:grid;grid-template-columns:minmax(100px,160px) minmax(0,520px);grid-template-rows:auto auto minmax(0,1fr);column-gap:22px;max-width:720px;width:100%;align-items:center}
  #s-title .tt-left :is(.title-mark,.title-sub){grid-column:1}
  #s-title .title-sub{max-width:160px;font-size:10px;letter-spacing:.14em;line-height:1.6}
  #s-title .title-desc,#s-title .title-foot{display:none}
  #s-title .tt-menu{display:grid;grid-column:2;grid-row:1/4;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;max-width:520px;max-height:none;overflow:visible;margin:0!important;align-content:center;padding:3px}
  #s-title #go-play{order:0}
  #s-title #go-multi{order:1}
  #s-title :is(#go-play,#go-multi){min-height:78px;padding:12px 14px;align-items:center;gap:8px;border-radius:16px}
  #s-title :is(#go-play,#go-multi)>span{min-width:0}
  #s-title :is(#go-play,#go-multi) b{font-size:16px;line-height:1.25}
  #s-title :is(#go-play,#go-multi) small{display:block;font-size:10.5px;line-height:1.4;margin-top:6px;max-width:24ch}
  #s-title :is(#go-play,#go-multi) i{font-size:22px;flex-shrink:0}
  #s-title #go-resume{order:2;min-height:44px;padding:9px 12px!important;border-radius:12px}
  #s-title #go-resume b{font-size:12px}
  #s-title #go-resume small{display:none}
  #s-title .tt-sub{order:4;grid-column:1/-1;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;align-items:start}
  #s-title .tt-sub>.tt-item,#s-title .home-practice summary{min-height:44px;padding:8px 10px;border-radius:12px;display:flex;align-items:center;justify-content:center;box-sizing:border-box}
  #s-title .tt-sub b,#s-title .home-practice summary{font-size:12px}
  #s-title .home-practice{min-width:0}
  #s-title .home-practice>div{position:static;min-width:0;width:100%;margin-top:6px;box-sizing:border-box}
  #s-title .home-guide{order:3;margin:0;min-width:0;font-size:11px}
  #s-title #home-equipment{order:5}
  #s-title .tt-menu:has(#go-resume[hidden]) .home-guide{order:5}
  #s-title .home-guide summary{min-height:38px;display:flex;align-items:center;padding:3px 9px;box-sizing:border-box}
  #s-title .home-guide[open]{grid-column:1/-1;order:6;border:1px solid var(--stroke2);border-radius:12px;padding:6px 10px;background:var(--glass2)}
  #s-title .tt-item:hover{transform:none}
  #home-account{gap:6px}
}
@media (max-width:600px) and (orientation:portrait) {
  #s-title{align-content:center;gap:14px}
  #s-title .tt-left{display:flex;gap:12px;width:100%;max-width:420px;margin:auto}
  #s-title .title-mark{font-size:64px}
  #s-title .title-sub{margin-top:5px;font-size:10px}
  #s-title .title-desc,#s-title .title-foot{display:none}
  #s-title .tt-menu{max-height:none}
  #home-account :is(#acct-chip,#rank-chip,#gold-chip,#mis-chip){font-size:10px!important;max-width:115px;min-height:32px;padding:5px 7px!important}
}
/* Two ability columns beside the right-thumb cluster; saved inline positions win. */
@media (orientation:landscape) and (max-height:600px) {
  body.touching #hud #tabil .tab{bottom:calc(env(safe-area-inset-bottom) + 64px + 58px*var(--mbs))!important;width:calc(48px*var(--mbs))!important;height:calc(48px*var(--mbs))!important}
  body.touching #hud #tabil .tab:nth-child(odd){right:calc(env(safe-area-inset-right) + 298px + 58px*var(--mbs))!important}
  body.touching #hud #tabil .tab:nth-child(even){right:calc(env(safe-area-inset-right) + 298px)!important}
  body.touching #hud #tabil .tab:nth-child(n+3){bottom:calc(env(safe-area-inset-bottom) + 64px)!important}
}
