/* Both shelf modes use the same two controls at the same coordinates. */
.combo053 #comboBadge,.combo053 .recipe-book048{display:block!important;position:absolute;top:auto;bottom:calc(var(--safe-b) + var(--dock048) - 43px);left:auto;transform:none;height:32px;min-height:32px;min-width:64px;width:64px;padding:1px 3px;z-index:6;pointer-events:auto;font-size:12px}
.combo053 #comboBadge{right:calc(var(--safe-r) + var(--draw-width048) + 8px);background:#264353;border:1px solid #dfc17d}
.combo053 #comboBadge b{margin-left:4px}.combo053.craft-open053 #comboBadge b{display:none}
.combo053 #comboBadge.hidden{display:none!important}
.combo053 .recipe-book048{right:calc(var(--safe-r) + var(--draw-width048) + 78px);background:#173847}
.combo053 #combo header,.combo053 .army-shelf049>header{padding-right:144px}
.combo053 #combo .combo-tools{display:none}
.combo053 #choices,.combo053 #choices[data-wide039="true"]{grid-auto-columns:max(128px,calc((100% - 16px)/3))!important;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;padding-bottom:5px;scrollbar-width:thin;scrollbar-color:#e6c276 #112d3a}
.combo053 #choices .choice{outline:1px solid #dfce9055;outline-offset:-4px}
.combo053.craft-ready053 #combo{filter:drop-shadow(0 0 5px #f6d27b80)}
.combo053.craft-ready053 #comboBadge{box-shadow:0 0 12px #ffd77c80,inset 0 0 7px #ffd77c40;animation:craft-glow053 1.8s ease-in-out infinite}
.combo053.craft-open053 #controls:before{border-top-color:#ffe2a0;box-shadow:0 -5px 16px #f8d47e55}
.recipe-strip053{position:absolute;bottom:calc(var(--safe-b) + var(--dock048) + 5px);left:calc(var(--safe-l) + var(--skill-width048));right:calc(var(--safe-r) + var(--draw-width048));display:flex;gap:5px;overflow-x:auto;overflow-y:hidden;touch-action:pan-x;scroll-snap-type:x mandatory;scrollbar-width:thin;pointer-events:auto;z-index:5;padding:2px;background:#102735d9}
.recipe-strip053[hidden]{display:none}.recipe-strip053 button{flex:0 0 108px;min-height:32px;scroll-snap-align:start;border:1px solid #708b92;background:#1d3c4d;font-size:12px;color:#d6e6e5;white-space:nowrap}
.recipe-strip053 button[aria-pressed=true]{border-color:#ffe19a;background:#645330;color:#fff1c6}
.choice-hint053{position:absolute;right:10px;bottom:2px;font-size:9px;line-height:11px;color:#fff1c1;background:#102434e8;pointer-events:none}
.choice-hint053[hidden]{display:none}
.choice.choice-merged{animation:choice-flash053 .45s cubic-bezier(.16,1,.3,1) forwards;outline:2px solid #fff8d6!important;z-index:10}
.merge-light053{position:fixed;inset:auto 0 0;height:calc(var(--dock048) + 36px);pointer-events:none;z-index:30;opacity:0;border:3px solid #ffdf96;box-shadow:inset 0 0 45px #ffe0a8,0 0 45px #ffda83cc,0 -6px 28px rgba(255,225,140,0.55)}
.merge-light053.active{animation:merge-light053 .85s ease-out}
@keyframes craft-glow053{50%{box-shadow:0 0 18px #ffd77ca0,inset 0 0 10px #ffd77c50}}
@keyframes merge-light053{0%{opacity:1;transform:scaleY(1.06)}30%{opacity:.65}100%{opacity:0;transform:scaleY(1)}}
@keyframes choice-flash053{0%{transform:scale(.95);filter:brightness(2.1) contrast(1.2);box-shadow:0 0 28px #ffe39a}40%{transform:scale(1.08);filter:brightness(1.6);box-shadow:0 0 34px #ffd77c}100%{transform:scale(1);filter:none}}
@media(max-height:450px){.combo053 #comboBadge,.combo053 .recipe-book048{bottom:calc(var(--safe-b) + var(--dock048) - 39px);height:30px;min-height:30px;min-width:56px;width:56px;font-size:11px}.combo053 .recipe-book048{right:calc(var(--safe-r) + var(--draw-width048) + 68px)}.combo053 #combo header,.combo053 .army-shelf049>header{padding-right:124px}.combo053 #choices,.combo053 #choices[data-wide039="true"]{grid-auto-columns:max(124px,calc((100% - 10px)/3))!important}.recipe-action053>span{font-size:25px}.recipe-strip053 button{min-height:30px}.recipe-action053>small{font-size:12px}}
@media(prefers-reduced-motion:reduce){.combo053 #comboBadge,.merge-light053.active{animation:none}.merge-light053.active{opacity:.35}}
html[data-reduced-effects=true] #comboBadge,html[data-reduced-effects=true] .merge-light053.active{animation:none}
html[data-reduced-effects=true] .merge-light053.active{opacity:.25}

.motion-stage053{display:grid;grid-template-columns:1fr 1.5fr;width:100%;align-items:center;flex-shrink:0;gap:2px;background:#102c38}.motion-stage053>img{width:100%;height:66px;object-fit:contain;image-rendering:pixelated}.motion-stage053>canvas{width:100%;height:78px;object-fit:contain;image-rendering:pixelated}.motion-controls053{display:grid;grid-template-columns:repeat(4,1fr);grid-column:1/-1;gap:2px;width:100%}.flow-hero048 .motion-controls053 button{min-height:30px;padding:2px 0;font-size:10px}.motion-controls053 button[aria-pressed=true]{border-color:#ffe2a0;background:#5c4e2c;color:#fff2c6}

/* The combat clock shows time and wave timing only. */
.combo053 #modeLabel{display:none!important}

/* Anchor to the same visual viewport as the battle dock, including browser chrome. */
.battle049.combo053 #combo{top:calc(var(--view-y) + var(--view-h) - var(--safe-b) - var(--dock048) + 7px)!important;bottom:auto;box-sizing:border-box;display:grid;grid-template-rows:var(--dock-header049) minmax(0,1fr);min-height:0;overflow:hidden}
.battle049.combo053 #combo>header{min-width:0;max-width:100%;box-sizing:border-box;overflow:hidden}
.battle049.combo053 #recipeMaterials{min-width:0;max-width:100%}
.battle049.combo053 #choices,.battle049.combo053 #choices[data-wide039="true"]{height:auto;min-height:0;max-height:100%;box-sizing:border-box;grid-template-rows:minmax(0,1fr);align-items:stretch}
.battle049.combo053 #choices .choice{height:100%!important;min-height:0!important;max-height:100%;box-sizing:border-box}

/* Recipe center: one stationary attack preview and authoritative unit information. */
/* Keep recipe navigation inside the dock header; never cover the battle lane.
   Reserve toolbar width explicitly so ingredients scroll before the buttons. */
.battle049.combo053{--combo-toggle053:88px;--combo-book053:64px;--combo-tools053:164px}
.battle049.combo053 #comboBadge{display:flex!important;align-items:center;justify-content:center;gap:4px;width:var(--combo-toggle053);min-width:var(--combo-toggle053);box-sizing:border-box;white-space:nowrap}
.battle049.combo053 #comboBadge.hidden{display:none!important}
.battle049.combo053 #comboBadge span{flex:0 1 auto;min-width:0}
.battle049.combo053 #comboBadge b{position:static;flex:none;margin:0;font-variant-numeric:tabular-nums}
.battle049.combo053 .recipe-book048{width:var(--combo-book053);min-width:var(--combo-book053);right:calc(var(--safe-r) + var(--draw-width048) + 14px + var(--combo-toggle053));white-space:nowrap;box-sizing:border-box}
.battle049.combo053 #combo>header,.battle049.combo053 .army-shelf049>header{box-sizing:border-box;padding-right:var(--combo-tools053);min-width:0;white-space:nowrap}
.battle049.combo053 #combo>header{display:flex;gap:4px;overflow:hidden}
.battle049.combo053 #recipeMaterials{flex:1 1 0;width:0;min-width:0;overscroll-behavior-x:contain;scrollbar-width:none}
.battle049.combo053 .army-shelf049{box-sizing:border-box;overflow:hidden}
.battle049.combo053 .merge-light053{height:var(--dock048);box-sizing:border-box;box-shadow:inset 0 0 24px #ffe0a8;transform-origin:bottom}
@media(max-height:450px){
 .battle049.combo053{--combo-toggle053:80px;--combo-book053:56px;--combo-tools053:148px}
}

.flow-hero048 .attack-preview078{display:block;background:radial-gradient(ellipse at center,#294b53,#102c38 75%);border-radius:4px}
.flow-hero048 .attack-preview078>canvas{display:block;width:100%;height:auto;max-height:140px;aspect-ratio:24/17;object-fit:contain}
.flow-hero048>*{flex-shrink:0}.flow-hero048 .flow-name048,.flow-hero048 .flow-range051{white-space:normal;overflow-wrap:anywhere;text-align:center}
.flow-position078{display:flex;width:100%;gap:3px;margin:3px 0}.flow-position078 span{flex:1;min-width:0;text-align:center;font-size:10px;line-height:24px;background:#132a35;color:#8dabae;border:1px solid #36555e;border-radius:3px}.flow-position078 .active{background:#5e4e2b;border-color:#e8c67b;color:#fff0b9;font-weight:bold}
.flow-skill-name078{font-size:12px;color:#ffe0a0;text-align:center;overflow-wrap:anywhere}.flow-abilities078{width:100%;font-size:10px;line-height:1.65;overflow-wrap:anywhere}.flow-abilities078 p{margin:0;padding:6px 2px;border-top:1px solid #34535b}
@media(max-height:450px){.flow-hero048 .attack-preview078>canvas{max-height:90px}.flow-skill-name078{font-size:11px}}


/* Full-width recipe selection sits immediately above the original bottom bar. */
.battle049.combo053 #controls>.recipe-strip053{height:34px;box-sizing:border-box;padding:1px 2px;gap:4px;scrollbar-width:none}
.battle049.combo053 #controls>.recipe-strip053 button{flex:0 0 88px;height:32px;min-height:32px;padding:0 7px;font-size:12px}
/* One pixel-art draw button: all decoration and counts stay inside its frame. */
.battle049.combo053 #summon{padding:0;overflow:hidden;background:transparent url('assets/draw-button-20261015.png') center/100% 100% no-repeat;image-rendering:pixelated}
.battle049.combo053 #summon #summonArt,.battle049.combo053 #summon .plus{display:none}
.battle049.combo053 #summon .draw-pixels20261015{position:absolute;inset:0;display:block;width:100%;height:100%;max-height:none;transform:none;margin:0;image-rendering:pixelated;pointer-events:none}
.battle049.combo053 #summon.draw-pixel-ko20261015>strong,.battle049.combo053 #summon.draw-pixel-ko20261015>.tickets{opacity:0;pointer-events:none}
.battle049.combo053 #summon .tickets{bottom:8px;background:transparent;border:0;box-shadow:none;font-size:16px;line-height:20px;min-width:0}
.battle049.combo053 #summon strong{bottom:28px;font-size:16px;line-height:20px}
.battle049.combo053 #summon .recharge{bottom:4px;left:14%;width:72%;transform:none;overflow:hidden}
.battle049.combo053 #controls .spell-change{border:2px solid #d6b96f;background:#244657;box-shadow:inset 2px 2px #547585,inset -2px -2px #0a2330,0 2px #050e16;color:#fff0c4;text-shadow:1px 1px #081a24;font-weight:bold;border-radius:2px}
.battle049.combo053 #controls .spell-change:active,.battle049.combo053 #controls .spell-change[aria-expanded=true]{background:#173340;box-shadow:inset 2px 2px #0a2330,inset -1px -1px #547585;transform:translateY(1px)}
