/* Final viewport constraints keep controls and the original machine inside the game field. */
@media(min-width:1001px) and (min-height:701px){
 .pull-panel{padding:21px}
 .pull-panel h1{font-size:33px}
 .pull-panel .panel-tag{margin-bottom:13px}
 .pull-panel .intro{font-size:14px;line-height:1.5;margin:12px 0 16px}
 .pull-panel .rule{margin:14px 0}
 .pull-panel .pull-actions{margin-top:15px}
 .pull-panel .gold,.pull-panel .blue{padding:12px 14px}
 .pull-panel .guarantee{margin:13px 0 14px;font-size:10px}
}
@media(max-width:600px){
 .profile-heading{width:calc(100% - 105px)}
 .profile-heading>div{min-width:0}
 .profile h1{font-size:19px;line-height:1.05}
 .profile-heading .overline{font-size:6px;letter-spacing:.9px}
}

#gacha-view{grid-template-rows:minmax(0,1fr)}
.pull-panel{max-height:100%;overflow:auto;scrollbar-width:thin;scrollbar-color:#607e9d #12213a}
.machine-zone{overflow:hidden}
#machine{flex:1;min-height:0;width:100%;max-width:528px;height:auto;max-height:none;object-fit:contain}
.zone-label,.machine-state,.machine-hint{flex:none}
@media(min-width:1001px) and (max-height:700px){
 #gacha-view{bottom:78px;padding:14px 30px}
 .pull-panel{padding:13px 17px}
 .pull-panel .panel-tag{font-size:8px;margin-bottom:8px}
 .pull-panel h1{font-size:25px;line-height:1.02}
 .pull-panel .intro{display:none}
 .pull-panel label{font-size:8px;margin-top:10px}
 .pull-panel select{font-size:14px;padding:7px 9px;margin-top:5px}
 .region-info{font-size:9px;margin-top:5px}
 .rule{margin:9px 0}
 .ticket-row strong{font-size:23px}
 .ticket-row small{font-size:7px}
 .ticket-row img{width:23px;height:23px}
 .ticket-row .tiny{font-size:18px}
 .pull-actions{grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
 .pull-actions button{font-size:14px;padding:8px 4px}
 .pull-actions span{display:block;float:none;font-size:9px;line-height:13px}
 .guarantee{font-size:8px;margin:10px 0}
 .guarantee img{width:11px;height:11px}
 .pity-line{font-size:9px}
 .pity-track{margin:6px 0 8px}
 .demo-note{font-size:9px}
 .discovery-heading h2{font-size:21px}
 .discovery .overline{font-size:8px}
 .featured{margin-top:8px}
 .featured-mon canvas{width:72px;height:65px}
 .featured-mon strong{font-size:16px}
 .ranch-teaser{display:none}
 .zone-label{font-size:9px;margin-bottom:5px}
 .machine-state{font-size:11px;padding:7px 12px;margin-top:7px}
 .machine-hint{font-size:8px;margin-top:7px}
 #gacha-bottom{padding:10px 16px;bottom:13px}
 #gacha-bottom strong{font-size:13px}
 #gacha-bottom small{font-size:10px}
 #gacha-bottom button{font-size:12px;padding:8px 12px}
 .profile{padding:13px 17px;max-height:calc(100% - 182px);overflow:auto}
 .profile .panel-tag{margin-bottom:5px}
 .profile-heading canvas{height:52px;width:60px}
 .profile .stats{margin:10px 0}
 .profile .stats b{font-size:23px}
 .profile label{font-size:8px}
 .profile select{padding:7px 9px;font-size:13px}
 .profile .small{display:none}
 .ranch-controls{top:auto;bottom:175px}
}
@media(max-width:600px){
 #machine{flex:none;width:226px;height:205px;max-width:100%}
 .machine-zone{overflow:visible}
 .pull-panel{max-height:none;overflow:visible}
}
/* Honest waiting feedback: no prize/reel outcome until authenticated fulfillment. */
#machine.is-waiting{animation:request-glow 1.1s ease-in-out infinite alternate}
.machine-state.is-waiting:before{content:'';display:inline-block;width:8px;height:8px;margin-right:8px;border:2px solid #f7cf6960;border-top-color:#f7cf69;animation:request-spin .8s linear infinite;vertical-align:middle}
@keyframes request-glow{from{filter:brightness(1)}to{filter:brightness(1.18) drop-shadow(0 0 9px #f7cf6960)}}
@keyframes request-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#machine.is-waiting,.machine-state.is-waiting:before{animation:none}}
/* Live wallet and receipt state, without changing machine/ranch geometry. */
.chain-status{font-size:12px;line-height:1.35;overflow-wrap:anywhere}
.chain-status p{margin:0 0 5px;max-height:4.1em;overflow:auto}
.chain-status a{font-size:11px}
.chain-actions{display:flex;gap:12px;margin:5px 0}
.chain-actions button{font-size:12px}
#collection-count{max-width:55%;font-size:12px;overflow-wrap:anywhere}
#connect-wallet,#disconnect-wallet{font-size:13px;padding:8px;white-space:nowrap}
.header-right{gap:9px}
@media(max-width:1000px){.header-right .network{display:none}}
@media(max-width:600px){
 .header-right{gap:4px;min-width:0}
 #connect-wallet,#disconnect-wallet{font-size:10px;padding:7px 5px}
 #connect-wallet{max-width:82px;overflow:hidden;text-overflow:ellipsis}
 #about-open{display:none}
 #collection-count{font-size:9px;max-width:40%}
 .chain-status{font-size:12px}
}
/* The removed lower promo banner no longer reserves vertical space. */
#gacha-view{bottom:0}
/* Foreground wallet bootstrap only; quiet synchronization never opens this layer. */
#wallet-loading{position:fixed;inset:0;z-index:12000;display:grid;place-items:center;background:#071120a8;backdrop-filter:blur(2px);cursor:progress}
#wallet-loading[hidden]{display:none}
.wallet-loading-ring{width:48px;height:48px;border:3px solid #79d8f52b;border-top-color:#91e4ff;border-right-color:#91e4ff80;border-radius:50%;box-shadow:0 0 22px #5dccff26;animation:wallet-loading-spin .85s linear infinite}
.wallet-loading-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@keyframes wallet-loading-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#wallet-loading .wallet-loading-ring{animation:none}}
