/* Keep desktop layout untouched; landscape phones use the same touch controls. */
.mobile-only{display:none}
.mobile-hint,.mobile-hint-content{display:contents}
@media(max-width:600px),(pointer:coarse) and (max-width:950px) and (orientation:landscape){
  html{scroll-padding:8px}
  body button{min-height:44px;touch-action:manipulation}
  body input:not([type=range]){font-size:16px!important;min-height:44px}
  .mobile-only{display:block}
  .mobile-hint{display:block;width:100%;max-width:42rem}
  .mobile-hint .hint-toggle{width:100%;background:#e2f8d5;color:#193d57;padding:10px;font-size:13px}
  .mobile-hint[data-expanded=false] .mobile-hint-content{display:none}
  .mobile-hint[data-expanded=true] .mobile-hint-content{display:block;margin-top:10px}
  .bowling-stage .ball-diagram{width:min(100%,180px);margin:0 auto}
  .bowling-stage .ball-question h1{font-size:18px;padding:8px;margin-bottom:10px}
  .bowling-stage .ball-question .ball-answer-note{font-size:12px;padding:8px}
  .bowling-stage>div{gap:12px}
  .bowling-stage .bowling-lane{max-width:460px;scroll-margin-top:8px}
  .bowling-stage .w-72{width:100%;max-width:42rem}
  .bowling-stage form button{min-width:76px}
  body .game-page{overflow:visible}
  body .game-page .concept-banner{display:block;margin:8px auto;padding:8px}
  body .game-page .concept-banner>div:not(.concept-formula){display:none}
  body .concept-formula{font-size:13px;text-align:center;margin:0}
  body .game-layout{grid-template-columns:minmax(0,1fr);gap:12px}
  body .clean-field{width:100%;max-width:460px;justify-self:center;scroll-margin-top:8px}
  body .clean-field .map-topline{padding:6px;font-size:11px}
  body .clean-field .map-topline>span{display:none}
  body .clean-field .route-label{font-size:17px!important}
  body .mission-card{display:flex;flex-direction:column;padding:12px;min-width:0}
  body .mission-card .card-tab,body .mission-card .level,body .mission-card .mission-copy{display:none}
  body .mission-card h2{font-size:18px;line-height:1.5;margin:0 0 8px}
  body .mission-card h2 br{display:none}
  body .mission-card .number-flow{display:none}
  body .mission-card label{font-size:14px;margin-top:10px}
  body .answer-row{margin:4px 0 10px}
  body .answer-row input{width:100%;min-width:0;height:48px}
  body .throw-button{font-size:16px;min-height:48px}
  body .feedback h3{font-size:18px;line-height:1.6}
  body .solution-steps p{font-size:13px;overflow-wrap:anywhere}
  body .touch-aim{display:grid;gap:8px}
  body .touch-aim input[type=range]{height:36px}
  body .aim-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
  body .aim-steps button{padding:6px;background:#dff4ff;color:#193d57;font-size:14px}
  body .vertex-controls{display:flex;flex-direction:column;gap:10px;padding:12px;align-items:stretch}
  body .vertex-equation{order:1}
  body .vertex-equation .eyebrow,body .vertex-equation>p,body .coordinate-help{display:none}
  body .vertex-formula{font-size:16px;gap:3px;line-height:1.4}
  body .vertex-formula input{width:50px;flex-basis:50px}
  body .vertex-controls .shoot{order:2;width:100%;min-height:48px}
  body .vertex-controls .shoot small{display:none}
  body .vertex-hint{order:3;font-size:11px;line-height:1.6}
  body .game-board:has(.next-round) .vertex-controls{display:none}
  body .court-wrap{scroll-margin-top:8px}
  body .game-toolbar{padding:8px;margin-bottom:8px}
  body .game-toolbar .eyebrow{display:none}
  body .court-label button{min-height:44px}
  body .gym-shell{padding:8px 8px calc(16px + env(safe-area-inset-bottom))}
  #cat-guide{display:block;right:8px;bottom:max(8px,env(safe-area-inset-bottom));width:calc(100% - 16px);max-height:calc(100dvh - 16px)}
  #cat-guide img,#cat-guide>div:after{display:none}
  #cat-guide p{min-height:0}
  #cat-guide button{width:100%;min-height:48px}
}
@media(pointer:coarse) and (max-width:950px) and (orientation:landscape){
  body .game-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}
  body .game-page .concept-banner{display:none}
  body .game-header{margin-bottom:12px}
  body .gym-shell{max-width:700px}
}
