.arcade-actions{display:flex;flex-wrap:wrap;gap:.6rem;margin:1rem 0}
.arcade-actions button{font:inherit;padding:.65rem .9rem;border:1px solid #7a6697;border-radius:.55rem;background:#fff;color:#261945;cursor:pointer}
.arcade-actions button[aria-pressed=true]{background:#362158;color:#fff}
.arcade-actions button:disabled{opacity:.55;cursor:default}
.arcade-panel{margin:1.25rem 0;padding:clamp(.9rem,3vw,1.6rem);border:1px solid #d6c9e7;border-radius:.9rem;background:#fff;color:#261945}
#flight-board{display:block;width:min(100%,480px);height:auto;border-radius:.55rem;background:#e2f4ff;touch-action:manipulation;cursor:pointer}
.arcade-battle{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr));gap:.8rem}
.arcade-battle>div{display:grid;gap:.4rem;padding:.8rem;background:#f0ebf8;border-radius:.55rem}
.arcade-battle meter{width:100%;height:1.1rem}
#flight-status,#battle-log{min-height:1.6em}

.arcade-symbols{position:absolute}
.arcade-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;margin:1.25rem 0}
.arcade-picker button{min-width:0;text-align:left;font:inherit;color:#261945;background:#fff;border:2px solid #ddd1e8;border-radius:.85rem;padding:.55rem;cursor:pointer;box-shadow:0 3px 0 #e9dfef}
.arcade-picker button[aria-pressed=true]{border-color:#684397;box-shadow:0 3px 0 #684397}
.arcade-picker button:hover{border-color:#684397}
.arcade-picker strong,.arcade-picker small{display:block;padding:0 .3rem}
.arcade-picker strong{margin:.5rem 0 .2rem}
.arcade-picker small{margin-bottom:.35rem;line-height:1.35;color:#574665}
.arcade-preview{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:center;gap:.4rem;height:96px;overflow:hidden;border-radius:.55rem}
.arcade-sprite{width:38px;height:auto;display:block;flex:none;filter:drop-shadow(2px 3px 0 #24163732)}
.preview-colors{background:#f3e5ff;color:#a982d5}
.preview-colors svg:nth-child(2){color:#79bdad;transform:translateY(-6px)}
.preview-colors svg:nth-child(3){color:#ef9aa8}
.preview-flight{background:linear-gradient(#86c9ef,#e4f8ff);color:#8464ba}
.preview-flight svg{z-index:1}
.preview-cloud{position:absolute;width:42px;height:10px;background:#fff;border-radius:12px;top:20%;left:9%;box-shadow:6px -5px #fff}
.preview-wing{width:21px;height:13px;background:#fff;border-radius:60%;margin-right:-12px;transform:rotate(32deg)}
.preview-wing.right{margin:0 0 0 -12px;transform:rotate(-32deg)}
.preview-pipe{position:absolute;right:9%;bottom:0;width:18px;height:34%;border:2px solid #27664e;background:#74bb69;box-shadow:0 -77px 0 #74bb69}
.preview-catch{background:#ddebba;color:#b9afd2}
.preview-catch svg:last-child{color:#7aae75;transform:translateY(-9px)}
.preview-versus{font:bold .72rem monospace;color:#314226}
#flight-board{width:min(100%,560px);border:2px solid #597e9b}
.battle-scene{position:relative;overflow:hidden;max-width:620px;margin:1rem auto 0;height:clamp(150px,36vw,235px);border:3px solid #314a36;border-radius:.7rem .7rem 0 0;background:linear-gradient(#f8f6d7 0 47%,#daedb8 47% 66%,#c5e099 66%);isolation:isolate}
.battle-platform{position:absolute;display:grid;place-items:center;width:35%;height:64%;color:#bdb8ad}
.battle-platform:before{content:"";position:absolute;bottom:7%;width:100%;height:29%;border-radius:50%;background:#8cb26f;border:3px solid #6b9658;z-index:-1}
.battle-player{left:8%;bottom:3%}
.battle-wild{right:8%;top:0;color:#7aaa87}
.battle-platform .arcade-sprite{width:clamp(42px,12vw,79px)}
.battle-effect{position:absolute;z-index:2;left:71%;top:18%;font:bold clamp(.85rem,3vw,1.35rem) monospace;background:#fffae2;color:#27382a;padding:.2rem .35rem;border:2px solid currentColor;border-radius:.25rem;white-space:nowrap;pointer-events:none}
#catch .arcade-battle{max-width:620px;margin:0 auto;grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem}
#catch .arcade-battle>div{background:#eff3db;color:#25372a;border-radius:0 0 .4rem .4rem;overflow-wrap:anywhere}
#battle-log{margin:1rem 0;padding:.75rem 1rem;min-height:4.5em;border:3px double #406448;border-radius:.45rem;background:#f5f5dc;color:#283e2f;font-family:monospace;line-height:1.5}
#battle-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
#battle-actions button{text-align:left}
#battle-actions [data-move=throw]{background:#673b85;color:#fff}
@media(max-width:600px){.arcade-picker{grid-template-columns:1fr}.arcade-picker button{display:grid;grid-template-columns:100px minmax(0,1fr);grid-template-rows:auto auto;column-gap:.5rem}.arcade-picker .arcade-preview{grid-row:span 2;height:68px}.arcade-preview .arcade-sprite{width:25px}.arcade-picker strong{align-self:end}.arcade-picker small{align-self:start}.preview-pipe{right:4%}}

.flight-stage{position:relative;width:min(100%,560px);overflow:hidden;border-radius:.55rem}
#flight-confetti{position:absolute;inset:0;pointer-events:none;z-index:1}
#flight-confetti span{position:absolute;top:-12px;width:7px;height:12px;animation:arcade-confetti 1.9s linear both}
@keyframes arcade-confetti{to{top:108%;transform:translateX(45px) rotate(620deg)}}
.battle-effect.catch-ball{width:21px;height:21px;padding:0;border:2px solid #312943;border-radius:50%;background:linear-gradient(#ef6488 0 43%,#312943 43% 57%,#fff8e2 57%)}
.battle-effect.catch-ball::after{content:"";position:absolute;inset:6px;border:1px solid #312943;border-radius:50%;background:#fff}

.battle-menu{padding:.7rem;border:2px solid #406448;border-radius:.45rem;background:#eef0d8}
.battle-menu>p{margin:0;color:#283e2f;font:bold .85rem monospace;text-transform:uppercase;letter-spacing:.08em}
#battle-actions{margin:.55rem 0 0}
#battle-actions button{background:#fcfaed;border-color:#73835d;box-shadow:inset 0 -2px #dce1be}
#battle-actions button:not(:disabled):hover{border-color:#374f33;background:#e1eac3}
#battle-actions button small{display:block;color:#435738;font-size:.8em}
#battle-actions [data-move=throw]{background:#673b85;color:#fff;box-shadow:none}
#battle-actions [data-move=throw]:not(:disabled):hover{background:#522d70}
#new-battle{margin-top:1rem}

.catch-ball.catch-confirmed{box-shadow:0 2px 0 #31294340}
.catch-ball.catch-confirmed::before{
  content:"";
  position:absolute;
  top:5px;
  left:-12px;
  width:5px;
  height:5px;
  border-radius:50%;
  background:#fff1a3;
  box-shadow:34px 0 #fff1a3, 4px -7px #fff8dc, 30px -7px #fff8dc;
  animation:arcade-catch-glow .65s ease-out both;
}
@keyframes arcade-catch-glow{
  0%,100%{opacity:0}
  35%{opacity:1}
}
@media(prefers-reduced-motion:reduce){.catch-ball.catch-confirmed::before{animation:none}}

.battle-help{margin-top:.75rem}
.battle-help summary{cursor:pointer;color:#513b72;font-weight:700}
.battle-help p{margin:.4rem 0 0}

@media(max-width:600px){
  #catch{padding:.65rem;scroll-margin-top:64px}
  #catch>h2{margin:0;font-size:1.35rem;line-height:1.2}
  #catch .battle-scene{
    height:clamp(96px,18svh,144px);
    margin-top:.45rem;
    border-width:2px;
  }
  #catch .battle-platform .arcade-sprite{width:clamp(32px,7svh,52px)}
  #catch .arcade-battle>div{align-content:start;gap:.15rem;padding:.35rem .45rem;font-size:.75rem;line-height:1.3}
  #catch .arcade-battle meter{height:.65rem}
  #catch-chance{margin:.35rem 0;font-size:.78rem;line-height:1.3}
  #battle-log{
    margin:.35rem 0;
    padding:.35rem .45rem;
    min-height:3.6em;
    max-height:5.8em;
    overflow-y:auto;
    font-size:.75rem;
    line-height:1.35;
  }
  #catch .battle-menu{padding:.35rem}
  #catch .battle-menu>p{display:none}
  #battle-actions{gap:.3rem;margin:0}
  #battle-actions button{min-height:44px;padding:.3rem .4rem;font-size:.78rem;line-height:1.2}
}

@media(max-width:600px) and (max-height:650px){
  #catch{margin-inline:-.35rem}
  #catch .battle-scene{height:clamp(90px,16svh,106px)}
  #battle-log{max-height:4.7em}
}
