/* Selector de mejoras. Los colores tonales distinguen la familia de la carta. */
#overlay .upgrade-sheet{font-family:Roboto,system-ui,sans-serif}
#overlay .upgrade-sheet .lv3-banner{background:transparent!important;box-shadow:none!important;color:#f4f1f8!important;letter-spacing:-.04em;transform:none;font:600 clamp(23px,3vw,38px)/1.1 Roboto,system-ui;text-shadow:none}
#overlay .upgrade-sheet .lv3-row{align-items:stretch;padding:8px 5px 12px;gap:14px}
#overlay .upgrade-sheet .lv3-card{
  --paper:#fff3e7;--wash:#ffdaae;--ink:#301e12;--accent:#834314;
  clip-path:none!important;border:0!important;border-radius:24px!important;
  background:var(--paper)!important;color:var(--ink)!important;
  box-shadow:0 3px 8px #06081138,0 12px 28px #06081135!important;
  padding:12px 16px 16px!important;gap:8px!important;align-items:stretch;
  height:auto;max-height:none;overflow:visible;filter:none;animation:material-in .2s ease-out both;
  transition:box-shadow .15s,translate .15s}
#overlay .upgrade-sheet .lv3-card.defensiva{--paper:#ecf6fa;--wash:#bce4ef;--ink:#132e36;--accent:#14576d}
#overlay .upgrade-sheet .lv3-card.utilidad{--paper:#edf6ed;--wash:#c8e8ce;--ink:#152f24;--accent:#285e45}
#overlay .upgrade-sheet .lv3-card:is(.rare,.fusion){--paper:#f6f0ff;--wash:#decdf6;--ink:#322144;--accent:#67478a}
#overlay .upgrade-sheet .lv3-card:is(:hover,:focus-visible):not(:disabled){translate:0 -3px;transform:none;filter:none;box-shadow:0 6px 18px #0005,inset 0 0 0 2px var(--accent)!important}
#overlay .upgrade-sheet .lv3-card.ban{outline:3px dashed #bf354e}
#overlay .upgrade-sheet .card-meta{display:flex;align-items:center;gap:5px;min-height:22px}
#overlay .upgrade-sheet .card-meta :is(.lv3-key,.lv3-tag,.lv3-new){position:static!important;line-height:1.2;letter-spacing:.02em;font:600 11px/1.2 Roboto,system-ui;text-transform:none;text-shadow:none}
#overlay .upgrade-sheet .card-meta .lv3-key{margin-left:auto;order:2;align-content:center;text-align:center;width:20px;height:20px;border-radius:7px;background:transparent;color:var(--accent);border:1px solid color-mix(in srgb,var(--accent) 35%,transparent)}
#overlay .upgrade-sheet .card-meta :is(.lv3-tag,.lv3-new){color:var(--accent)!important;background:var(--wash)!important;border:0;border-radius:20px;padding:4px 8px}
#overlay .upgrade-sheet .upgrade-illustration{isolation:isolate;position:relative;overflow:hidden;display:grid;place-items:center;height:106px;flex:0 0 auto;min-height:0;border:0;border-radius:16px;background:var(--wash)}
#overlay .upgrade-sheet .upgrade-illustration:before{content:"";position:absolute;z-index:-1;width:92px;aspect-ratio:1;border-radius:50%;background:#ffffff65;box-shadow:0 0 0 12px #ffffff22,0 0 0 26px #ffffff16}
#overlay .upgrade-sheet .upgrade-illustration :is(img,.lv3-fx-png){max-height:76px;object-fit:contain}
#overlay .upgrade-sheet .upgrade-name{font:650 clamp(17px,1.7vw,23px)/1.12 Roboto,system-ui;letter-spacing:-.035em;color:var(--ink)!important;text-shadow:none}
#overlay .upgrade-sheet .lv3-card p{color:var(--ink)!important;font:400 13px/1.45 Roboto,system-ui}
#overlay .upgrade-sheet :is(.lv3-effect,.lv3-fusion-hint,.lv3-pips,.lv3-vignette-plus){color:var(--accent)!important;text-shadow:none}
#overlay .upgrade-sheet .lv3-pips{margin-top:auto;font:650 10px/1.3 Roboto,system-ui;letter-spacing:.05em}
#overlay .upgrade-sheet .lv3-pips i{border-radius:6px;background:var(--wash);height:5px}
#overlay .upgrade-sheet .lv3-pips i:is(.on,.next){background:var(--accent);animation:none}
#overlay .upgrade-sheet .lv3-act{border-radius:24px!important;box-shadow:none!important;background:#ded9eb!important;color:#302c3f!important}
#overlay .upgrade-sheet .lv3-act.red.on{background:#ffc7cf!important}
@keyframes material-in{from{opacity:0;translate:0 7px}to{opacity:1;translate:0}}
@media(max-height:540px){#overlay .upgrade-sheet .lv3-card{padding:8px!important;gap:4px!important;border-radius:14px!important}#overlay .upgrade-sheet .upgrade-illustration{height:42px}#overlay .upgrade-sheet .upgrade-illustration :is(img,.lv3-fx-png,.lv3-vignette){max-height:38px}#overlay .upgrade-sheet .lv3-card p{font-size:11px}}
@media(prefers-reduced-motion:reduce){#overlay .upgrade-sheet .lv3-card{animation:none;transition:none}}

/* Ilustraciones de combate, recetas y objetos en el mismo soporte de carta. */
#overlay .upgrade-sheet .upgrade-illustration{
  --light:color-mix(in srgb,var(--accent) 55%,#8ef2ff);
  height:118px;color:white;border-radius:16px;
  background:radial-gradient(ellipse at 50% 86%,var(--light) -75%,transparent 69%),linear-gradient(155deg,#243d4d,#121d32 79%);
  box-shadow:inset 0 0 0 1px #ffffff24
}
#overlay .upgrade-sheet .upgrade-illustration:before{
  width:86px;background:transparent;border:1px solid #ffffff42;
  box-shadow:0 0 0 7px #ffffff08,0 0 0 8px #ffffff13,0 0 20px #9abfff22
}
#overlay .upgrade-sheet .attack-display{
  background:linear-gradient(90deg,#0a1e2c44,#0b23396b 42%,#071c38cc),url('../seleccion-mapas/bosque.png') center 63%/cover
}
#overlay .upgrade-sheet .attack-display[data-terrain="desierto"]{background-image:linear-gradient(90deg,#29180d44,#261b2dc7),url('../seleccion-mapas/desierto.png')}
#overlay .upgrade-sheet .attack-display[data-terrain="nevado"]{background-image:linear-gradient(90deg,#0e2e4144,#13233dc7),url('../seleccion-mapas/nevado.png')}
#overlay .upgrade-sheet .attack-display:before{left:51%;width:66px}
#overlay .upgrade-sheet .attack-display .card-fighter{position:absolute;left:6%;bottom:12%;filter:drop-shadow(0 3px 2px #050e24aa)}
#overlay .upgrade-sheet .attack-display .lv3-vignette{width:48%;justify-self:end;margin-right:7%}
#overlay .upgrade-sheet .fusion-display{background:radial-gradient(ellipse at 20% 65%,#723b75,transparent 62%),radial-gradient(ellipse at 85% 28%,#403176,transparent 60%),#20192e}
#overlay .upgrade-sheet .fusion-display:before{width:138px;height:54px;border-radius:50%;transform:rotate(-18deg);box-shadow:0 0 0 7px #dac4ff0b,0 0 0 8px #dac4ff26}
#overlay .upgrade-sheet .fusion-display .lv3-vignette-plus{color:#fff!important;font-size:18px}
#overlay .upgrade-sheet .item-display{background:radial-gradient(ellipse at 50% 90%,#456b69 0%,#253e45 45%,#192c35)}
#overlay .upgrade-sheet .item-display:before{width:66px;border-radius:18px;transform:rotate(45deg)}
#overlay .upgrade-sheet .upgrade-name{font-weight:720}
#overlay .upgrade-sheet .lv3-card p{color:color-mix(in srgb,var(--ink) 82%,#68727a)!important;text-wrap:pretty}
#overlay .upgrade-sheet .lv3-card .lv3-pips{padding-top:9px;border-top:1px solid color-mix(in srgb,var(--accent) 18%,transparent)}
@media(max-height:540px){
  #overlay .upgrade-sheet .upgrade-illustration{height:48px}
  #overlay .upgrade-sheet .attack-display .card-fighter{transform:scale(.58);transform-origin:left bottom;bottom:4%}
  #overlay .upgrade-sheet .lv3-card .lv3-pips{padding-top:4px}
}

/* Rarity belongs to the title band, never over the artwork. */
#overlay .upgrade-sheet .lv3-row .lv3-card{
  --paper:#fff;--ink:#20242b;--muted:#525c69;--wash:#edf1f6;--accent:#24568a;
  --band:#dbeafe;--band-ink:#17477b;--band-edge:#a7c8ef;
  background:var(--paper)!important;color:var(--ink)!important;
  border:1px solid var(--m-cardline)!important;box-shadow:0 4px 14px #0003!important;
  text-shadow:none!important;filter:none!important;backdrop-filter:none;
}
#overlay .upgrade-sheet .lv3-row .lv3-card.rarity-epica{--band:#eadcff;--band-ink:#603398;--band-edge:#c8a7ef;--accent:#603398}
#overlay .upgrade-sheet .lv3-row .lv3-card.rarity-legendaria{--band:#ffe5a5;--band-ink:#674007;--band-edge:#e5b657;--accent:#805006}
html[data-theme=oscuro] #overlay .upgrade-sheet .lv3-row .lv3-card{
  --paper:#25282d;--ink:#f2f3f5;--muted:#c3c8d0;--wash:#393e46;--accent:#9bcaff;
  --band:#244b70;--band-ink:#e2efff;--band-edge:#507da5;
}
html[data-theme=oscuro] #overlay .upgrade-sheet .lv3-row .lv3-card.rarity-epica{--band:#543878;--band-ink:#f3e7ff;--band-edge:#9570bd;--accent:#d6b6ff}
html[data-theme=oscuro] #overlay .upgrade-sheet .lv3-row .lv3-card.rarity-legendaria{--band:#65491e;--band-ink:#fff0c6;--band-edge:#b48a42;--accent:#ffdc8a}
#overlay .upgrade-sheet .lv3-card .card-meta{display:flex;flex-wrap:wrap;gap:4px;min-height:0;flex:0 0 auto;position:static}
#overlay .upgrade-sheet .lv3-card .card-meta :is(.lv3-key,.lv3-tag,.lv3-new){
  position:static!important;inset:auto!important;z-index:auto;max-width:100%;white-space:normal;overflow-wrap:anywhere;
  background:var(--wash)!important;color:var(--ink)!important;border:0!important;text-shadow:none!important;
}
#overlay .upgrade-sheet .lv3-card .card-meta .lv3-key{flex:none;margin-left:auto}
#overlay .upgrade-sheet .lv3-card .upgrade-title-band{
  display:flex;flex-direction:column;align-items:flex-start;gap:4px;flex:0 0 auto;min-width:0;
  padding:10px 12px;border-radius:12px;background:var(--band);border:1px solid var(--band-edge);
}
#overlay .upgrade-sheet .lv3-card .upgrade-title-band .upgrade-name{
  color:var(--band-ink)!important;text-shadow:none!important;overflow-wrap:anywhere;margin:0;
}
#overlay .upgrade-sheet .lv3-card .upgrade-title-band .lv3-rarity{
  position:static!important;inset:auto!important;display:block;height:auto;width:auto;min-height:0;
  background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;
  color:var(--band-ink)!important;text-shadow:none!important;font:800 10px/1.2 Roboto,system-ui,sans-serif;
  letter-spacing:.09em;z-index:auto;
}
#overlay .upgrade-sheet .lv3-card p{color:var(--muted)!important;text-shadow:none!important}
#overlay .upgrade-sheet .lv3-card :is(.lv3-effect,.lv3-fusion-hint,.lv3-pips){color:var(--accent)!important;text-shadow:none!important;border-color:var(--wash)!important}
#overlay .upgrade-sheet .lv3-card .lv3-pips i{background:var(--wash)}
#overlay .upgrade-sheet .lv3-card .lv3-pips i:is(.on,.next){background:var(--accent)}
#overlay .upgrade-sheet .lv3-row .lv3-card:is(:hover,:focus-visible):not(:disabled){box-shadow:0 6px 18px #0004,inset 0 0 0 2px var(--band-edge)!important}
@media(max-height:540px){
  #overlay .upgrade-sheet .lv3-card .upgrade-title-band{padding:5px 7px;gap:2px;border-radius:8px}
  #overlay .upgrade-sheet .lv3-card .upgrade-title-band .lv3-rarity{font-size:8px}
  #overlay .upgrade-sheet .lv3-card .card-meta :is(.lv3-key,.lv3-tag,.lv3-new){font-size:9px;padding:2px 5px}
}

/* El HUD se gestiona exclusivamente desde digivice-completo.css.
   Las cartas de mejoras no reposicionan el reloj, el radar ni las estadísticas. */
