/* v53: compact battle, same cascade for browser mobile and native WebView. */
.v53-armor-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:6px 0}
.v53-armor-strip:has(>.v53-armor:only-child){grid-template-columns:minmax(0,1fr)}
.v53-armor{min-width:0;border:1px solid #53697c;border-radius:10px;background:#132638}
.v53-armor.active{border-color:#b98cec;background:#302744}
.v53-armor summary{cursor:pointer;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 8px;min-height:38px;padding:8px 10px;font-size:12px;line-height:1.4}
.v53-armor summary span{min-width:0;overflow-wrap:anywhere}.v53-armor summary small{color:#c6d7e4;font-size:11px}.v53-armor p{margin:0;padding:0 10px 10px;color:#d3e2ef;font-size:12px;line-height:1.5}
.v53-battle-dock{min-width:0}
@media(max-width:720px){
 #app .battle-shell .battle-compact{padding:6px 6px calc(10px + env(safe-area-inset-bottom))!important}
 #app .battle-shell .battle-mobile-brief{margin:0 0 5px!important;gap:4px!important}
 #app .battle-shell .mobile-arena-card,#app .battle-shell .mobile-objective-card{min-height:0!important;padding:6px 8px!important;gap:2px!important}
 #app .battle-shell .mobile-arena-card small,#app .battle-shell .mobile-objective-card small{font-size:8px!important}
 #app .battle-shell .mobile-arena-card b,#app .battle-shell .mobile-objective-card b{font-size:11px!important;line-height:1.3!important}
 #app .battle-shell .mobile-arena-card span,#app .battle-shell .mobile-objective-card span{font-size:10px!important;line-height:1.35!important}
 #app .battle-shell .team-identity-header{margin:4px 0!important}
 #app .battle-shell .mobile-team-identity{padding:5px 8px!important;gap:7px!important;min-height:38px!important}
 #app .battle-shell .mobile-team-avatar{width:28px!important;height:28px!important;flex-basis:28px!important}
 #app .battle-shell .mobile-team-copy{display:flex!important;flex-wrap:wrap!important;gap:3px 7px!important;align-items:center!important}
 #app .battle-shell .mobile-team-copy>small{font-size:8px!important}
 #app .battle-shell .mobile-team-copy>b{font-size:12px!important;max-width:45%;overflow:hidden;text-overflow:ellipsis}
 #app .battle-shell .mobile-team-pointline{margin:0!important;gap:5px!important;margin-left:auto!important}
 #app .battle-shell .mobile-team-pointline>span{font-size:11px!important}
 #app .battle-shell .mobile-team-pointline .points{display:flex!important;gap:3px!important;margin:0!important;flex:0 0 auto}
 #app .battle-shell .mobile-team-pointline .point-dot{width:8px!important;height:8px!important;border-radius:3px;flex:0 0 8px}
 #app .battle-shell .mobile-team-pointline{flex-basis:100%;margin-left:0!important;flex-wrap:wrap}
 #app .battle-shell .unit-row{gap:5px!important;padding-top:4px!important;margin:0!important;align-items:stretch}
 #app .battle-shell .unit-card{display:flex!important;flex-direction:column!important;min-height:0!important;height:auto!important;padding:6px!important;justify-content:flex-start!important;overflow:visible!important}
 #app .battle-shell .unit-card .unit-art{position:relative!important;inset:auto!important;transform:none!important;width:100%!important;height:64px!important;min-height:64px!important;max-height:64px!important;padding:2px!important;margin:0 0 4px!important;overflow:visible!important}
 #app .battle-shell .unit-card .living-figure{position:relative!important;inset:auto!important;width:100%!important;height:100%!important;display:flex!important;align-items:center!important;justify-content:center!important}
 #app .battle-shell .unit-card .battle-unit-image{width:100%!important;height:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important;transform:none!important}
 #app .battle-shell .unit-card .unit-meta{position:relative!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:3px!important;flex:1}
 #app .battle-shell .unit-card .unit-meta .type{font-size:7px!important;line-height:1.2!important;letter-spacing:0!important}
 #app .battle-shell .unit-card .unit-meta h4{font-size:11px!important;line-height:1.25!important;margin:3px 0!important;min-height:28px;max-height:none!important;overflow:visible!important;white-space:normal!important;overflow-wrap:anywhere}
 #app .battle-shell .unit-card .hp-block{display:flex!important;flex-direction:row!important;align-items:baseline!important;justify-content:flex-end!important;gap:2px!important;margin-top:auto!important}
 #app .battle-shell .unit-card .hp-block b{font-size:14px!important}.unit-card .hp-block small{font-size:9px!important}
 #app .battle-shell .unit-card .hpbar{position:relative!important;min-height:4px!important;margin-top:4px!important;width:100%!important;flex-shrink:0}
 #app .battle-shell .unit-card .statusline{top:3px!important;right:3px!important;z-index:12;max-width:100%;gap:2px!important;flex-wrap:wrap}
 #app .battle-shell .unit-card .mini-status{width:22px!important;height:22px!important;font-size:12px!important}
 #app .battle-shell .unit-card .unit-lock-badge{font-size:8px!important;padding:3px!important}
 #app .battle-shell .battle-intent-inline{margin:4px 0!important;padding:6px 8px!important}
 #app .battle-shell .battle-intent-inline b{font-size:11px!important}
 #app .battle-shell .battle-turn-bridge{margin:4px 0!important;padding:7px 8px!important;font-size:11px!important}
 #app .battle-shell .battle-turn-bridge b{font-size:11px!important}
 #app .battle-shell .v53-armor-strip{grid-template-columns:minmax(0,1fr);margin:4px 0;gap:4px}
 #app .battle-shell .v53-armor summary{min-height:36px;padding:6px 8px;font-size:11px}
 #app .battle-shell .v53-battle-dock{position:sticky;bottom:env(safe-area-inset-bottom,0px);z-index:45;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);align-items:stretch;gap:6px;padding:6px 0;margin-top:5px;background:#081c2bf2}
 #app .battle-shell .v53-battle-dock .hand-drawer-toggle{position:static!important;min-height:44px!important;margin:0!important;padding:7px!important;font-size:11px!important;display:flex;flex-wrap:wrap;align-content:center;gap:3px}
 #app .battle-shell .v53-battle-dock .always-end-turn{margin:0!important;padding:0!important;display:flex!important;gap:5px!important}
 #app .battle-shell .v53-battle-dock .always-end-turn>small{display:none!important}
 #app .battle-shell .v53-battle-dock .end-turn-btn{min-height:44px!important;width:100%;font-size:12px!important;padding:8px!important}
 #app .battle-shell .v53-battle-dock:has(.beginner-actions){grid-template-columns:1fr}
 #app .battle-shell .selected-action-panel{max-height:calc(100dvh - 24px);overflow-y:auto;padding-bottom:calc(9px + env(safe-area-inset-bottom))}
 #app .battle-shell .selected-close,#app .battle-shell .hand-drawer-head .icon-btn{min-width:44px!important;min-height:44px!important}
 #app .battle-shell .compact-actions button{min-height:44px!important;font-size:11px!important}
}
@media(max-width:360px),(max-height:600px) and (max-width:720px){#app .battle-shell .unit-card .unit-art{height:52px!important;min-height:52px!important;max-height:52px!important}}

/* v54: filled Point indicators are green in PvE and PvP; keep text + lightning. */
#app .battle-shell .point-dot{background:#183348;border-color:#45627a}
#app .battle-shell .point-dot.on{background:#36d986!important;border-color:#91f6b7!important;box-shadow:0 0 4px #36d98640}

/* v55: larger native artwork, current wordmark, compact mobile navigation. */
#app .topbar .brand-logo{width:140px;height:48px;object-fit:contain;background:transparent;padding:0;border-radius:0}
#app .auth-gate-brand img{width:140px;height:52px;object-fit:contain;background:transparent;padding:0}
@media(max-width:720px){
 #app .battle-shell .unit-card .unit-art{height:clamp(88px,24vw,150px)!important;min-height:clamp(88px,24vw,150px)!important;max-height:none!important;padding:0!important;margin:0 0 4px!important}
 #app .battle-shell .unit-card .living-figure{width:100%!important;height:100%!important}
 #app .battle-shell .unit-card .battle-unit-image{width:100%!important;height:100%!important;object-fit:contain!important}
 #app .battle-shell .mobile-team-avatar img,#app .battle-shell .mobile-team-avatar .avatar-icon-art img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important}
 #app .topbar.v55-mobile-header{display:grid!important;grid-template-columns:minmax(70px,1fr) auto auto auto!important;align-items:center!important;gap:5px!important;padding:6px 0 10px!important;position:relative;overflow:visible!important}
 #app .v55-mobile-header .brand-lockup{display:flex;flex-direction:column;align-items:flex-start;min-width:0;gap:2px}
 #app .v55-mobile-header .brand-logo{width:116px;max-width:100%;height:36px!important;object-fit:contain}
 .v55-header-title{font-size:10px;color:#b7d6e7;line-height:1.3;overflow-wrap:anywhere}
 #app .v55-mobile-header>button{min-height:44px!important;margin:0!important;padding:7px!important;min-width:0!important}
 #app .v55-mobile-header .account-top-btn{display:flex;align-items:center;gap:4px;max-width:96px!important;font-size:11px!important}
 #app .v55-mobile-header .account-top-btn>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:58px}
 .v55-profile-thumb{width:24px;height:24px;border-radius:50%;object-fit:cover;flex-shrink:0}
 #app .v55-mobile-header .notif-top-btn{width:44px!important;font-size:16px!important}
 .v55-header-menu{position:static;min-width:0}.v55-header-menu>summary{display:flex;align-items:center;justify-content:center;min-height:44px;padding:7px;font-size:11px;cursor:pointer;border:1px solid #355970;border-radius:14px;background:#112c3f;color:white;box-sizing:border-box;list-style:none}.v55-header-menu>summary::-webkit-details-marker{display:none}
 .v55-header-menu>div{position:absolute;z-index:90;right:0;top:100%;width:min(320px,100%);box-sizing:border-box;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:12px;border:1px solid #3d647b;border-radius:14px;background:#0a2030;box-shadow:0 10px 35px #0009;max-height:65dvh;overflow-y:auto}
 .v55-header-menu:not([open])>div{display:none!important}
 #app .v55-header-menu .pill-btn{width:100%;min-height:44px!important;font-size:12px!important;padding:9px!important;margin:0!important;white-space:normal}
}

/* Evolution artwork retains the existing card's dimensions and never crops the figure. */
.battle-unit-image.evolution-unit-image{object-fit:contain!important;object-position:center!important;width:100%;height:100%;max-width:100%;max-height:100%}
.evolution-transformation{position:fixed;inset:0;z-index:10020;display:grid;place-items:center;padding:12px;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom));background:rgba(3,12,23,.92);box-sizing:border-box;overflow:auto}
.evolution-reveal{position:relative;text-align:center;width:min(100%,430px);max-height:100%;box-sizing:border-box;border:1px solid #b5f9ff;border-radius:24px;padding:18px;background:radial-gradient(ellipse at 50% 36%,#216170 0%,#0a2439 48%,#06111f 85%);box-shadow:0 0 30px #6deaff55;color:#f6ffff}
.evolution-kicker{font-size:11px;letter-spacing:.18em;color:#a2e7ed;font-weight:800}
.evolution-stage{position:relative;height:clamp(120px,34vh,300px);height:clamp(100px,34dvh,300px);margin:8px auto;max-width:100%;isolation:isolate}
.evolution-stage img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center;max-width:100%;max-height:100%}
.evolution-before{animation:evolution-old 1.4s ease-out both}
.evolution-after{animation:evolution-new 2s .9s ease-out both}
.evolution-ring{position:absolute;inset:12%;border:2px solid #b6fff3;border-radius:50%;box-shadow:0 0 24px #70ffdd,inset 0 0 24px #70ffdd;animation:evolution-ring 2.8s ease-out both;z-index:-1}
.evolution-reveal h2{font-size:clamp(17px,5vw,24px);margin:6px 0;line-height:1.15;overflow-wrap:anywhere}
.evolution-title{font-size:15px;font-weight:900;letter-spacing:.2em;color:#c8fff2}
.evolution-reveal p{font-size:13px;line-height:1.45;margin:8px 0 12px;color:#cee1ed}
.evolution-skip{min-height:40px;touch-action:manipulation}
@keyframes evolution-old{0%{opacity:1;transform:scale(.92)}70%{opacity:.6;filter:brightness(2);transform:scale(1)}100%{opacity:0;transform:scale(.9)}}
@keyframes evolution-new{0%{opacity:0;transform:scale(.7)}40%{opacity:1;filter:brightness(1.4)}100%{opacity:1;transform:scale(1);filter:brightness(1)}}
@keyframes evolution-ring{0%{opacity:0;transform:scale(.4) rotate(-30deg)}45%{opacity:1}100%{opacity:.3;transform:scale(1.2) rotate(30deg)}}
@media(max-height:500px) and (orientation:landscape){.evolution-reveal{width:min(100%,560px);display:grid;grid-template-columns:44% 1fr;align-items:center;padding:12px;column-gap:12px}.evolution-stage{grid-column:1;grid-row:1/6;width:100%;height:64vh;margin:0}.evolution-kicker,.evolution-reveal h2,.evolution-title,.evolution-reveal p,.evolution-skip{grid-column:2}.evolution-reveal p{margin:4px}}
@media(prefers-reduced-motion:reduce){.evolution-before{display:none}.evolution-after,.evolution-ring{animation:none}.evolution-ring{opacity:.3}}

/* Keep portrait evolution assets within the reserved art box, including flex layouts. */
#app .battle-shell .unit-card.unit-champion .unit-art .living-figure{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important}
#app .battle-shell .unit-card.unit-champion .evolution-unit-image{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important}

/* v57: square brand icon for application UI; wordmark reserved for intro/credits. */
#app .topbar .brand-logo{width:44px!important;height:44px!important;max-width:44px;object-fit:contain;background:transparent;padding:0;border-radius:10px}
#app .auth-gate-brand img,#app .setup-logo{width:56px!important;height:56px!important;object-fit:contain;border-radius:12px}
@media(max-width:720px){#app .v55-mobile-header .brand-logo{width:36px!important;height:36px!important;max-width:36px}#app .v55-mobile-header .brand-lockup{flex-direction:row;align-items:center;gap:5px}.v55-header-title{font-size:9px}}

/* v59.57.2: compact Champion preview in the civilization deck editor */
.v51-evolution-preview{margin-top:10px;padding:10px;border:1px solid rgba(125,211,252,.25);border-radius:14px;background:rgba(3,18,31,.38)}
.v51-evolution-preview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:8px}
.v51-evolution-preview-grid article{min-width:0;text-align:center;padding:6px;border-radius:10px;background:rgba(255,255,255,.05)}
.v51-evo-images{height:72px;display:flex;align-items:center;justify-content:center;gap:4px}.v51-evo-images img{width:42px;height:62px;object-fit:contain}.v51-evo-images span{font-size:16px;color:#f7c948}
.v51-evolution-preview-grid strong,.v51-evolution-preview-grid small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.v51-evolution-preview-grid small,.v51-evolution-note{font-size:11px;color:#b8cfda}.v51-evolution-note{display:block;margin-top:8px}
@media(max-width:560px){.v51-evolution-preview-grid{gap:5px}.v51-evolution-preview-grid article{padding:4px}.v51-evo-images{height:58px}.v51-evo-images img{width:32px;height:50px}.v51-evolution-preview-grid strong{font-size:11px}.v51-evolution-preview-grid small{font-size:9px}.v51-evolution-preview{padding:8px}}

/* v59.68.5 battle feedback patch: enemy mirrors the player, rank badge under info, and evolution cards are hand-based. */
#app .battle-shell .unit-card.enemy-unit .battle-unit-image,
#app .battle-shell .unit-card.enemy-unit .evolution-unit-image{transform:scaleX(-1)!important;transform-origin:center center!important}
#app .battle-shell .unit-card.enemy-unit .living-figure{transform:none!important}
#app .battle-shell .r68-rankline{display:flex;justify-content:flex-start;align-items:center;margin-top:4px}
#app .battle-shell .r68-rank{display:inline-flex;align-items:center;justify-content:center;min-width:30px;padding:2px 10px;border-radius:999px;border:1px solid rgba(241,212,139,.55);background:rgba(11,40,53,.85);color:#ffe9a6;font-weight:800;font-size:11px;letter-spacing:.08em}
#app .battle-shell .unit-card .unit-meta{gap:4px!important}
#app .battle-shell .unit-card .unit-meta h4{margin-bottom:1px!important}
#app .battle-shell .statusline .r68-evolve{display:none!important}
#app .battle-shell .action-card.r68-evolution-card{box-shadow:0 0 0 1px rgba(254,226,135,.45),0 8px 24px rgba(0,0,0,.22)!important;background:linear-gradient(180deg,rgba(28,52,70,.98),rgba(11,29,43,.98))!important}
#app .battle-shell .action-card.r68-evolution-card .kind{background:rgba(254,226,135,.16)!important;color:#ffe9a6!important}
#app .battle-shell .action-card.r68-evolution-card .cost{background:#f2d28b!important;color:#2a1e04!important}
#app .battle-shell .action-card.r68-evolution-card .a-icon{display:grid;grid-template-columns:96px 1fr;gap:10px;align-items:stretch}
#app .battle-shell .action-card.r68-evolution-card .support-card-icon{width:96px!important;height:128px!important;border-radius:14px;background:linear-gradient(180deg,#173444,#0b1f2d)!important;display:flex;align-items:center;justify-content:center;font-size:40px}
@media(max-width:720px){
  #app .battle-shell .action-card.r68-evolution-card .a-icon{grid-template-columns:84px 1fr}
  #app .battle-shell .action-card.r68-evolution-card .support-card-icon{width:84px!important;height:118px!important;font-size:34px}
}

/* v59.68.6 REV 6: denser hand-card layout with readable copy and structured 01.C / 02.B / 03.A / 04.S asset naming. */
#app .battle-shell .hand-grid-2x2>.action-card{
  display:grid!important;
  grid-template-columns:96px minmax(0,1fr)!important;
  grid-template-areas:
    "icon kind"
    "icon title"
    "icon text"
    "icon owner"!important;
  align-items:start!important;
  column-gap:10px!important;
  row-gap:3px!important;
  min-height:148px!important;
  padding:9px 10px 10px!important;
  position:relative!important;
  overflow:hidden!important;
}
#app .battle-shell .hand-grid-2x2>.action-card .kind{
  grid-area:kind!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-self:start!important;
  width:max-content!important;
  max-width:calc(100% - 42px)!important;
  margin:0!important;
  padding:2px 8px!important;
  border-radius:999px!important;
  font-size:10px!important;
  letter-spacing:.06em!important;
  line-height:1.15!important;
}
#app .battle-shell .hand-grid-2x2>.action-card .cost{
  position:absolute!important;
  top:8px!important;
  right:8px!important;
  width:26px!important;
  height:26px!important;
  font-size:12px!important;
}
#app .battle-shell .hand-grid-2x2>.action-card .a-icon{
  grid-area:icon!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:96px!important;
  min-width:96px!important;
  height:126px!important;
  min-height:126px!important;
  max-height:126px!important;
  margin:0!important;
  padding:6px!important;
  border-radius:14px!important;
  background:rgba(4,17,27,.24)!important;
  overflow:hidden!important;
}
#app .battle-shell .hand-grid-2x2>.action-card .a-icon img,
#app .battle-shell .hand-grid-2x2>.action-card .a-icon .skill-art-img,
#app .battle-shell .hand-grid-2x2>.action-card .a-icon .support-card-icon img,
#app .battle-shell .hand-grid-2x2>.action-card .a-icon .card-art-image img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
}
#app .battle-shell .hand-grid-2x2>.action-card h5{
  grid-area:title!important;
  margin:0!important;
  min-width:0!important;
  font-size:13px!important;
  line-height:1.18!important;
  max-height:33px!important;
  overflow:hidden!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
}
#app .battle-shell .hand-grid-2x2>.action-card p{
  grid-area:text!important;
  margin:0!important;
  min-width:0!important;
  font-size:11px!important;
  line-height:1.28!important;
  color:#d7e7ea!important;
  max-height:58px!important;
  overflow:hidden!important;
  display:-webkit-box!important;
  -webkit-line-clamp:4!important;
  -webkit-box-orient:vertical!important;
}
#app .battle-shell .hand-grid-2x2>.action-card .owner-name-tag,
#app .battle-shell .hand-grid-2x2>.action-card .fallen-skill{
  grid-area:owner!important;
  margin-top:2px!important;
  align-self:end!important;
  justify-self:start!important;
  max-width:100%!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  font-size:9px!important;
}
#app .battle-shell .hand-grid-2x2>.action-card .owner-thumb{
  top:auto!important;
  bottom:7px!important;
  right:7px!important;
}
#app .battle-shell .hand-grid-2x2>.action-card.r68-evolution-card .a-icon,
#app .battle-shell .hand-grid-2x2>.action-card.option .a-icon,
#app .battle-shell .hand-grid-2x2>.action-card.point .a-icon{
  background:linear-gradient(180deg,rgba(22,53,72,.95),rgba(10,26,38,.92))!important;
}
#app .battle-shell .hand-grid-2x2>.action-card.r68-evolution-card .kind{background:rgba(254,226,135,.18)!important;color:#ffe7a0!important}
#app .battle-shell .hand-grid-2x2>.action-card.option .kind{background:rgba(237,156,204,.17)!important}
#app .battle-shell .hand-grid-2x2>.action-card.point .kind{background:rgba(240,214,155,.16)!important}

@media(max-width:900px){
  #app .battle-shell .hand-grid-2x2>.action-card{
    grid-template-columns:82px minmax(0,1fr)!important;
    min-height:136px!important;
    padding:8px!important;
    column-gap:8px!important;
  }
  #app .battle-shell .hand-grid-2x2>.action-card .a-icon{
    width:82px!important;min-width:82px!important;height:112px!important;min-height:112px!important;max-height:112px!important;
  }
  #app .battle-shell .hand-grid-2x2>.action-card h5{font-size:12px!important;max-height:30px!important}
  #app .battle-shell .hand-grid-2x2>.action-card p{font-size:10px!important;line-height:1.24!important;max-height:50px!important;-webkit-line-clamp:4!important}
  #app .battle-shell .hand-grid-2x2>.action-card .kind{font-size:9px!important}
}
@media(max-width:720px){
  #app .battle-shell .hand-grid-2x2>.action-card{
    grid-template-columns:68px minmax(0,1fr)!important;
    min-height:122px!important;
    padding:7px 7px 8px!important;
    column-gap:7px!important;
    row-gap:2px!important;
  }
  #app .battle-shell .hand-grid-2x2>.action-card .a-icon{
    width:68px!important;min-width:68px!important;height:94px!important;min-height:94px!important;max-height:94px!important;padding:4px!important;border-radius:12px!important;
  }
  #app .battle-shell .hand-grid-2x2>.action-card .kind{font-size:8px!important;padding:2px 6px!important;max-width:calc(100% - 34px)!important}
  #app .battle-shell .hand-grid-2x2>.action-card .cost{top:6px!important;right:6px!important;width:22px!important;height:22px!important;font-size:10px!important}
  #app .battle-shell .hand-grid-2x2>.action-card h5{font-size:11px!important;line-height:1.14!important;max-height:26px!important}
  #app .battle-shell .hand-grid-2x2>.action-card p{font-size:9px!important;line-height:1.18!important;max-height:42px!important;-webkit-line-clamp:4!important}
  #app .battle-shell .hand-grid-2x2>.action-card .owner-name-tag,
  #app .battle-shell .hand-grid-2x2>.action-card .fallen-skill{font-size:8px!important}
  #app .battle-shell .hand-grid-2x2>.action-card .owner-thumb{display:none!important}
}


/* === REV10 mobile refinement === */
@media(max-width:760px){
 #app .battle-shell .unit-card .unit-art{height:clamp(82px,23vw,128px)!important;min-height:clamp(82px,23vw,128px)!important}
 #app .battle-shell .unit-card .battle-unit-image{object-position:center bottom!important}
 #app .battle-shell .selected-action-panel{bottom:min(41dvh,292px)!important;max-height:34dvh!important}
 #app .battle-shell .always-end-turn{padding:4px!important}
 #app .battle-shell .end-turn-btn{min-height:34px!important;font-size:11px!important}
}
@media(max-width:430px){
 #app .battle-shell .unit-card .unit-art{height:72px!important;min-height:72px!important}
 #app .battle-shell .selected-action-panel{bottom:min(43dvh,286px)!important;max-height:35dvh!important}
}


/* === RIMBA REV10 COMPLETE - transformation cutscene, original procedural audio === */
.evolution-transformation.evolution-r68{
  z-index:11020!important;
  background:radial-gradient(circle at 50% 44%,rgba(31,79,100,.74),rgba(2,11,25,.97) 72%)!important;
  -webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);
}
.evolution-r68 .evolution-reveal{
  position:relative!important;width:min(96vw,490px)!important;
  padding:clamp(12px,3vw,22px)!important;
  overflow:hidden!important;border:1px solid rgba(140,224,255,.72)!important;
  background:linear-gradient(170deg,rgba(18,73,96,.98),rgba(7,25,44,.99) 60%,rgba(9,18,37,.99))!important;
  box-shadow:0 0 0 1px rgba(255,255,255,.06),0 20px 60px rgba(0,0,0,.6),0 0 44px rgba(105,206,255,.22)!important;
}
.evolution-r68 .evolution-reveal::before{
  content:"";position:absolute;inset:-70%;pointer-events:none;
  background:repeating-conic-gradient(from 5deg,transparent 0deg 12deg,rgba(97,206,245,.07) 13deg 16deg,transparent 17deg 34deg);
  animation:r10PortalSpin 8s linear infinite;transform-origin:center;
}
.evolution-r68 .evolution-reveal>*{position:relative;z-index:2}
.evolution-r68 .evolution-kicker{font-weight:900;letter-spacing:.13em;font-size:clamp(9px,2vw,12px);color:#a9f3ff}
.evolution-r68 .evolution-stage.compact-rank-evo{
  position:relative;isolation:isolate;
  margin:8px auto!important;
  width:min(100%,360px)!important;
  height:clamp(155px,29dvh,260px)!important;
  min-height:155px!important;max-height:260px!important;
  border-radius:50%;
}
.evolution-r68 .evo-power-halo{
  position:absolute;inset:5% 16%;border-radius:50%;pointer-events:none;
  background:radial-gradient(ellipse,rgba(229,253,255,.46),rgba(83,230,243,.13) 33%,rgba(59,159,247,.06) 60%,transparent 75%);
  filter:blur(7px);animation:r10EvoHalo 2.2s ease-in-out both;
}
.evolution-r68 .evo-energy-column{
  position:absolute;inset:8% 33%;border-radius:45%;pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(167,250,255,.38),rgba(255,255,255,.15),transparent);
  filter:blur(8px);animation:r10EvoColumn 2.3s ease-in-out both;
}
.evolution-r68 .evolution-ring{
  position:absolute;inset:15% 22%!important;border:2px solid rgba(133,243,255,.64)!important;
  box-shadow:0 0 18px rgba(67,217,251,.56),inset 0 0 14px rgba(67,217,251,.25)!important;
  border-radius:50%;animation:r10EvoRing 2.3s ease-in-out both!important;
}
.evolution-r68 .evo-spark{position:absolute;z-index:2;width:8px;height:8px;border-radius:50%;background:#e3faff;box-shadow:0 0 10px 5px #54dfff66;animation:r10Spark 2.2s ease-out both}
.evolution-r68 .evo-spark-1{top:20%;left:26%;--sparkX:-16px;--sparkY:-55px;animation-delay:.12s}
.evolution-r68 .evo-spark-2{top:35%;right:24%;--sparkX:22px;--sparkY:-74px;animation-delay:.23s}
.evolution-r68 .evo-spark-3{bottom:18%;left:54%;--sparkX:8px;--sparkY:39px;animation-delay:.06s}
.evolution-r68 .evolution-stage img.evolution-before,
.evolution-r68 .evolution-stage img.evolution-after{
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  max-height:100%!important;max-width:100%!important;object-fit:contain!important;object-position:center bottom!important;
  filter:drop-shadow(0 8px 9px rgba(0,0,0,.6));z-index:3;
}
.evolution-r68 .evolution-before{animation:r10EvoOld 1.18s ease-in both!important}
.evolution-r68 .evolution-after{animation:r10EvoNew 1.45s 1.05s cubic-bezier(.15,.8,.28,1) both!important}
.evolution-r68 .evolution-title{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;font-weight:900;font-size:clamp(13px,3vw,18px)!important;color:#e2faff;text-shadow:0 0 15px #6fe8ff77}
.evolution-r68 .evo-rank-step{display:inline-grid;place-items:center;width:29px;height:29px;border:1px solid #88c5e0;border-radius:8px;background:#143b53;color:#fff;font-size:16px}
.evolution-r68 .evo-rank-new{background:linear-gradient(135deg,#daecff,#67dbfb);color:#0a293a;box-shadow:0 0 16px #64ddff66}
.evolution-r68 .evo-rank-arrow{font-size:17px;color:#a9fbff}
.evolution-r68 .evolution-reveal p{font-size:clamp(11px,2.4vw,13px)!important;line-height:1.4!important}
.evolution-r68 .evolution-skip{position:relative;z-index:4;min-height:40px;min-width:150px}
@keyframes r10PortalSpin{from{transform:rotate(0)}to{transform:rotate(360deg)}}
@keyframes r10EvoHalo{0%{opacity:0;transform:scale(.62)}30%{opacity:1;transform:scale(.9)}74%{opacity:.95;transform:scale(1.08)}100%{opacity:.55;transform:scale(1.0)}}
@keyframes r10EvoColumn{0%{opacity:0;transform:scaleY(.15)}22%{opacity:.92;transform:scaleY(1)}78%{opacity:.85;transform:scaleY(1.15)}100%{opacity:0;transform:scaleY(1.2)}}
@keyframes r10EvoRing{0%{opacity:0;transform:scale(.5) rotate(-20deg)}32%{opacity:.95;transform:scale(.94) rotate(18deg)}72%{opacity:.8;transform:scale(1.08) rotate(32deg)}100%{opacity:.12;transform:scale(1.25) rotate(48deg)}}
@keyframes r10Spark{0%{opacity:0;transform:scale(.3)}35%{opacity:1;transform:scale(1)}100%{opacity:0;transform:translate(var(--sparkX),var(--sparkY)) scale(.1)}}
@keyframes r10EvoOld{0%,25%{opacity:1;filter:brightness(1) drop-shadow(0 8px 9px #0008)}70%{opacity:.95;filter:brightness(3) drop-shadow(0 0 10px #ccfaff)}100%{opacity:0;filter:brightness(6)}}
@keyframes r10EvoNew{0%{opacity:0;filter:brightness(5) drop-shadow(0 0 18px #a9faff)}36%{opacity:1;filter:brightness(3) drop-shadow(0 0 20px #a9faff)}100%{opacity:1;filter:brightness(1) drop-shadow(0 7px 9px #0007)}}
@media(max-width:720px){
 .evolution-r68 .evolution-reveal{max-height:calc(100dvh - 20px)!important;overflow:auto!important}
 .evolution-r68 .evolution-stage.compact-rank-evo{height:clamp(145px,28dvh,215px)!important;min-height:145px!important}
 .evolution-r68 .evolution-ring{inset:21% 28%!important}
 .evolution-r68 .evolution-reveal h2{font-size:17px!important}
 .evolution-r68 .evolution-reveal p{margin:6px 0!important}
}
@media(max-height:480px) and (orientation:landscape){
 .evolution-r68 .evolution-reveal{width:min(96vw,710px)!important;grid-template-columns:40% minmax(0,1fr);padding:9px 15px!important;gap:1px 8px;max-height:96dvh}
 .evolution-r68 .evolution-stage.compact-rank-evo{grid-column:1;grid-row:1/7;height:58dvh!important;max-height:230px!important;min-height:120px!important}
 .evolution-r68 .evolution-reveal p{font-size:10px!important}
 .evolution-r68 .evolution-title{font-size:12px!important}
 .evolution-r68 .evolution-kicker{font-size:9px!important}
}
@media(prefers-reduced-motion:reduce){
 .evolution-r68 .evolution-reveal::before,.evolution-r68 .evo-power-halo,
 .evolution-r68 .evo-energy-column,.evolution-r68 .evolution-ring,.evolution-r68 .evo-spark{animation:none!important}
 .evolution-r68 .evolution-before{display:none!important}
 .evolution-r68 .evolution-after{animation:none!important;opacity:1!important;filter:none!important}
}
