/* Landscape battle: scenery above, fixed thumb shelf below. All scrolling is local. */
.battle048{--dock048:112px;--skill-width048:128px;--draw-width048:100px}
.battle048 #hud{padding:5px 7px;gap:8px;grid-template-columns:1fr 86px 1fr;align-items:start}
.battle048 #hud .team{min-height:34px;height:34px;padding:4px 7px;border:1px solid #718d96;background:#102c3beb;box-shadow:inset 0 -2px #274452}
.battle048 #hud .team small{font-size:11px;line-height:14px;color:#e6f3f0}
.battle048 #hud .team strong{font-size:12px}.battle048 #hud .health{height:5px}
.battle048 #hud .clock{min-width:0;width:86px;padding:3px 4px 5px;background:#0a283bed;border:1px solid #69848e;box-shadow:none}
.battle048 #hud .clock b{font-size:26px;line-height:27px}.battle048 #hud .clock small{font-size:9px}.battle048 #hud .clock span{font-size:10px;white-space:nowrap}
.battle048 #controls:before{content:'';position:absolute;bottom:0;left:0;right:0;height:var(--dock048);background:#0c2433;border-top:2px solid #b59855;box-shadow:inset 0 2px #1a4050;pointer-events:none}
.battle048 .skill-controls{left:calc(var(--safe-l) + 5px);bottom:calc(var(--safe-b) + 16px);gap:5px;width:calc(var(--skill-width048) - 10px)}
.battle048 .skill-controls .skill{width:calc((var(--skill-width048) - 15px)/2);height:64px;border:2px solid #6993a0;border-radius:0;background:#163b4c;box-shadow:inset 2px 2px #2c5869}
.battle048 .skill svg{width:35px;height:35px}.battle048 .skill .button-name{font-size:10px;bottom:-13px;white-space:nowrap}.battle048 .skill .charges{font-size:14px;right:0;top:-10px;background:#132a38;border:1px solid #d5b571}
.battle048 #summon{left:auto;right:calc(var(--safe-r) + 5px);bottom:calc(var(--safe-b) + 7px);width:calc(var(--draw-width048) - 10px);height:calc(var(--dock048) - 16px);border:2px solid #f3ce7c;border-radius:0;background:#9b6b29 url('assets/rank-button047.png') center/100% 145%;box-shadow:inset 2px 2px #ffdf98;overflow:visible}
.battle048 #summon canvas{width:48px;height:42px;top:0}.battle048 #summon strong{font-size:14px;bottom:24px}.battle048 #summon .tickets{bottom:0;font-size:14px;min-width:50px;border-radius:0}.battle048 #summon .plus{right:5px;top:8px;font-size:19px}.battle048 #summon .recharge{bottom:-5px}
.battle048 #combo{top:auto!important;bottom:calc(100vh - var(--view-y) - var(--view-h) + var(--safe-b) + 5px);left:calc(var(--view-x) + var(--safe-l) + var(--skill-width048));transform:none;width:calc(var(--view-w) - var(--safe-l) - var(--safe-r) - var(--skill-width048) - var(--draw-width048));max-width:none;height:calc(var(--dock048) - 11px);max-height:none;padding:0 4px;border:0!important;background:#0c2433;box-shadow:none!important;overflow:hidden}
.battle048 #combo header{height:27px;min-height:0;display:flex;gap:3px;padding:0;margin:0;border:0}
.battle048 #recipeMaterials{display:flex;align-items:center;gap:3px;min-width:0;flex:1;overflow:auto;scrollbar-width:none;font-size:10px}
.battle048 .material048{flex:0 0 auto;display:flex;align-items:center;gap:2px;min-height:26px;padding:0 3px;border:0;background:#142f3e;white-space:nowrap;font-size:10px;color:#d7e7e7}
.battle048 .material048 img{width:24px;height:24px;object-fit:contain;image-rendering:pixelated}.battle048 .combo-tools{gap:1px;flex:none}.battle048 #combo .combo-tools button{height:26px;min-height:26px;padding:1px 3px;font-size:10px}
.battle048 #choices,.battle048 #choices[data-wide039="true"]{height:calc(100% - 27px);display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important;overflow:auto;padding:0;scrollbar-width:thin}
.battle048 #choices .choice,.battle048 #choices[data-wide039="true"] .choice{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:minmax(0,1fr) 13px 10px!important;gap:0!important;min-width:0!important;min-height:0!important;height:100%!important;padding:2px!important;border:1px solid #4f8396!important;background:#173645;text-align:center!important;box-shadow:inset 1px 1px #325166!important}
.battle048 #choices .choice img,.battle048 #choices[data-wide039="true"] .choice img{width:38px!important;height:25px!important;grid-row:1!important;grid-column:1!important;justify-self:center;align-self:center}
.battle048 #choices .choice strong,.battle048 #choices[data-wide039="true"] .choice strong{grid-row:2!important;grid-column:1!important;font-size:11px!important;line-height:13px!important;white-space:nowrap}
.battle048 #choices .choice .tier,.battle048 #choices .choice>small:not(.combo-synergy),.battle048 .combo-foot,.battle048 .branch-guide039{display:none!important}
.battle048 #choices .choice .combo-synergy{display:block;grid-row:3!important;grid-column:1!important;min-height:0!important;line-height:10px!important;font-size:9px!important;color:#cce99c;overflow:auto;white-space:nowrap}
.battle048 #comboBadge{left:50%;right:auto;bottom:calc(var(--safe-b) + 22px);transform:translateX(-50%);height:44px;min-width:96px;border-radius:0;background:#234853;border:1px solid #8bb9bd}
.battle048 .recipe-book048{position:absolute;bottom:calc(var(--safe-b) + 4px);left:calc(var(--safe-l) + var(--skill-width048));height:24px;min-height:24px;font-size:10px;padding:2px 8px;background:#183b48;border:1px solid #547383;pointer-events:auto}
.battle048:has(#combo:not(.hidden)) .recipe-book048{display:none}
.battle048 #menuButton{left:auto;right:calc(var(--safe-r) + 5px);top:calc(var(--hud-edge) + 5px);width:38px;height:38px;background:#163240;border:1px solid #567881}.battle048 #menuButton .atlas-icon045{width:30px;height:30px;display:block}
.battle048 #rosterButton{right:calc(var(--safe-r) + 5px);top:calc(var(--hud-edge) + 47px);width:38px;height:38px}.battle048 #rosterButton svg{width:20px;height:20px}.battle048 #rosterButton span{font-size:9px}
.battle048 #synergyHUD{display:none!important}
.battle048 .synergy-rail048{position:absolute;left:calc(var(--safe-l) + 3px);top:calc(var(--hud-edge) + 3px);bottom:calc(var(--dock048) + 7px);width:91px;display:flex;flex-direction:column;gap:3px;overflow-y:auto;scrollbar-width:none;pointer-events:auto}
.battle048 .rail-title048{font-size:9px;color:#e0efe3;text-shadow:1px 1px #082130}
.battle048 .synergy-pill048{display:flex;align-items:center;gap:2px;width:100%;min-height:30px;padding:1px 2px;border:1px solid #5b7178;border-radius:0;background:#102839e6;color:#a8bdc3;text-align:left;flex:none}
.battle048 .synergy-pill048.active{border-color:#c6b274;background:#354639eb;color:#ffeab0}.battle048 .synergy-pill048 img{width:25px;height:26px;object-fit:contain;image-rendering:pixelated;flex:none}.battle048 .synergy-pill048 span{min-width:0;flex:1}.battle048 .synergy-pill048 strong{display:block;font-size:10px;white-space:nowrap;font-weight:normal}.battle048 .synergy-pill048 small{display:block;font-size:8px;white-space:nowrap;color:#c1d2cc}
.battle048 .toast{bottom:calc(100vh - var(--view-y) - var(--view-h) + var(--dock048) + 6px);padding:3px 7px;font-size:10px;max-width:calc(var(--view-w) - 200px)}
.battle048 .merge-feed{top:calc(var(--view-y) + var(--hud-edge) + 2px);max-width:150px;pointer-events:none}.battle048 .merge-feed.mine{left:calc(var(--view-x) + var(--safe-l) + 100px)}.battle048 .merge-feed.enemy{right:calc(100vw - var(--view-x) - var(--view-w) + var(--safe-r) + 48px)}.battle048 .merge-notice{max-width:146px;padding:3px;min-height:0}.battle048 .merge-notice img{width:25px;height:28px}.battle048 .merge-notice strong{font-size:10px}.battle048 .merge-notice small,.battle048 .merge-notice span{font-size:8px}
.battle048 #aimHint{top:auto;bottom:calc(var(--dock048) + 6px);font-size:11px;background:#172d3ae8;padding:5px 10px}.battle048 #aimHint small{display:none}
.battle048 #atlasV3 .flow-open048{grid-template-columns:1fr!important}.battle048 #atlasV3 .flow-open048>.v3-atlas-detail{display:none!important}.battle048 #atlasV3 .flow-open048>.v3-atlas-view{display:flex!important}
.flow048{min-height:0;display:flex;flex-direction:column;padding:5px!important;overflow:hidden!important}.flow-nav048{display:flex;align-items:center;gap:5px;flex:none;height:32px}.flow-nav048 strong{flex:1;min-width:0;white-space:nowrap;font-size:12px}.flow-nav048 button{min-height:30px;font-size:11px;padding:3px 8px}
.flow-columns048{display:grid;grid-template-columns:minmax(0,1fr) minmax(140px,1.1fr) minmax(0,1fr);gap:8px;min-height:0;flex:1;margin-top:6px}.flow-side048,.flow-hero048{min-width:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin}.flow-side048 h3{position:sticky;top:0;background:#152c35;margin:0 0 4px;padding:5px;font-size:12px;z-index:1}.flow-node048{display:flex;align-items:center;gap:3px;width:100%;min-height:47px;padding:3px;margin-bottom:4px;border:1px solid #627d7e;background:#1c3841;text-align:left;color:#e8e4cb}.flow-node048 img{width:38px;height:38px;object-fit:contain;image-rendering:pixelated;flex:none}.flow-node048 span{min-width:0;overflow:auto}.flow-node048 strong{display:block;font-size:11px;white-space:nowrap;font-weight:normal}.flow-node048 small{display:block;font-size:10px;white-space:nowrap}
.flow-hero048{display:flex;flex-direction:column;align-items:center;gap:4px;border-left:1px solid #43616a;border-right:1px solid #43616a;padding:4px 6px}.flow-hero048>img{width:68px;height:61px;object-fit:contain;image-rendering:pixelated;flex:none}.flow-name048{font-size:14px;white-space:nowrap}.flow-hero048 small{font-size:10px;text-align:center}.flow-skill048{font-size:10px;margin:2px 0;text-align:center;line-height:1.5}.flow-hero048 select{width:100%;font:10px Galmuri11,monospace;min-height:30px;background:#142a37;color:#eef2dd;border:1px solid #758878}.flow-hero048 button{width:100%;min-height:36px;white-space:nowrap}.flow-trait048{color:#ddca8a}.flow-base048{font-size:11px;padding:6px;line-height:1.5}.flow-side048>small{font-size:10px}
@media(max-height:450px){.battle048{--dock048:88px;--skill-width048:103px;--draw-width048:78px}.battle048 #hud{grid-template-columns:1fr 72px 1fr;padding:3px 5px;gap:5px}.battle048 #hud .clock{width:72px}.battle048 #hud .clock b{font-size:22px;line-height:23px}.battle048 #hud .team{height:31px;min-height:31px}.battle048 #hud .team small{font-size:10px}.battle048 .skill-controls .skill{height:48px}.battle048 .skill svg{width:29px;height:29px}.battle048 #summon canvas{width:40px;height:36px}.battle048 #summon strong{font-size:12px;bottom:23px}.battle048 #summon .tickets{font-size:12px}.battle048 #combo header{height:25px}.battle048 #choices,.battle048 #choices[data-wide039="true"]{height:calc(100% - 25px)}.battle048 #choices .choice img,.battle048 #choices[data-wide039="true"] .choice img{height:21px!important;width:32px!important}.battle048 .synergy-rail048{width:85px}.battle048 .synergy-pill048 strong{font-size:9px}.battle048 .synergy-pill048 img{width:22px}.battle048 .flow-hero048>img{width:51px;height:44px}.flow-name048{font-size:12px}.flow-columns048{gap:4px;grid-template-columns:minmax(0,1fr) minmax(130px,1.05fr) minmax(0,1fr)}.flow-node048{min-height:44px}.flow-node048 img{width:30px;height:33px}.flow048 .flow-nav048{height:28px}.flow-hero048{gap:2px;padding:2px 4px}.flow-skill048{font-size:9px}.battle048 #atlasV3 .codex-header{min-height:32px}.battle048 #atlasV3 .v3-racebar button{min-height:28px;padding:3px 7px;font-size:10px}}

.battle048 #hud{height:auto;min-height:0}.battle048 #hud .clock{height:54px;min-height:0;margin:0;display:flex;flex-direction:column;justify-content:center}.battle048 #hud .clock small{line-height:10px}.battle048 #hud .clock span{line-height:12px}.battle048 #controls .skill-controls{z-index:1}
.battle048 .combo-preview048{position:absolute;bottom:calc(var(--safe-b) + 5px);left:calc(var(--safe-l) + var(--skill-width048));right:calc(var(--safe-r) + var(--draw-width048));height:calc(var(--dock048) - 11px);padding:0 4px;pointer-events:auto}.battle048 .combo-preview048>header{height:25px;font-size:10px;color:#d8ce99;display:flex;align-items:center;padding-left:3px}.battle048 .preview-targets048{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;height:calc(100% - 25px)}.battle048 .preview-choice048{display:grid;grid-template-rows:1fr 13px 10px;justify-items:center;align-items:center;gap:0;min-width:0;min-height:44px;padding:2px;border:1px solid #476772;background:#16313e}.battle048 .preview-choice048 img{width:30px;height:24px;object-fit:contain;image-rendering:pixelated}.battle048 .preview-choice048 strong{font-size:10px;line-height:13px;white-space:nowrap;font-weight:normal}.battle048 .preview-choice048 small{font-size:9px;line-height:10px;color:#b5c8c8}.battle048:has(#combo:not(.hidden)) .combo-preview048{display:none}.battle048 #comboBadge{left:auto;right:calc(var(--safe-r) + var(--draw-width048) + 4px);bottom:calc(var(--safe-b) + var(--dock048) - 32px);transform:none;min-width:62px;height:24px;min-height:24px;padding:1px 5px;font-size:10px;z-index:2}.battle048 .recipe-book048{left:calc(var(--safe-l) + var(--skill-width048) + 64px);bottom:calc(var(--safe-b) + var(--dock048) - 32px);z-index:2}

.battle048 .settings045:has(.battle-settings048){grid-template-columns:repeat(3,minmax(0,1fr));align-content:start;gap:9px}.battle048 .settings045:has(.battle-settings048) .settings-group045{gap:10px}.battle048 .battle-settings048 button:last-child{color:#ffe0c7;border-color:#bd8b70}.battle048 .settings045:has(.battle-settings048) button{font-size:12px;min-height:44px;padding:4px}

.flow-range051{white-space:nowrap;color:#e9d9a6}

/* Stable, readable notice rows; symmetric opponent portrait and text alignment. */
.battle048 .merge-feed.merge-feed{width:clamp(160px,22vw,186px);max-width:calc(50vw - 24px);gap:6px}
.battle048 .merge-feed .merge-notice{width:100%;max-width:none;height:66px;min-height:66px;padding:5px 7px;gap:6px;box-sizing:border-box;overflow:hidden}
.battle048 .merge-feed .merge-notice img{width:32px;height:40px}
.battle048 .merge-feed .merge-notice>div{min-width:0;flex:1}
.battle048 .merge-feed .notice-meta{display:block;text-align:inherit}
.battle048 .merge-feed .merge-notice small{font-size:9px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.battle048 .merge-feed .merge-notice strong{font-size:11px;line-height:14px;height:28px;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:keep-all;overflow-wrap:anywhere}
.battle048 .merge-feed .notice-detail{flex-wrap:nowrap;gap:4px;line-height:12px}
.battle048 .merge-feed .notice-detail .tier-badge{font-size:8px;padding:1px 4px}
.battle048 .merge-feed.enemy .merge-notice{animation-name:notice-drop-enemy263}
.battle048 .merge-feed.enemy .merge-notice.tier-4{animation-name:notice-drop-enemy263,tier4-legendary-pulse}
@keyframes notice-drop-enemy263{from{opacity:0;transform:translate(10px,-8px)}to{opacity:1;transform:translate(0,0)}}
@media(prefers-reduced-motion:reduce){.battle048 .merge-feed .merge-notice{animation:none!important}}
