/* Arena principal: primero el escenario y la jugada, no los textos. */
:root{--focus-ink:#f2e6c6;--focus-cyan:#7de0e8}

/* No hay informes de ronda, tutoriales ni párrafos sobre la batalla en el campo. */
.duelMode #gameView .quickHelp,
.duelMode #gameView #battleHighlights,
.onlineApp.duelMode #arena .quickHelp,
.onlineApp.duelMode #arena .roundReport,
.onlineApp.duelMode #arena #modeBanner,
.onlineApp.duelMode #arena #eventObjective:not(:has(.bossObjective)),
.duelMode .previewDisclaimer,
.duelMode .hiddenCpu,
.duelMode .synergyBadges,
.duelMode .territoryCore .liveStats,
.duelMode .territoryCore .laneResult,
.duelMode .handPanel::after,
.duelMode .dockLabel #deploymentHint,
.onlineApp.duelMode #arena .onlineRune small{display:none!important}

@media(min-width:801px){
  #gameView.active,
  .onlineApp.duelMode #arena{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:44px 34px minmax(0,1fr) auto!important;
    gap:7px!important;
    height:calc(100dvh - 44px)!important;
    min-height:0!important;
    padding:5px 11px 8px!important;
    align-content:stretch;
    overflow:hidden;
  }
  .onlineApp.duelMode #arena > :is(.duelHud,.gameMeta,.mapsBoard,.duelDock){grid-column:1/-1;width:100%;min-width:0}
  /* Event with boss: the only extra permanent status is its health. */
  .onlineApp.duelMode #arena #eventObjective:has(.bossObjective){
    position:absolute;z-index:9;top:87px;left:24%;width:52%;max-height:45px;overflow:hidden;pointer-events:none;
  }
  .onlineApp.duelMode #arena .bossObjective{padding:5px 9px;margin:0;display:flex;align-items:center;gap:9px;background:#172c3adf}
  .onlineApp.duelMode #arena .bossObjective>img,.onlineApp.duelMode #arena .bossObjective p,.onlineApp.duelMode #arena .bossObjective strong{display:none}
  .onlineApp.duelMode #arena .bossObjective progress{width:100%;max-width:none;height:12px;margin:0}
  .duelMode .duelHud,.onlineApp.duelMode #arena .duelHud{min-height:0;height:44px;padding:0 4px}
  .duelMode .duelHud .duelist img{width:35px;height:35px}
  .duelMode .duelHud .duelist>b{width:38px;height:38px;font-size:18px}
  .duelMode .duelCrest strong{font-size:21px;letter-spacing:4px}
  .duelMode .gameMeta{min-height:0;height:34px;margin:0!important;padding:4px 12px!important}
  .duelMode #roundStatus{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
  .duelMode .mapsBoard{
    grid-template-columns:repeat(3,minmax(0,1fr));
    align-items:stretch;
    height:100%;min-height:0;overflow:hidden;
    gap:9px!important;
  }
  .duelMode .mapCard{
    --arena-color:#b6ac87;
    display:grid!important;
    grid-template-rows:minmax(78px,1fr) minmax(165px,1.75fr) minmax(78px,1fr)!important;
    min-height:0!important;height:100%!important;
    overflow:hidden!important;
    border:1px solid var(--arena-color)!important;
    border-radius:12px!important;
    background:#101a25ec!important;
    box-shadow:0 6px 24px #0008!important;
  }
  .duelMode .mapCard[data-family="CIELO"]{--arena-color:#b5dbea}
  .duelMode .mapCard[data-family="INFIERNO"]{--arena-color:#d17c5c}
  .duelMode .mapCard[data-family="CEMENTERIO"]{--arena-color:#a1b29a}
  .duelMode .mapCard[data-family="LONDRES"]{--arena-color:#92a1c3}
  .duelMode .mapCard[data-family="BLACK ROCK"]{--arena-color:#c8ae7c}
  .duelMode .mapCard[data-family="CLOACAS"]{--arena-color:#74b7a3}
  .duelMode .laneSide{height:auto!important;min-height:0!important;padding:5px 8px!important;gap:3px!important;overflow:hidden!important}
  .duelMode .laneSide h4{justify-content:space-between;font-size:10px;line-height:1.1;margin:0}
  .duelMode .laneSide h4 span{font-size:9px;letter-spacing:0}
  .duelMode .laneUnits{min-height:0!important;max-height:none!important;overflow:auto;flex:1;grid-auto-rows:clamp(72px,10vh,94px)!important;gap:4px!important;scrollbar-width:thin}
  .duelMode .miniUnit{height:clamp(72px,10vh,94px)!important;min-height:0!important;width:100%;max-width:104px;transform:none!important}
  .duelMode .miniUnit img{object-position:center 24%}
  .duelMode .unitOverlay{bottom:14px;padding:9px 2px 1px}
  .duelMode .unitOverlay strong{font-size:9px;white-space:nowrap}
  .duelMode .unitOverlay span,.duelMode .unitOverlay b{font-size:8px}
  .duelMode .unitHealth{height:13px}
  .duelMode .unitHealth small{font-size:8px;line-height:12px}
  .duelMode .laneSide .dropHint{padding:1px 4px!important;border:0!important;background:none!important;border-radius:0;font-size:9px!important;line-height:1;min-width:0}
  .duelMode .laneSide.hasUnits .dropHint{display:none}
  .duelMode .emptyFormation{min-height:40px;font-size:9px}
  /* CORE: panorama grande, nombre y cualidad integrados, sin bandas extra. */
  .duelMode .territoryCore{
    display:block!important;position:relative!important;
    width:100%;height:100%!important;min-height:0!important;max-height:none!important;
    border-top:2px solid var(--arena-color)!important;
    border-bottom:2px solid var(--arena-color)!important;
    padding:0!important;margin:0!important;overflow:hidden!important;
    background:#15212d!important;
    isolation:isolate;
  }
  .duelMode .territoryCore .mapHero{
    display:block!important;position:absolute!important;
    inset:0!important;width:100%!important;height:100%!important;min-height:0!important;
    border-radius:0!important;margin:0!important;box-shadow:none!important;
    background-size:cover!important;background-position:center 43%!important;
    overflow:hidden!important;
  }
  .duelMode .territoryCore .mapHero::after{content:'';position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,#08101c85,#08101c10 34%,#08101c15 53%,#06111cf0 100%)!important;border-radius:0!important}
  .duelMode .territoryCore .mapHero::before{display:none!important}
  .duelMode .mapSector{z-index:3!important;top:8px!important;left:10px!important;letter-spacing:1px;font-size:10px!important;background:#0d1a27ba!important}
  .duelMode .arenaTrait{position:absolute;z-index:4;top:9px;left:auto;right:36px;transform:none;padding:3px 9px;background:#091724bd;border:1px solid var(--arena-color);border-radius:999px;color:#faf0d0;font:700 10px/1 system-ui,sans-serif;letter-spacing:.5px;text-transform:uppercase;white-space:nowrap;pointer-events:none}
  .duelMode .mapTitle{z-index:4!important;position:absolute!important;bottom:31px!important;left:8px!important;right:8px!important;padding:4px 8px!important;font:700 clamp(12px,1.16vw,17px)/1.2 Georgia,serif!important;text-align:center!important;color:#fff5dc!important;white-space:normal;text-shadow:0 2px 6px #000,0 0 14px #000;background:transparent!important}
  .duelMode .mapTitle .small{font-size:8px;color:#d1d9cb}
  .duelMode .mapCard .territoryScore{position:absolute!important;z-index:5!important;top:36px!important;min-width:43px;width:auto;height:auto;min-height:27px;border-radius:8px!important;padding:1px 7px!important;display:flex;flex-direction:row;align-items:center;gap:5px}
  .duelMode .mapCard .territoryScore b{font-size:17px!important;line-height:1.1}
  .duelMode .mapCard .territoryScore span{font-size:8px!important}
  .duelMode .mapCard .rivalScore{left:7px!important;right:auto!important}
  .duelMode .mapCard .allyScore{right:7px!important;left:auto!important}
  .duelMode .territoryObjective{position:absolute!important;z-index:6!important;bottom:3px;left:8px;right:8px;width:auto;background:#091923df;border:1px solid var(--arena-color);border-radius:7px;padding:0 6px;min-height:25px;color:#ffe5aa;overflow:visible}
  .duelMode .territoryObjective summary{padding:3px 2px!important;font-size:11px!important;font-weight:700!important;line-height:1.5!important;cursor:pointer}
  .duelMode .territoryObjective summary>span{float:right;color:#f7d798}
  .duelMode .territoryObjective p{position:absolute;bottom:calc(100% + 5px);left:0;right:0;padding:8px;border:1px solid var(--arena-color);border-radius:7px;background:#081522f5;color:#f5e8cf;font-size:11px;line-height:1.3;margin:0;z-index:15}
  .duelMode .mapInfo{position:absolute!important;z-index:7!important;top:8px;right:8px;width:24px;min-height:24px;overflow:visible;background:transparent!important;border:0!important}
  .duelMode .mapInfo summary{font-size:0!important;letter-spacing:0!important;line-height:1!important;padding:2px!important;text-align:center;cursor:pointer}
  .duelMode .mapInfo summary::after{content:'ⓘ';font-size:20px;color:#ffedba;text-shadow:0 1px 4px #000}
  .duelMode .mapInfo summary span{display:none!important}
  .duelMode .mapInfo>div{position:absolute!important;top:27px!important;left:auto!important;right:0!important;width:min(285px,75vw);padding:9px!important;background:#0a1929fa!important;border:1px solid var(--arena-color)!important;border-radius:8px;font-size:11px!important;z-index:30!important;box-shadow:0 8px 26px #000b}
  .duelMode .territoryCore:has(.mapInfo[open]){z-index:20!important;overflow:visible!important}
  .duelMode .mapCard:has(.territoryObjective[open]){z-index:12}
  /* Mano jugable: imágenes completas, botones accesibles. */
  .duelMode .duelDock,.onlineApp.duelMode .duelDock{
    display:grid!important;grid-template-areas:none!important;
    grid-template-columns:minmax(0,1fr) minmax(130px,190px) 145px!important;
    min-height:0!important;height:auto!important;max-height:225px!important;
    gap:10px!important;align-items:stretch!important;padding:7px 10px!important;
    background:#081a2be8!important;border:1px solid #476277!important;border-radius:12px!important;
  }
  .duelMode .duelDock>.handPanel,.duelMode .duelDock>.legendDock,.duelMode .duelDock>.onlineRune,.duelMode .duelDock>.actionDock{grid-area:auto!important;grid-row:auto!important;grid-column:auto!important}
  .duelMode .handPanel .hand{display:flex!important;flex-wrap:nowrap!important;align-items:start!important;justify-content:flex-start!important;gap:8px!important;min-height:0!important;overflow-x:auto!important;padding:4px 3px 7px!important}
  .duelMode .handCard,.onlineApp #hand[data-count="5"] .handCard{width:clamp(89px,8vw,118px)!important;min-width:clamp(89px,8vw,118px)!important;max-width:118px!important;flex:0 0 clamp(89px,8vw,118px)!important;margin:0!important;transform:none!important;padding:4px!important}
  .duelMode .handCard img{height:clamp(102px,13vh,124px)!important;object-fit:cover}
  .duelMode .handStats{top:clamp(76px,10vh,98px)!important}
  .duelMode .handCard .assignment{font-size:8px;line-height:1.1;min-height:0!important;max-height:17px;overflow:hidden}
  .duelMode .handCard .cardMeta{font-size:10px!important}
  .duelMode .dockLabel{min-height:16px;margin:0 0 5px;gap:5px;justify-content:flex-start}
  .duelMode .dockLabel strong{font-size:12px}
  .duelMode .dockLabel span{font-size:11px}
  .duelMode .onlineRune{gap:5px;align-items:center;justify-content:center}
  .duelMode .onlineRune img{width:58px;height:58px}
  .duelMode .onlineRune span{font-size:10px}
  .onlineApp.duelMode .duelDock:has(.onlineRune #runeImage[hidden]){grid-template-columns:minmax(0,1fr) 145px!important}
  .onlineApp.duelMode .onlineRune:has(#runeImage[hidden]){display:none!important}
  .duelMode .legendDock{overflow:auto;padding:0 2px 0 10px}
  .duelMode .miniChoices{overflow-x:auto;flex-wrap:nowrap;gap:4px}
  .duelMode .miniChoice{flex:0 0 49px;min-width:49px;max-width:49px}
  .duelMode .miniChoice img{height:47px}
  .duelMode .actionDock{justify-content:center;align-items:stretch;gap:9px}
  .duelMode #confirmRound{width:100%!important;height:auto!important;min-height:48px!important;border-radius:9px!important;font-size:12px!important;padding:8px!important;letter-spacing:.15px!important;background:linear-gradient(125deg,#385f8e,#7773c7)!important;border:1px solid #96ccef!important}
  .duelMode #abortDuel,.duelMode #leave{font-size:10px!important;padding:9px 4px!important;min-height:36px!important}
  .duelMode .actionDock button{width:100%;max-height:none;min-height:34px}
}

/* El resultado, de cualquier modalidad, contiene únicamente el veredicto y acciones. */
.onlineApp #result.entryPanel{width:min(460px,calc(100% - 24px))!important;max-width:460px!important;padding:26px 22px!important;margin:clamp(22px,12vh,110px) auto!important;text-align:center!important;border-radius:15px!important;background:#0b1c28f5!important}
.onlineApp #result .eyebrow,.onlineApp #result #resultReason,.onlineApp #result #onlineReward,.onlineApp #result details,.onlineApp #result #exportResult,.onlineApp #result #rematchNotice{display:none!important}
.onlineApp #result h1{font:700 clamp(27px,4vw,41px)/1.15 Georgia,serif!important;color:#ead6a8;margin:0 0 22px!important}
.onlineApp #result button:not(.hidden){display:inline-flex;align-items:center;justify-content:center;min-width:130px;min-height:42px;padding:9px 14px!important;margin:3px!important;font-size:12px!important;border-radius:8px}
.onlineApp #result #again{background:#18313a!important;color:#e0e9e6!important;border:1px solid #6f8c98!important}

#modal .modalCard{width:min(460px,calc(100% - 24px))!important;max-height:85dvh;padding:26px 20px!important;text-align:center!important;background:#0b1c28f5;border-radius:15px}
#modal #modalBody h2{margin:0 0 21px!important;font-size:clamp(27px,4vw,42px)!important;font-weight:700!important}
#modal .modalCard>button{display:inline-flex;min-height:42px;padding:9px 15px!important;margin:3px!important;font-size:12px!important;border-radius:8px}
#modal .modalCard>#modalClose{background:#18313a!important;color:#e0e9e6!important;border:1px solid #6f8c98!important}

/* Campeones: misma presentación mínima después de finalizar. */
.championMode #championArena:has(#championFinish:not(.hidden)) > :not(#championFinish){display:none!important}
.championMode #championArena:has(#championFinish:not(.hidden)){min-height:calc(100dvh - 70px);display:grid;place-items:center}
.championMode #championFinish:not(.hidden){width:min(460px,calc(100% - 24px));min-height:0;margin:25px auto;padding:27px 20px;display:grid;place-items:center;gap:16px;text-align:center;background:#101f2bed;border:1px solid #bea56a;border-radius:14px}
.championMode #championFinish h2{font:700 clamp(28px,4vw,42px)/1.2 Georgia,serif;margin:0;color:#ead6a8}
.championMode #championFinish>div{display:flex;justify-content:center;flex-wrap:wrap;gap:8px}
.championMode #championFinish button{min-width:135px;min-height:42px;padding:9px 12px;font-size:12px;border-radius:8px}

@media(min-width:801px) and (max-height:770px){
  .duelMode .mapCard{grid-template-rows:minmax(66px,.9fr) minmax(142px,1.85fr) minmax(69px,.9fr)!important}
  .duelMode .laneUnits{grid-auto-rows:71px!important}
  .duelMode .miniUnit{height:71px!important}
  .duelMode .handCard img{height:96px!important}
  .duelMode .handStats{top:72px!important}
  .duelMode .duelDock{max-height:194px!important}
  .duelMode .territoryCore .mapTitle{bottom:27px!important;font-size:12px!important}
  .duelMode .territoryObjective summary{font-size:10px!important}
}
@media(max-width:800px){
  .duelMode .mapCard{min-height:370px!important;height:auto!important;overflow:hidden!important}
  .duelMode .territoryCore{position:relative!important;min-height:190px!important;height:190px!important;overflow:hidden!important;background:#112130!important}
  .duelMode .territoryCore .mapHero{position:absolute!important;inset:0;width:100%;height:100%;min-height:0!important;background-size:cover!important;background-position:center!important;border-radius:0!important}
  .duelMode .territoryCore .mapHero::after{background:linear-gradient(180deg,#09141a99,transparent 35%,#061019f3)!important;border-radius:0!important}
  .duelMode .mapTitle{position:absolute;bottom:38px;left:8px;right:8px;font-size:15px!important;text-shadow:0 2px 7px #000;z-index:4}
  .duelMode .arenaTrait{position:absolute;z-index:4;top:6px;left:44%;padding:4px 9px;border:1px solid #dfc68d;background:#10232bdc;border-radius:14px;color:white;font-size:10px}
  .duelMode .territoryScore{top:29px;z-index:4}
  .duelMode .territoryObjective{position:absolute;bottom:3px;left:8px;right:8px;background:#11232be8;border:1px solid #a9b2a8;border-radius:5px;z-index:6}
  .duelMode .mapInfo,.duelMode .liveStats,.duelMode .previewDisclaimer,.duelMode .laneResult{display:none!important}
  .duelMode .handPanel::after{display:none!important}
  .duelMode .duelDock{max-height:none!important}
  .duelMode .handPanel .hand{gap:9px!important;flex-wrap:wrap!important}
  .duelMode .handCard img{height:105px!important}
  .onlineApp.duelMode #arena .roundReport,.onlineApp.duelMode #arena #modeBanner{display:none!important}
}
@media(min-width:801px){
  /* The online header is taller than the local titlebar. */
  .onlineApp.duelMode #arena{height:calc(100dvh - 61px)!important}
}
