/* A smaller preparation HUD gives useful space back to the company. */
body[data-screen=setup] main>header{height:28px!important;min-height:28px!important;flex:0 0 28px!important;padding-top:0!important;padding-bottom:0!important}
body[data-screen=setup] main>header .brand-lockup h1{font-size:23px!important;line-height:1!important}body[data-screen=setup] main>header .brand-lockup p{display:none!important}
body[data-screen=setup] main>.panel{padding-top:3px!important;padding-bottom:5px!important;margin:3px 0 6px!important}
body[data-screen=setup] main>.panel .topbar{min-height:32px!important;height:32px!important;flex-wrap:nowrap!important;margin:0!important}
body[data-screen=setup] main>.panel .round-track-label{line-height:1.1!important}
#screen-setup,body.mobile-edge-to-edge #screen-setup{grid-template-rows:minmax(0,1fr) 140px!important}
#screen-setup[data-storage-empty=true],body.mobile-edge-to-edge #screen-setup[data-storage-empty=true]{grid-template-rows:minmax(0,1fr) 120px!important}
#screen-setup[data-creature-details=true],body.mobile-edge-to-edge #screen-setup[data-creature-details=true]{grid-template-rows:minmax(0,1fr) max-content!important}
/* Name, level/charge and element each have their own line; stats never hang below the frame. */
#screen-setup #formationPanel .formation-layout .slot{--party-main:48px;--party-portrait:44px}
#screen-setup #formationPanel .formation-layout .slot .formation-card-main,body.mobile-edge-to-edge #screen-setup #formationPanel .formation-layout .slot .formation-card-main{height:var(--party-main)!important;min-height:var(--party-main)!important;flex-basis:var(--party-main)!important}
#screen-setup #formationPanel .formation-layout .slot .formation-card-identity{overflow:visible!important;gap:2px!important}
#screen-setup #formationPanel .formation-layout .slot .formation-name-line{width:100%!important;height:auto!important;min-height:0!important;display:block!important;overflow:visible!important}
#screen-setup #formationPanel .formation-layout .slot .unitname{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:normal!important;font-size:13px!important;line-height:1.1!important}
#screen-setup .party-level-line{display:flex;align-items:center;gap:5px;white-space:nowrap;min-height:12px}
#screen-setup .party-charge-badge{font:600 9px/1.1 system-ui;color:#b6d8ce;white-space:nowrap}
#screen-setup #formationPanel .formation-layout .slot .creature-inline-level{height:13px!important;min-height:13px!important;font-size:9px!important;padding:0 3px!important}
#screen-setup #formationPanel .formation-layout .slot .formation-card-element{font-size:9px!important;line-height:1.1!important}
#screen-setup #formationPanel .formation-layout .slot .slot-inline-stats,body.mobile-edge-to-edge #screen-setup #formationPanel .formation-layout .slot .slot-inline-stats{min-height:14px!important;height:14px!important;flex:0 0 14px!important;align-items:center!important}
#screen-setup #formationPanel .slot .stat-charge{display:none!important}
@supports(height:1cqh){#screen-setup #formationPanel .formation-layout .slot{--party-main:clamp(40px,calc(100cqh - 17px),56px);--party-portrait:min(48px,var(--party-main))}}
/* The lower preparation panel becomes the selected creature's page, without obscuring the shop. */
#inlineCreatureDetails{display:flex;flex-direction:column;gap:7px;width:100%;height:auto;min-height:0;box-sizing:border-box;color:#e5e7dc;text-align:left}
#screen-setup[data-creature-details=true] #terrainPanel>.storage-heading,#screen-setup[data-creature-details=true] #terrainPanel>#roster,#screen-setup[data-creature-details=true] #terrainPanel>#quickEquipment,#screen-setup[data-creature-details=true] #terrainPanel>.storage-toolbar{display:none!important}
#inlineCreatureDetails .inline-creature-heading{display:flex!important;align-items:center!important;justify-content:space-between!important;height:auto!important;min-height:32px!important;padding:0!important;gap:8px!important;flex:none}
.inline-creature-identity{display:flex;align-items:center;gap:8px;min-width:0}.inline-detail-art{width:32px;height:32px;flex:none;border-radius:50%;object-fit:contain;border:1px solid #bba16d88}
.inline-creature-identity strong{display:block;font:700 17px/1.1 Georgia,serif;color:#f0d7a8}.inline-creature-identity small{display:block;margin-top:3px;font:9px/1.2 system-ui;color:#acbfbe}
#inlineCreatureBack{font-size:10px!important;padding:4px 6px!important;min-height:26px!important;white-space:nowrap}
.inline-creature-copy{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;flex:0 0 auto;min-height:auto;align-content:start}.inline-creature-copy.single-special{grid-template-columns:1fr}
.inline-creature-copy section{min-width:0}.inline-creature-copy section>small{display:block;font:600 9px/1.1 system-ui;letter-spacing:.12em;color:#c7ad7a;margin:2px 8px 0 0;float:left}.inline-creature-copy p{margin:0;font:12px/1.4 system-ui;color:#dce5df;overflow-wrap:break-word}
#inlineCreatureDetails footer{display:flex;align-items:center;justify-content:space-between;gap:7px;padding-top:5px;border-top:1px solid #b99d6433;flex:none}
.inline-creature-stats{font:10px/1.3 system-ui;color:#b4cbc4;min-width:0;flex:1}.inline-creature-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px;flex:none}
#inlineCreatureDetails .inline-creature-actions button{min-height:27px!important;padding:5px 8px!important;font-size:10px!important;white-space:nowrap}
#screen-setup #shopPanel #offers .offer.ability-focused{border-color:#f2d8a2!important;box-shadow:inset 0 0 0 1px #e9cb8c44,0 0 12px #e9cb8c22!important}
/* Calm halos in the party; ornamental linework belongs in the shop. */
#screen-setup #formationPanel .element-filigree{display:none!important}
#screen-setup #shopPanel [data-whimsy-element=Water] .element-filigree{width:54px;height:54px;margin:-27px 0 0 -27px;rotate:0deg;opacity:.6}
#screen-setup #shopPanel [data-whimsy-element=Water] .filigree-keyline{display:none}
#screen-setup #terrainPanel #roster{min-height:24px!important}
#screen-setup #waitingCompany{gap:8px;height:26px;min-height:26px;justify-content:flex-start;overflow:hidden}
#screen-setup #waitingCompany svg{width:23px!important;height:26px!important;flex:0 0 23px!important}
#screen-setup #waitingCompany span{font:italic 11px/1.2 Georgia,serif;max-width:none;white-space:nowrap}
/* A distinct event accent, rather than another persistent decorative circle. */
#screen-setup .arrival-attached svg{display:none!important}
#screen-setup .summoner-arrival.arrival-attached{border-radius:50%;box-shadow:0 0 0 1px #edd29b99,0 0 16px #e6c17844;animation:arrival-settle250 .65s cubic-bezier(.2,.7,.3,1) both}
#screen-setup .summoner-arrival.arrival-attached.is-merge{box-shadow:0 0 0 1px #e1cbf5aa,0 0 20px #d3b6f65c;animation:merge-lift250 .8s cubic-bezier(.2,.7,.3,1) both}
#screen-setup .arrival-attached.is-merge::before,#screen-setup .arrival-attached.is-merge::after{content:'✧';position:absolute;top:0;left:15%;font:12px Georgia;color:#e5d6f2;animation:merge-spark250 .8s ease-out both;pointer-events:none}
#screen-setup .arrival-attached.is-merge::after{left:auto;right:6%;top:24%;animation-delay:.05s}
@keyframes arrival-settle250{0%{opacity:0;translate:0 3px;scale:.94}30%{opacity:.8}100%{opacity:0;translate:0 0;scale:1.02}}
@keyframes merge-lift250{0%{opacity:0;translate:0 2px;scale:.96}35%{opacity:.9;translate:0 -3px;scale:1.03}100%{opacity:0;translate:0 0;scale:1.06}}
@keyframes merge-spark250{0%{opacity:0;translate:0 3px}25%{opacity:.8}100%{opacity:0;translate:2px -8px}}
@media(prefers-reduced-motion:reduce){#screen-setup .arrival-attached,#screen-setup .arrival-attached::before,#screen-setup .arrival-attached::after{animation:none!important;display:none!important}}

#screen-setup[data-creature-details=true] #terrainPanel>:not(#inlineCreatureDetails){display:none!important}
#screen-setup .unit-avatar:has(>.summoner-arrival.is-merge) .formation-art,#screen-setup .chip:has(>.summoner-arrival.is-merge) .roster-art{animation:portrait-merge250 .8s cubic-bezier(.2,.7,.3,1) both}
@keyframes portrait-merge250{0%,100%{transform:translateY(0) scale(1);filter:brightness(1)}35%{transform:translateY(-2px) scale(1.035);filter:brightness(1.18)}}
@media(prefers-reduced-motion:reduce){#screen-setup .unit-avatar .formation-art,#screen-setup .chip .roster-art{animation:none!important}}
