@media(max-width:760px){
 html{overflow-x:hidden}body{overflow-wrap:anywhere}body>header{padding:12px 14px;gap:10px;flex-wrap:wrap;max-width:100%}header nav{display:flex;gap:8px 14px;flex-wrap:wrap;width:100%;font-size:12px}header button,header a{min-height:36px;align-content:center}main{padding:24px 16px!important;max-width:100%;box-sizing:border-box}main>*{min-width:0}.hero,.about,.layout,.bottom,.petbody{grid-template-columns:1fr!important;gap:24px!important}.hero{padding:24px 0 36px!important}.hero h1{font-size:32px;letter-spacing:2px}.portrait{max-width:440px;margin:0 auto;transform:none}.badge{left:6px;bottom:52px;padding:8px}.actions,.buttons,.bondfooter,.sectionhead,.heading{flex-wrap:wrap;gap:12px}section{padding-top:30px;padding-bottom:30px}.radarwrap{grid-template-columns:1fr!important}.messageform input,.messageform textarea,input,textarea,select{max-width:100%;box-sizing:border-box;font-size:16px}button,summary,.btn{touch-action:manipulation}dialog{max-width:calc(100vw - 32px);max-height:85dvh;overflow:auto;box-sizing:border-box}img{max-width:100%}.study-heading h1{font-size:28px}.study-page main{padding:16px 10px!important}.study-page .battle{height:auto!important;min-height:0;display:block}.study-page .arena{height:auto!important;min-height:0!important}.study-page #game{width:100%!important;height:auto!important;min-height:0!important;aspect-ratio:8/5}.battlehud{gap:6px;padding:8px;font-size:11px}.healthhud,.energyhud{padding:5px 10px;grid-template-columns:1fr;gap:4px}.healthhud small,.energyhud small{display:none}.battlehelp{display:none}.skillhud{padding:8px;gap:8px;flex-wrap:wrap}#gameOverlay{padding:8px;overflow:auto}#gameOverlay h2{font-size:19px;margin:4px}#gameOverlay p{font-size:11px;line-height:1.45;margin:6px}#startGame{padding:9px 16px}.battle-focus main{padding:4px!important}#enemyBook{grid-template-columns:1fr 1fr}.study-entry{padding:16px;gap:12px}.site-filing{padding-bottom:max(12px,env(safe-area-inset-bottom))}
}
.touch-controls{display:none}
@media(pointer:coarse){
 .touch-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;background:#f7f5e9;border-top:1px dashed #a6b68e;user-select:none;-webkit-user-select:none}
 .touch-stick{position:relative;width:108px;height:108px;flex:0 0 108px;border:2px solid #91a580;border-radius:50%;background:#e3ead6;touch-action:none;display:grid;place-items:center}
 .touch-stick span{width:42px;height:42px;background:#8fa77a;border:2px solid #667e55;border-radius:50%;pointer-events:none}
 .touch-actions{display:grid;grid-template-columns:repeat(2,minmax(56px,1fr));gap:8px;max-width:230px}.touch-actions button{min-height:44px;font-size:12px;padding:8px;touch-action:none;background:#f5e7c5;color:#4c603f;border:2px solid #9aab83}.touch-actions .touch-attack{grid-row:span 2;min-width:76px;background:#dce8cb}.touch-controls[aria-disabled=true]{opacity:.6}.touch-hint{font-size:10px;color:#647553;margin:4px 0;text-align:center}
}

@media(max-width:760px){.closet,.rewards{display:grid;grid-template-columns:1fr!important;gap:20px}.outfits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}.outfit{min-width:0;padding:8px}.outfit h3{font-size:13px}.mirror{max-width:380px;margin:auto}.birthday h1{font-size:28px;letter-spacing:2px}.party,.rewardbody{padding:16px!important}.gift-scene{max-width:100%;overflow:hidden}.ticket{box-sizing:border-box;max-width:100%}.amount{font-size:clamp(28px,9vw,52px)}.received{flex-wrap:wrap}.bunting{overflow:hidden}.chapter-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
