/* Soul Lord prototype. Stage 1080x1920 (9:16) scaled to the screen, like Myl2D's base-resolution layout. */
:root{
  --bg:#110c0a; --felt:#1d1512; --felt2:#2a1d17; --line:#5a3b25; --bronze:#c8955a; --bronze-hi:#f0c98a;
  --ink:#f6ead3; --muted:#b9a58a; --alma:#4696c8; --oro:#e3c06a; --hp:#c9483c; --hp-bg:#3a1712;
  --leo:#B8453A; --hec:#5A5FD6; --danger:#e06a5a; --ok:#8fc27a;
  --serif:"DejaVu Serif",Georgia,"Times New Roman",serif;
  color-scheme:dark;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--bg);color:var(--ink);font-family:var(--serif);overflow:hidden;-webkit-tap-highlight-color:transparent}
#wrap{position:fixed;inset:0;display:flex;align-items:center;justify-content:center}
#stage{position:relative;width:1080px;height:1920px;flex:none;transform-origin:center center;overflow:hidden;border-radius:24px;
  background:radial-gradient(ellipse at 50% 30%,var(--felt2),var(--felt) 55%,#140e0c)}
.abs{position:absolute}
button{font-family:var(--serif);color:var(--ink);cursor:pointer}
button:focus-visible{outline:3px solid var(--bronze-hi);outline-offset:3px}

/* stats bar */
.bar{left:20px;right:20px;height:140px;display:flex;align-items:center;gap:20px;padding:0 20px;
  background:linear-gradient(180deg,#2c1f19,#1a120f);border:3px solid var(--line);border-radius:22px}
.bar.active{border-color:var(--bronze-hi);box-shadow:0 0 24px #f0c98a44}
.portrait{width:108px;height:108px;border-radius:50%;border:5px solid var(--bronze);flex:none;background:#222 center/cover;
  display:flex;align-items:center;justify-content:center;font-size:58px}
.hinfo{flex:1;display:flex;flex-direction:column;gap:8px;min-width:0}
.hname{font-size:31px;font-weight:bold;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hname small{font-size:21px;color:var(--muted);font-weight:normal}
.hp{position:relative;height:32px;background:var(--hp-bg);border-radius:16px;overflow:hidden;border:2px solid #6b2a20}
.hp>i{position:absolute;inset:0 auto 0 0;background:linear-gradient(90deg,#8e2a20,var(--hp));transition:width .35s}
.hp>b{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:23px}
.stats{display:flex;gap:14px;align-items:center;font-size:26px;flex-wrap:nowrap}
.pips{display:flex;gap:4px}
.pip{width:24px;height:24px;transform:rotate(45deg) scale(.76);border:3px solid #173048;background:#13202c}
.pip.on{background:var(--alma);box-shadow:0 0 10px #4fb0ff88}
.chip{display:flex;align-items:center;gap:7px;padding:3px 12px;border-radius:20px;background:#00000055;border:2px solid var(--line);white-space:nowrap}
.chip.warn{border-color:var(--danger);color:#ffb3a8}
.coin{width:22px;height:22px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fff3b8,var(--oro) 55%,#8a6a1e);flex:none}
.shield{width:20px;height:24px;background:var(--bronze);clip-path:polygon(50% 0,100% 15%,90% 70%,50% 100%,10% 70%,0 15%);flex:none}
.piles{display:flex;flex-direction:column;gap:6px;font-size:21px;color:var(--muted);text-align:right;white-space:nowrap}

/* field: hero card in front, equipment fanned behind, trap face down behind */
.field{left:0;right:0;height:400px;cursor:pointer}
.field .slotc{position:absolute;width:140px;height:196px;transform-origin:50% 100%}
.field .ghost{position:absolute;inset:0;border:3px dashed #5a3b2588;border-radius:12px;background:#0003;display:flex;align-items:flex-end;justify-content:center;
  padding-bottom:10px;font-size:18px;color:var(--muted)}
.field .hero{position:absolute;left:430px;width:220px;height:308px;z-index:3}
.heroph{width:100%;height:100%;border-radius:14px;border:5px solid var(--hec);display:flex;flex-direction:column;align-items:center;justify-content:space-between;
  padding:16px 10px;text-align:center;background:radial-gradient(circle at 50% 40%,#3d40a0,#14152e)}
.heroph b{font-size:24px} .heroph .sym{font-size:96px;color:#cfd2ff} .heroph p{margin:0;font-size:15px;color:#dfe1ff}

/* cards */
.card{position:relative;width:100%;height:100%;border-radius:11px;background:#000 center/cover no-repeat;box-shadow:0 6px 16px #000b;overflow:hidden}
.tcard{display:flex;flex-direction:column;border:6px solid var(--c,#888);background:linear-gradient(180deg,#f1e2c3,#e2cfa6);color:#24140c;padding:6%}
.tcard .tc-cost{position:absolute;left:4%;top:3%;width:22%;aspect-ratio:1;border-radius:50%;background:#3a1e14;color:#ffe9c6;display:flex;align-items:center;justify-content:center;font-weight:bold}
.tcard .tc-name{margin-left:24%;font-weight:bold;line-height:1.1;min-height:2.3em;display:flex;align-items:center}
.tcard .tc-type{border-top:2px solid #0003;border-bottom:2px solid #0003;text-align:center;margin:4% 0;font-size:.8em}
.tcard .tc-text{flex:1;font-size:.72em;line-height:1.25;overflow:hidden}
.tcard .tc-rar{font-size:.6em;text-align:right;opacity:.7}
.back{border:5px solid var(--bronze);background:repeating-linear-gradient(45deg,#2b2016 0 14px,#33261b 14px 28px);display:flex;align-items:center;justify-content:center}
.back::after{content:attr(data-sym);font-size:72px;color:var(--bronze)}
.back.hec{background:repeating-linear-gradient(45deg,#1c1d3d 0 14px,#24264c 14px 28px);border-color:#8d91f0}
.back.hec::after{color:#aab0ff}
.revealed{outline:4px solid #ffd36a}

/* center strip */
.phases{left:60px;right:60px;display:flex}
.ph-step{flex:1;text-align:center;padding:8px 0;font-size:24px;color:var(--muted);border-bottom:5px solid #3a2a20}
.ph-step.now{color:var(--ink);border-color:var(--bronze);font-weight:bold}
.lastlog{left:40px;right:40px;height:58px;font-size:23px;color:var(--muted);text-align:center;display:flex;align-items:center;justify-content:center;
  line-height:1.2;overflow:hidden;cursor:pointer}

/* attacks */
.atks{left:20px;right:20px;height:104px;display:flex;gap:14px}
.atk{flex:1;border-radius:18px;border:3px solid var(--bronze);background:linear-gradient(180deg,#3b2a1f,#241913);display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:4px;min-width:0;padding:0 8px}
.atk .n{font-size:26px;font-weight:bold;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.atk .d{font-size:21px;color:var(--muted)}
.atk .g{display:flex;gap:1px}
.gem{width:20px;height:20px;transform:rotate(45deg) scale(.74);background:var(--alma);border:2px solid #143049;display:inline-block}
.atk[disabled]{opacity:.62;cursor:not-allowed}
.btn{min-width:150px;border-radius:16px;border:3px solid var(--bronze);background:#2c1f17;font-size:24px;padding:8px 14px}
.btn.main{background:linear-gradient(180deg,#a8503c,#7a2f22);border-color:var(--bronze-hi);font-weight:bold}
.btn[disabled]{opacity:.4;cursor:not-allowed}
.noweapon{flex:1;display:flex;align-items:center;justify-content:center;font-size:24px;color:var(--muted);border:3px dashed var(--line);border-radius:18px}

/* shop */
.shop{left:20px;right:20px;height:250px;border:3px solid var(--line);border-radius:22px;background:#00000033;display:flex;align-items:center;gap:20px;padding:0 24px}
.shopslot{position:relative;width:150px;height:210px;flex:none}
.shopslot.empty{border:3px dashed #5a3b2577;border-radius:12px}
.price{position:absolute;left:50%;bottom:-16px;transform:translateX(-50%);display:flex;gap:6px;align-items:center;z-index:2;
  background:#1a120f;border:2px solid var(--oro);border-radius:16px;padding:1px 12px;font-size:23px;white-space:nowrap}
.price.no{border-color:#6b5a3a;color:var(--muted)}
.locked .card{filter:grayscale(.85) brightness(.5)}
.lockt{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;font-size:22px;z-index:2;padding:8px}
.shopside{display:flex;flex-direction:column;gap:12px;margin-left:auto;align-items:stretch}
.shoplbl{font-size:22px;color:var(--muted);text-align:center}

/* hand */
.hand{left:0;right:0;height:300px;display:flex;justify-content:center;align-items:flex-start}
.hcard{width:190px;height:266px;margin:0 -16px;transition:transform .15s;flex:none;cursor:pointer;position:relative}
.hcard.cant .card{filter:brightness(.7)}
.hcard.sel{transform:translateY(-40px) scale(1.06)!important;z-index:6}
.hcard.sel .card{outline:5px solid var(--bronze-hi)}

/* overlays */
.overlay{position:absolute;inset:0;background:#000000eb;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px;padding:40px}
.overlay[hidden]{display:none}
.sheet{display:flex;flex-direction:column;gap:18px;align-items:center}
.sheet .big{width:450px;height:630px}
.sheet .row{display:flex;gap:16px;flex-wrap:wrap;justify-content:center}
.sheet .btn{min-height:86px;min-width:200px;font-size:28px}
.eqgrid{display:grid;grid-template-columns:repeat(3,260px);gap:22px;justify-items:center}
.eqgrid .cell{width:260px;height:364px;position:relative}
.eqgrid .cap{position:absolute;bottom:-34px;left:0;right:0;text-align:center;font-size:22px;color:var(--muted)}
.logbox{width:960px;max-height:1400px;overflow:auto;background:#1a120f;border:3px solid var(--line);border-radius:18px;padding:24px;font-size:24px;line-height:1.4}
.logbox p{margin:0 0 10px}
.title{font-size:64px;font-weight:bold;color:var(--bronze-hi);letter-spacing:.04em;text-align:center}
.sub{font-size:28px;color:var(--muted);text-align:center;max-width:820px;line-height:1.35}
.pick{display:flex;gap:40px}
.pick button{background:none;border:0;padding:0;display:flex;flex-direction:column;align-items:center;gap:16px;font-size:30px}
.pick .pc{width:300px;height:420px}
.pick{flex-wrap:wrap;justify-content:center}
.banner{left:60px;right:60px;top:1196px;height:104px;z-index:8;border-radius:18px;background:#2c1f17ee;border:3px solid var(--bronze-hi);
  display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 24px;font-size:25px}
.toast{left:80px;right:80px;top:600px;z-index:15;padding:22px;border-radius:18px;background:#000e;border:3px solid var(--bronze);font-size:27px;text-align:center}
.toast[hidden],.banner[hidden]{display:none}
.tag{position:absolute;left:24px;top:4px;font-size:16px;color:#ffffff55;z-index:1}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}
.lvls{display:flex;gap:16px;flex-wrap:wrap;justify-content:center}
.lvls .btn{min-width:180px;min-height:76px;font-size:28px}
.menubtn{right:22px;top:2px;min-width:0;width:64px;height:44px;padding:0;font-size:28px;z-index:4;border-radius:20px}
.btn.danger{border-color:#e06a5a;color:#ffc4ba}
.row2{display:flex;gap:20px;flex-wrap:wrap;justify-content:center}
.row2 .btn{min-height:80px;min-width:220px;font-size:28px}

/* layers */
#board{position:absolute;inset:0}
#fx{position:absolute;inset:0;pointer-events:none;z-index:14}
.screen{position:absolute;inset:0;z-index:30;overflow-y:auto;overflow-x:hidden;padding:110px 40px 60px;display:flex;flex-direction:column;align-items:center;gap:26px;
  background:radial-gradient(ellipse at 50% 20%,#3a2619,#140e0c 70%)}
.screen[hidden],.viewer[hidden]{display:none}
.btn.back{position:absolute;left:30px;top:28px;min-width:0;font-size:26px}

/* main menu */
.screen.menu{justify-content:center;padding-top:40px}
.mm-fan{position:relative;width:100%;height:560px;flex:none}
.mm-card{position:absolute;left:50%;top:40px;width:330px;height:462px;margin-left:-165px;border-radius:16px;background:center/cover;box-shadow:0 18px 40px #000c;
  transform:translateX(var(--x)) rotate(var(--r));transform-origin:50% 120%;animation:mmIn .7s ease-out both}
.mm-card:nth-child(2){z-index:2;top:10px}
@keyframes mmIn{from{opacity:0;transform:translateX(0) rotate(0) translateY(60px)}}
.mm-title{font-size:110px;font-weight:bold;letter-spacing:.12em;color:var(--bronze-hi);text-shadow:0 4px 0 #5a3b25,0 0 40px #f0c98a55;text-align:center}
.mm-sub{font-size:30px;color:var(--muted);margin-top:-14px}
.mlist{display:flex;flex-direction:column;gap:18px;width:560px}
.mlist .btn{min-height:92px;font-size:34px}
.mm-foot{font-size:20px;color:#ffffff55;text-align:center;max-width:800px;margin-top:20px}

/* deck picker */
.decks{display:flex;flex-direction:column;gap:18px;width:100%}
.deckrow{display:flex;align-items:center;gap:16px;padding:16px;border-radius:20px;border:3px solid var(--line);border-left:12px solid var(--c);background:#00000044}
.dk-strip{display:flex;flex:none;width:300px;height:110px;position:relative}
.dk-strip img{width:78px;height:110px;border-radius:6px;margin-right:-34px;box-shadow:0 4px 10px #000a}
.dk-info{flex:1;display:flex;flex-direction:column;gap:6px;min-width:0}
.dk-info b{font-size:32px}.dk-info span{font-size:22px;color:var(--muted)}
.deckrow .btn{min-width:0;min-height:76px;font-size:26px}

/* collection */
.screen.col{gap:16px;padding-top:28px}
.colhead{width:100%;display:flex;align-items:center;justify-content:center;position:relative;min-height:80px}
.colhead .btn.back{top:6px;left:0}
.colhead .count{position:absolute;right:0;font-size:24px;color:var(--muted)}
.frow{width:100%;display:flex;gap:10px;overflow-x:auto;flex:none;padding-bottom:6px;scrollbar-width:none}
.fchip{flex:none;display:flex;align-items:center;gap:8px;padding:10px 18px;border-radius:24px;border:2px solid var(--line);background:#00000044;font-size:23px}
.fchip.on{border-color:var(--bronze-hi);background:#5a3b25;font-weight:bold}
.dot{width:16px;height:16px;border-radius:50%;background:var(--c);display:inline-block;flex:none}
.search{width:100%;flex:none;font:inherit;font-size:26px;padding:14px 20px;border-radius:16px;border:2px solid var(--line);background:#0006;color:var(--ink)}
.cgrid{width:100%;display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.ctile{padding:0;border:0;background:none;aspect-ratio:5/7;border-radius:11px;overflow:hidden;box-shadow:0 6px 14px #000a}
.ctile img{width:100%;height:100%;display:block;object-fit:cover}
.ctile .card{border-radius:11px}

/* settings */
.slist{width:100%;display:flex;flex-direction:column;gap:14px}
.srow{display:flex;align-items:center;gap:20px;justify-content:space-between;padding:20px 24px;border-radius:18px;border:2px solid var(--line);background:#00000040}
.srow>div:first-child{display:flex;flex-direction:column;gap:6px;min-width:0}
.srow b{font-size:28px}.srow span{font-size:21px;color:var(--muted)}
.seg{display:flex;flex:none;border:2px solid var(--line);border-radius:16px;overflow:hidden}
.seg button{border:0;background:#0005;font-size:22px;padding:14px 16px;min-width:80px}
.seg button.on{background:linear-gradient(180deg,#a8503c,#7a2f22);font-weight:bold}
.logbox.rules{font-size:27px}

/* card viewer */
.viewer{position:absolute;inset:0;z-index:40;background:#000000f2;display:flex;flex-direction:column;align-items:center;padding:24px 40px 40px;gap:18px}
.vtop{width:100%;display:flex;justify-content:space-between;align-items:center;font-size:24px;color:var(--muted);min-height:64px}
.vtop .btn{min-width:0;width:72px;height:64px;font-size:30px}
.vcard{width:600px;height:840px;flex:none;touch-action:pan-y;animation:vIn .18s ease-out}
@keyframes vIn{from{opacity:0;transform:scale(.94)}}
.varrow{position:absolute;top:470px;width:84px;height:140px;border-radius:18px;border:3px solid var(--line);background:#1a120fcc;font-size:72px;line-height:1}
.varrow.l{left:20px}.varrow.r{right:20px}.varrow[disabled]{opacity:.25}
.vinfo{width:100%;max-width:900px;text-align:center}
.vinfo h3{margin:0 0 8px;font-size:40px;color:var(--bronze-hi)}
.vmeta{margin:0;font-size:24px;color:var(--muted);display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
.vmeta .dot{background:var(--c)}
.vtext{font-size:27px;line-height:1.35;margin-top:12px}.vtext p{margin:4px 0}
.vtext .g{display:inline-flex;vertical-align:middle;margin:0 4px}
.vid{font-size:18px;color:#ffffff44;margin:8px 0 0}
.vact{display:flex;gap:16px;flex-wrap:wrap;justify-content:center;margin-top:auto}
.vact .btn{min-height:90px;min-width:240px;font-size:30px}

/* improved table */
.divider{left:80px;right:80px;height:2px;background:linear-gradient(90deg,transparent,var(--bronze) 30%,var(--bronze-hi) 50%,var(--bronze) 70%,transparent);opacity:.5}
.field .slotc.filled,.field .hero,.field [data-view]{cursor:pointer}
.field .slotc.filled:hover{filter:brightness(1.12)}
.bar.low .hp{animation:lowhp 1.2s ease-in-out infinite}
@keyframes lowhp{50%{box-shadow:0 0 18px #ff4a3a}}
.hero.hit{animation:hit .45s ease-out}
@keyframes hit{20%{transform:translateX(-14px) rotate(-2deg);filter:brightness(1.8) saturate(.5)}45%{transform:translateX(12px) rotate(1.5deg)}70%{transform:translateX(-6px)}}
.hcard.can .card{box-shadow:0 0 0 3px #f0c98acc,0 0 22px #f0c98a88}
.atk.ready{animation:ready 1.6s ease-in-out infinite}
@keyframes ready{50%{box-shadow:0 0 22px #f0c98a99;border-color:var(--bronze-hi)}}
.fx{position:absolute}
.fx.float{left:0;right:0;text-align:center;font-size:96px;font-weight:bold;-webkit-text-stroke:4px #000;paint-order:stroke;animation:floatUp 1.4s ease-out forwards}
.fx.float.dmg{color:#ff6a55}.fx.float.heal{color:#8fe27a}
@keyframes floatUp{0%{opacity:0;transform:translateY(30px) scale(.6)}15%{opacity:1;transform:translateY(0) scale(1.1)}100%{opacity:0;transform:translateY(-110px) scale(1)}}
.fx.turnban{left:0;right:0;top:880px;padding:26px 0;text-align:center;font-size:64px;font-weight:bold;color:var(--bronze-hi);letter-spacing:.06em;
  background:linear-gradient(90deg,transparent,#000d 20%,#000d 80%,transparent);animation:ban 1.3s ease-in-out forwards}
@keyframes ban{0%{opacity:0;transform:scaleY(.2)}15%,75%{opacity:1;transform:none}100%{opacity:0}}
.fx.trap{left:0;right:0;top:300px;display:flex;flex-direction:column;align-items:center;gap:16px;animation:ban 1.9s ease-in-out forwards}
.tr-card{width:400px;height:560px;animation:flip .5s ease-out}
@keyframes flip{from{transform:perspective(1200px) rotateY(90deg)}}
.tr-cap{font-size:44px;font-weight:bold;color:#ffd36a;-webkit-text-stroke:3px #000;paint-order:stroke}
.fx.narr{left:60px;right:60px;top:440px;pointer-events:auto;padding:22px 28px;border-radius:20px;background:#120c0aee;border:3px solid var(--bronze);font-size:25px;
  animation:narrIn .3s ease-out}
.fx.narr b{display:block;font-size:28px;color:var(--bronze-hi);margin-bottom:8px}
.fx.narr p{margin:6px 0;opacity:0;animation:lineIn .35s ease-out forwards}
@keyframes narrIn{from{opacity:0;transform:translateY(-16px)}}
@keyframes lineIn{to{opacity:1}}
.still *{animation:none!important;transition:none!important}
.still .fx.narr p{opacity:1}

/* hint, replace note, end stats */
.hintbtn{right:30px;min-width:0;width:130px;height:58px;padding:0;font-size:24px;z-index:4;border-color:#ffd36a;color:#ffe7a8}
.lastlog{right:180px}
.hinted{animation:hinted 1s ease-in-out infinite!important;z-index:7!important}
.hcard.hinted .card,.shopslot.hinted .card{box-shadow:0 0 0 6px #ffd36a,0 0 34px #ffd36a!important}
.atk.hinted,.btn.hinted{box-shadow:0 0 0 5px #ffd36a,0 0 30px #ffd36a}
@keyframes hinted{50%{filter:brightness(1.25)}}
.still .hinted{filter:brightness(1.15)}
.vwarn{width:100%;margin:0;text-align:center;font-size:25px;color:#ffd36a}
.endst{display:flex;align-items:center;gap:40px;font-size:30px}
.endst div{display:flex;flex-direction:column;align-items:center;gap:4px}.endst span{color:var(--muted)}.endst i{color:var(--muted)}
.pick small.rec{display:block;font-size:22px;color:var(--muted)}

/* deck picker additions */
.dk-h{font-size:26px;color:var(--bronze-hi);margin-top:10px}
.dk-btns{display:flex;flex-direction:column;gap:8px;flex:none}
.deckrow .dk-btns .btn{min-height:56px;font-size:23px;padding:4px 18px}
.btn.newdeck{min-height:84px;font-size:28px;border-style:dashed}

/* deck builder */
.screen.build{padding-bottom:0}
.bstat{width:100%;display:flex;flex-wrap:wrap;gap:10px 22px;font-size:25px;color:#ffb3a8}
.bstat .ok{color:var(--ok)}.bstat span:nth-child(3){color:var(--muted)}.bstat .bw{color:#ffd36a}
.bhelp{margin:0;font-size:21px;color:var(--muted);width:100%}
.btile{position:relative;aspect-ratio:5/7;border-radius:11px;overflow:hidden;box-shadow:0 6px 14px #000a;cursor:pointer}
.btile img{width:100%;height:100%;display:block;object-fit:cover;filter:brightness(.82)}
.btile.in img{filter:none}.btile.in{outline:4px solid var(--bronze-hi)}
.bcount{position:absolute;left:6px;bottom:6px;font-size:30px;font-weight:bold;color:#fff;-webkit-text-stroke:3px #000;paint-order:stroke}
.bminus,.binfo{position:absolute;bottom:6px;width:52px;height:52px;border-radius:50%;border:2px solid var(--bronze);background:#1a120fdd;font-size:30px;padding:0;line-height:1}
.bminus{right:6px;display:none}.btile.in .bminus{display:block}
.binfo{right:6px;top:6px;bottom:auto;width:44px;height:44px;font-size:24px;font-style:italic}
.bbar{position:sticky;bottom:0;width:calc(100% + 80px);margin:10px -40px 0;padding:18px 24px 28px;display:flex;gap:12px;flex-wrap:wrap;justify-content:center;
  background:linear-gradient(180deg,#140e0cee,#140e0c);border-top:3px solid var(--line);z-index:3}
.bbar .btn{min-height:76px;font-size:25px;min-width:0;padding:8px 18px}

/* tutorial */
.overlay.tuto:not([hidden]){background:none;display:block;padding:0}
.tuto-hole{position:absolute;left:12px;right:12px;border-radius:24px;border:4px solid #ffd36a;box-shadow:0 0 0 2000px #000000c8,0 0 30px #ffd36a88;pointer-events:none}
.tuto-box{position:absolute;left:70px;right:70px;padding:28px 32px;border-radius:22px;background:#1a120f;border:3px solid var(--bronze-hi);display:flex;flex-direction:column;gap:14px}
.tuto-box b{font-size:38px;color:var(--bronze-hi)}.tuto-box p{margin:0;font-size:29px;line-height:1.35}
.tuto-box .row2{justify-content:flex-end}
.mlist .btn small{font-size:22px;color:var(--muted);font-weight:normal}

/* audit fixes: phone legibility, touch hover, states */
.overlay.top{z-index:36}
.menubtn{left:30px;right:auto;top:650px;width:110px;height:58px;font-size:32px}
.lastlog{left:160px;right:180px;font-size:27px}
.piles{font-size:26px}
.hname small{font-size:24px}
.atk .d{font-size:25px}
.shoplbl{font-size:26px}
.lockt{font-size:28px;font-weight:bold}
.ph-step{font-size:27px}
.vtop .btn{width:110px;height:96px;font-size:44px}
.chip.hot{border-color:#ffb347;color:#ffd9a0;box-shadow:0 0 12px #ff8a3a66}
.field .slotc.seen .card{outline:4px solid #ffd36a}
.field .slotc.seen::after{content:'vista';position:absolute;left:50%;top:8px;transform:translateX(-50%);font-size:20px;color:#1a120f;background:#ffd36a;border-radius:10px;padding:0 10px}
.banner{left:20px;right:20px;background:#2c1f17}
.fx.narr{top:180px;pointer-events:none}
@media (hover:hover){.hcard:hover{transform:translateY(-26px) scale(1.04)!important;z-index:5}}

/* round 2 fixes */
.toast{top:540px;pointer-events:none}
.states{position:absolute;left:18px;width:180px;display:flex;flex-direction:column;gap:8px;z-index:4;pointer-events:none}
.states .chip{font-size:22px;white-space:normal;line-height:1.15;background:#120c0add;padding:6px 12px}
.logbox h4{margin:18px 0 8px;font-size:24px;color:var(--bronze-hi);border-bottom:2px solid var(--line);padding-bottom:4px}
.bbar .bstat{flex-basis:100%;justify-content:center}
.btile .bminus{width:64px;height:64px;font-size:38px}
.btile .binfo{width:58px;height:58px;font-size:30px}
.menubtn,.hintbtn{height:66px}

/* layer for full screens, viewer and dialogs: 720 px wide, scaled to the table's width */
#layer{position:fixed;transform-origin:0 0;pointer-events:none;z-index:50}
#layer>*{pointer-events:auto}
#layer .screen{padding:84px 24px 40px;gap:22px;border-radius:0}
#layer .screen.col{padding-top:20px;gap:14px}
#layer .title{font-size:52px}
#layer .sub{max-width:100%;font-size:26px}
#layer .btn.back{left:16px;top:18px;font-size:26px;padding:10px 18px}
#layer .colhead .btn.back{top:4px;left:0}
#layer .mm-fan{height:420px}
#layer .mm-card{width:240px;height:336px;margin-left:-120px;top:30px}
#layer .mm-title{font-size:80px}
#layer .mlist{width:100%;max-width:520px}
#layer .pick{gap:18px}
#layer .pick .pc{width:200px;height:280px}
#layer .pick button{font-size:26px}
#layer .lvls .btn{min-width:0;flex:1 1 40%}
#layer .deckrow{flex-wrap:wrap;gap:12px}
#layer .dk-strip{width:190px;height:96px}
#layer .dk-strip img{width:68px;height:96px;margin-right:-38px}
#layer .dk-info{min-width:200px}
#layer .dk-btns{flex-direction:row;width:100%}
#layer .deckrow .dk-btns .btn{flex:1;min-height:70px;font-size:26px}
#layer .cgrid{grid-template-columns:repeat(3,1fr);gap:14px}
#layer .fchip{font-size:24px;padding:12px 18px}
#layer .search{font-size:28px}
#layer .srow{flex-wrap:wrap}
#layer .seg button{font-size:24px;padding:16px 14px;min-width:70px}
#layer .logbox{width:100%;font-size:26px}
#layer .bbar{width:calc(100% + 48px);margin:10px -24px 0}
#layer .bbar .btn{flex:1 1 30%;min-height:80px;font-size:26px}
#layer .bstat{font-size:24px}
/* viewer */
#layer .viewer{padding:16px 24px 28px;gap:14px}
#layer .vcard{width:min(520px,100%);height:auto;aspect-ratio:5/7;max-height:52%}
#layer .vcard .card{width:100%;height:100%}
#layer .vtop .btn{width:96px;height:84px;font-size:40px}
#layer .varrow{top:30%;width:76px;height:130px;font-size:64px}
#layer .varrow.l{left:4px}#layer .varrow.r{right:4px}
#layer .vinfo h3{font-size:40px}
#layer .vtext{font-size:28px}
#layer .vact .btn{flex:1 1 40%;min-width:0;min-height:96px;font-size:30px}
/* dialogs over screens */
#layer .overlay.dlg{z-index:60;padding:40px 30px}
#layer .overlay.dlg .row2 .btn{flex:1;min-width:0}
.hand .hcard{width:var(--hw,190px);height:var(--hh,266px)}
#layer .dk-strip{width:220px;overflow:hidden;border-radius:8px}
.chip.uni{border-color:#ffd36a;color:#ffe7a8}
.btile .card{border-radius:11px}
.btile.isuni{outline:3px dashed #ffd36a}
.dk-txt{width:68px;height:96px;margin-right:-38px;border-radius:6px;border:3px solid var(--c);background:#e9d9b6;color:#24140c;font-size:12px;padding:4px;overflow:hidden;flex:none}

/* round 3 */
.pres{display:flex;flex-direction:column;gap:12px;width:100%}
.pres-c{display:grid;grid-template-columns:110px 1fr;grid-template-rows:auto auto auto;gap:4px 16px;align-items:center;padding:12px;border-radius:16px;border:2px solid var(--line);background:#0006}
.pres-c.up{border-color:var(--ok)}.pres-c.down{border-color:#6b5a3a;opacity:.8}
.pres-img{grid-row:1/4;width:110px;height:154px}
.pres-c b{font-size:28px}.pres-tag{font-size:24px;color:var(--bronze-hi)}
.pres-b{display:flex;gap:10px}.pres-b .btn{min-width:0;flex:1;min-height:64px;font-size:24px}
.atk .x{font-size:21px;color:#ffe7a8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.atks{height:118px}
.states .chip{font-size:20px;padding:4px 10px}
.ttile{width:100%;height:100%;border:5px solid var(--c);border-radius:11px;background:linear-gradient(180deg,#f1e2c3,#d9c398);color:#24140c;padding:10px 8px;display:flex;flex-direction:column;gap:6px;text-align:left;position:relative}
.ttile b{font-size:26px;line-height:1.1;margin-top:34px}
.ttile .tt-cost{position:absolute;left:8px;top:8px;width:36px;height:36px;border-radius:50%;background:#3a1e14;color:#ffe9c6;display:flex;align-items:center;justify-content:center;font-weight:bold;font-size:22px}
.ttile .tt-type{font-size:19px;opacity:.8}.ttile .tt-mec{font-size:20px;font-weight:bold;color:#6b2a20;margin-top:auto}
.fx.float{z-index:3}
.fx.narr{opacity:.94}
.menubtn,.hintbtn{width:150px;height:76px;font-size:30px}
.lastlog{left:190px;right:200px}
#endturn{font-size:28px;min-width:170px}
#reroll{font-size:26px;min-height:80px}
.states .chip.more{pointer-events:auto;cursor:pointer;border-color:var(--bronze-hi);color:var(--bronze-hi);font-family:var(--serif)}
.logbox.stlist{display:flex;flex-direction:column;gap:12px}.logbox.stlist .chip{white-space:normal;font-size:26px}
.atk .x{font-size:24px}
.hcard{margin:0}

/* round 5: in-game sheets on the large layer; bigger setup banner and tutorial */
#layer .overlay.sheet3{z-index:25;padding:40px 24px;gap:24px;background:#000000e6}
#layer .sheet3 .title{font-size:56px}
#layer .sheet3 .logbox{width:100%;max-height:70%;font-size:28px}
#layer .sheet3 .row2 .btn{flex:1 1 40%;min-width:0;min-height:92px;font-size:30px}
#layer .sheet3 .mlist{width:100%}
#layer .sheet3 .endst{font-size:34px}
.banner{height:150px;font-size:32px;line-height:1.2}
.banner .btn{min-height:110px;min-width:220px;font-size:36px}
.tuto-box{left:30px;right:30px;padding:34px}
.tuto-box b{font-size:48px}.tuto-box p{font-size:38px}
.tuto-box .btn{min-height:100px;font-size:34px;padding:10px 26px}
.portrait{cursor:pointer}
#layer .sheet3>.btn{min-height:88px;min-width:280px;font-size:32px}
.fx.narr .nsum{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:30px;font-weight:bold;margin:2px 0 10px;padding-bottom:8px;border-bottom:2px solid var(--line)}
.fx.narr .nsum .bad{color:#ff8a78}.fx.narr .nsum .good{color:#9fe38a}
.states .chip.more{font-size:24px;padding:8px 14px}
/* viewer card: fit both width and height without cropping (comment 26 nov) */
#layer .viewer{container-type:size}
#layer .vcard{max-height:none;height:auto;width:min(520px,calc(100cqw - 48px),calc(52cqh * 5 / 7))}
#layer .vcard .card{background-size:contain}
/* progression (proposal): packs, owned copies, deck guide */
.btn.gold{background:linear-gradient(180deg,#d9a441,#8a5a12);border-color:#ffd36a;color:#fff6dd;font-weight:bold}
.r-com{--rc:#b9b2a6}.r-rar{--rc:#5fa8ff}.r-epi{--rc:#c07bff}.r-leg{--rc:#ffcc4d}.r-uni{--rc:#ff8a3d}
.odds span[class^="r-"]{color:var(--rc);font-weight:bold}
.odds{width:100%;font-size:24px;line-height:1.5;color:var(--muted);background:#0006;border:2px solid var(--line);border-radius:14px;padding:14px 18px}
.colprog{width:100%;font-size:24px;color:var(--muted);display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.colprog .btn{font-size:22px;padding:8px 14px;min-height:0}
.ctile{position:relative}
.ctile.notown>*:first-child{filter:grayscale(1) brightness(.45)}
.ctile .own,.btile .own{position:absolute;left:6px;bottom:6px;background:#000c;border-radius:8px;padding:2px 8px;font-size:20px;color:#fff}
.ctile .own.no{color:#c9b9a3;font-size:16px}
.new{position:absolute;right:6px;top:6px;background:#ffcc4d;color:#2a1a05;border-radius:8px;padding:2px 8px;font-size:16px;font-weight:bold}
.pack{width:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:14px;justify-items:center}
.pk-card{position:relative;width:100%;aspect-ratio:5/7;border-radius:12px;padding:0;border:4px solid var(--rc,#6b5038);background:#000;overflow:hidden;box-shadow:0 6px 14px #000a}
.pk-card img,.pk-card .ttile{width:100%;height:100%;object-fit:cover;display:block}
.pk-card.down{background:radial-gradient(circle at 50% 40%,#5a3a22,#1a0f08);border-color:#6b5038}
.pk-card.down::after{content:"Λ";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:64px;color:#c8955a88}
.pk-card.glow{border-color:var(--rc);box-shadow:0 0 22px var(--rc),0 6px 14px #000a;animation:pkGlow 1.4s ease-in-out infinite alternate}
@keyframes pkGlow{to{box-shadow:0 0 40px var(--rc),0 6px 14px #000a}}
.pk-card.up{animation:pkFlip .35s ease-out}
@keyframes pkFlip{from{transform:rotateY(90deg)}}
.pk-rar{position:absolute;left:0;right:0;bottom:0;background:#000c;color:var(--rc);font-size:20px;font-weight:bold;padding:4px 0}
.pk-ess{position:absolute;left:0;right:0;top:0;background:#000c;color:#ffd36a;font-size:18px;padding:3px 0}
.still .pk-card{animation:none!important}
.reward{font-size:30px;color:#ffe7a8;text-align:center}
.dk-miss{color:#ff9a7a}
.tline{flex-basis:100%;display:flex;flex-wrap:wrap;justify-content:center;gap:4px 12px;font-size:20px}
.tline i{font-style:normal;color:#ff9a7a}.tline i.ok{color:#9be29b}.tline i.hi{color:#ffd36a}
#layer .overlay.dlg:has(.guide){justify-content:flex-start;overflow-y:auto}
.guide{width:100%;display:flex;flex-direction:column;gap:14px}
.guide .gnote{font-size:22px;color:var(--muted);margin:0}
.gtype{background:#0006;border:2px solid var(--line);border-radius:14px;padding:12px 16px}
.gtype .gh{display:flex;justify-content:space-between;font-size:28px}
.gtype .gh .ok{color:#9be29b}.gtype .gh .bw{color:#ff9a7a}
.gtype p{margin:6px 0;font-size:22px;color:var(--muted)}
.gsug{display:flex;flex-wrap:wrap;gap:8px}
.gsug .fchip{font-size:22px;padding:8px 12px}
.vown{font-size:26px;color:var(--muted);align-self:center}
#layer .overlay.dlg:has(.guide){background:#0d0907}
.btile.notown>*:first-child{filter:grayscale(1) brightness(.45)}

/* Torre de las Almas, missions, Sello (proposal) */
.tw{width:100%;display:flex;flex-direction:column;gap:8px}
.tw-f{display:grid;grid-template-columns:52px 1fr auto;align-items:center;gap:14px;padding:10px 16px;border:2px solid var(--line);border-radius:12px;background:#0006;font-size:24px;color:var(--muted)}
.tw-f b{font-size:30px;text-align:center}
.tw-f span{display:flex;flex-direction:column}.tw-f small{font-size:20px;opacity:.8}
.tw-f i{font-style:normal;font-size:20px;color:#ffe7a8;text-align:right}
.tw-f.done{opacity:.55}.tw-f.done b::after{content:' ✓';font-size:20px}
.tw-f.cur{border-color:var(--bronze-hi);color:#fff;background:#3a2414cc;box-shadow:0 0 18px #c98b3a66}
.hearts{color:#e0524a;letter-spacing:4px}
.tw-decks{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.mis{width:100%;display:flex;align-items:center;gap:14px;padding:12px 16px;border:2px solid var(--line);border-radius:12px;background:#0006;font-size:24px}
.mis>div{flex:1;display:flex;flex-direction:column;gap:4px}.mis span{color:var(--muted);font-size:20px}
.mis em{font-style:normal;font-size:26px;color:var(--bronze-hi)}
.mis .btn{font-size:20px;padding:8px 12px;min-height:0}
.mis.ok{opacity:.6}.mis.ok em{color:#8fd18a}
.mbar{display:block;height:8px;border-radius:4px;background:#ffffff1a;overflow:hidden}.mbar i{display:block;height:100%;background:linear-gradient(90deg,#c98b3a,#ffe7a8)}
.seal-o p{margin:6px 0 0;font-size:22px;line-height:1.35}.seal-o [data-so]{cursor:pointer}

/* ---- phone legibility pass (mobile audit, 26 nov): the 1080-px table is shown at ~0.35–0.40 on phones,
   so key numbers get ≥30 table px (≈11–12 CSS px) and buttons a ≥44-CSS-px touch area ---- */
.tag{display:none}
.hname{font-size:36px;line-height:1.15}.hname small{font-size:26px}
.hp{height:42px;border-radius:21px}.hp>b{font-size:31px;font-weight:bold;text-shadow:0 2px 3px #000}
.stats{font-size:33px;gap:12px}.chip{padding:2px 12px}.coin{width:28px;height:28px}.shield{width:25px;height:30px}
.pip{width:27px;height:27px}
.piles{font-size:28px;gap:2px}
.field .ghost{font-size:23px}
.ph-step{font-size:32px}
.lastlog{font-size:31px;height:66px}
.atk .n{font-size:31px;line-height:1.1}.atk .d{font-size:26px;line-height:1.15}.atk .x{font-size:24px;line-height:1.15}.atk .g{transform:scale(.85)}
#endturn{font-size:36px;min-width:210px;line-height:1.1}
#reroll{font-size:31px}.shoplbl{font-size:30px}
.price{font-size:31px;padding:2px 14px;bottom:-22px}
.lockt{font-size:28px}
.banner{font-size:31px}
.toast{font-size:36px;padding:26px}
.fx.narr{font-size:32px}.fx.narr b{font-size:36px}
#reroll,#endturn,.portrait{position:relative}
.menubtn,.hintbtn{font-size:32px}
.menubtn::after,.hintbtn::after,.portrait::after{content:'';position:absolute;inset:-16px}
.atk{gap:0;padding-top:2px;padding-bottom:2px;justify-content:center}.atk .n{font-size:29px}

.bktxt{width:100%;height:220px;font-size:20px;font-family:monospace;background:#0008;color:var(--ink);border:2px solid var(--line);border-radius:12px;padding:12px;resize:none;-webkit-user-select:text;user-select:text}

.dk-lock{width:100%}.dk-lock summary{font-size:26px;color:var(--bronze-hi);padding:14px 6px;cursor:pointer;list-style-position:inside}
.dk-lock[open] summary{margin-bottom:8px}
.dk-info .mbar{margin-top:4px;width:100%}

.pk-card.down.last{outline:3px solid #ffe7a8aa;outline-offset:4px}
.pk-card.down.r-rar.glow{animation-duration:2.4s}
.mis .btn{min-width:0;width:auto;flex:none;padding:8px 16px}.mis{gap:10px}

/* rival summary over the hand, tap to close (mobile audit #7) */
.fx.narr{top:auto;bottom:24px;pointer-events:auto;cursor:pointer;max-height:46%;overflow:hidden}
.fx.narr small{display:block;margin-top:8px;font-size:24px;color:var(--muted);text-align:right}
#endturn.ready{animation:ready 1.4s ease-in-out infinite}

.ftoggle{flex:none;align-self:flex-start;font-size:26px;padding:10px 24px;height:auto;line-height:1.2;width:auto}
.fbox{flex:none;width:100%;display:flex;flex-direction:column;gap:10px}.fbox[hidden]{display:none}

/* main menu: secondary entries share rows so the menu fits an iPhone SE without scrolling */
.mrow{display:flex;gap:14px;width:100%}.mrow .btn{flex:1;min-width:0;padding-left:6px;padding-right:6px}

/* screen controls: bigger targets and text (mobile audit #14) */
#layer .btn.back{padding:12px 22px;font-size:28px}
#layer .btn.back::after{content:'';position:absolute;inset:-14px}
#layer .btn.back{position:absolute}
.seg button{min-height:56px;font-size:24px}
.fchip{min-height:52px;font-size:24px}
.mis .btn{min-height:56px;font-size:24px}
.mis span{font-size:22px}
.tw-f small,.tw-f i{font-size:22px}
#twgo{font-size:32px;padding:16px 30px}
.new{font-size:18px}
.pk-rar{font-size:24px}
.odds{font-size:26px}
.own{font-size:18px}
/* builder: title clear of the back button; a slimmer bottom bar (mobile audit #25) */
#layer .screen.build .colhead .title{padding:0 150px}   /* symmetric: the title stays centred (José, 29 nov) */
#layer .bbar{padding:10px 16px 16px;gap:8px}
#layer .bbar .btn{flex:1 1 22%;min-height:62px;font-size:23px;padding:6px 8px}
#layer .bbar #bsave,#layer .bbar #bplay{flex:1 1 40%;min-height:70px;font-size:26px}
#layer .bstat{font-size:22px;gap:4px 16px}
.tline{font-size:19px}

/* portrait: number of active states, so it reads as tappable (audit #26) */
.pbadge{position:absolute;right:-6px;bottom:-6px;min-width:40px;height:40px;border-radius:20px;background:var(--bronze);color:#1a120f;font-size:26px;font-weight:bold;display:flex;align-items:center;justify-content:center;border:3px solid #1a120f}

/* tutorial box readable on phones (audit #11) */
.tuto-box{font-size:36px}.tuto-box b{font-size:42px}.tuto-box .btn{font-size:32px;min-height:96px;padding:10px 26px}

.switch{flex:none;width:104px;height:60px;border-radius:30px;border:3px solid var(--line);background:#0008;position:relative;padding:0;transition:background .2s}
.switch i{position:absolute;top:5px;left:6px;width:44px;height:44px;border-radius:50%;background:var(--muted);transition:left .2s,background .2s}
.switch.on{background:#3d7a3a;border-color:#8fc27a}.switch.on i{left:48px;background:#fff}
#layer .srow:has(>.switch){flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between}
.hcard{touch-action:none}

/* sealed pack before the reveal (audit #24): tap or swipe to tear it */
.sealed{flex:none;width:340px;height:480px;margin-top:20px;border-radius:22px;border:4px solid #e9c77a;cursor:pointer;position:relative;overflow:hidden;touch-action:none;
  background:linear-gradient(160deg,var(--hc),#1a120f 70%);box-shadow:0 18px 40px #000a,inset 0 0 40px #0008;animation:pkIdle 2.4s ease-in-out infinite}
.sealed span{position:absolute;left:0;right:0;top:44%;text-align:center;font-size:40px;letter-spacing:6px;color:#f6e2b0;text-shadow:0 2px 6px #000}
.sealed i{position:absolute;left:0;right:0;top:16%;height:6px;background:repeating-linear-gradient(90deg,#e9c77a 0 14px,transparent 14px 22px);opacity:.8}
.sealed.rich{box-shadow:0 0 50px #c58be8aa,0 18px 40px #000a}
.sealed.tear{animation:pkTear .5s ease-in forwards}
@keyframes pkIdle{50%{transform:translateY(-8px) rotate(-1deg)}}
@keyframes pkTear{30%{transform:scale(1.06) rotate(2deg)}100%{transform:scale(1.3);opacity:0;filter:brightness(2)}}
.still .sealed{animation:none}

/* affordable hand cards lift a little and glow brighter on your turn (dead-turn study) */
.hcard.can .card{box-shadow:0 0 0 4px #ffd36a,0 0 30px #ffd36aaa}
.hcard.can{margin-top:-14px}

/* ---- round 7 (27 nov): touch areas ≥44 CSS px (≈122 table px at 390 px) and key numbers ≥11 CSS px ---- */
.fx.narr{pointer-events:none}
.menubtn::after,.hintbtn::after{inset:-30px -14px}
#reroll::after,#endturn::after{content:'';position:absolute;inset:-22px -8px}
.states .chip.more{position:relative}.states .chip.more::after{content:'';position:absolute;inset:-22px -10px}
.atk .d{font-size:31px;line-height:1}.atk .x{font-size:30px;line-height:1}.atk .n{line-height:1.02}.atk .g{margin:-3px 0}
.field .ghost{font-size:24px}
.piles{font-size:31px}
.guide .gx{position:sticky;top:0;align-self:flex-end;z-index:2;min-width:0;width:96px;height:96px;padding:0;font-size:40px;border-radius:50%;margin-bottom:-96px}
#gclose{min-height:96px}

/* ---- field design (27 nov): bigger equipment slots; empty slots show an icon and a label on the side the hero card does not cover ---- */
.field .slotc{width:156px;height:218px}
.field .ghost{flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:0 10px;font-size:26px;color:#c9b48f;border-color:#8a6a4a88;background:#00000040}
.field .ghost i{font-style:normal;font-size:54px;line-height:1;opacity:.55;color:var(--bronze-hi)}
.field .ghost span{white-space:nowrap;max-width:100%}
.field .ghost.gl{align-items:flex-start;padding-left:14px}.field .ghost.gr{align-items:flex-end;padding-right:14px}
.field .ghost.gt{justify-content:flex-start;padding-top:12px}
/* turn timer: a bar on the centre line, red and pulsing in the last 10 s */
.tclock{left:80px;right:80px;height:10px;border-radius:5px;background:#ffffff14;overflow:hidden}
.tclock i{display:block;height:100%;border-radius:5px;background:linear-gradient(90deg,var(--bronze),var(--bronze-hi));transition:width .25s linear}
.tclock.low i{background:linear-gradient(90deg,#b8453a,#ff8a78);animation:tpulse 1s ease-in-out infinite}
@keyframes tpulse{50%{opacity:.45}}
.ph-step #tsec{font-variant-numeric:tabular-nums}
.field .ghost span{font-size:24px}.field .ghost.gl{padding-left:10px}.field .ghost.gr{padding-right:10px}
.field .ghost.gb{justify-content:flex-end;padding-bottom:12px}
.field .hero{z-index:5}.field .ghost span{font-size:22px}
.states{z-index:6}
/* responsive field (27 nov): on tall phones the equipment and hero scale up from the top centre (FS in ui.js) */
.field .fieldin{position:absolute;left:0;right:0;top:0;height:400px;transform-origin:50% 0}
/* idle help (27 nov): after a few seconds without input the playable zones pulse (#board.nudge, ui.js) */
@keyframes nudge{0%,100%{box-shadow:0 0 0 4px #ffd36a,0 0 26px #ffd36a99}50%{box-shadow:0 0 0 7px #ffe7a8,0 0 60px #ffd36a}}
@keyframes nudgeUp{0%,100%{translate:0 0}50%{translate:0 -18px}}
#board.nudge .hcard.can .card,#board.nudge .shopslot.can .card{animation:nudge 1.3s ease-in-out infinite}
#board.nudge .hcard.can{animation:nudgeUp 1.3s ease-in-out infinite}
#board.nudge .atk.ready{animation:nudge 1.3s ease-in-out infinite;border-color:#ffe7a8}
#board.nudge #endturn.ready{animation:nudge 1.3s ease-in-out infinite}
@media (prefers-reduced-motion:reduce){#board.nudge .hcard.can{animation:none}}
.still #board.nudge .hcard.can{animation:none}
/* v32: mulligan, history strip, attack aim, quick phrases, keywords, weekly rule, «Elige 1 de 3» */
.banner #mull{min-width:170px;font-size:28px;line-height:1.1}
.mull{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;width:100%}
.mull .mc{position:relative;padding:0;border:4px solid transparent;border-radius:14px;background:none;aspect-ratio:5/7;overflow:hidden}
.mull .mc .card{width:100%;height:100%}
.mull .mc.out{border-color:#ff8a6a}.mull .mc.out .card{filter:grayscale(.7) brightness(.55)}
.mull .mc b{position:absolute;left:0;right:0;top:42%;text-align:center;font-size:26px;color:#ffd0c0;text-shadow:0 2px 4px #000}
.modetag{left:0;right:0;text-align:center;font-size:22px;color:#ffe7a8;pointer-events:none;letter-spacing:.04em}
.hist{right:12px;width:96px;display:flex;flex-direction:column;gap:8px;z-index:7;cursor:pointer}
.hist .hi{position:relative;width:96px;height:134px;border-radius:9px;border:3px solid var(--hc);box-shadow:0 4px 10px #000a;overflow:hidden;background:#120c0a}
.hist .hi .card{width:100%;height:100%;font-size:9px}
.hist .hi.rv{opacity:.92}
.hist .hi i{position:absolute;right:2px;bottom:2px;width:38px;height:38px;border-radius:50%;background:#000c;border:2px solid var(--hc);font-style:normal;font-size:24px;line-height:34px;text-align:center;color:#fff}
.hist::after{content:'';position:absolute;inset:-6px -12px -6px -10px}
.hlist{display:flex;flex-direction:column;gap:10px;width:100%;max-height:60vh;overflow:auto}
.hrow{display:flex;align-items:center;gap:16px;padding:8px 12px;border-radius:14px;border:2px solid var(--hc);background:#1a120f;color:inherit;font-size:26px;text-align:left}
.hrow .ht{flex:none;width:64px;height:90px;border-radius:7px;overflow:hidden}.hrow .ht .card{width:100%;height:100%}
.emobtn{left:24px;min-width:0;width:96px;height:80px;padding:0;font-size:40px;z-index:7;border-radius:40px}
.emobtn::after{content:'';position:absolute;inset:-10px}
.emos{display:grid;grid-template-columns:1fr 1fr;gap:14px;width:100%}.emos .btn{min-height:88px;font-size:30px}
.fx.bubble{left:290px;right:290px;z-index:9;padding:18px 26px;border-radius:30px;background:#f4ead7;color:#2a1a10;font-size:40px;font-weight:bold;text-align:center;box-shadow:0 8px 24px #000a;animation:bubIn 2.4s ease-out forwards;pointer-events:none}
@keyframes bubIn{0%{opacity:0;transform:scale(.6)}8%{opacity:1;transform:scale(1.05)}14%{transform:scale(1)}85%{opacity:1}100%{opacity:0}}
.fx.aim{inset:0;z-index:12;pointer-events:none}
.fx.aim svg{position:absolute;left:0;top:0}
.fx.aim path{opacity:.75}.fx.aim.on path{opacity:1;stroke:#ffe9a8}
.aimlbl{position:absolute;left:0;right:0;text-align:center;font-size:64px;font-weight:bold;color:#ff6a55;-webkit-text-stroke:4px #000;paint-order:stroke}
.aimlbl small{display:block;font-size:28px;color:#f4ead7;-webkit-text-stroke:3px #000}
.aimlbl.lethal{color:#ffd36a}
.hp>s.hpv{position:absolute;top:0;bottom:0;background:repeating-linear-gradient(45deg,#ffd36a,#ffd36a 8px,#ff6a55 8px,#ff6a55 16px);animation:hpv 0.8s ease-in-out infinite alternate;text-decoration:none}
@keyframes hpv{from{opacity:.45}to{opacity:1}}
.anext{font-size:22px;color:#c9b6ff;margin-left:4px;font-weight:bold}
.vkw{margin-top:10px;font-size:24px;color:#e8dccb;text-align:left;border-top:1px solid #5a4636;padding-top:8px}
.vkw summary{font-size:24px;color:var(--bronze-hi);cursor:pointer}
.vkw p{margin:6px 0;line-height:1.3}
.cgrid.draft{grid-template-columns:repeat(3,1fr)}
.atk{touch-action:none}
/* v33: grouped menu (Jugar / Colección hubs) */
.mlist.modes{width:600px}
.btn.mode{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:4px;padding:16px 26px;min-height:104px}
.btn.mode b{font-size:34px}.btn.mode small{font-size:23px;color:var(--muted);font-weight:normal;line-height:1.25}
.btn.mode.main small,.btn.mode.gold small{color:#f4ead7cc}
/* v34: Refinería (upgrade glows: +1 green, +2 blue, +3/+4 red, +5 purple) */
.up1{--uc:#3fd46b}.up2{--uc:#4aa3ff}.up3{--uc:#ff4a3a}.up4{--uc:#ff2a1a}.up5{--uc:#b25cff}
.slotc.up1 .card,.slotc.up2 .card,.slotc.up3 .card,.slotc.up4 .card,.slotc.up5 .card,.refc[class*=up] .card,.vcard[class*=up] .card{box-shadow:0 0 0 4px var(--uc),0 0 22px 6px var(--uc);animation:upglow 2.2s ease-in-out infinite}
.slotc.up4 .card,.refc.up4 .card,.vcard.up4 .card{box-shadow:0 0 0 6px var(--uc),0 0 34px 12px var(--uc)}
.slotc.up5 .card,.refc.up5 .card,.vcard.up5 .card{box-shadow:0 0 0 6px var(--uc),0 0 40px 14px var(--uc),0 0 12px 3px #fff inset}
@keyframes upglow{50%{filter:brightness(1.12)}}
.slotc[data-up]::after,.refc[data-up]::after{content:attr(data-up);position:absolute;right:-8px;top:-10px;z-index:3;min-width:52px;padding:2px 8px;border-radius:20px;background:var(--uc);color:#fff;font:bold 28px/1.2 var(--serif);text-align:center;box-shadow:0 2px 6px #000}
.refbtn{right:24px;min-width:0;height:80px;padding:0 22px;font-size:30px;z-index:7;border-color:#ffd36a;color:#ffe7a8;animation:nudge 1.6s ease-in-out infinite}
.refrow{display:flex;gap:18px;align-items:center;width:100%;padding:12px;border-radius:16px;background:#1a120f;border:2px solid #5a4636;margin-bottom:12px;text-align:left}
.refrow b{font-size:30px;display:block}.refrow span{font-size:24px;color:var(--muted);display:block;margin:4px 0 10px}
.refrow .btn{min-height:76px;font-size:28px}
.refc{position:relative;flex:none;width:130px;height:182px;border-radius:10px}.refc .card{width:100%;height:100%}
.refc.empty{border:3px dashed #5a4636;display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:24px}
.reftab{width:100%;border-collapse:collapse;font-size:24px;margin:6px 0 14px}.reftab th,.reftab td{padding:6px 8px;border-bottom:1px solid #3a2c22;text-align:center}
.reftab .sw{display:inline-block;width:18px;height:18px;border-radius:50%;background:var(--uc);margin-right:6px;vertical-align:-2px;box-shadow:0 0 8px var(--uc)}
.still .slotc[class*=up] .card,.still .refbtn{animation:none}
@media (prefers-reduced-motion:reduce){.slotc[class*=up] .card,.refbtn{animation:none}}
/* v35: guided tutorial */
.coach{left:40px;right:40px;z-index:20;padding:22px 28px;border-radius:22px;background:#1c130eF2;border:4px solid #ffd36a;box-shadow:0 12px 40px #000c;font-size:30px;line-height:1.3;color:#f4ead7}
.coach b{color:#ffd36a;font-size:26px;letter-spacing:.04em}.coach p{margin:8px 0 14px}
.coach .row2{justify-content:flex-end}.coach .btn{min-height:84px;font-size:30px}
.tutfocus{outline:6px solid #ffd36a;outline-offset:6px;border-radius:18px;animation:tutpulse 1.1s ease-in-out infinite;z-index:19!important}
@keyframes tutpulse{50%{outline-color:#fff3c4;outline-offset:12px}}
.modetag{left:24px;right:auto;text-align:left;font-size:24px;padding:4px 14px;border-radius:14px;background:#120c0acc;border:1px solid #6b5137}
/* viewer: long card texts scroll inside the info box so Vender/Jugar stay visible at the bottom (comment 27 nov) */
#layer .vinfo{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding:0 6px 8px;scrollbar-width:thin;scrollbar-color:var(--bronze) transparent}
#layer .vinfo::-webkit-scrollbar{width:8px}#layer .vinfo::-webkit-scrollbar-thumb{background:var(--bronze);border-radius:4px}
#layer .vact{flex:none;margin-top:0}
.viewer .vtop,.viewer .vcard{flex:none}#layer .vinfo{overflow-x:hidden;border-bottom:1px solid #5a463688}
/* deck builder: the bottom bar collapses to one handle; it glows when the deck is ready (José, 27 nov) */
.bbar{flex-direction:column;align-items:stretch}
.bbar .bbody{display:none;flex-wrap:wrap;gap:8px;justify-content:center}
.bbar.open .bbody{display:flex}
.bbar .bhandle{width:100%;min-height:64px;display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:25px;padding:6px 18px}
.bbar .bhandle span{font-size:21px;color:var(--muted);font-weight:normal}
.bbar .bhandle.ready{border-color:#ffd36a;color:#ffe7a8;animation:nudge 1.6s ease-in-out infinite}
.bbar .bhandle.ready span{color:#ffe7a8cc}
#layer .bbar{padding:8px 16px 12px}
#layer .bbar .bhandle{flex:none;min-height:64px;font-size:25px}
.still .bbar .bhandle.ready{animation:none;box-shadow:0 0 0 4px #ffd36a}
#layer .screen.build{padding-bottom:0}#layer .screen.build .bbar{padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
/* piles on your field (José, 27 nov): deck face down + discard face up, right edge */
.field .pile{position:absolute;right:16px;width:100px;height:140px;padding:0;border:0;background:none;z-index:4;cursor:pointer}
.field .pile .card{width:100%;height:100%;border-radius:9px;font-size:9px}
.field .pile.deck .card{box-shadow:3px 3px 0 #1a120f,6px 6px 0 #2a1d17,8px 8px 10px #000a}
.field .pile.disc .card{filter:saturate(.75) brightness(.9);box-shadow:0 6px 12px #000a}
.field .pile:not(:has(.card)){border:3px dashed #5a4636;border-radius:9px}
.field .pile b{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);min-width:52px;padding:2px 8px;border-radius:18px;background:#000c;border:2px solid var(--bronze);font-size:28px;color:#fff}
.field .pile span{position:absolute;left:0;right:0;bottom:-30px;font-size:20px;color:var(--muted);text-align:center}
.field .pile::after{content:'';position:absolute;inset:-8px}
.piles .tapd{cursor:pointer;text-decoration:underline dotted;text-underline-offset:4px}
.cgrid.search{grid-template-columns:repeat(3,1fr);max-height:calc(var(--lh,100vh) * .56);overflow-y:auto;width:100%}#ov2 .cgrid.search .btile{cursor:pointer}
#layer .viewer.ontop{z-index:70}
#layer .cgrid.search{grid-auto-rows:max-content;align-content:start;flex:0 1 auto;min-height:0;padding:4px}#layer .cgrid.search .btile{aspect-ratio:5/7;height:auto}
/* pack opening on the altar (PENDIENTE art in juego/sobre/) */
.screen.pkopen{justify-content:flex-start;overflow:hidden}
.pkbg{position:absolute;inset:0;z-index:0;background:#120c0a url(sobre/fondo.webp) center bottom/cover no-repeat}
.pkbg::after{content:'';position:absolute;inset:0;background:linear-gradient(#000a,#0000 30%,#0000 70%,#000c)}
.screen.pkopen>*:not(.pkbg){position:relative;z-index:1}
.sobre{position:relative;width:min(58%,330px);aspect-ratio:521/900;margin-top:6%;padding:0;border:0;background:none;cursor:pointer;touch-action:none;
  filter:drop-shadow(0 22px 26px #000c);animation:pkIdle 2.6s ease-in-out infinite}
.sobre img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
.sobre img.op{opacity:0}
.sobre .beam{position:absolute;left:8%;right:8%;top:-60%;height:70%;opacity:0;pointer-events:none;
  background:radial-gradient(ellipse 50% 80% at 50% 100%,var(--beam),transparent 70%);filter:blur(6px);mix-blend-mode:screen}
.sobre .fly{position:absolute;left:34%;top:6%;width:32%;aspect-ratio:5/7;border-radius:8px;opacity:0;pointer-events:none;
  background:linear-gradient(135deg,#3a2a1c,#1a120f);border:3px solid var(--bronze);box-shadow:0 0 16px var(--beam)}
@keyframes pkIdle{50%{transform:translateY(-8px)}}
.sobre.shake{animation:pkShake .48s ease-in-out}
@keyframes pkShake{0%,100%{transform:none}15%{transform:rotate(-3deg) scale(1.02)}35%{transform:rotate(3deg) scale(1.04)}55%{transform:rotate(-2deg) scale(1.05)}75%{transform:rotate(2deg) scale(1.06)}}
.sobre.torn{animation:none;transform:scale(1.06)}
.sobre.torn img.cl{opacity:0;transition:opacity .08s}.sobre.torn img.op{opacity:1;transition:opacity .08s}
.sobre.torn .beam{animation:pkBeam 1.2s ease-out forwards}
@keyframes pkBeam{0%{opacity:0;transform:scaleY(.2)}25%{opacity:1;transform:scaleY(1.1)}100%{opacity:.85;transform:scaleY(1)}}
.sobre.torn .fly{animation:pkFly .9s cubic-bezier(.2,.8,.3,1) forwards}
.sobre.torn .f1{--x:-120%;--r:-18deg;animation-delay:.25s}.sobre.torn .f2{--x:0%;--r:0deg;animation-delay:.35s}.sobre.torn .f3{--x:120%;--r:18deg;animation-delay:.45s}
@keyframes pkFly{0%{opacity:0;transform:translateY(40%)}20%{opacity:1}100%{opacity:1;transform:translate(var(--x),-95%) rotate(var(--r))}}
.still .sobre,.still .sobre.shake{animation:none}
@media (prefers-reduced-motion:reduce){.sobre{animation:none}}
.pkbg.dim{filter:brightness(.45) blur(2px)}.screen.pkopen:has(.pack){overflow-y:auto}
/* card back «Alma Eterna» (REV-005, APROBADA by José 27 nov) on every face-down card */
.card.back,.card.back.hec{background:#1a120f var(--rev-min,url(reverso_min.webp)) center/cover no-repeat;border:0}
.card.back::after{content:none}
#viewer .card.back,.vcard .card.back{background-image:var(--rev,url(reverso.webp))}
.pk-card.down{background:#1a120f var(--rev-min,url(reverso_min.webp)) center/cover no-repeat}
.pk-card.down::after{content:none}
.sobre .fly{background:#1a120f var(--rev-min,url(reverso_min.webp)) center/cover no-repeat;border:2px solid #c8955a}
/* piles: each name sits inside its own card, so "Mazo" no longer hangs over the discard pile below it (comment 27 nov) */
.field .pile span{bottom:6px;left:6px;right:6px;font-size:17px;line-height:1.3;color:#fff;background:#000c;border-radius:8px;padding:1px 0}
.field .pile.disc span{color:#e8c9a0}
.field .pile b{top:40%}
/* tutorial coach: lower box; one-line reminder while acting (José, 27 nov) */
.coach.mini{display:flex;align-items:center;gap:16px;padding:12px 16px 12px 24px;border-width:3px;font-size:28px}
.coach.mini b{flex:none;font-size:24px}.coach.mini span{flex:1;font-weight:bold;color:#ffe7a8}
.coach.mini .btn{flex:none;min-width:0;width:72px;min-height:64px;padding:0;font-size:32px}
.coach.bump{animation:coachBump .35s ease-out}
@keyframes coachBump{30%{transform:scale(1.04);border-color:#fff}}
/* Arma / Accesorio ghosts: icon and name centred in the part of the slot that is not under Escudo / Armadura (comment 27 nov) */
.field .ghost.gl,.field .ghost.gr{align-items:center;text-align:center}.field .ghost.gl{padding:0 38px 0 0}.field .ghost.gr{padding:0 0 0 38px}
/* card guide (Colección › Guía de cartas, Reglas) */
.screen.guide2{align-items:stretch;gap:16px}
.gnav{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.gnav a{padding:10px 18px;border-radius:24px;border:2px solid var(--bronze);color:var(--bronze-hi);text-decoration:none;font-size:24px}
.gh{margin:22px 0 4px;font-size:34px;color:var(--bronze-hi);scroll-margin-top:20px}
.ganat{display:flex;flex-direction:column;align-items:center;gap:16px}
.gcard{position:relative;width:min(420px,80%);aspect-ratio:5/7}.gcard img{width:100%;height:100%;border-radius:16px;box-shadow:0 10px 30px #000c}
.gpin{position:absolute;transform:translate(-50%,-50%);width:46px;height:46px;border-radius:50%;background:#ffd36a;color:#1a120f;font:bold 26px/46px var(--serif);text-align:center;font-style:normal;box-shadow:0 0 0 3px #1a120f,0 4px 10px #000}
.glist{margin:0;padding-left:34px;font-size:25px;line-height:1.4;color:var(--ink)}.glist li{margin:6px 0}.glist b{color:var(--bronze-hi)}
ul.glist{padding-left:28px}
.gnote{font-size:22px;color:var(--muted);text-align:center;margin:0}
.gtypes{display:flex;flex-direction:column;gap:14px}
.grow{display:flex;gap:16px;align-items:flex-start;background:#1a120f;border:2px solid #3a2c22;border-radius:16px;padding:12px}
.grow p{margin:0;font-size:24px;line-height:1.35}.grow p b{color:var(--bronze-hi)}
.gtype{flex:none;width:150px;margin:0;cursor:pointer}.gtype img,.gtype .gmini{width:150px;aspect-ratio:5/7;border-radius:10px;display:block;overflow:hidden}
.gtype .gmini>*{width:100%;height:100%}
.gtype figcaption{text-align:center;font-size:20px;margin-top:4px}.gtype figcaption b{display:block;font-size:22px;color:var(--bronze-hi)}.gtype figcaption span{color:var(--muted)}
.gboard{display:flex;flex-direction:column;gap:6px;padding:12px;border-radius:18px;background:#120c0a;border:2px solid #3a2c22}
.gz{border:2px dashed #6b5137;border-radius:12px;padding:10px;font-size:22px;text-align:center;color:#e8dccb;position:relative}
.gz.gzbar{background:#2a1d17}.gz.gzmid{border-style:solid;border-color:#ffd36a66;color:#ffe7a8}
.gz.gzfield{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;align-items:center;min-height:120px;padding-right:96px}
.gz.gzfield span{border:2px solid #5a4636;border-radius:10px;padding:8px 4px;background:#1a120f}.gz.gzfield span.gzhero{border-color:var(--bronze);color:var(--bronze-hi);padding:24px 4px}
.gz.gzfield em{grid-column:2;font-style:normal;font-size:19px;color:var(--muted)}.gz.gzfield.mine em{order:-1}
.gz .side{position:absolute;right:8px;top:8px;bottom:8px;width:84px;display:flex;align-items:center;justify-content:center;border:2px solid #5a4636;border-radius:10px;font-size:17px;background:#1a120f}
.gz.gzatk,.gz.gzshop{background:#241913}.gz.gzhand{background:#2a1d17;min-height:70px;display:flex;align-items:center;justify-content:center}
.gcard{margin:10px 26px}.gpin{width:40px;height:40px;font-size:22px;line-height:40px}
.gz.gzfield span{grid-row:1}.gz.gzfield em{grid-row:2;order:0}.gz.gzfield.mine span{grid-row:2}.gz.gzfield.mine em{grid-row:1;order:0}
/* tutorial target: strong pulsing red instead of the soft gold (comment 27 nov) */
.tutfocus{outline:7px solid #ff3b30!important;outline-offset:6px;box-shadow:0 0 0 4px #fff8,0 0 34px 10px #ff3b30cc!important;animation:tutred 1s ease-in-out infinite}
@keyframes tutred{50%{outline-color:#ff8a7a;box-shadow:0 0 0 4px #fff4,0 0 52px 18px #ff3b30}}
/* tutorial box with the pictures of what it explains */
.coach .cbody{display:flex;gap:18px;align-items:center;margin:8px 0 12px}
.coach .cpics{flex:none;display:flex;gap:8px}
.coach .cpics img{width:150px;aspect-ratio:5/7;border-radius:10px;box-shadow:0 6px 14px #000c;border:2px solid #ffd36a88}
.coach .cpics img+img{margin-left:-40px;transform:rotate(6deg)}
.coach .cbody p{margin:0}
/* account screen */
.acseg{align-self:center}
.acform{display:flex;flex-direction:column;gap:14px;width:100%;max-width:560px;align-self:center}
.acform .search{width:100%;font-size:30px}
.acform .btn{min-height:84px;font-size:32px}
.achelp{font-size:21px;color:var(--muted);margin:0}
.acmsg{min-height:34px;font-size:25px;color:#ffd36a;text-align:center;margin:0}
/* Refinería forge: entry animation + forge screen (art HER-001 PENDIENTE in herreria/) */
.fbg{position:absolute;inset:0;z-index:0;background:#140c08 url(herreria/mesa.webp) center/cover no-repeat}
.fbg::after{content:'';position:absolute;inset:0;background:radial-gradient(ellipse 80% 60% at 50% 55%,#0000,#000b)}
.gear{position:absolute;z-index:1;width:190px;height:190px;color:#b9874e;opacity:.85;filter:drop-shadow(0 6px 10px #000c);pointer-events:none}
.gear svg{width:100%;height:100%;animation:gspin 9s linear infinite}
.gear.tl{left:-60px;top:-60px}.gear.tr{right:-60px;top:-60px}.gear.bl{left:-60px;bottom:-60px}.gear.br{right:-60px;bottom:-60px}
.gear.tr svg,.gear.bl svg{animation-direction:reverse}
@keyframes gspin{to{transform:rotate(360deg)}}
.fglow{position:absolute;left:-10%;right:-10%;bottom:-20%;height:60%;z-index:1;pointer-events:none;background:radial-gradient(ellipse 50% 45% at 50% 70%,#ff8a2a66,#0000 70%);mix-blend-mode:screen}
.forge-intro{position:absolute;inset:0;z-index:80;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;animation:fIn .35s ease-out}
.forge-intro b{position:relative;z-index:2;font-size:76px;color:#ffd9a0;letter-spacing:.04em;text-shadow:0 0 20px #ff8a2a,0 4px 10px #000;transform:scale(.85);opacity:0;animation:fTitle .5s .25s ease-out forwards}
.forge-intro span{position:relative;z-index:2;font-size:30px;color:#f4ead7cc;opacity:0;animation:fTitle .5s .45s ease-out forwards}
.forge-intro .fsparks{position:absolute;inset:0;z-index:2;pointer-events:none;opacity:0;background:radial-gradient(circle at 50% 58%,#fff6 0,#ffb54a88 8%,#0000 26%)}
.forge-intro.hit{animation:fShake .32s ease-out}
.forge-intro.hit .fsparks{animation:fFlash .32s ease-out}
.forge-intro.hit2 .fsparks{animation-name:fFlash2}
.forge-intro.blow .fglow{animation:fBlow 1s ease-out forwards}
.forge-intro.out{animation:fOut .45s ease-in forwards}
@keyframes fIn{from{opacity:0}}@keyframes fOut{to{opacity:0}}
@keyframes fTitle{to{opacity:1;transform:none}}
@keyframes fShake{20%{transform:translate(-10px,6px)}40%{transform:translate(9px,-5px)}60%{transform:translate(-6px,3px)}80%{transform:translate(3px,-2px)}}
@keyframes fFlash{0%{opacity:1;transform:scale(.6)}100%{opacity:0;transform:scale(1.4)}}
@keyframes fFlash2{0%{opacity:1;transform:scale(.7)}100%{opacity:0;transform:scale(1.7)}}
@keyframes fBlow{0%{opacity:.6;transform:scaleY(.8)}40%{opacity:1;transform:scaleY(1.25);filter:brightness(1.6)}100%{opacity:.9;transform:none}}
.screen.forge{background:#140c08;overflow-x:hidden}
.screen.forge>*:not(.fbg):not(.gear):not(.fglow){position:relative;z-index:2}
.forge-t{color:#ffd9a0!important;text-shadow:0 0 18px #ff8a2a99,0 3px 8px #000}
.screen.forge .sub{color:#f4ead7;text-shadow:0 2px 6px #000}
.foro{display:flex;align-items:center;gap:10px;font-size:32px;font-weight:bold;color:#ffe7a8;background:#000a;padding:6px 20px;border-radius:24px;border:2px solid #c8955a}
.fstation{display:flex;gap:18px;align-items:center;width:100%;padding:14px;border-radius:18px;background:#1a0f0bcc;border:2px solid #8a5a2e;box-shadow:0 8px 20px #000a;text-align:left}
.fstation b{font-size:30px;display:block;color:#ffd9a0}.fstation span{font-size:24px;color:#e8dccb;display:block;margin:4px 0 10px}
.fstation .btn{min-height:80px;font-size:28px}
.refc.struck .card{animation:struck .6s ease-out}
@keyframes struck{0%{transform:scale(1.12);filter:brightness(2.2)}100%{transform:none;filter:none}}
.screen.forge .reftab{background:#000a;border-radius:12px}
.still .gear svg{animation:none}
@media (prefers-reduced-motion:reduce){.gear svg{animation:none}}
.gear{width:160px;height:160px;color:#c99558;opacity:.75}.gear.tl{left:-50px;top:-50px}.gear.tr{right:-50px;top:-50px}.gear.bl{left:-50px;bottom:-50px}.gear.br{right:-50px;bottom:-50px}
/* shop + cosmetics */
.shopgrid{display:grid;grid-template-columns:1fr 1fr;gap:14px;width:100%}
.shopitem{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;padding:16px 10px;border-radius:18px;border:3px solid var(--bronze);background:linear-gradient(180deg,#3b2a1f,#1a120f);color:inherit}
.shopitem.best{border-color:#ffd36a;box-shadow:0 0 24px #ffd36a55}
.shopitem .spk{position:relative;height:120px;width:100%;display:flex;justify-content:center}
.shopitem .spk i{width:70px;height:120px;margin:0 -22px;background:url(sobre/cerrado.webp) center/contain no-repeat;filter:drop-shadow(0 6px 8px #000a)}
.shopitem .spk i:nth-child(odd){transform:rotate(-6deg)}.shopitem .spk i:nth-child(even){transform:rotate(6deg) translateY(4px)}
.shopitem b{font-size:30px}.shopitem small{font-size:20px;color:#8fe27a;min-height:24px}
.shopitem .price{font-size:26px;font-weight:bold;color:#ffe7a8;padding:4px 14px;border-radius:16px;background:#000a}
.estgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;width:100%}
.esttile{display:flex;flex-direction:column;align-items:center;gap:6px;padding:8px;border-radius:14px;border:2px solid #3a2c22;background:#1a120f}
.esttile.on{border-color:#ffd36a;box-shadow:0 0 18px #ffd36a55}
.esttile img{width:100%;aspect-ratio:5/7;border-radius:8px}
.esttile b{font-size:21px;text-align:center}.esttile .btn{min-height:60px;font-size:22px;width:100%;padding:4px}
.shopgrid{row-gap:22px}.shopitem{padding-bottom:20px}
/* wallet, keys and chests */
.wallet{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;font-size:26px;padding:8px 18px;border-radius:24px;background:#000a;border:2px solid #c8955a;color:#ffe7a8}
.wallet .wcoin{color:#ffd36a;font-size:30px}
.keyrow{width:100%;display:flex;flex-direction:column;gap:10px;padding:14px;border-radius:18px;background:#1a120f;border:2px solid #6b5137}
.keyhead b{display:block;font-size:30px;color:#ffd9a0}.keyhead span{font-size:23px;color:var(--muted)}
.keybuy{display:flex;gap:8px}.keybuy .btn{flex:1;min-width:0;min-height:70px;font-size:24px;padding:4px}
.keyrow>.btn{min-height:76px;font-size:28px}
.spk.coins{font-size:46px;color:#ffd36a;letter-spacing:-8px;align-items:center;text-shadow:0 3px 6px #000}
.chestimg{width:220px;aspect-ratio:5/7;border-radius:12px;box-shadow:0 0 40px #ffd36a88;animation:struck .8s ease-out}
.chestico{font-size:120px;color:#ffd36a;text-shadow:0 0 30px #ffb54a;animation:struck .8s ease-out}
.wallet .wob,.spk.ob{color:#b9e3ff}.spk.ob{text-shadow:0 0 10px #4696c8,0 3px 6px #000}
/* offers */
.offers{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:100%}
.offer{position:relative;display:flex;flex-direction:column;gap:6px;padding:16px 14px 14px;border-radius:18px;border:3px solid #ffd36a;background:linear-gradient(160deg,#4a2f14,#1a120f 70%);box-shadow:0 0 22px #ffd36a33;overflow:hidden}
.offer.hero{width:100%;border-color:#ff9a3c;background:linear-gradient(135deg,#6a2a12,#2a1206 55%,#1a120f);box-shadow:0 0 30px #ff9a3c55;animation:offerGlow 2.6s ease-in-out infinite}
@keyframes offerGlow{50%{box-shadow:0 0 44px #ffb54a88}}
.offer.done{opacity:.55;border-color:#6b5137;box-shadow:none}
.offer .otag{align-self:flex-start;font-size:19px;padding:2px 10px;border-radius:10px;background:#ffd36a;color:#2a1a10;font-weight:bold}
.offer .opct{position:absolute;right:-6px;top:10px;padding:4px 16px;background:#d2382a;color:#fff;font:bold 24px var(--serif);transform:rotate(8deg);box-shadow:0 3px 8px #000a}
.offer b{font-size:26px;line-height:1.2;color:#ffe7a8}.offer.hero b{font-size:34px}
.offer .oinc{font-size:23px;color:#f4ead7}
.offer .otime{font-size:20px;color:#ffb3a8}
.offer .obuy{display:flex;align-items:center;gap:10px;margin-top:auto}.offer .obuy s{color:var(--muted);font-size:21px}
.offer .obuy .btn{flex:1;min-width:0;min-height:66px;font-size:26px}
.ofirst{color:#b9e3ff}
.shopitem small.x2{color:#b9e3ff}
.still .offer.hero{animation:none}
.offer,.offers,.keyrow,.fstation,.wallet,.shopgrid,.estgrid{flex:none}
.gh3{margin:10px 0 2px;font-size:26px;color:#e8dccb}
/* profile (Myl2D-like) */
.avatar{display:inline-block;flex:none;border-radius:50%;background:#2a1d17 center/cover;border:3px solid var(--bronze);vertical-align:middle;box-shadow:0 2px 6px #000a}
.phead{display:flex;gap:18px;align-items:center;width:100%;padding:18px;border-radius:20px;border:3px solid var(--bronze);background:linear-gradient(135deg,#3b2a1f,#140e0c);box-shadow:0 8px 24px #000a;flex:none}
.phead.rk5,.phead.rk6{border-color:#ffd36a;box-shadow:0 0 30px #ffd36a44}
.pinfo{flex:1;display:flex;flex-direction:column;gap:4px}.pinfo b{font-size:38px;color:#ffe7a8}.prank{font-size:22px;color:var(--muted)}
.plv{font-size:24px;font-weight:bold;color:var(--bronze-hi);margin-top:4px}.pinfo small{font-size:20px;color:var(--muted)}
.pbar{display:block;height:12px;border-radius:6px;background:#000a;border:1px solid #5a4636;overflow:hidden;width:100%}.pbar>i{display:block;height:100%;background:linear-gradient(90deg,#c8955a,#ffd36a)}
.pnums,.pdata{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;width:100%;flex:none}
.pnums>div,.pdata>div{display:flex;flex-direction:column;align-items:center;padding:10px 4px;border-radius:14px;background:#1a120f;border:2px solid #3a2c22;text-align:center}
.pnums b{font-size:32px;color:#ffe7a8}.pdata b{font-size:24px;color:#ffe7a8}.pnums span,.pdata span{font-size:18px;color:var(--muted)}
.pbadges{display:flex;gap:4px;width:100%;flex:none}.pbadges span{flex:1;display:flex;flex-direction:column;align-items:center;font-size:30px;opacity:.35;filter:grayscale(1)}
.pbadges span.on{opacity:1;filter:none}.pbadges small{font-size:14px;color:var(--muted);text-align:center;line-height:1.1}.pbadges em{font-size:13px;color:#ffb3a8;font-style:normal}
.pequip{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;width:100%;flex:none}
.peq{display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 4px;border-radius:14px;border:2px solid #5a4636;background:#1a120f;color:inherit}
.peq img{width:100%;aspect-ratio:5/7;border-radius:8px;object-fit:cover}.peq .avatar{width:72px!important;height:72px!important;margin:6px 0}
.peq b{font-size:19px}.peq small{font-size:16px;color:var(--muted);text-align:center}
.gh small{font-size:22px;color:var(--muted)}
.prar{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:19px;flex:none}.prar i{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:4px;background:var(--rc)}
.r1{--rc:#b07a4a}.r2{--rc:#c9ced6}.r3{--rc:#e9c45a}.r4{--rc:#b479e8}.r5{--rc:#7ff0e0}
.achgrid{display:grid;grid-template-columns:1fr;gap:8px;width:100%;flex:none}
.ach{display:flex;gap:12px;align-items:center;padding:10px 12px;border-radius:14px;border:2px solid #3a2c22;background:#1a120f;opacity:.75}
.ach.ok{opacity:1;border-color:var(--rc);box-shadow:0 0 12px color-mix(in srgb,var(--rc) 40%,transparent)}
.ach.r5.ok{animation:iri 3s linear infinite}@keyframes iri{to{filter:hue-rotate(360deg)}}
.aico{flex:none;width:58px;height:58px;border-radius:50%;border:3px solid var(--rc);display:flex;align-items:center;justify-content:center;font-size:28px;font-style:normal;background:#000a}
.ach:not(.ok) .aico{filter:grayscale(1);border-color:#5a4636}
.ach div{flex:1;display:flex;flex-direction:column;gap:2px}.ach b{font-size:23px}.ach small{font-size:17px;color:var(--rc)}.ach span{font-size:19px;color:#e8dccb}
.ach em{font-size:17px;color:#8fe27a;font-style:normal}.ach em.mark{color:var(--muted)}
.plast{display:flex;flex-wrap:wrap;gap:4px;flex:none}.plast i{width:20px;height:20px;border-radius:4px;background:#777}.plast i.w{background:#3fae5a}.plast i.l{background:#c9483c}
.ptab{width:100%;border-collapse:collapse;font-size:20px;flex:none}.ptab th,.ptab td{padding:6px 4px;border-bottom:1px solid #3a2c22;text-align:center}.ptab td:first-child{text-align:left}
.ptab .pbar{height:6px;margin-top:3px}
.pname{display:flex;gap:10px;width:100%;flex:none}.pname .search{flex:1}
.icopick{display:flex;gap:16px;justify-content:center}.icopick button{background:none;border:3px solid transparent;border-radius:16px;padding:8px;color:inherit;display:flex;flex-direction:column;align-items:center;gap:6px;font-size:22px}.icopick button.on{border-color:#ffd36a}
.logrosnew{color:#ffd36a}
.screen.profile{gap:16px}
/* desafíos */
.dlist{display:flex;flex-direction:column;gap:10px;width:100%;flex:none}
.drow{display:flex;align-items:center;gap:16px;padding:14px 16px;border-radius:16px;border:2px solid #6b5137;background:#1a120f;color:inherit;text-align:left}
.drow.ok{border-color:#3fae5a}.drow.lock{opacity:.5}
.dnum{flex:none;width:58px;height:58px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:bold;background:#000a;border:2px solid #c8955a;color:#ffe7a8}
.drow.ok .dnum{border-color:#3fae5a;color:#8fe27a}
.dtxt{display:flex;flex-direction:column;gap:2px}.dtxt b{font-size:28px}.dtxt small{font-size:20px;color:var(--muted)}
.btn.mode b small.dprog{font-size:22px;color:var(--muted);font-weight:normal}
/* hero levels + achievements showcase */
.pheroes{display:flex;flex-direction:column;gap:8px;width:100%;flex:none}
.phero{display:flex;gap:12px;align-items:center;padding:8px 12px;border-radius:14px;background:#1a120f;border:2px solid #3a2c22}
.phero div{flex:1;display:flex;flex-direction:column;gap:3px}.phero b{font-size:24px}.phero small{font-size:18px;color:var(--muted)}
.hb3,.hb4{color:#e9c45a!important}.hb5,.hb6{color:#b479e8!important}
.vitrina{display:flex;flex-wrap:wrap;gap:14px;justify-content:center;width:100%;max-height:calc(var(--lh,100vh) * .6);overflow-y:auto}
.vcard2{width:200px;min-height:270px;padding:16px 10px;border-radius:16px;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;
  background:linear-gradient(180deg,color-mix(in srgb,var(--rc) 35%,#1a120f),#1a120f);border:3px solid var(--rc);box-shadow:0 0 24px color-mix(in srgb,var(--rc) 50%,transparent);
  opacity:0;transform:rotateY(90deg);animation:vflip .42s ease-out forwards}
.vcard2 .aico{width:84px;height:84px;font-size:44px}.vcard2 b{font-size:24px}.vcard2 small{font-size:18px;color:var(--rc)}.vcard2 span{font-size:18px;color:#e8dccb}
.vcard2.r5{animation:vflip .42s ease-out forwards,iri 3s linear infinite}
@keyframes vflip{to{opacity:1;transform:none}}
.still .vcard2{animation:none;opacity:1;transform:none}
/* multi-open */
.pnseg{align-self:center}
.screen.pkopen .pack{grid-template-columns:repeat(5,1fr)}
.chestgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;width:100%;max-height:55vh;overflow-y:auto}
.chestit{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px;border-radius:12px;background:#1a120f;border:2px solid #6b5137;opacity:0;animation:vflip .4s ease-out forwards;text-align:center}
.chestit img{width:90px;aspect-ratio:5/7;border-radius:6px}.chestit i{font-size:52px;color:#ffd36a;font-style:normal}
.chestit b{font-size:19px}.chestit em{position:absolute;top:4px;right:4px;font-size:15px;font-style:normal;background:#3fae5a;color:#fff;padding:1px 6px;border-radius:8px}
.kpity{font-size:20px;color:var(--muted)}
.dcode{width:100%;min-height:120px;font:24px/1.3 monospace;word-break:break-all;resize:none}
/* life curve on the end screen */
.curve{width:100%;max-width:640px;padding:10px;border-radius:14px;background:#000a;border:2px solid #3a2c22;flex:none}
.curve svg{width:100%;height:auto;display:block}.curve path{fill:none;stroke-width:4;stroke-linejoin:round}
.curve path.cm{stroke:#8fe27a}.curve path.cr{stroke:#ff6a55}
.cleg{display:flex;gap:16px;justify-content:center;font-size:20px;color:var(--muted)}.cleg .cm{color:#8fe27a}.cleg .cr{color:#ff6a55}
/* mailbox */
.mblist{display:flex;flex-direction:column;gap:12px;width:100%;flex:none}
.mbm{padding:14px;border-radius:16px;background:#1a120f;border:2px solid #3a2c22}.mbm.new{border-color:#ffd36a}
.mbh{display:flex;justify-content:space-between;align-items:baseline;gap:10px}.mbh b{font-size:28px;color:#ffe7a8}.mbh small{font-size:19px;color:var(--muted)}
.mbm p{font-size:23px;margin:8px 0}.mbg{font-size:23px;color:#8fe27a;margin-bottom:8px}
/* ===== v60: polished UI art (Codex pass, PENDIENTE) ===== */
#scr{background-size:cover;background-position:center}
.ic{display:inline-block;width:1.25em;height:1.25em;vertical-align:-0.28em;object-fit:contain;filter:drop-shadow(0 1px 2px #000)}
/* bottom navigation */
#nav{position:absolute;left:0;right:0;bottom:0;z-index:35;height:150px;display:flex;align-items:center;justify-content:space-around;padding:0 2% calc(6px + env(safe-area-inset-bottom,0px));
  background:url(ui/k/UI-K05.webp) center/100% 100% no-repeat,linear-gradient(#0000,#000d 40%)}
#nav[hidden]{display:none}
#nav button{flex:1;display:flex;flex-direction:column;align-items:center;gap:0;background:none;border:0;padding:6px 0;color:#e8dccb;font:20px var(--serif);opacity:.8}
#nav button img{width:64px;height:64px;object-fit:contain;filter:drop-shadow(0 3px 4px #000)}
#nav button.mid img{width:86px;height:86px;margin-top:-26px}
#nav button.on{opacity:1;color:#ffd36a}#nav button.on img{filter:drop-shadow(0 0 10px #ffd36a) drop-shadow(0 3px 4px #000)}
#nav button span{text-shadow:0 2px 3px #000}
.screen.withnav{padding-bottom:180px}
/* kit buttons on the menus */
.mlist .btn,.btn.mode,.mrow .btn{background:url(ui/k/UI-K03.webp) center/100% 100% no-repeat;border:0;box-shadow:none;text-shadow:0 2px 4px #000}
.mlist .btn.main,.btn.mode.main{background-image:url(ui/k/UI-K02.webp);color:#fff3dc}
.mlist .btn.gold,.btn.mode.gold,.mrow .btn.gold{background-image:url(ui/k/UI-K04.webp);color:#2a1a10;text-shadow:0 1px 0 #fff6}
.btn.mode.gold small{color:#3a2414!important}
.btn.mode{padding:16px 40px}
/* titles with the ornamental divider */
.screen>.title::after{content:'';display:block;width:min(560px,90%);height:34px;margin:6px auto 0;background:url(ui/k/UI-K08.webp) center/contain no-repeat}
/* avatar frame */
.avatar.framed{position:relative;overflow:visible;border:0}
.avatar.framed::after{content:'';position:absolute;inset:-22%;background:url(ui/k/UI-K06.webp) center/contain no-repeat;pointer-events:none}
.pbadges img{width:44px;height:44px;object-fit:contain}
.aico img{width:80%;height:80%;object-fit:contain}
.chestit img[src^="ui/"]{width:70px;aspect-ratio:auto}
/* end screen backgrounds */
#ov3.endwin{background:linear-gradient(#000c,#000a 40%,#000d),url(ui/f/UI-F12.webp) center/cover}
#ov3.endlose{background:linear-gradient(#000c,#000a 40%,#000d),url(ui/f/UI-F13.webp) center/cover}
/* playmat under the table */
#board{background-color:#140e0c}
#stage{background:linear-gradient(rgba(14,9,7,var(--tdim,.45)),rgba(14,9,7,var(--tdim,.45))),var(--tapete,url(ui/f/UI-F11.webp)) center/cover,#140e0c}
.mlist .btn{padding-left:56px;padding-right:56px}.btn.mode{padding:16px 56px}.mlist .btn small{display:block;font-size:20px}
.mlist .mrow .btn{padding:6px 8px;font-size:28px}.mlist .mrow .btn small{display:inline;font-size:20px}
/* T4.5 holographic tilt in the viewer */
.vcard{transition:transform .12s ease-out;position:relative}
.vcard.holo::after{content:'';position:absolute;inset:0;border-radius:4%;pointer-events:none;mix-blend-mode:color-dodge;opacity:.55;-webkit-mask:var(--hm,none) center/contain no-repeat;mask:var(--hm,none) center/contain no-repeat;
  background:radial-gradient(circle at var(--hx) var(--hy),#fff8,#0000 45%),linear-gradient(115deg,#0000 30%,#ff6ad533 42%,#6ad5ff33 50%,#ffe56a33 58%,#0000 70%);background-size:100% 100%,200% 200%;background-position:center,var(--hx) var(--hy)}
/* bottom nav: each icon sits on the centre of its ring in UI-K05 (rings at 13.1 / 30.7 / 49.8 / 68.9 / 86.6 % of the bar) (comment 28 nov) */
#nav button{position:absolute;top:0;bottom:0;width:17%;transform:translateX(-50%);flex:none;justify-content:flex-start;padding:43px 0 0;gap:2px}
#nav button:nth-child(1){left:13.1%}#nav button:nth-child(2){left:30.7%}#nav button:nth-child(3){left:49.8%}#nav button:nth-child(4){left:68.9%}#nav button:nth-child(5){left:86.6%}
#nav button.mid img{margin-top:-11px}
#nav button span{line-height:1.1;white-space:nowrap}
/* main menu: smaller hero fan, one-line title and slimmer buttons so it fits above the bottom bar without scrolling (comment 28 nov) */
#layer .screen.menu{justify-content:flex-start;padding-top:24px}
#layer .screen.menu .mm-fan{height:290px}
#layer .screen.menu .mm-card{width:170px;height:238px;margin-left:-85px;top:20px}
#layer .screen.menu .mm-card{transform:translateX(calc(var(--x) * .7)) rotate(var(--r))}
#layer .screen.menu .mm-title{font-size:60px;letter-spacing:.08em;white-space:nowrap;margin-top:4px}
#layer .screen.menu .mm-sub{font-size:24px;margin-top:-6px}
#layer .screen.menu .mlist{gap:10px;margin-top:14px}
#layer .screen.menu .mlist .btn{min-height:74px;font-size:29px;padding-top:6px;padding-bottom:6px}
#layer .screen.menu .mlist .btn small{font-size:18px}
#layer .screen.menu .mlist .mrow .btn{font-size:24px;min-height:66px}
/* Jugar / Colección lists: compact so they fit above the bottom bar (comment 28 nov) */
#layer .mlist.modes{gap:8px}
#layer .btn.mode{min-height:0;padding:10px 52px 12px;gap:2px}
#layer .btn.mode b{font-size:29px;line-height:1.15}
#layer .btn.mode small{font-size:19px;line-height:1.2}
#layer .screen.withnav>.title{font-size:56px}
/* hub screens (Jugar, Colección…): slimmer mode buttons so the list fits above the bottom bar (comment 28 nov) */
#layer .screen.withnav{padding-top:16px}
#layer .screen.withnav>.title{font-size:46px;margin:0}
#layer .screen.withnav>.title::after{height:24px;margin-top:2px}
#layer .screen.withnav .mlist.modes{gap:8px;margin-top:6px}
#layer .screen.withnav .btn.mode{min-height:0;padding:10px 48px;gap:2px}
#layer .screen.withnav .btn.mode b{font-size:27px;line-height:1.15}
#layer .screen.withnav .btn.mode small{font-size:18px;line-height:1.2}
#layer .screen.withnav .btn.mode b small.dprog{font-size:18px;display:inline}
/* logo: Codex emblem UI-K09 (PENDIENTE) + the title drawn by code in gilded letters */
#layer .screen.menu .mm-title{width:min(640px,96%);aspect-ratio:640/257;flex:none;margin:0 auto;display:flex;align-items:center;justify-content:center;padding-top:9%;
  background:url(ui/k/UI-K09.webp) center/contain no-repeat;font-size:50px;letter-spacing:.12em;white-space:nowrap;
  color:#ffe3a0;background-clip:border-box;text-shadow:0 2px 0 #7a4a14,0 4px 8px #000,0 0 18px #ffb54a66}
/* Jugar list: 20 % larger than the compact version (comment 28 nov) */
#layer .screen.withnav .btn.mode{padding:12px 56px 14px}
#layer .screen.withnav .btn.mode b{font-size:32px}
#layer .screen.withnav .btn.mode small{font-size:22px}
#layer .screen.withnav .mlist.modes{gap:10px}
#layer .screen.withnav .btn.mode.main{padding-left:80px;padding-right:80px}#layer .mlist.modes{width:min(640px,100%)}
.mbm{background:#1a120ff2}.mbm p{color:#f4ead7}.mbh b{color:#ffe7a8}.mbg{color:#9ff08a}
/* collectible qualities (Myl2D: bronze, silver, gold, amethyst, iridescent) */
.q1,.qb1{--qc:#b07a4a}.q2,.qb2{--qc:#c9ced6}.q3,.qb3{--qc:#e9c45a}.q4,.qb4{--qc:#b479e8}.q5,.qb5{--qc:#7ff0e0}
.esttile[class*=qb]{border-color:var(--qc);box-shadow:0 0 10px color-mix(in srgb,var(--qc) 35%,transparent)}
/* legendary: the rainbow lives only in the frame now, the art keeps its colours (José, 28 nov: «brillan demasiado») */
@property --iria{syntax:'<angle>';inherits:false;initial-value:0deg}
.esttile.qb5{position:relative;animation:none;border-color:transparent;box-shadow:0 0 12px #7ff0e044}
.esttile.qb5::before{content:'';position:absolute;inset:-2px;border-radius:inherit;padding:3px;pointer-events:none;z-index:2;
  background:conic-gradient(from var(--iria),#ff9a9e,#fad0c4,#fbc2eb,#a6c1ee,#84fab0,#8fd3f4,#e0c3fc,#ff9a9e);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;animation:iriframe 6s linear infinite}
@keyframes iriframe{to{--iria:360deg}}
.still .esttile.qb5::before{animation:none}
.qtag{font-size:16px;color:var(--qc);font-weight:bold}
.qlegend{display:flex;flex-wrap:wrap;gap:6px 14px;justify-content:center;font-size:20px;flex:none}
.qlegend i,.plit i{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:5px;background:var(--qc);vertical-align:0}
.planned{display:flex;flex-direction:column;gap:10px;width:100%;flex:none}
.plcat{padding:10px 12px;border-radius:14px;background:#1a120ff0;border:2px solid #3a2c22;display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center}
.plcat>b{width:100%;font-size:24px;color:#ffe7a8}
.plit{font-size:20px;color:#e8dccb}.plit small{color:var(--qc);font-size:16px}
/* mailbox: unread cards used the class .new, which is also the yellow "NEW" badge (position:absolute): the cards piled up over the title. Renamed to .unread (comment 28 nov) */
.mbm.unread{border-color:#ffd36a}
/* hero cards still to generate (José, 28 nov) */
.esttile.todo{border-style:dashed;opacity:.85}.esttile .todoimg{width:100%;aspect-ratio:5/7;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:19px;color:var(--qc);border:2px dashed var(--qc);background:repeating-linear-gradient(45deg,#0000 0 10px,#ffffff08 10px 20px)}
/* wallet bar redesign (José, 28 nov): 4 equal cells with a big icon, the amount and its name */
.wallet.w4{display:grid;grid-template-columns:repeat(4,1fr);gap:0;width:100%;padding:8px 6px;border-radius:18px;background:linear-gradient(180deg,#2a1d15f2,#120c0af2);border:2px solid #c8955a;box-shadow:inset 0 1px 0 #f0c98a44,0 6px 16px #000a}
.wallet.w4.pinned{position:sticky;z-index:7;width:calc(100% + 48px);margin:0 -24px;border-radius:0 0 18px 18px;border-top:0;background:linear-gradient(180deg,#2a1d15,#120c0a);box-shadow:inset 0 -1px 0 #f0c98a44,0 6px 16px #000c}
#layer .screen>.wallet.w4.pinned+.esttabs,#layer .screen>.esttabs{background-clip:padding-box}
.wallet.w4 .wcell{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;column-gap:6px;padding:2px 4px;min-width:0;text-align:center}
.wallet.w4 .wcell+.wcell{border-left:1px solid #c8955a55}
.wallet.w4 .ic{width:42px;height:42px;vertical-align:0;filter:drop-shadow(0 2px 3px #000)}
.wallet.w4 b{font-size:28px;line-height:1.05;color:#ffe7a8;font-variant-numeric:tabular-nums}
.wallet.w4 span{flex-basis:100%;font-size:15px;line-height:1.15;color:var(--muted)}
.wallet.w4 .dr b{color:#cfe8ff}.wallet.w4 .mi b{color:#d9c2ff}
/* dracma packs: stacked silver coins with gold cracks (José, 28 nov) */
.spk.dstack{letter-spacing:0;display:flex;justify-content:center;align-items:center}.spk.dstack .dcoin{width:78px;height:78px;flex:none;filter:drop-shadow(0 3px 4px #000c)}.spk.dstack .dcoin+.dcoin{margin-left:-46px}
.shopitem .price{font-size:21px;padding:3px 10px;white-space:nowrap;max-width:calc(100% - 6px)}
.plit i{margin:0 0 0 3px}.plit i.todo{background:transparent;border:2px solid var(--qc);box-sizing:border-box}
/* legendary: plus an occasional diagonal foil sweep across the tile, and the quality name in rainbow text */
.esttile.qb5::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:3;
  background:linear-gradient(115deg,#0000 40%,#ffffff40 48%,#c8f5ff55 50%,#ffffff40 52%,#0000 60%) -150% 0/250% 100% no-repeat;animation:sweep 6s ease-in-out infinite}
@keyframes sweep{0%,70%{background-position:-150% 0}100%{background-position:250% 0}}
.still .esttile.qb5::after{animation:none;display:none}
.esttile.qb5 .qtag{background:linear-gradient(90deg,#ff9be4,#ffe08a,#8ff5e6,#9db8ff);-webkit-background-clip:text;background-clip:text;color:transparent}
/* unlockable finish «Arcoíris total» (José, 28 nov): the original legendary effect, whole card hue cycle; kept for a future unlock */
.acab-arcoiris{animation:iri 3s linear infinite}
.acab-prev{width:100%;aspect-ratio:5/7;border-radius:8px;background:#000 center/cover no-repeat}
.esttile.locked .acab-prev{opacity:.85}.esttile .acab-d{font-size:15px;color:var(--muted);text-align:center;line-height:1.2}
.still .acab-arcoiris{animation:none;filter:hue-rotate(90deg)}
/* floating «Mis sobres» button in the shop (José, 28 nov): sticks to the bottom right, above the nav bar */
#scr .fabpk{position:fixed;right:18px;bottom:calc(162px + env(safe-area-inset-bottom,0px));pointer-events:auto;z-index:36;flex:none;display:flex;align-items:center;gap:8px;padding:10px 18px 10px 10px;
  border-radius:40px;border:2px solid #e9c45a;background:linear-gradient(180deg,#5a3418,#2a170c);color:#ffe7a8;font:inherit;font-size:22px;font-weight:bold;
  box-shadow:0 6px 18px #000c,0 0 14px #e9c45a55;cursor:pointer}
#scr .fabpk img{width:52px;height:52px;filter:drop-shadow(0 2px 3px #000)}
#scr .fabpk b{min-width:30px;height:30px;padding:0 8px;border-radius:15px;background:#c0392b;color:#fff;font-size:19px;display:flex;align-items:center;justify-content:center}
#scr .fabpk.has{animation:fabp 2.4s ease-in-out infinite}@keyframes fabp{50%{box-shadow:0 6px 18px #000c,0 0 26px #ffd36acc}}
.still #scr .fabpk.has{animation:none}
/* Única cards (José, 28 nov): designed placeholder until the art exists, catalogue grid in Sello */
.unigrid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;width:100%;flex:none}.unigrid button{padding:0;border:0;background:none;cursor:pointer}
.unic{position:relative;width:100%;aspect-ratio:5/7;border-radius:8px;overflow:hidden}.unic>.card{width:100%;height:100%}
.unic.uph{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4%;padding:8% 6%;text-align:center;color:#ffe7a8;border:3px solid #ffd36a;
  background:radial-gradient(circle at 50% 38%,color-mix(in srgb,var(--c) 70%,#000) 0,color-mix(in srgb,var(--c) 30%,#0a0604) 55%,#0a0604 100%);box-shadow:inset 0 0 0 2px #0008,inset 0 0 18px #ffd36a44,0 4px 10px #000a}
.unic.uph .us{position:absolute;top:3%;left:50%;transform:translateX(-50%);font-style:normal;font-size:16px;color:#ffd36a;text-shadow:0 0 6px #ffb54a}
.unic.uph .ui{font-style:normal;font-size:30px;line-height:1;color:#fff3dc;text-shadow:0 0 10px var(--c),0 2px 3px #000}
.unic.uph b{font-size:13px;line-height:1.1;text-shadow:0 1px 2px #000}.unic.uph span{font-size:10px;color:#e8dccbcc}
.unic.off{filter:grayscale(.55) brightness(.7)}
.seal-o .seal-img{flex:none;width:110px}.seal-o .seal-img .unic.uph .ui{font-size:40px}.seal-o .seal-img .unic.uph b{font-size:15px}
.gh3 small{font-size:.7em;color:var(--muted);font-weight:normal}
/* shop «Llaves y cofres»: keep the text clear of the gold plaque ornaments */
#layer #tokeys{padding:14px 92px 16px;align-items:center;text-align:center}#layer #tokeys small{font-size:19px;line-height:1.2}
/* profile: the header card started under the «Volver» button (avatar covered it) */
#scr.profile .phead{margin-top:70px}
/* history sheet redesign (José, 28 nov): bronze-framed panel, rows with who / what / card, kit buttons on the in-game sheets */
#layer .sheet3 .btn{background:url(ui/k/UI-K03.webp) center/100% 100% no-repeat;border:0;box-shadow:none;text-shadow:0 2px 4px #000;color:#f4ead7}
#layer .sheet3 .btn.main{background-image:url(ui/k/UI-K02.webp);color:#fff3dc}
#layer .sheet3 .btn.gold{background-image:url(ui/k/UI-K04.webp);color:#2a1a10;text-shadow:0 1px 0 #fff6}
#layer .sheet3 .btn.danger{filter:hue-rotate(-12deg) saturate(1.2)}
#layer .sheet3 .btn:active{transform:translateY(2px);filter:brightness(1.12)}
.hpanel{display:flex;flex-direction:column;gap:14px;width:100%;max-height:100%;padding:22px 18px 18px;border-radius:26px;
  background:linear-gradient(180deg,#2a1d15f5,#120c0af5);border:3px solid #c8955a;box-shadow:inset 0 0 0 2px #0008,inset 0 1px 0 #f0c98a55,0 18px 40px #000c}
.hhead{display:flex;flex-direction:column;align-items:center;gap:4px;flex:none}
.hhead .title{font-size:44px!important;line-height:1.1}
.hhead .title::after{content:'';display:block;width:min(420px,80%);height:26px;margin:4px auto 0;background:url(ui/k/UI-K08.webp) center/contain no-repeat}
.hhead p{margin:0;font-size:20px;color:var(--muted)}
.hleg{display:flex;justify-content:space-between;width:100%;font-size:18px;margin-top:6px}
.hleg span{padding:2px 12px;border-radius:10px;background:#0008;border:1px solid #5a4636;color:#e8dccb}.hleg .me{border-color:#c8955a}
.hlist2{display:flex;flex-direction:column;gap:10px;overflow:auto;min-height:0;flex:1 1 auto;padding:2px 2px 6px;overscroll-behavior:contain}
.hrow2{display:grid;grid-template-columns:72px 1fr 32px;align-items:center;gap:14px;width:92%;padding:8px 10px;border-radius:16px;border:2px solid #3a2c22;
  border-left:6px solid var(--hc);background:linear-gradient(90deg,color-mix(in srgb,var(--hc) 22%,#1a120f),#1a120f 60%);color:inherit;text-align:left;font:inherit;cursor:pointer;box-shadow:0 4px 10px #0008}
.hrow2.me{align-self:flex-end;border-left-color:#3a2c22;border-right:6px solid var(--hc);background:linear-gradient(270deg,color-mix(in srgb,var(--hc) 22%,#1a120f),#1a120f 60%)}
.hrow2.rv{align-self:flex-start}
.hrow2 .ht{width:72px;height:100px;border-radius:8px;overflow:hidden;box-shadow:0 3px 8px #000c;border:2px solid #0008}.hrow2 .ht .card{width:100%;height:100%}
.hrow2 .hb{display:flex;flex-direction:column;gap:6px;min-width:0}
.hrow2 .hw{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.hrow2 .hw i{font-style:normal;font-size:17px;padding:2px 10px;border-radius:10px;white-space:nowrap}
.hrow2 .hn{background:var(--hc);color:#fff;font-weight:bold;text-shadow:0 1px 2px #000a}
.hrow2 .hk{background:#000a;border:1px solid #6b5137;color:#f0c98a}
.hrow2 .k-atk{color:#ffb3a8;border-color:#a8503c}.hrow2 .k-buy{color:#ffe08a;border-color:#a8873c}.hrow2 .k-trap,.hrow2 .k-reveal{color:#d9c2ff;border-color:#7a5aa8}
.hrow2 .hnew{background:#ffd36a;color:#2a1a05;font-weight:bold}
.hrow2 b{font-size:24px;line-height:1.15;color:#ffe7a8;overflow:hidden;text-overflow:ellipsis}
.hrow2 b small{display:block;font-size:17px;font-weight:normal;color:var(--muted);margin-top:2px}
.hrow2 .hgo{font-size:34px;color:#c8955a;text-align:center}
.hrow2.hid b{color:#c9b9a3}
.hrow2:active{filter:brightness(1.15)}
.hfoot{display:flex;justify-content:center;flex:none}.hfoot .btn{min-width:300px;min-height:84px;font-size:30px}
/* choose 1 of 3 (Épica alternate arts, José 28 nov) */
.sealgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;width:100%;flex:none}
.sealc{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}
.sealc img{width:100%;aspect-ratio:5/7;border-radius:10px;cursor:pointer;box-shadow:0 6px 16px #000b,0 0 14px #b479e866}
.sealc b{font-size:20px;line-height:1.15;color:#ffe7a8}.sealc small{font-size:16px;color:#c9a3f0}.sealc .btn{width:100%;padding:10px 4px}
/* alternative arts (rarity by score, José 28 nov) */
.unic.alt{border:3px solid var(--qc);border-radius:8px}.unic.alt .qtag{position:absolute;left:0;right:0;bottom:0;background:#000c;font-size:11px;text-align:center;color:var(--qc)}
/* temporary normal frame for cards that dropped rarity (José, 28 nov), until their base art is generated */
.card.nframe{position:relative}
.card.nframe::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:2;border:7px solid var(--nfc);
  box-shadow:inset 0 0 0 2px #0009,inset 0 0 14px #000c}
.card.nf-com{--nfc:#9a6a3f}.card.nf-rar{--nfc:#b9c2cc}
.nfwrap{position:relative;display:block;width:100%;height:100%}.nfwrap img{width:100%;height:100%;display:block;object-fit:cover}
.nfwrap::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;border:6px solid var(--nfc);box-shadow:inset 0 0 0 2px #0009,inset 0 0 12px #000c}
.nfwrap.nf-com{--nfc:#9a6a3f}.nfwrap.nf-rar{--nfc:#b9c2cc}
/* deck picker redesign (José, 28 nov): bronze-framed deck panels, kit buttons and the seal (Única) slot */
#layer .deckrow{position:relative;display:grid;grid-template-columns:1fr auto;grid-template-areas:"strip seal" "info seal" "btns btns";gap:12px 14px;padding:16px 16px 14px 22px;
  border-radius:22px;border:2px solid #8a6a4a;border-left:0;background:linear-gradient(135deg,color-mix(in srgb,var(--c) 26%,#1c130e) 0,#1a120f 45%,#120c0a 100%);
  box-shadow:inset 0 1px 0 #f0c98a33,inset 0 0 0 1px #0008,0 8px 18px #000a;overflow:hidden}
#layer .deckrow::before{content:'';position:absolute;left:0;top:0;bottom:0;width:8px;background:linear-gradient(180deg,var(--c),color-mix(in srgb,var(--c) 40%,#000))}
#layer .deckrow .dk-strip{grid-area:strip;width:auto;height:104px;overflow:visible;border-radius:0}
#layer .deckrow .dk-strip img{width:74px;height:104px;margin-right:-30px;border-radius:7px;border:2px solid #0009;box-shadow:3px 4px 10px #000c;transform:rotate(calc((var(--i,0) - 2) * 2deg))}
#layer .deckrow .dk-strip img:nth-child(odd){transform:rotate(-3deg) translateY(2px)}#layer .deckrow .dk-strip img:nth-child(even){transform:rotate(3deg)}
#layer .deckrow .dk-info{grid-area:info;min-width:0}
#layer .deckrow .dk-info b{font-size:32px;color:#ffe7a8;text-shadow:0 2px 4px #000}
#layer .deckrow .dk-info span{font-size:21px}
#layer .deckrow .dk-btns{grid-area:btns;display:grid;grid-template-columns:1fr 64px 1fr 1.4fr;gap:8px;width:100%}
#layer .deckrow .dk-btns .btn{min-height:68px;font-size:24px;padding:4px 8px;border:0;box-shadow:none;background:url(ui/k/UI-K03.webp) center/100% 100% no-repeat;color:#f4ead7;text-shadow:0 2px 3px #000}
#layer .deckrow .dk-btns .btn.main{background-image:url(ui/k/UI-K02.webp);color:#fff3dc;font-weight:bold;font-size:26px}
#layer .deckrow .dk-btns .btn[disabled]{filter:grayscale(.8) brightness(.6);opacity:1}
#layer .deckrow .dk-btns .btn:active{transform:translateY(2px);filter:brightness(1.15)}
.dk-seal{grid-area:seal;align-self:start;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:118px;padding:6px;border-radius:14px;cursor:pointer;color:#e8dccb;font:inherit;
  border:2px dashed #c8955a99;background:repeating-linear-gradient(45deg,#0000 0 10px,#ffffff06 10px 20px),#0008}
.dk-seal i{font-style:normal;font-size:46px;line-height:1;color:#c8955a88;text-shadow:0 0 10px #000}
.dk-seal span{font-size:16px;line-height:1.15;text-align:center}.dk-seal small{font-size:13px;color:var(--muted)}
.dk-seal.on{border:2px solid #ffd36a;background:#0008;box-shadow:0 0 14px #ffd36a44}.dk-seal.on .unic{width:96px}.dk-seal.on span{color:#ffe7a8;font-weight:bold}
.sealpick{display:flex;flex-direction:column;gap:14px;width:100%;max-height:100%;overflow:auto;padding:20px 16px;border-radius:24px;border:3px solid #c8955a;background:linear-gradient(180deg,#2a1d15f5,#120c0af5)}
.sealpick .unigrid{grid-template-columns:repeat(4,1fr)}.sealpick .unigrid button.cur .unic{outline:4px solid #ffd36a;outline-offset:2px}
.sealpick .row2 .btn{flex:1;border:0;background:url(ui/k/UI-K03.webp) center/100% 100% no-repeat;color:#f4ead7}.sealpick .row2 .btn.main{background-image:url(ui/k/UI-K02.webp)}
#layer .decks .row2 .btn,#layer #dguide{border:0;box-shadow:none;background:url(ui/k/UI-K03.webp) center/100% 100% no-repeat;color:#f4ead7;text-shadow:0 2px 3px #000;min-height:72px;padding:6px 34px}
#layer .decks .row2 .btn.newdeck{background-image:url(ui/k/UI-K04.webp);color:#2a1a10;text-shadow:0 1px 0 #fff6;font-weight:bold}
/* every remaining plain button on screens, dialogs and the card viewer uses the kit look (José, 28 nov) */
#layer .screen .btn,#layer .overlay.dlg .btn,#layer .viewer .vact .btn,#layer .viewer .vtop .btn{border:0;box-shadow:none;border-radius:12px;
  background:url(ui/k/UI-K03.webp) center/100% 100% no-repeat;color:#f4ead7;text-shadow:0 2px 3px #000;padding-left:max(18px,6%);padding-right:max(18px,6%)}
#layer .screen .btn.main,#layer .overlay.dlg .btn.main,#layer .viewer .vact .btn.main{background-image:url(ui/k/UI-K02.webp);color:#fff3dc;font-weight:bold}
#layer .screen .btn.gold,#layer .overlay.dlg .btn.gold,#layer .viewer .vact .btn.gold{background-image:url(ui/k/UI-K04.webp);color:#2a1a10;text-shadow:0 1px 0 #fff6}
#layer .screen .btn.danger,#layer .overlay.dlg .btn.danger{background-image:url(ui/k/UI-K02.webp);filter:saturate(.7) brightness(.85);color:#ffd9d4}
#layer .screen .btn[disabled],#layer .overlay.dlg .btn[disabled],#layer .viewer .vact .btn[disabled]{filter:grayscale(.85) brightness(.6);opacity:1}
#layer .screen .btn:active,#layer .overlay.dlg .btn:active,#layer .viewer .btn:active{transform:translateY(2px);filter:brightness(1.15)}
#layer .screen .btn.back{padding:10px 24px;font-weight:bold}
#layer .screen .btn.newdeck{border-style:none}
/* dialog / sheet button rows (José, 28 nov: «el texto es más grande que el botón»): full-width row, text kept inside the frame */
#layer .sheet3 .row2,#layer .overlay.dlg .row2{width:100%;max-width:640px;flex-wrap:nowrap;gap:14px}
#layer .sheet3 .row2 .btn,#layer .overlay.dlg .row2 .btn{flex:1 1 0;min-width:0;min-height:92px;padding:6px 40px;font-size:27px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* generated collectibles (José, 28 nov): sleeves over every face-down card, profile icon, passive marker, previews */
.card.back{position:relative}
.card.back::after{content:'';position:absolute;inset:0;pointer-events:none;background:var(--funda,none) center/100% 100% no-repeat;border-radius:inherit}
.avatar.colico{background-size:cover;background-color:transparent}
.pfic{display:inline-block;width:1.25em;height:1.25em;vertical-align:-.28em;margin-right:4px;background:center/contain no-repeat;filter:drop-shadow(0 1px 2px #000)}
.colprev{width:100%;aspect-ratio:5/7;border-radius:8px;background:#000 center/contain no-repeat}
.colprev.colFUN{background-color:#1a120f;background-image:var(--x);background-size:100% 100%}
.colprev.colICO,.colprev.colFIC{aspect-ratio:1;background-color:transparent}
.colnone{width:100%;aspect-ratio:1;display:flex;align-items:center;justify-content:center;font-size:48px;color:var(--muted)}
.tw-sel{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;flex:none}.tw-sel .fchip.lock{opacity:.55}
/* report a card (T6.4) */
.vrep{background:none;border:1px solid #c8955a88;border-radius:8px;color:#e8dccb;font:inherit;font-size:18px;padding:2px 10px;cursor:pointer}
.repm{display:flex;flex-direction:column;gap:8px;font-size:24px;text-align:left;width:min(560px,100%)}.repm input{transform:scale(1.4);margin-right:10px}
#ov2 textarea.search{width:min(560px,100%);font:inherit;font-size:22px;min-height:90px}
/* entrance auras (Myl2D parameters, José 28 nov): drawn by code, theme colour --ac */
.aura{position:absolute;inset:-14%;pointer-events:none;display:flex;align-items:center;justify-content:center}
.aura .ar{position:absolute;border-radius:50%;border:3px solid var(--ac);box-shadow:0 0 12px var(--ac),inset 0 0 10px var(--ac);opacity:.85}
.aura .r0{inset:18%}.aura .r1{inset:10%;border-style:dashed}.aura .r2{inset:3%;border-width:2px}
.aura.q3 .ar{animation:aspin 9s linear infinite}.aura.q3 .r1{animation-direction:reverse}
.aura.q4 .ar{animation:aspin 6s linear infinite}.aura.q4 .r1{animation-direction:reverse}
@keyframes aspin{to{transform:rotate(360deg)}}
.aura .sp{position:absolute;left:50%;top:50%;width:8px;height:8px;margin:-4px;border-radius:50%;background:#fff;box-shadow:0 0 10px var(--ac),0 0 4px #fff;
  transform:rotate(var(--a)) translateY(-46%);animation:spark 1.6s ease-in-out var(--d) infinite}
@keyframes spark{0%{opacity:0;transform:rotate(var(--a)) translateY(-30%) scale(.4)}50%{opacity:1}100%{opacity:0;transform:rotate(var(--a)) translateY(-60%) scale(1.1)}}
.aura.big{inset:-22%;z-index:3;animation:ain .6s ease-out}
@keyframes ain{from{opacity:0;transform:scale(.6)}to{opacity:1;transform:scale(1)}}
.colprev.colAUR{position:relative;aspect-ratio:1;background:radial-gradient(circle,#2a1d15,#0e0907);border-radius:50%}
.colprev.colAUR .aura{inset:8%}
.still .aura *{animation:none!important}
.temas{display:flex;flex-direction:column;gap:8px;width:100%;flex:none}.trow{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.trow b{width:100%;font-size:22px;color:#ffe7a8}.trow .fchip{border-color:var(--c)}
/* nav icons a bit higher, centred in their rings (José, 28 nov: «centra el icono, está muy abajo») */
#nav button{padding-top:36px}#nav button.mid img{margin-top:-13px}
/* «Jugar» icon: centre of its raised ring, measured on screen (comment 28 nov) */
#nav button.mid img{margin-top:-19px}
/* back-to-top button (José, 28 nov) */
#layer .totop{position:absolute;left:18px;bottom:28px;z-index:36;width:72px;height:72px;border-radius:50%;padding:0;cursor:pointer;
  border:3px solid #c8955a;background:radial-gradient(circle at 50% 35%,#5a3418,#1a0f08);color:#ffe7a8;font-size:28px;box-shadow:0 6px 16px #000c,inset 0 1px 0 #f0c98a66;opacity:.92}
#layer .totop.nav{bottom:calc(168px + env(safe-area-inset-bottom,0px))}
#layer .totop[hidden]{display:none}#layer .totop:active{transform:translateY(2px);filter:brightness(1.2)}
/* in-game sheets (end of match, pause…) on small phones (José, 28 nov: «no se ve en dispositivos»): the sheet scrolls,
   stays centred when it fits, and rows with 3+ buttons wrap two per line instead of squeezing */
#layer .overlay.sheet3{overflow-y:auto;overflow-x:hidden;justify-content:flex-start;gap:18px;padding:28px 20px calc(28px + env(safe-area-inset-bottom,0px));overscroll-behavior:contain}
#layer .overlay.sheet3>:first-child{margin-top:auto}#layer .overlay.sheet3>:last-child{margin-bottom:auto}
#layer .overlay.sheet3>*{flex:none}
#layer .sheet3 .row2:has(> .btn:nth-child(3)){flex-wrap:wrap}
#layer .sheet3 .row2:has(> .btn:nth-child(3)) .btn{flex:1 1 calc(50% - 7px);min-height:84px;font-size:25px;padding:6px 34px}
#layer .sheet3 .row2:has(> .btn:nth-child(3)) .btn:last-child:nth-child(odd){flex-basis:100%}
#layer .sheet3 .reward{font-size:24px;padding:10px 16px}
#layer .sheet3 .endst{font-size:30px}
#layer .sheet3 .row2:has(> .btn:nth-child(3)) .btn{font-size:23px;padding:6px 26px;white-space:normal;text-overflow:clip;line-height:1.1}
/* the action buttons stay pinned at the bottom of the sheet while the summary scrolls above them */
#layer .overlay.sheet3>.row2:last-child{position:sticky;bottom:calc(-28px - env(safe-area-inset-bottom,0px));z-index:2;margin-bottom:calc(-28px - env(safe-area-inset-bottom,0px));
  padding:14px 4px calc(18px + env(safe-area-inset-bottom,0px));background:linear-gradient(#0000,#000000e6 22%)}
/* painted auras (Codex): black is invisible with screen blending; quality sets the motion */
.aura.img img{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}   /* RGBA light (preparar_coleccionables.py): no blend mode needed */
.aura.img.q2 img{animation:apulse 3.2s ease-in-out infinite}
.aura.img.q3 img{animation:aspin 16s linear infinite}
.aura.img.q4 img{animation:aspin 10s linear infinite,apulse 2.6s ease-in-out infinite}
@keyframes apulse{50%{filter:brightness(1.35)}}
.colprev.colAUR .aura.img{inset:2%}
/* main-menu small row (Misiones · Buzón · Ajustes · Reglas): same size, text centred, counter as a badge (José, 28 nov: «lo veo chueco») */
#layer .screen .mrow .btn{display:flex;align-items:center;justify-content:center;text-align:center;position:relative;padding:4px 14px;font-size:20px;white-space:nowrap;min-height:66px}
#layer .screen .mrow .btn small{position:absolute;top:-6px;right:-2px;min-width:30px;height:30px;padding:0 7px;border-radius:15px;display:flex;align-items:center;justify-content:center;
  background:#c0392b;color:#fff;font-size:17px!important;font-weight:bold;text-shadow:none;box-shadow:0 2px 6px #000a;border:2px solid #ffd36a}
#layer .screen.menu .mlist .mrow .btn{font-size:20px;padding:4px 14px}

/* cosmetic chests (José, 28 nov): one per collectible kind */
.cchests{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:100%;flex:none}
.cchest{display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:16px;background:#1a120f;border:2px solid #6b5137}
.cchead{display:flex;gap:10px;align-items:center}.cchead .colprev{width:70px;height:70px;flex:none;position:relative;border-radius:10px;background-size:cover;background-position:center}
.cchead b{display:block;font-size:22px;color:#ffd9a0;line-height:1.1}.cchead small{font-size:18px;color:var(--muted)}
.cchest .keybuy{display:flex;gap:8px}.cchest .keybuy .btn{flex:1;min-height:60px;font-size:22px;padding:4px 6px}
.ccout{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;padding:20px;border-radius:18px;background:#1a120f;border:3px solid #6b5137;animation:vflip .5s ease-out}
.ccout .colprev{width:260px;height:260px;position:relative;border-radius:14px;background-size:contain;background-repeat:no-repeat;background-position:center}
.ccout .colprev.colTAP,.ccout .colprev.colREV,.ccout .colprev.colFUN{height:340px;width:243px;background-size:cover}
.ccout b{font-size:30px}.ccout em{position:absolute;top:10px;right:10px;font-size:18px;font-style:normal;background:#3fae5a;color:#fff;padding:2px 8px;border-radius:8px}
.cchead .colprev.colFUN,.cchead .colprev.colREV,.cchead .colprev.colTAP{width:50px;height:70px;background-size:cover}

/* weekly family (José, 28 nov) */
.famgrid{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:6px}.famgrid .esttile{padding:5px;gap:4px;min-width:0}.famgrid .btn{min-width:0!important}
.famgrid .colprev{width:100%;aspect-ratio:1;position:relative;border-radius:8px;background-size:cover;background-position:center}
.famgrid .colprev.colTAP,.famgrid .colprev.colREV,.famgrid .colprev.colFUN{aspect-ratio:5/7}
.famgrid .btn{min-height:48px;font-size:18px;padding:2px 4px;width:100%}.famgrid .qtag{font-size:14px}
.famlot{width:100%;min-height:80px;font-size:26px;flex:none}.famlot small{color:#2a5a1a;font-weight:bold}
.incofre{font-size:17px;color:var(--muted);padding:6px 0}

/* social (José, 28 nov) */
#socbox{width:100%;display:flex;flex-direction:column;gap:10px;flex:none}
.stabs{display:flex;gap:6px;width:100%}.stab{flex:1;position:relative;min-height:64px;font:600 22px var(--serif,serif);color:#e8dcc4;background:#1a120f;border:2px solid #6b5137;border-radius:14px}
.stab.on{background:#5a2a1e;border-color:#ffd36a;color:#ffd9a0}.stab small{position:absolute;top:-8px;right:-4px;min-width:28px;height:28px;border-radius:14px;background:#c0392b;color:#fff;font-size:16px;line-height:28px;padding:0 6px}
.chatlog{display:flex;flex-direction:column;gap:6px;height:52vh;overflow-y:auto;padding:10px;border-radius:14px;background:#0f0a08cc;border:2px solid #3a2c22}
.cmsg{display:flex;flex-wrap:wrap;gap:2px 8px;align-items:baseline;font-size:22px;line-height:1.3}.cmsg b{color:#ffd9a0;cursor:pointer}.cmsg.mine b{color:#9fd3ff}
.cmsg span{color:#efe6d6;word-break:break-word;flex-basis:100%}.cmsg i,.cleg i{font-size:15px;color:var(--muted);font-style:normal}
.cleg{display:flex;gap:10px;align-items:center;padding:6px 8px;border-radius:12px;background:linear-gradient(90deg,#3d2a08,#1a120f);border:1px solid #ffd36a88;font-size:21px;cursor:pointer}
.cleg img{width:44px;aspect-ratio:5/7;border-radius:4px}.cleg em{color:#ffd36a;font-style:normal;font-weight:bold}.cleg span{flex:1}
.chatin{display:flex;gap:8px;width:100%}.chatin input{flex:1;min-width:0}.chatin .btn{min-height:60px;padding:4px 16px;font-size:22px}
.frow{display:flex;gap:8px;align-items:center;padding:8px 10px;border-radius:12px;background:#1a120f;border:1px solid #3a2c22;font-size:22px}
.frow b{flex:1;color:#ffd9a0}.frow span{font-size:18px;color:var(--muted)}.frow .btn{min-height:52px;padding:2px 12px;font-size:20px}
.dot{width:14px;height:14px;border-radius:7px;background:#555;flex:none}.dot.on{background:#3fae5a;box-shadow:0 0 8px #3fae5a}
.frow [data-fmenu]{flex:none;width:58px;padding:0}

/* mythic key / chest look apart from the normal ones (José, 28 nov: «agrégale algo para distinguirlo») */
.keyrow.mit{background:radial-gradient(120% 90% at 50% 0%,#3a1f5c 0%,#1a0f22 70%);border-color:#a77bff;box-shadow:0 0 18px #8a5cff66,inset 0 0 22px #8a5cff33}
.keyrow.mit .keyhead b{color:#d9c2ff;text-shadow:0 0 10px #a77bffaa}
.btn.mit{background-image:none!important;background:linear-gradient(180deg,#9b6dff,#5b2fb8)!important;color:#fff!important;border:2px solid #e3d2ff!important;
  box-shadow:0 0 14px #8a5cffaa,inset 0 1px 0 #fff6!important;text-shadow:0 1px 2px #000a!important}
.btn.mit:disabled{filter:grayscale(.7) brightness(.6)}
.btn.mit .ic{filter:drop-shadow(0 0 6px #c9a8ff)}
.mitbadge{font:700 24px var(--serif,serif);letter-spacing:.18em;color:#e3d2ff;text-shadow:0 0 12px #a77bff;animation:apulse 2.4s ease-in-out infinite}
.ccout.mit,.chestgrid.mit .chestit{border-color:#a77bff;box-shadow:0 0 22px #8a5cff88;background:radial-gradient(circle at 50% 30%,#3a1f5c,#1a0f22)}

/* Bóveda (José, 28 nov): tabs and the chest opening animation */
.vtabs{margin:4px 0 6px}
.chestanim{position:relative;width:600px;max-width:92%;aspect-ratio:1;display:grid;place-items:center;cursor:pointer}
.chestanim img,.chestanim .chfb{position:absolute;inset:8%;width:84%;height:84%;object-fit:contain}
.chestanim .chfb{display:grid;place-items:center;font-size:220px}
.chestanim .chc{animation:chshake 1.1s ease-in-out infinite}
.chestanim .cho{opacity:0;transform:scale(.9)}
.chestanim .chray{position:absolute;inset:-10%;border-radius:50%;background:radial-gradient(circle,#ffe7a0cc 0%,#ffd36a55 30%,transparent 65%);opacity:0;transform:scale(.4)}
.chestanim.mit .chray{background:radial-gradient(circle,#efe0ffdd 0%,#a77bff77 32%,transparent 66%)}
.chestanim.open .chc{animation:none;opacity:0;transition:opacity .25s}
.chestanim.open .cho{opacity:1;transform:scale(1.04);transition:opacity .2s,transform .5s cubic-bezier(.2,1.6,.4,1)}
.chestanim.open .chray{opacity:1;transform:scale(1.15);transition:opacity .25s,transform .9s ease-out}
@keyframes chshake{0%,100%{transform:rotate(0)}20%{transform:rotate(-4deg) translateY(-2%)}40%{transform:rotate(4deg)}60%{transform:rotate(-3deg) translateY(-1%)}80%{transform:rotate(2deg)}}
.chtap{text-align:center;opacity:.8}
.chestanim.open + .chtap{visibility:hidden}

/* tablets / landscape (José, 28 nov, iPad): fill the side bands with the game's art instead of flat black */
body.wide{background:#0d0907 url(ui/f/UI-F01.webp) center/cover no-repeat}
body.wide::before{content:'';position:fixed;inset:0;background:radial-gradient(ellipse at center,#0d090766 0%,#0d0907bb 80%);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);pointer-events:none}
/* wide layer: lists and buttons keep a phone-like column, grids use the extra width */
body.wide #scr>.mlist,body.wide #scr>.btn,body.wide #scr>.sub,body.wide #scr>.gnote,body.wide #scr>.wallet,body.wide #scr>.stabs,body.wide #scr>.keyrow,body.wide #scr>form,body.wide #socbox,body.wide .mblist,body.wide #scr>.offers{max-width:760px;margin-left:auto;margin-right:auto;width:100%}
body.wide .estgrid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
body.wide .cchests{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
/* José, 28 nov (iPad): «estos botones se ven aplastados» — on wide screens the menu buttons keep the phone proportions */
body.wide #scr .mlist,body.wide #scr>.mrow,body.wide #scr .mlist .mrow{max-width:640px;margin-left:auto;margin-right:auto}
body:not(.short) #layer .screen.menu:not(.compact) .mlist>.btn{min-height:112px}   /* the K02/K03 art is 4.6:1; at 74 px it looked squashed */
.shopitem.off{opacity:.45;filter:grayscale(.6)}

/* tutorial as a dialogue with a guide (José, 28 nov) */
.coach .cwho{display:flex;align-items:baseline;gap:10px;color:#ffd9a0}.coach .cwho small{font-size:.7em;color:var(--muted);font-weight:normal}
.coach p{animation:cline .35s ease-out}@keyframes cline{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
/* PC / wide: the «‹ Volver / Menú» button keeps its own size (it was stretched by the centred-column rule) */
body.wide #scr>.btn.back{width:auto;max-width:none;margin:0}
/* «Aprende a jugar» in Jugar: the same flame-frame design as «Partida rápida», in a softer amber tone (José, 28 nov) */
#layer .btn.mode.soft{background-image:url(ui/k/UI-K02.webp)!important;filter:saturate(.7) hue-rotate(24deg) brightness(1.06);color:#fff6e6;padding-left:80px!important;padding-right:80px!important}
#layer .btn.mode.soft small{color:#fff1dccc!important}
/* PC / wide: game modes (and other hub lists) in 2 columns, like Myl2D; the highlighted ones span the full row (José, 28 nov) */
body.wide #scr .mlist.modes{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px;max-width:1040px;width:100%}
body.wide #scr .mlist.modes>.btn.mode{min-height:96px;align-self:stretch;justify-content:center}
body.wide #scr .mlist.modes>.btn.mode.main,body.wide #scr .mlist.modes>.btn.mode.soft{grid-column:1/-1;max-width:640px;width:100%;justify-self:center}
/* disabled «Torneos» placeholder in Jugar */
#layer .btn.mode.off,#layer .btn.mode[disabled]{filter:grayscale(.9) brightness(.55);cursor:not-allowed;opacity:1}
/* «Jugar online» in blue (José, 28 nov): the same button art recoloured (ui/k/UI-K02-azul.webp), so the gold frame stays intact */
#layer .btn.mode.blue{background-image:url(ui/k/UI-K02-azul.webp)!important;background-size:100% 100%!important;color:#eef5ff;padding-left:80px!important;padding-right:80px!important}
#layer .btn.mode.blue small{color:#d6e6ffcc!important}

/* ---------- animated title v2 (José, 28 nov: «una animación en el título por detrás … la fuente, el texto, una textura»)
   Cinzel (SIL OFL 1.1, juego/fuentes/OFL-Cinzel.txt) only for the title; UI-K11 gilded-bronze texture clipped into the
   letters with a light sweep; UI-K12 soul-flame halo behind the emblem (screen-blended), slow spin + pulse; rising embers.
   Ajustes › Animaciones off or reduced motion: everything still. Art PENDIENTE. */
@font-face{font-family:'Cinzel';src:url(fuentes/cinzel-900.woff2) format('woff2');font-weight:900;font-display:swap}
@font-face{font-family:'Cinzel';src:url(fuentes/cinzel-700.woff2) format('woff2');font-weight:700;font-display:swap}
#layer .screen.menu .mm-logo{position:relative;width:min(640px,96%);margin:0 auto;flex:none}
#layer .screen.menu .mm-logo .mm-title{width:100%;position:relative;z-index:2;animation:mmTitleIn .9s ease-out both}
#layer .screen.menu .mm-halo{position:absolute;left:50%;top:24%;width:92%;aspect-ratio:1;translate:-50% -50%;z-index:0;pointer-events:none;
  background:url(ui/k/UI-K12a.webp) center/contain no-repeat;opacity:.7;   /* José, 29 nov («un cubo oscurecido girando»): UI-K12 with its black turned into transparency, no blend needed */
  animation:mmHaloIn .9s ease-out both,mmSpin 90s linear infinite,mmPulse 5s ease-in-out infinite}
#layer .screen.menu .mm-embers{position:absolute;inset:-10% 10% 30%;z-index:1;pointer-events:none}
#layer .screen.menu .mm-embers i{position:absolute;bottom:0;width:5px;height:5px;border-radius:50%;background:#ffd36a;box-shadow:0 0 8px 2px #ffb54a;opacity:0;animation:mmEmber 5.5s ease-in infinite}
#layer .screen.menu .mm-embers i:nth-child(even){background:#a9d8ff;box-shadow:0 0 8px 2px #4696c8}
#layer .screen.menu .mm-embers i:nth-child(1){left:12%;animation-delay:.2s;animation-duration:4.6s}
#layer .screen.menu .mm-embers i:nth-child(2){left:26%;animation-delay:1.7s;animation-duration:6.2s}
#layer .screen.menu .mm-embers i:nth-child(3){left:38%;animation-delay:3.1s;animation-duration:5.1s}
#layer .screen.menu .mm-embers i:nth-child(4){left:50%;animation-delay:.9s;animation-duration:6.8s}
#layer .screen.menu .mm-embers i:nth-child(5){left:61%;animation-delay:2.5s;animation-duration:4.9s}
#layer .screen.menu .mm-embers i:nth-child(6){left:72%;animation-delay:4.2s;animation-duration:5.8s}
#layer .screen.menu .mm-embers i:nth-child(7){left:84%;animation-delay:1.3s;animation-duration:6.4s}
#layer .screen.menu .mm-embers i:nth-child(8){left:45%;animation-delay:3.8s;animation-duration:4.4s}
#layer .screen.menu .mm-title .mm-txt{font-family:'Cinzel',var(--serif),serif;font-weight:900;font-size:50px;letter-spacing:.1em;color:transparent;text-shadow:none;
  background:linear-gradient(105deg,#0000 42%,#fff8 50%,#0000 58%) 160% 0/300% 100% no-repeat,
    linear-gradient(180deg,#fff1c4 0%,#f3c25e 45%,#a8701f 55%,#e9b24f 100%) 0 0/100% 100%,
    url(ui/k/UI-K11.webp) 0 0/256px;
  background-blend-mode:normal,overlay,normal;-webkit-background-clip:text;background-clip:text;
  -webkit-text-stroke:1px #fff3cf44;filter:drop-shadow(0 2px 0 #6b3f12) drop-shadow(0 5px 6px #000c);
  animation:mmSweep 8.1s ease-in-out 1.8s infinite}
@keyframes mmTitleIn{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}
@keyframes mmHaloIn{from{opacity:0;scale:.85}to{opacity:.7;scale:1}}
@keyframes mmSpin{to{rotate:360deg}}
@keyframes mmPulse{0%,100%{opacity:.55}50%{opacity:.8}}
@keyframes mmEmber{0%{opacity:0;transform:translateY(0) scale(.6)}15%{opacity:.7}100%{opacity:0;transform:translateY(-110px) scale(1)}}
@keyframes mmSweep{0%{background-position:160% 0,0 0,0 0}13.5%,100%{background-position:-60% 0,0 0,0 0}}
body.still #layer .screen.menu .mm-halo,body.still #layer .screen.menu .mm-txt,body.still #layer .screen.menu .mm-title{animation:none}
body.still #layer .screen.menu .mm-embers{display:none}
@media (prefers-reduced-motion:reduce){#layer .screen.menu .mm-halo,#layer .screen.menu .mm-txt,#layer .screen.menu .mm-title{animation:none}#layer .screen.menu .mm-embers{display:none}}
/* Sello reveal animation (José, 28 nov) */
#layer .overlay.sealfx{z-index:65;background:radial-gradient(circle at 50% 45%,#3a2410,#000 70%);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;overflow:hidden;cursor:pointer}
.sealfx .sf-rays{position:absolute;left:50%;top:45%;width:1400px;height:1400px;margin:-700px 0 0 -700px;background:repeating-conic-gradient(#ffd36a33 0 6deg,#0000 6deg 18deg);border-radius:50%;
  -webkit-mask:radial-gradient(circle,#000 10%,#0000 60%);mask:radial-gradient(circle,#000 10%,#0000 60%);animation:sfspin 9s linear infinite,sffade .6s ease-out both}
.sealfx .sf-seal{position:absolute;top:45%;left:50%;transform:translate(-50%,-50%);width:170px;height:170px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:90px;color:#ffe7a8;
  background:radial-gradient(circle at 40% 35%,#c0392b,#5a120c);border:6px solid #ffd36a;box-shadow:0 0 40px #ffb54a;animation:sfseal .9s ease-in forwards}
.sealfx .sf-card{width:300px;position:relative;z-index:2;animation:sfcard .9s cubic-bezier(.2,.8,.3,1.2) .75s both}
.sealfx .sf-card .unic{box-shadow:0 0 60px #ffd36acc,0 0 0 3px #ffd36a}
.sealfx .sf-card .unic.uph .ui{font-size:80px}.sealfx .sf-card .unic.uph b{font-size:30px}.sealfx .sf-card .unic.uph span{font-size:18px}
.sealfx .sf-name{position:relative;z-index:2;font-size:42px;font-weight:bold;color:#ffe7a8;text-shadow:0 0 20px #ffb54a,0 2px 4px #000;text-align:center;animation:sffade .5s ease-out 1.4s both}
.sealfx .sf-sub{position:relative;z-index:2;font-size:22px;color:var(--muted);animation:sffade .5s ease-out 1.6s both}
@keyframes sfspin{to{transform:rotate(360deg)}}
@keyframes sffade{from{opacity:0}}
@keyframes sfseal{0%{transform:translate(-50%,-50%) scale(.6)}40%{transform:translate(-50%,-50%) scale(1.1) rotate(-8deg)}70%{transform:translate(-50%,-50%) scale(1) rotate(6deg);opacity:1}100%{transform:translate(-50%,-50%) scale(2.2);opacity:0;filter:blur(6px)}}
@keyframes sfcard{from{opacity:0;transform:perspective(900px) rotateY(180deg) scale(.4)}to{opacity:1;transform:none}}
.still .sealfx *{animation:none!important}
/* title letters centred in the red plate of UI-K09 (plate at 54–75 % of the height; José, 28 nov: «el texto está muy arriba») */
#layer .screen.menu .mm-logo .mm-title{padding-top:12.6%}
#layer .screen.menu .mm-title .mm-txt{font-size:44px;line-height:1;display:block}

/* turn indicator (José, 28 nov): the active field glows with its owner's colour and a chip; the other one dims a little;
   when a turn ends, a «Turno terminado» sweep crosses the field that just played */
#board .field{transition:filter .4s,box-shadow .4s;border-radius:28px}
#board .field.turnon{box-shadow:0 0 0 3px #ffd36a66,0 0 38px #ffb54a44 inset;animation:turnGlow 2.4s ease-in-out infinite}
#board .field.turnoff{filter:brightness(.82) saturate(.85)}
#board .turnchip{position:absolute;left:50%;transform:translateX(-50%);z-index:6;padding:4px 18px;border-radius:16px;font:700 24px var(--serif,serif);letter-spacing:.06em;white-space:nowrap;pointer-events:none;box-shadow:0 2px 8px #000a}
#board .turnchip.me{bottom:-6px;background:linear-gradient(#ffd36a,#c98a2a);color:#2a1a10}
#board .turnchip.rv{top:-6px;background:linear-gradient(#8a3a3a,#4a1616);color:#ffe3c8;border:1px solid #ffb59a88}
@keyframes turnGlow{50%{box-shadow:0 0 0 3px #ffd36aaa,0 0 54px #ffb54a66 inset}}
#fx .turnend{position:absolute;left:0;right:0;text-align:center;font:700 44px var(--serif,serif);color:#fff3dc;letter-spacing:.08em;text-shadow:0 2px 6px #000,0 0 18px #ffb54a;
  background:linear-gradient(90deg,#0000,#000a 30%,#000a 70%,#0000);padding:14px 0;animation:turnEnd 1.5s ease-out forwards;pointer-events:none}
@keyframes turnEnd{0%{opacity:0;transform:translateX(-30%)}20%{opacity:1;transform:none}75%{opacity:1}100%{opacity:0;transform:translateX(30%)}}
.still #board .field.turnon{animation:none}

/* status chips with icons (José, 28 nov): tap for the whole effect; warnings in red */
#board .chip.st{display:inline-flex;align-items:center;gap:6px;border:0;cursor:pointer;font:inherit}
#board .chip.st .sti{width:30px;height:30px;object-fit:contain;flex:none;filter:drop-shadow(0 1px 2px #000)}
#board .chip.st.warn{background:#7a1c14;color:#ffe3dc;box-shadow:0 0 0 1px #ff8a7a88}
/* attack cancelled by a status: crossed out in red with the status icon */
#board .atk.blocked{position:relative;opacity:.85}
#board .atk.blocked::after{content:'';position:absolute;left:6%;right:6%;top:50%;height:4px;background:#e0392b;transform:rotate(-8deg);box-shadow:0 0 6px #e0392b;border-radius:2px;pointer-events:none}
#board .atk.blocked .atkst{position:absolute;top:-10px;right:-8px;width:40px;height:40px;filter:drop-shadow(0 0 4px #e0392b)}
/* «No te alcanza» and other dialog buttons: allow two lines instead of cutting the text (José, 28 nov) */
#layer .overlay.dlg .row2 .btn{font-size:24px;white-space:normal;text-overflow:clip;padding:6px 36px}
/* Estéticas: category tabs pinned at the top (José, 28 nov) */
#layer .esttabs{position:sticky;top:-24px;z-index:6;display:flex;gap:8px;width:calc(100% + 48px);margin:0 -24px;padding:12px 20px;overflow-x:auto;scrollbar-width:none;flex:none;
  background:linear-gradient(#140e0cf5,#140e0ce6);border-bottom:2px solid #6b5137;box-shadow:0 6px 14px #000a}
#layer .esttabs::-webkit-scrollbar{display:none}
#layer .esttabs button{flex:none;padding:10px 18px;border-radius:22px;border:2px solid #6b5137;background:#1a120f;color:#e8dccb;font:inherit;font-size:22px;white-space:nowrap;cursor:pointer}
#layer .esttabs button.on{border-color:#ffd36a;background:linear-gradient(180deg,#a8503c,#7a2f22);color:#fff3dc;font-weight:bold;box-shadow:0 0 12px #ffd36a55}
#layer .estsec{display:flex;flex-direction:column;align-items:center;gap:14px;width:100%;flex:none}
#layer .estsec[hidden]{display:none}
#layer .screen .esttabs{top:-84px}   /* flush with the top edge of the screen when scrolled (#scr has 84 px of top padding) */

/* auras on Legendary cards (José, 28 nov) */
.gh .infob{margin-left:10px;width:34px;height:34px;border-radius:50%;border:2px solid #ffd36a;background:#2a1a10;color:#ffd36a;font:italic 700 22px Georgia,serif;vertical-align:middle;cursor:pointer}
.aurcards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;width:100%;flex:none}
.aurc{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px;border-radius:12px;border:2px solid #3a2c22;background:#1a120f;color:#e8dcc4;font:inherit;font-size:15px;cursor:pointer}
.aurc img{width:100%;aspect-ratio:5/7;object-fit:cover;border-radius:6px}
.aurc span{line-height:1.15;text-align:center}
.aurc.on{border-color:#ffd36a;box-shadow:0 0 14px #ffd36a77}
.aurc .aura{position:absolute;inset:-6% -10% 22%;pointer-events:none}
.aurc.off{opacity:.38;filter:grayscale(1);cursor:not-allowed}
.aurc em{position:absolute;top:40%;left:4px;right:4px;font-style:normal;font-size:14px;background:#000c;color:#fff;border-radius:6px;padding:2px}
#fx .aurfx{position:absolute;left:0;right:0;display:flex;justify-content:center;pointer-events:none;animation:aurIn 1.9s ease-out forwards}
#fx .aurfx .aura{position:absolute;inset:-20% -28%}
@keyframes aurIn{0%{opacity:0;transform:scale(.8)}15%{opacity:1;transform:scale(1)}80%{opacity:1}100%{opacity:0;transform:scale(1.05)}}

/* José, 28 nov: «el aura debe salir detrás de la carta, no sobre ella» (picker and in game) */
.aurc .aura{z-index:0}
.aurc>img.aurcimg{position:relative;z-index:1}
.aurc>span,.aurc>em{position:relative;z-index:2}
.aurc .aura.img img{aspect-ratio:auto;object-fit:contain;border-radius:0}
#fx .aurfx .aura,#fx .aurfx .aura.big{z-index:0}

/* Legendary entrance. The painted image, light waves and motes sit behind the card. */
.aura-legendary{--wave-tilt:0deg}
.aura-legendary::before{content:'';position:absolute;inset:3%;border-radius:50%;opacity:.62;
  background:radial-gradient(ellipse,transparent 27%,color-mix(in srgb,var(--ac) 48%,transparent) 53%,transparent 73%)}
.aura-legendary:not(.big)::before{animation:aura-breathe 5.2s ease-in-out infinite}
.aura-legendary .aura-art{position:absolute;inset:0;transform:scale(.96)}
.aura-legendary .aura-art img{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;object-fit:contain;border-radius:0}
.aura-legendary.aura-fallback .aura-art::before,.aura-legendary.aura-fallback .aura-art::after{
  content:'';position:absolute;inset:14% 12%;border:2px solid var(--ac);border-radius:50%;
  box-shadow:0 0 16px var(--ac),inset 0 0 16px var(--ac)}
.aura-legendary.aura-fallback .aura-art::after{inset:9% 7%;border:1px dashed var(--al);box-shadow:none;opacity:.66}
.aurc .aura-legendary{inset:-6% -20% 18%}
#fx .aurfx .aura-legendary,.aura-preview .aura-legendary{inset:-18% -39%}
.tr-card.tr-aura{position:relative;isolation:isolate}
.tr-aura>.aura{z-index:0}
.tr-aura>.aura-legendary{inset:-12% -28%}
.tr-aura>.card{z-index:1}
.aura-legendary.big{z-index:0;font-size:19px;animation:none}
.aura-legendary.big::before{animation:aura-bloom 1.62s ease-out both}
.aura-legendary.big .aura-art{animation:aura-unfold 1.78s cubic-bezier(.22,.72,.28,1) both}
.aura-legendary .aura-wave{position:absolute;inset:14% 10%;border:2px solid var(--al);border-radius:50%;opacity:0;
  box-shadow:0 0 16px var(--ac),inset 0 0 10px var(--ac);animation:aura-spread .98s .32s ease-out both}
.aura-legendary .aura-echo{inset:18% 15%;border-width:1px;border-style:dashed;animation-delay:.57s}
.aura-legendary .aura-mote{position:absolute;left:var(--x);top:var(--y);width:.52em;height:.52em;border-radius:50%;opacity:0;
  background:var(--al);box-shadow:0 0 .55em var(--ac);animation:aura-mote 1.2s calc(.39s + var(--delay)) ease-out both}
.aura-legendary[data-motion=rays] .aura-mote{width:.15em;height:1.65em;border-radius:100%;background:linear-gradient(transparent,var(--al),transparent)}
.aura-legendary[data-motion=rift]{--wave-tilt:-24deg;--mote-turn:115deg}
.aura-legendary[data-motion=rift] .aura-wave{border-left-color:transparent;border-right-color:transparent}
.aura-legendary[data-motion=rift] .aura-mote{width:1.25em;height:.34em;border-radius:100%;background:linear-gradient(90deg,transparent,var(--al));animation-duration:1.45s}
.aura-legendary[data-motion=leaves]{--wave-tilt:17deg;--mote-turn:105deg;--mote-lift:1.6em}
.aura-legendary[data-motion=leaves] .aura-wave{border-radius:41% 59% 45% 55%}
.aura-legendary[data-motion=leaves] .aura-mote{width:.9em;height:.48em;border-radius:0 85% 0 85%;background:linear-gradient(25deg,var(--ac),var(--al))}
.aura-legendary[data-motion=souls]{--mote-lift:-3em;--mote-turn:32deg}
.aura-legendary[data-motion=souls] .aura-mote{width:.8em;height:1.65em;border-radius:70% 30% 56% 44%;background:linear-gradient(var(--al),transparent);animation-duration:1.45s}
.aura-legendary[data-motion=mist]{--mote-lift:-2em}
.aura-legendary[data-motion=mist] .aura-wave{border-style:dotted}
.aura-legendary[data-motion=mist] .aura-mote{width:2.8em;height:1.7em;box-shadow:none;background:radial-gradient(ellipse,var(--ac),transparent 68%);animation-duration:1.48s}
.aura-legendary[data-motion=storm] .aura-wave{border-top-style:dashed;border-bottom-style:dashed}
.aura-legendary[data-motion=storm] .aura-mote{width:.92em;height:2.7em;box-shadow:none;
  clip-path:polygon(63% 0,15% 52%,48% 48%,27% 100%,88% 39%,55% 43%);background:linear-gradient(var(--al),var(--ac));animation-duration:.8s}
.aura-legendary[data-motion=sparks]{--mote-lift:-2.2em}
.aura-legendary[data-motion=sparks] .aura-wave{border-style:dashed}
.aura-legendary[data-motion=sparks] .aura-mote{width:.39em;height:1.5em;background:linear-gradient(var(--al),var(--ac),transparent)}
.aura-legendary[data-motion=sigils]{--wave-tilt:40deg;--mote-turn:55deg}
.aura-legendary[data-motion=sigils] .aura-wave{inset:19% 18%;border-radius:21%;border-style:double}
.aura-legendary[data-motion=sigils] .aura-mote{width:.64em;height:.64em;border-radius:12%;border:1px solid var(--al);background:var(--ac)}
.aura-legendary[data-motion=tide]{--wave-tilt:12deg;--mote-lift:1.5em}
.aura-legendary[data-motion=tide] .aura-wave{border-radius:42% 58% 51% 49%;border-color:var(--al) transparent var(--ac)}
.aura-legendary[data-motion=tide] .aura-mote{width:1.9em;height:.48em;border-radius:50%;background:linear-gradient(90deg,transparent,var(--al),var(--ac))}
.aura-legendary[data-motion=stone]{--mote-lift:2.8em;--mote-turn:72deg}
.aura-legendary[data-motion=stone] .aura-wave{border-style:dotted}
.aura-legendary[data-motion=stone] .aura-mote{width:.85em;height:.7em;clip-path:polygon(0 42%,38% 2%,100% 22%,73% 100%,18% 80%);background:linear-gradient(45deg,var(--ac),var(--al))}
@keyframes aura-breathe{50%{opacity:.93;transform:scale(1.13)}}
@keyframes aura-bloom{
  0%{opacity:.1;transform:scale(.53)} 38%{opacity:.95;transform:scale(1.08)} 100%{opacity:.62;transform:scale(1)}
}
@keyframes aura-unfold{
  0%{opacity:.08;transform:scale(.63)} 35%{opacity:1;transform:scale(1.12)}
  65%{opacity:.92;transform:scale(1.02)} 100%{opacity:1;transform:scale(.96)}
}
@keyframes aura-spread{
  0%{opacity:0;transform:rotate(var(--wave-tilt)) scale(.55)}
  31%{opacity:.8} 100%{opacity:0;transform:rotate(var(--wave-tilt)) scale(1.24)}
}
@keyframes aura-mote{
  0%{opacity:0;transform:translate(-50%,-50%) translate(calc(var(--dx) * -1),calc(var(--dy) * -1)) rotate(var(--angle)) scale(.3)}
  27%{opacity:.94}
  100%{opacity:0;transform:translate(-50%,-50%) translate(var(--dx),calc(var(--dy) + var(--mote-lift,0em))) rotate(calc(var(--angle) + var(--mote-turn,0deg))) scale(.7)}
}
.aurent{position:relative;width:300px;aspect-ratio:5/7;isolation:isolate}
.aurent>.card{position:absolute;inset:0;z-index:1}
#fx .aurfx.aurfx-legendary{animation:aura-entrance var(--aura-duration) cubic-bezier(.18,.65,.24,1) both}
.aurfx-legendary .aurent>.card,.aura-preview .aurent>.card{animation:aura-card-rise .76s cubic-bezier(.19,.64,.28,1) both}
@keyframes aura-entrance{0%{opacity:0}16%,74%{opacity:1}100%{opacity:0}}
@keyframes aura-card-rise{from{transform:translateY(32px) scale(.88)}56%{transform:translateY(-7px) scale(1.035)}to{transform:none}}
#ov2 .aura-preview-title{font-size:clamp(26px,5vw,40px)}
.aura-preview{width:100%;display:grid;place-items:center;padding:48px 0;overflow:hidden}
.aura-preview .aurent{width:min(300px,61%)}
.still .aura-legendary::before{animation:none}
.still .aura-replay{display:none}
@media(prefers-reduced-motion:reduce){
  .aura-legendary,.aura-legendary::before,.aura-legendary *,.aura-preview .aurent>.card,
  #fx .aurfx.aurfx-legendary,#fx .aurfx.aurfx-legendary .aurent>.card{animation:none!important}
  .aura-replay{display:none}
}
/* José, 28 nov: zone menu (Tienda and long screens) (same look as the Estéticas tabs) */
#layer .esttabs.zones button{font-size:20px;padding:9px 16px}
#layer .shopgrid[hidden]{display:none}
/* José, 28 nov («poner un borde máximo a la izquierda y derecha para que el texto no se pase del diseño del borde»): the text of
   every framed mode button stays inside the painted frame. The side margin is a % of the button width, so it follows the
   ornaments at any size: the red/blue buttons have big medallions at the ends, the bronze ones only the laurel border */
#layer .btn.mode,#layer .screen.withnav .btn.mode,#layer .screen.withnav .btn.mode.main,#layer .btn.mode.soft,#layer .btn.mode.blue{padding:22px 0 24px!important}
#layer .btn.mode>b,#layer .btn.mode>small{margin-left:9%;margin-right:9%;max-width:82%}
#layer .btn.mode.main>b,#layer .btn.mode.main>small,#layer .btn.mode.soft>b,#layer .btn.mode.soft>small,#layer .btn.mode.blue>b,#layer .btn.mode.blue>small{margin-left:17%;margin-right:17%;max-width:66%}
/* José, 29 nov: the sleeve preview shows it over the card back of its theme (sleeve on top, back inside its window) */
.colprev.colFUN{background-size:100% 100%,93% 95%;background-position:center,center;background-repeat:no-repeat,no-repeat}
/* José, 29 nov («combina las fundas con los reversos y crea los bordes» · «el borde debería estar a ras»): a sleeve (funda)
   is a thin FRAME flush with the card. Every sleeve image has the same geometry (funda_marco.py): canvas 580x780, the card is
   the 500x700 box at (40,40). So over a card box the frame is an overlay with inset -5.714% -8% (.fnd: your face-up cards in
   the match, viewer and previews); inside a box (card backs, shop tiles) the image fills the box and the card art is the
   86.2% x 89.74% in the middle */
.fnd{position:absolute;inset:-5.714% -8%;z-index:2;pointer-events:none;background:var(--funda,none) center/100% 100% no-repeat}
#ov2 .protpv .fnd,.fcombo .fnd{background-image:var(--fu,none)}
#layer .vcard.sleeved{margin:44px 0;width:min(480px,calc(100cqw - 110px),calc(48cqh * 5 / 7))}   /* room for the frame around the card in the viewer */
.fcombo{position:relative;background:#1a120f center/86.2% 89.74% no-repeat!important;background-size:86.2% 89.74%!important;border-radius:8px}
.fcombo::after{content:'';position:absolute;inset:0;background:var(--fu) center/100% 100% no-repeat;border-radius:inherit}
.rvcombo{position:relative;width:100%;line-height:0}
.rvcombo img{width:100%;display:block}
.rvcombo::after{content:'';position:absolute;inset:0;background:var(--fu,none) center/100% 100% no-repeat;border-radius:6px;pointer-events:none}   /* the sleeve that comes with THIS reverso, never the equipped one */
/* protector preview: back and front inside the same sleeve (José, 29 nov, like Myl2D) */
#ov2 .protpv{display:flex;gap:56px;justify-content:center;align-items:flex-start;margin:22px 0 10px}
#ov2 .protpv figure{margin:0;display:flex;flex-direction:column;align-items:center;gap:30px}
#ov2 .protpv figcaption{font-size:22px;color:var(--muted)}
#ov2 .pvc{position:relative;width:240px;aspect-ratio:5/7;border-radius:12px;background:#1a120f center/cover no-repeat;box-shadow:0 8px 24px #000a}
#ov2 .pvc.front img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:10px}
#ov2 .pvc.front{background:none;box-shadow:none}
/* José, 29 nov («en sobres agrega el sobre encima de la carta y la carta de Leónidas que se vea detrás»): each hero pack
   is the sealed pack in front with the hero card peeking out behind it */
#layer .pkpick .pc{position:relative;width:220px;height:300px}
#layer .pkpick .pkcard{position:absolute;right:0;top:0;width:66%;height:66%;transform:rotate(10deg);filter:drop-shadow(0 6px 10px #000a);transition:transform .2s}
#layer .pkpick .pkcard>*{width:100%;height:100%}
#layer .pkpick .pkenv{position:absolute;left:4%;bottom:0;height:74%;width:auto;transform:rotate(-5deg);filter:drop-shadow(0 10px 14px #000c)}
#layer .pkpick button:hover .pkcard{transform:rotate(12deg) translate(6px,-10px)}
/* themed packs: the same pack + card, smaller, archetype colour under the name */
#layer .temas .trow{flex-direction:column;align-items:stretch}
#layer .pkpick.pkmini{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
#layer .pkpick.pkmini .pc{width:130px;height:178px}
#layer .pkpick.pkmini button{font-size:20px;gap:6px}
#layer .pkpick.pkmini .pkcard img{width:100%;height:100%;object-fit:cover;border-radius:6px;display:block}
#layer .pkpick.pkmini button span{border-bottom:3px solid var(--c);padding:0 4px 2px}
#layer .pkpick.pkmini button{background:none;border:0;padding:0;box-shadow:none;display:flex;flex-direction:column;align-items:center;color:inherit;cursor:pointer}
#layer .keybuy.kdr .btn{min-height:56px;font-size:22px;background-image:url(ui/k/UI-K02-azul.webp);background-size:100% 100%;color:#eef5ff}
/* José, 29 nov («se sale del límite inferior quedando bajo el menú»): every screen with the bottom menu leaves room for it
   (150 px bar + the floating ↑ and «Mis sobres» buttons) so the last row can be scrolled fully above it */
#layer #scr.screen.withnav{padding-bottom:calc(290px + env(safe-area-inset-bottom,0px))}
/* coin ⇄ dracma exchange (José, 29 nov) */
#layer .xch{display:flex;flex-direction:column;gap:14px;width:100%;flex:none}
#layer .xrow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#layer .xrow b{grid-column:1/-1;font-size:22px;color:#ffe7a8}
#layer .xrow .btn{min-height:58px;font-size:20px;padding:4px 6px;white-space:nowrap}
/* José, 29 nov («agrega un fondo de acuerdo a la calidad»): each reward of a chest gets the colour of its quality
   (Común bronze · Poco común silver · Raro gold · Épico violet · Legendario prismatic) */
.chestgrid .chestit[class*="qb"]{border-color:var(--qc);background:radial-gradient(circle at 50% 32%,color-mix(in srgb,var(--qc) 55%,#1a120f) 0%,color-mix(in srgb,var(--qc) 22%,#120c0a) 55%,#0e0907 100%);box-shadow:0 0 14px color-mix(in srgb,var(--qc) 45%,transparent)}
.chestgrid .chestit.qb4{box-shadow:0 0 20px #b479e899}
.chestgrid .chestit.qb5{border-color:#fff4;background:radial-gradient(circle at 50% 30%,#ffffff33,transparent 45%),linear-gradient(135deg,#7a3a6e,#7d6a2a 30%,#1f6e66 60%,#3a4c8a);box-shadow:0 0 26px #7ff0e0aa}
.chestgrid .chestit.qb5 b{text-shadow:0 1px 3px #000}
.ccout[class*="qb"]{background:radial-gradient(circle at 50% 35%,color-mix(in srgb,var(--qc) 50%,#1a120f),#0e0907 75%);border-color:var(--qc)}
.ccout.qb5{background:radial-gradient(circle at 50% 30%,#ffffff33,transparent 45%),linear-gradient(135deg,#7a3a6e,#7d6a2a 30%,#1f6e66 60%,#3a4c8a)}
/* José, 29 nov («sí, pero con degradé de color a las esquinas»): dark in the middle, the quality colour grows toward the corners */
.chestgrid .chestit[class*="qb"],.ccout[class*="qb"]{background:radial-gradient(ellipse farthest-corner at 50% 50%,#0e0907 0%,#140d0a 38%,color-mix(in srgb,var(--qc) 35%,#140d0a) 72%,color-mix(in srgb,var(--qc) 85%,#000) 100%)}
.chestgrid .chestit.qb5,.ccout.qb5{background:radial-gradient(circle at 0 0,#ff9be4cc,transparent 42%),radial-gradient(circle at 100% 0,#ffe08acc,transparent 42%),radial-gradient(circle at 100% 100%,#8ff5e6cc,transparent 42%),radial-gradient(circle at 0 100%,#9db8ffcc,transparent 42%),#0e0907}
/* not owned yet: grey (José, 29 nov) */
.esttile.notown>img,.esttile.notown>.colprev,.esttile.notown>.rvcombo,.esttile.notown>.todoimg{filter:grayscale(1) brightness(.55);transition:filter .2s}
.esttile.notown:hover>img,.esttile.notown:hover>.colprev,.esttile.notown:hover>.rvcombo{filter:grayscale(.6) brightness(.8)}
.esttile.notown>b,.esttile.notown>.qtag{opacity:.6}
.esttile.notown{box-shadow:none!important}
.esttile.notown::before,.esttile.notown::after{opacity:.35}
/* Protectores: one grid, each tile tagged Reverso / Funda */
.esttile{position:relative}
.esttile .ptype{position:absolute;top:6px;left:6px;z-index:4;font-size:14px;padding:1px 8px;border-radius:8px;background:#000b;color:#e8dcc4;border:1px solid #6b5137}
.esttile .ptype.fu{color:#ffe7a8;border-color:#c8955a}
.esttile .skinvar{font-size:16px;color:var(--muted);line-height:1.1;text-align:center;margin-top:-2px}   /* hero skins: hero name, then the variant (José, 29 nov) */
/* José, 29 nov («dice arcoíris pero no brilla»): the Arcoíris finish is a moving holographic rainbow sheen over the card,
   not only a hue shift; it keeps shining even when you do not own it yet (so you see what you would buy) */
.arcwrap{position:relative;width:100%;border-radius:8px;overflow:hidden;line-height:0}
.arcwrap img{width:100%;display:block}
.arcwrap::after{content:'';position:absolute;inset:0;pointer-events:none;mix-blend-mode:color-dodge;opacity:.55;
  background:linear-gradient(115deg,transparent 20%,#ff5ec488 30%,#ffd84a88 38%,#5effc888 46%,#5ea8ff88 54%,#c85eff88 62%,transparent 72%) 0 0/250% 250%;
  animation:arcsweep 3.2s linear infinite}
.arcwrap::before{content:'';position:absolute;inset:0;pointer-events:none;z-index:1;mix-blend-mode:overlay;opacity:.25;
  background:repeating-linear-gradient(60deg,#ff5ec4 0 6%,#ffd84a 6% 12%,#5effc8 12% 18%,#5ea8ff 18% 24%,#c85eff 24% 30%) 0 0/300% 300%;animation:arcsweep 6s linear infinite reverse}
@keyframes arcsweep{from{background-position:100% 100%}to{background-position:0 0}}
.esttile.notown>.arcwrap{filter:brightness(.8)}
.still .arcwrap::after,.still .arcwrap::before{animation:none}
/* images whose pack is missing: a clear placeholder instead of an empty box (José, 29 nov) */
.noimg[style*="url("]{background:repeating-linear-gradient(45deg,#2a1d16 0 10px,#1f1511 10px 20px)!important;position:relative}
.noimg[style*="url("]::after{content:'Imagen pendiente\A' attr(data-nm);white-space:pre-wrap;position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;font-size:14px;line-height:1.2;color:#c8a77a;padding:4px}
img.noimg{background:repeating-linear-gradient(45deg,#2a1d16 0 10px,#1f1511 10px 20px);min-height:40px}
/* Llaves y cofres as a game shop (José, 29 nov) */
#layer .keyrow.kshop{gap:12px;padding:0 0 16px;overflow:hidden;background:linear-gradient(180deg,#2a1c14,#140d0a);border:2px solid #8a6a3e;box-shadow:0 6px 20px #000a}
#layer .kshop .kbanner{display:flex;align-items:center;gap:14px;padding:16px 18px;background:radial-gradient(120% 140% at 0% 50%,#6b4a24 0%,#2a1c14 70%);border-bottom:2px solid #8a6a3e}
#layer .kshop.mit .kbanner{background:radial-gradient(120% 140% at 0% 50%,#5a2fa0 0%,#1a0f22 70%);border-bottom-color:#a77bff}
#layer .kshop .kbig{width:92px;height:92px;object-fit:contain;flex:none;filter:drop-shadow(0 0 14px #ffd36a88);animation:kfloat 3s ease-in-out infinite}
#layer .kshop.mit .kbig{filter:drop-shadow(0 0 16px #b98cffcc)}
@keyframes kfloat{50%{transform:translateY(-6px) rotate(-4deg)}}
#layer .kshop .kbanner b{display:block;font-size:30px;color:#ffd9a0}#layer .kshop.mit .kbanner>div>b{color:#e2ccff}
#layer .kshop .kbanner span{font-size:20px;color:#e8dcc4cc;line-height:1.25}#layer .kshop .kbanner span b{display:inline;font-size:inherit;color:#ffe7a8}
#layer .kshop .kcur{padding:0 16px;font-size:20px;color:#ffe7a8;display:flex;align-items:center;gap:6px}
#layer .kshop .kgrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;row-gap:14px;padding:0 12px;width:100%;box-sizing:border-box}
#layer .kshop .kitem{padding:12px 6px 18px;gap:4px;min-height:0}
#layer .kshop .kitem b{font-size:21px}#layer .kshop .kitem small{font-size:15px;color:#9fe39f}
#layer .kshop .kitem.dr{border-color:#5d86c9;background:linear-gradient(180deg,#203452,#10192a)}
#layer .kshop.mit .kitem{border-color:#8a64d6}
#layer .kshop .kstack{display:flex;justify-content:center;height:54px;align-items:center}
#layer .kshop .kstack img{width:44px;height:44px;object-fit:contain;margin:0 -12px;filter:drop-shadow(0 2px 4px #000)}
#layer .kshop .kstack img:nth-child(even){transform:translateY(-6px) rotate(8deg)}
#layer .kshop .ribbon{position:absolute;top:-10px;left:50%;transform:translateX(-50%);white-space:nowrap;font-style:normal;font-size:13px;font-weight:bold;padding:2px 10px;border-radius:10px;background:linear-gradient(90deg,#e0a72c,#ffd36a);color:#2a1a10;box-shadow:0 2px 6px #000a;z-index:2}
#layer .kshop .kown{display:flex;flex-direction:column;gap:8px;margin:2px 12px 0;padding:12px;border-radius:14px;background:#0007;border:1px solid #6b513766}
#layer .kshop .kown>span{font-size:20px;color:#e8dcc4}
#layer .kshop .kgrid+.kcur{margin-top:10px}#layer .kshop .kgrid+.kown{margin-top:12px}
/* Colección hub: illustrated tiles (José, 29 nov) */
#layer .hgrid{display:grid;grid-template-columns:1fr 1fr;gap:14px;width:100%;flex:none}
#layer .htile{position:relative;display:flex;flex-direction:column;padding:0;overflow:hidden;border-radius:18px;border:2px solid #8a6a3e;background:linear-gradient(180deg,#2e2018,#140d0a);color:#f4ead7;font:inherit;cursor:pointer;text-align:left;box-shadow:0 6px 18px #000a;transition:transform .15s,border-color .15s}
#layer .htile:hover{transform:translateY(-3px);border-color:#ffd36a}
#layer .htile.wide{grid-column:1/-1}
#layer .htile.hot{border-color:#ffd36a;box-shadow:0 0 18px #ffd36a55,0 6px 18px #000a}
#layer .hart{position:relative;height:190px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:radial-gradient(90% 90% at 50% 70%,#5a3a1e 0%,#1a110c 75%)}
#layer .htile.wide .hart{height:210px}
#layer .htxt{display:flex;flex-direction:column;gap:2px;padding:10px 14px 14px;border-top:1px solid #8a6a3e66;background:#0006}
#layer .htxt b{font-size:28px;color:#ffe7a8}#layer .htxt small{font-size:17px;color:#e8dcc4bb;line-height:1.2}
#layer .hbadge{position:absolute;top:10px;right:10px;min-width:34px;height:34px;padding:0 8px;border-radius:17px;background:#c0392b;color:#fff;font-style:normal;font-weight:bold;font-size:20px;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px #000a;z-index:3}
#layer .hfan{position:relative;width:100%;height:100%}
#layer .hfan img{position:absolute;left:50%;bottom:-18px;width:112px;aspect-ratio:5/7;object-fit:cover;border-radius:8px;box-shadow:0 6px 14px #000c;transform:translateX(calc(-50% + var(--n) * 74px)) rotate(calc(var(--n) * 12deg));transform-origin:50% 120%}
#layer .htile.wide .hfan img{width:128px;transform:translateX(calc(-50% + var(--n) * 110px)) rotate(calc(var(--n) * 10deg))}
#layer .hfan img:nth-child(2){z-index:2;bottom:-8px}
#layer .hprot{position:relative;width:104px;aspect-ratio:5/7}
#layer .hrev{position:absolute;inset:0;border-radius:8px;background:var(--rev-min,#3a2a1f) center/cover;box-shadow:0 6px 14px #000c}
#layer .hrev::after{content:'';position:absolute;inset:0;border-radius:inherit;background:var(--funda,none) center/100% 100% no-repeat}
#layer .hprot .aura{inset:-16%;z-index:-1}
#layer .hvault{position:relative;width:100%;height:100%}
#layer .hvault .hpk{position:absolute;left:50%;top:14px;height:160px;transform:translateX(-70%) rotate(-8deg);filter:drop-shadow(0 6px 10px #000c)}
#layer .hvault .hch{position:absolute;left:50%;bottom:6px;width:100px;transform:translateX(5%);filter:drop-shadow(0 6px 10px #000c)}
#layer .hseal{width:120px;height:120px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:64px;color:#ffe7a8;background:radial-gradient(circle at 40% 35%,#c9433a,#6e1712 70%);border:5px solid #d4a54a;box-shadow:0 0 0 4px #6e4a1e,0 8px 18px #000c,inset 0 0 14px #0008;text-shadow:0 2px 4px #000}
#layer .htile.hot .hseal{animation:kfloat 3s ease-in-out infinite}
/* José, 29 nov («cartas usa los héroes … cambia el color del botón, cambia los bordes, y así con cada uno»): every tile has its
   own colour and an ornate double frame with gold corner studs */
#layer .htile{--tc:#c8955a;--tb:#3a2618;border:3px solid var(--tc);outline:2px solid #0009;outline-offset:-7px;background:linear-gradient(180deg,var(--tb),#100a08)}
#layer .htile::before,#layer .htile::after{content:'';position:absolute;width:22px;height:22px;z-index:4;pointer-events:none;
  background:radial-gradient(circle,#fff6d0 0 3px,var(--tc) 4px 6px,transparent 7px),conic-gradient(from 45deg,var(--tc) 0 25%,transparent 0 50%,var(--tc) 0 75%,transparent 0);border-radius:4px;opacity:.95}
#layer .htile::before{top:4px;left:4px}#layer .htile::after{top:4px;right:4px}
#layer .htile .hart{border-bottom:2px solid var(--tc)}
#layer .htile .htxt{background:linear-gradient(90deg,color-mix(in srgb,var(--tc) 28%,#0008),#0008)}
#layer .htile .htxt b{color:color-mix(in srgb,var(--tc) 45%,#fff3d8)}
#layer .htile:hover{border-color:#fff3d8;box-shadow:0 0 22px color-mix(in srgb,var(--tc) 70%,transparent),0 6px 18px #000a}
#layer .htile.t-cartas{--tc:#d9a441;--tb:#4a2a12}#layer .htile.t-cartas .hart{background:radial-gradient(90% 100% at 50% 90%,#8a5a1e 0%,#24140a 75%)}
#layer .htile.t-mazos{--tc:#c0533f;--tb:#3e1712}#layer .htile.t-mazos .hart{background:radial-gradient(90% 100% at 50% 90%,#7a2a1e 0%,#1e0c09 75%)}
#layer .htile.t-est{--tc:#a77bff;--tb:#2a1846}#layer .htile.t-est .hart{background:radial-gradient(90% 100% at 50% 70%,#5a2fa0 0%,#140c22 75%)}
#layer .htile.t-boveda{--tc:#4fb0c6;--tb:#0f2a33}#layer .htile.t-boveda .hart{background:radial-gradient(90% 100% at 50% 80%,#1f6a7a 0%,#08161a 75%)}
#layer .htile.t-sello{--tc:#e0703a;--tb:#3a1a0c}#layer .htile.t-sello .hart{background:radial-gradient(90% 100% at 50% 60%,#8a3a14 0%,#1c0c06 75%)}
#layer .htile.hot{box-shadow:0 0 20px color-mix(in srgb,var(--tc) 80%,transparent),0 6px 18px #000a}
/* Mazos: three deck stacks, one per hero, with the hero portrait on top */
#layer .hdecks{position:relative;width:100%;height:100%}
#layer .hdeck{position:absolute;left:50%;bottom:16px;width:74px;aspect-ratio:5/7;transform:translateX(calc(-50% + var(--n) * 62px)) rotate(calc(var(--n) * 6deg))}
#layer .hdeck i{position:absolute;inset:0;border-radius:7px;background:var(--rev-min,#3a2a1f) center/cover;box-shadow:0 2px 4px #000a;border:1px solid #0008}
#layer .hdeck i:nth-child(1){transform:translate(6px,6px)}#layer .hdeck i:nth-child(2){transform:translate(3px,3px)}
#layer .hdeck img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:7px;border:2px solid var(--hc);box-shadow:0 4px 10px #000c}
#layer .hdeck:nth-child(2){z-index:2;bottom:22px}
#layer .htile .hbadge{top:12px;right:34px}
/* José, 29 nov («los iconos de los bordes superiores están feos»): no corner studs */
#layer .htile::before,#layer .htile::after{display:none}
#layer .htile .hbadge{top:10px;right:10px}
/* seal art from Codex (UI-S01, PENDIENTE); until it exists the CSS wax seal is drawn */
#layer .hsealimg{height:150px;width:auto;object-fit:contain;filter:drop-shadow(0 8px 14px #000c)}
#layer .htile.hot .hsealimg{animation:kfloat 3s ease-in-out infinite}
/* José, 29 nov («podría ser una animación»): the Colección tiles are alive: each preview moves gently and a light sweep crosses
   the tiles one after another; on hover the preview reacts. «Animaciones» off in Ajustes (.still) stops all of it */
@keyframes hfanL{0%,100%{transform:translateX(calc(-50% - 74px)) rotate(-12deg)}50%{transform:translateX(calc(-50% - 84px)) rotate(-16deg)}}
@keyframes hfanR{0%,100%{transform:translateX(calc(-50% + 74px)) rotate(12deg)}50%{transform:translateX(calc(-50% + 84px)) rotate(16deg)}}
@keyframes hfanWL{0%,100%{transform:translateX(calc(-50% - 110px)) rotate(-10deg)}50%{transform:translateX(calc(-50% - 124px)) rotate(-14deg)}}
@keyframes hfanWR{0%,100%{transform:translateX(calc(-50% + 110px)) rotate(10deg)}50%{transform:translateX(calc(-50% + 124px)) rotate(14deg)}}
@keyframes hbob{50%{translate:0 -8px}}
@keyframes htilt{0%,100%{transform:rotate(-4deg)}50%{transform:rotate(4deg)}}
@keyframes hshake{0%,88%,100%{rotate:0deg}91%{rotate:-6deg}94%{rotate:6deg}97%{rotate:-3deg}}
@keyframes hsweep{0%,70%{background-position:-150% 0}100%{background-position:250% 0}}
#layer .htile .hfan img:nth-child(1){animation:hfanL 4s ease-in-out infinite}
#layer .htile .hfan img:nth-child(3){animation:hfanR 4s ease-in-out infinite}
#layer .htile .hfan img:nth-child(2){animation:hbob 4s ease-in-out infinite}
#layer .htile.wide .hfan img:nth-child(1){animation-name:hfanWL}#layer .htile.wide .hfan img:nth-child(3){animation-name:hfanWR}
#layer .hdeck{animation:hbob 3.2s ease-in-out infinite}#layer .hdeck:nth-child(2){animation-delay:-1s}#layer .hdeck:nth-child(3){animation-delay:-2s}
#layer .hprot{animation:htilt 5s ease-in-out infinite}
#layer .hvault .hpk{animation:hbob 3s ease-in-out infinite}
#layer .hvault .hch{animation:hshake 4.5s ease-in-out infinite;transform-origin:50% 90%}
#layer .hsealimg,#layer .hseal{animation:hbob 3.4s ease-in-out infinite}
#layer .htile .hart::after{content:'';position:absolute;inset:0;pointer-events:none;z-index:3;background:linear-gradient(110deg,transparent 35%,#fff3 48%,#fff6 50%,#fff3 52%,transparent 65%) 0 0/250% 100% no-repeat;animation:hsweep 6s ease-in-out infinite}
#layer .htile:nth-child(2) .hart::after{animation-delay:1.2s}#layer .htile:nth-child(3) .hart::after{animation-delay:2.4s}
#layer .htile:nth-child(4) .hart::after{animation-delay:3.6s}#layer .htile:nth-child(5) .hart::after{animation-delay:4.8s}
#layer .htile:hover .hart>*{animation-duration:1.2s}
.still #layer .htile *,.still #layer .htile .hart::after{animation:none!important}
/* José, 29 nov («igual que al pasar el mouse sobre los botones se cambie de tono el botón»): on hover/focus each Colección tile
   lights up in its own colour (brighter, more saturated, tinted background and title bar); pressed = slightly darker */
#layer .htile{transition:transform .15s,border-color .15s,filter .2s,background .2s,box-shadow .2s}
#layer .htile:hover,#layer .htile:focus-visible{filter:brightness(1.18) saturate(1.25);background:linear-gradient(180deg,color-mix(in srgb,var(--tc) 40%,var(--tb)),#1a100c)}
#layer .htile:hover .htxt,#layer .htile:focus-visible .htxt{background:linear-gradient(90deg,color-mix(in srgb,var(--tc) 55%,#0006),color-mix(in srgb,var(--tc) 20%,#0008))}
#layer .htile:hover .htxt b{color:#fff}
#layer .htile:active{filter:brightness(.9);transform:translateY(0) scale(.98)}
/* the same tone change on the shop offers */
#layer .shopitem:not([disabled]):hover,#layer .offer:hover{filter:brightness(1.15) saturate(1.2)}
#layer .shopitem:not([disabled]):active{filter:brightness(.9)}
/* ---- world map behind the main menu (José, 29 nov). Codex layers in ui/mapa (preparar_mapa.py); the CSS map and castles
   below are the fallback while (or if) the images do not load: .wmap.ok = painted map in, .wm-site.ok = its landmark in ---- */
#layer .screen.menu{position:relative}
#layer .screen.menu>*:not(.wmap){position:relative;z-index:1}
.wmap{position:absolute;left:0;right:0;top:0;height:100%;min-height:100%;overflow:hidden;z-index:0;pointer-events:none;background:#07090d}
.wm-cam{position:absolute;inset:0;perspective:3000px;perspective-origin:50% 0%}
/* José, 29 nov: «completa las zonas negras con el mapa · en grande»: the map plane is wider than the screen, less tilted
   (--rx) and grows with the height of the screen, so it reaches the bottom bar on tall phones */
.wmap{--rx:26deg;--pw:104%;container-type:size}
@supports (width:1cqh){.wmap{--pw:max(104cqw,46cqh)}}
/* desktop / landscape (short, wide window): the map lies flatter so the eight worlds still fit, and the window around the
   column shows the same map blurred instead of the dark default background */
body.wide .wmap{--rx:57deg}body.wide .wm-cam{perspective:6000px}
body.wide:has(.screen.menu .wmap.ok){background-image:url(ui/mapa/UI-M00_fondo.webp)}
body.wide:has(.screen.menu .wmap.ok)::before{background:radial-gradient(ellipse at center,#0d090744 0%,#0d090799 80%)}
.wm-plane{position:absolute;left:calc(50% - var(--pw) / 2);width:var(--pw);top:13%;aspect-ratio:2/3;transform-style:preserve-3d;transform-origin:50% 0%;
  transform:rotateX(var(--rx));animation:wmdrift 34s ease-in-out infinite alternate;border-radius:30px;
  background:var(--map) center/cover #b89a68;box-shadow:0 0 0 14px #5a3e22,0 0 0 18px #2a1c10,0 40px 120px #000}
.wm-plane::before{content:'';position:absolute;inset:0;border-radius:inherit;z-index:0;   /* parchment + ink texture (fallback map) */
  background:radial-gradient(ellipse at 30% 30%,#e8d3a0 0%,transparent 60%),radial-gradient(ellipse at 70% 70%,#d9bd84 0%,transparent 55%),
  repeating-linear-gradient(0deg,#0000000a 0 2px,transparent 2px 6px),repeating-linear-gradient(90deg,#0000000a 0 2px,transparent 2px 9px),linear-gradient(160deg,#cdb07a,#a8854f)}
.wmap.ok .wm-plane{box-shadow:none;border-radius:0}
/* behind the tilted map: the same map blurred and dimmed fills the whole screen (sides and below) and drifts very slowly */
.wmap.ok::before{content:'';position:absolute;inset:-12%;background:url(ui/mapa/UI-M00_fondo.webp) center 30%/cover;
  animation:wmbg 60s ease-in-out infinite alternate}   /* pre-blurred image (no CSS filter on an animated full-screen layer: flicker on phones) */
@keyframes wmbg{from{transform:scale(1.18) translate(-2%,0)}to{transform:scale(1.25) translate(2%,-2%)}}
/* sky and far horizon above the far edge of the map (Codex layer UI-M14, PENDIENTE); it slides slowly sideways.
   Without the image the gradient alone stays */
.wmap.ok .wm-cam::before{content:'';position:absolute;left:-8%;right:-8%;aspect-ratio:3/2;bottom:calc(87% - 122px);   /* its far mountains sit just above the far edge of the map (top:13%) */
  background:url(ui/mapa/UI-M14.webp) center/100% 100%,linear-gradient(180deg,#0b0d14 0%,#1c2433 60%,#6b5a44 100%);
  animation:wmsky 80s ease-in-out infinite alternate}
@keyframes wmsky{from{transform:translateX(-3.5%) scale(1.02)}to{transform:translateX(3.5%) scale(1.06)}}
/* golden haze where the map meets the horizon: hides the far edge of the plane */
.wmap.ok::after{content:'';position:absolute;left:-10%;right:-10%;top:calc(13% - 60px);height:150px;pointer-events:none;
  background:radial-gradient(55% 50% at 50% 42%,#ecd6a699 0%,#c9a76a44 50%,transparent 100%),linear-gradient(180deg,transparent 0%,#b7a07855 25%,#bfa67caa 40%,#b7a07866 56%,transparent 100%);
  animation:wmhaze 9s ease-in-out infinite alternate}
@keyframes wmhaze{from{opacity:.75}to{opacity:1}}
.still .wmap::before,.still .wmap::after,.still .wm-cam::before{animation:none}
@media (prefers-reduced-motion:reduce){.wmap::before,.wmap::after,.wm-cam::before{animation:none}}
.wmap.ok .wm-plane::before,.wmap.ok .wm-land,.wmap.ok .wm-sea{display:none}
/* the camera glides slowly over the tilted map */
@keyframes wmdrift{0%{transform:rotateX(calc(var(--rx) + 2deg)) translate(-1.5%,1%) scale(.98)}50%{transform:rotateX(var(--rx)) translate(1%,-.5%) scale(1)}100%{transform:rotateX(calc(var(--rx) - 2deg)) translate(1.5%,-1.5%) scale(1.02)}}
.wm-sea{position:absolute;left:-2%;bottom:6%;width:34%;height:42%;border-radius:45% 55% 40% 60%;background:radial-gradient(ellipse,#3f7f98 0%,#25566e 60%,transparent 72%);
  animation:wmsea 6s ease-in-out infinite alternate;z-index:1}
@keyframes wmsea{to{filter:hue-rotate(12deg) brightness(1.1);transform:scale(1.04)}}
.wm-land{position:absolute;width:26%;height:20%;transform:translate(-50%,-50%);border-radius:50% 40% 55% 45%;z-index:1;
  background:radial-gradient(ellipse,color-mix(in srgb,var(--c) 45%,#b89a68) 0%,color-mix(in srgb,var(--c) 25%,#b89a68) 45%,transparent 70%);opacity:.9}
/* low mist lying on the map */
.wm-mist{position:absolute;left:-10%;top:40%;width:80%;height:22%;z-index:1;background:var(--mist) center/100% 100% no-repeat;opacity:.45;transform:translateZ(4px);animation:wmmist 70s linear infinite alternate}
.wmap:not(.ok) .wm-mist{display:none}
@keyframes wmmist{to{transform:translateZ(4px) translateX(50%)}}
.wm-site{position:absolute;width:0;height:0;transform-style:preserve-3d;z-index:2}
.wm-site>span{position:absolute;left:0;top:16px;transform:translateX(-50%);white-space:nowrap;font:bold 21px Cinzel,serif;color:#2a1608;text-shadow:0 0 6px #f3e3bd,0 0 3px #f3e3bd,0 0 2px #f3e3bd;letter-spacing:.04em;
  animation:wmfade .8s ease-out both;animation-delay:calc(1.6s + var(--d))}
@keyframes wmfade{from{opacity:0}to{opacity:1}}
/* with the Codex landmarks the name stands up with its castle (readable, hidden only by its own neighbours); the flat name
   on the map stays for the CSS fallback */
.wm-site.ok>span{display:none}
.wm-name{position:absolute;left:50%;bottom:6px;z-index:3;transform:translateX(var(--lx,-50%));white-space:nowrap;font:bold 19px Cinzel,serif;color:#f3e3bd;letter-spacing:.05em;
  padding:1px 10px;border-radius:10px;background:#1a0f08b3;box-shadow:0 0 0 1px #c9a25a66;text-shadow:0 1px 2px #000}
.w-MAR .wm-name{--lx:-14%}.w-VAC .wm-name{--lx:-70%}.w-BOS .wm-name{--lx:-62%}
/* fallback castles (CSS boxes) */
.wm-site.ok .wm-castle{display:none}
.wm-site:not(.ok) .wm-up{display:none}
.wm-castle{position:absolute;left:0;bottom:0;display:flex;align-items:flex-end;gap:4px;transform-origin:50% 100%;
  transform:translate(-50%,0) rotateX(-90deg) scaleY(0);animation:wmrise 1.6s cubic-bezier(.2,.8,.2,1.15) forwards;animation-delay:calc(.6s + var(--d))}
@keyframes wmrise{to{transform:translate(-50%,0) rotateX(-90deg) scaleY(1)}}
.wm-castle b{position:relative;display:block;width:34px;height:var(--h);border-radius:2px 2px 0 0;
  background:linear-gradient(90deg,#4a3f36,#8f8170 35%,#a99a86 50%,#6d6052 75%,#3a312a),repeating-linear-gradient(0deg,transparent 0 16px,#0003 16px 18px);background-blend-mode:multiply;
  box-shadow:inset 0 -10px 18px #0006}
.wm-castle b::before{content:'';position:absolute;left:-4px;right:-4px;top:-12px;height:12px;background:repeating-linear-gradient(90deg,#9a8b77 0 10px,transparent 10px 16px)}
.wm-castle b u{position:absolute;left:50%;top:35%;width:10px;height:18px;margin-left:-5px;border-radius:5px 5px 0 0;background:#ffd36a;box-shadow:0 0 10px #ffb43a;animation:wmwin 3s ease-in-out infinite;animation-delay:calc(var(--j) * .7s)}
@keyframes wmwin{50%{opacity:.4}}
.wm-castle.cone b::before{left:-8px;right:-8px;top:-60px;height:60px;background:linear-gradient(90deg,color-mix(in srgb,var(--c) 70%,#000),var(--c));clip-path:polygon(50% 0,100% 100%,0 100%)}
.wm-castle.dome b::before{left:-6px;right:-6px;top:-30px;height:30px;border-radius:50% 50% 0 0;background:radial-gradient(circle at 40% 30%,#fff8,var(--c) 60%)}
.wm-castle.spike b::before{left:-10px;right:-10px;top:-50px;height:50px;background:linear-gradient(90deg,#1a0c0c,var(--c));clip-path:polygon(0 100%,15% 20%,30% 70%,50% 0,70% 70%,85% 20%,100% 100%)}
.wm-castle em{position:absolute;left:50%;bottom:calc(100% + 40px);width:4px;height:70px;margin-left:-2px;background:#3a2a1a}
.wm-castle em::after{content:'';position:absolute;left:4px;top:2px;width:44px;height:26px;background:var(--c);clip-path:polygon(0 0,100% 15%,80% 50%,100% 85%,0 100%);animation:wmflag 1.4s ease-in-out infinite;transform-origin:0 50%}
@keyframes wmflag{50%{transform:skewY(6deg) scaleX(.9)}}
/* Codex landmarks: billboards standing up from the map (pop-up book), one after another, with a puff of dust */
.wm-up{position:absolute;left:0;bottom:0;width:var(--w,170px);transform-origin:50% 100%;transform:translateX(-50%) rotateX(calc(var(--rx) * -1));
  animation:wmup 1.5s cubic-bezier(.25,.8,.3,1.1) both;animation-delay:calc(.5s + var(--d))}
@keyframes wmup{0%{transform:translateX(-50%) rotateX(0deg) scale(.55);opacity:0}18%{opacity:1}70%{transform:translateX(-50%) rotateX(calc(var(--rx) * -1 - 8deg)) scale(1.04)}100%{transform:translateX(-50%) rotateX(calc(var(--rx) * -1)) scale(1)}}
.wm-loop{position:relative;transform-origin:50% 100%}
.wm-spr{position:relative;z-index:1;display:block;width:100%;height:auto}
.wm-dust{position:absolute;left:0;top:0;width:220px;height:220px;margin:-110px 0 0 -110px;border-radius:50%;opacity:0;
  background:radial-gradient(circle,#e8d6b0cc 0%,#c9b08a66 35%,transparent 68%);animation:wmdust 1.8s ease-out both;animation-delay:calc(.7s + var(--d))}
@keyframes wmdust{0%{opacity:0;transform:scale(.2)}25%{opacity:.9}100%{opacity:0;transform:scale(1.7)}}
.wm-site:not(.ok) .wm-dust,.wmap.seen .wm-dust{display:none}
.wmap.seen .wm-up,.wmap.seen .wm-castle,.wmap.seen .wm-site>span{animation:none}
.wmap.seen .wm-castle{transform:translate(-50%,0) rotateX(-90deg)}
.wm-glow{position:absolute;z-index:0;left:50%;top:var(--gy,55%);width:var(--gw,120%);aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;
  background:radial-gradient(circle,var(--gc,#ffd36a88) 0%,transparent 62%);opacity:0}
.wm-fx{position:absolute;inset:0;z-index:2}
.wm-fx i{position:absolute;display:block}
.wm-ring{position:absolute;left:0;top:0;width:0;height:0;display:none}
/* --- each world's own loop --- */
/* Olimpo: beams of light from the summit */
.w-OLI{--w:167px}
.w-OLI .wm-glow{--gc:#fff1b488;--gy:30%;--gw:110%;animation:wmpulse 5s ease-in-out infinite}
.w-OLI .wm-fx i{left:50%;bottom:62%;width:16px;height:95%;margin-left:-8px;transform-origin:50% 100%;transform:rotate(calc((var(--k) - 1) * 22deg));
  background:linear-gradient(0deg,#fff6c800,#fff6c877 35%,#fff6c800);opacity:0;animation:wmray 6s ease-in-out infinite;animation-delay:calc(var(--k) * -2s)}
@keyframes wmray{0%,100%{opacity:0}50%{opacity:.75}}
/* Esparta: torches that flicker */
.w-ESP{--w:154px}
.w-ESP .wm-fx i{left:calc(41% + var(--k) * 25%);bottom:41%;width:16px;height:16px;margin-left:-8px;border-radius:50%;
  background:radial-gradient(circle,#fff3b0 0%,#ffb43a 35%,#ff6a0000 70%);animation:wmtorch .9s steps(5) infinite alternate;animation-delay:calc(var(--k) * -.4s)}
@keyframes wmtorch{0%{transform:scale(.8);opacity:.7}40%{transform:scale(1.25);opacity:1}70%{transform:scale(.95);opacity:.8}100%{transform:scale(1.15);opacity:1}}
/* Bosque antiguo: the crown sways and leaves fall */
.w-BOS{--w:163px}
.w-BOS .wm-loop{animation:wmsway 6s ease-in-out infinite alternate}
@keyframes wmsway{from{transform:rotate(-1.3deg)}to{transform:rotate(1.3deg)}}
.w-BOS .wm-fx i{left:calc(18% + var(--k) * 13%);top:22%;width:9px;height:5px;border-radius:50% 0;background:#9bd06a;opacity:0;
  animation:wmleaf 7s linear infinite;animation-delay:calc(var(--k) * -1.15s)}
.w-BOS .wm-fx i:nth-child(odd){background:#d8b24a}
@keyframes wmleaf{0%{opacity:0;transform:translate(0,0) rotate(0)}10%{opacity:1}90%{opacity:.9}100%{opacity:0;transform:translate(34px,120px) rotate(620deg)}}
/* Fragua: the furnace glow beats, sparks fly up */
.w-FRA{--w:158px}
.w-FRA .wm-glow{--gc:#ff7a1acc;--gy:58%;--gw:135%;animation:wmbeat 2.2s ease-in-out infinite}
@keyframes wmbeat{0%,100%{opacity:.35;transform:translate(-50%,-50%) scale(.92)}50%{opacity:.95;transform:translate(-50%,-50%) scale(1.06)}}
.w-FRA .wm-fx i{left:calc(25% + var(--k) * 8%);top:18%;width:4px;height:4px;border-radius:50%;background:#ffd36a;box-shadow:0 0 6px 2px #ff8a3a;opacity:0;
  animation:wmspark 1.8s ease-out infinite;animation-delay:calc(var(--k) * -.27s)}
@keyframes wmspark{0%{opacity:0;transform:translate(0,0)}10%{opacity:1}100%{opacity:0;transform:translate(calc((var(--k) - 3) * 7px),-110px)}}
/* Torre de las Almas: souls rise from the crown */
.w-TOR{--w:106px}
.w-TOR .wm-glow{--gc:#8fc6ffaa;--gy:10%;--gw:150%;animation:wmpulse 3.5s ease-in-out infinite}
.w-TOR .wm-fx i{left:50%;top:8%;width:12px;height:16px;margin-left:-6px;border-radius:50% 50% 45% 45%;background:radial-gradient(circle at 50% 40%,#e8f4ff 0%,#8fc6ffcc 40%,#4696c800 72%);opacity:0;
  animation:wmsoul 5s ease-in-out infinite;animation-delay:calc(var(--k) * -1s)}
@keyframes wmsoul{0%{opacity:0;transform:translate(0,10px) scale(.6)}20%{opacity:1}50%{transform:translate(14px,-60px) scale(1)}80%{opacity:.6}100%{opacity:0;transform:translate(-10px,-130px) scale(.7)}}
@keyframes wmpulse{0%,100%{opacity:.35}50%{opacity:.9}}
/* Mar profundo: foam rings on the water around the islet (lying on the map) */
.w-MAR{--w:150px}
.w-MAR .wm-ring{display:block}
.w-MAR .wm-ring::before,.w-MAR .wm-ring::after{content:'';position:absolute;left:-60px;top:-60px;width:120px;height:120px;border-radius:50%;border:2px solid #e8fbffaa;box-shadow:0 0 6px #e8fbff66,inset 0 0 6px #e8fbff66;opacity:0;animation:wmwave 4s ease-out infinite}
.w-MAR .wm-ring::after{animation-delay:-2s}
@keyframes wmwave{0%{opacity:0;transform:scale(.45)}20%{opacity:.5}100%{opacity:0;transform:scale(1.2)}}
.w-MAR .wm-fx i{left:calc(22% + var(--k) * 26%);bottom:8%;width:26px;height:8px;border-radius:50%;background:radial-gradient(ellipse,#ffffffdd 0%,#ffffff00 70%);
  animation:wmfoam 2.6s ease-in-out infinite;animation-delay:calc(var(--k) * -.9s)}
@keyframes wmfoam{0%,100%{opacity:.2;transform:scaleX(.6)}50%{opacity:.9;transform:scaleX(1.3)}}
/* Tártaro: fire flickers below, smoke rises */
.w-TAR{--w:163px}
.w-TAR .wm-glow{--gc:#ff2a1acc;--gy:78%;--gw:130%;animation:wmflick 1.3s steps(6) infinite alternate}
@keyframes wmflick{0%{opacity:.5}30%{opacity:.95}55%{opacity:.6}80%{opacity:1}100%{opacity:.7}}
.w-TAR .wm-fx i{left:calc(28% + var(--k) * 11%);top:12%;width:34px;height:34px;margin-left:-17px;border-radius:50%;background:radial-gradient(circle,#55484099 0%,#2a222000 68%);opacity:0;
  animation:wmsmoke 6s ease-out infinite;animation-delay:calc(var(--k) * -1.2s)}
@keyframes wmsmoke{0%{opacity:0;transform:translate(0,0) scale(.5)}20%{opacity:.9}100%{opacity:0;transform:translate(18px,-120px) scale(2.2)}}
/* Vacío: the island floats, stars twinkle, a ring turns around the orb */
.w-VAC{--w:154px}
.w-VAC .wm-loop{animation:wmbob 4.5s ease-in-out infinite alternate}
@keyframes wmbob{from{transform:translateY(4px)}to{transform:translateY(-8px)}}
.w-VAC .wm-glow{--gc:#8a7dffaa;--gy:35%;--gw:120%;animation:wmpulse 4s ease-in-out infinite}
.w-VAC .wm-fx i{width:4px;height:4px;border-radius:50%;background:#fff;box-shadow:0 0 6px 1px #b8b4ff;opacity:.2;
  left:calc(8% + var(--k) * 14%);top:calc(6% + var(--k) * 9%);animation:wmtwinkle 2.4s ease-in-out infinite;animation-delay:calc(var(--k) * -.55s)}
.w-VAC .wm-fx i:nth-child(even){top:calc(70% - var(--k) * 7%)}
.w-VAC .wm-fx i:first-child{left:50%;top:var(--ry,30%);width:150px;height:150px;margin:-75px 0 0 -75px;background:none;box-shadow:none;opacity:.85;border:2px solid;
  border-color:#d8d4ffcc #d8d4ff00 #ffffffee #d8d4ff00;transform:scaleY(.26) rotate(0);animation:wmorbit 7s linear infinite}
@keyframes wmorbit{to{transform:scaleY(.26) rotate(360deg)}}
@keyframes wmtwinkle{0%,100%{opacity:.15;transform:scale(.6)}50%{opacity:1;transform:scale(1.2)}}
/* clouds crossing at different speeds and heights (parallax: the near ones are bigger and faster) */
.wm-cloud{position:absolute;z-index:3;left:0;background:var(--cl) center/contain no-repeat;transform:translateX(var(--x0));animation:wmcloud var(--t) linear infinite;animation-delay:var(--dl)}
.wm-cloud.c1{top:18%;width:60%;aspect-ratio:3/1;opacity:.55;--t:90s;--dl:-30s;--x0:10%}
.wm-cloud.c2{top:42%;width:55%;aspect-ratio:4/1;opacity:.45;--t:120s;--dl:-80s;--x0:90%}
.wm-cloud.c3{top:58%;width:42%;aspect-ratio:1;opacity:.5;--t:65s;--dl:-10s;--x0:-40%}
.wm-cloud.c4{top:80%;width:95%;aspect-ratio:3/1;opacity:.6;--t:55s;--dl:-40s;--x0:30%}
.wmap:not(.ok) .wm-cloud{display:none}
@keyframes wmcloud{from{transform:translateX(-110%)}to{transform:translateX(240%)}}
.wm-fade{position:absolute;inset:0;background:linear-gradient(180deg,#07090d66 0%,#07090d2e 16%,#07090d44 50%,#07090d77 80%,#07090daa 100%)}
.still .wmap *{animation:none!important}.still .wm-castle{transform:translate(-50%,0) rotateX(-90deg)}
@media (prefers-reduced-motion:reduce){.wmap *{animation:none!important}.wm-castle{transform:translate(-50%,0) rotateX(-90deg)}}
/* Estéticas thumbnail of the map background */
.colprev.wmprev{aspect-ratio:2/3;background:url(ui/mapa/UI-M00.webp) center/cover,linear-gradient(160deg,#cdb07a,#8a6a3e)}
/* one chest per collectible kind (José, 29 nov) */
.cchead .ccart{position:relative;width:96px;height:86px;flex:none}
.ccart .ccimg{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 4px 8px #000c)}
.ccart .ccimg.fb{filter:sepia(1) saturate(2.2) hue-rotate(var(--hr,0deg)) drop-shadow(0 0 8px var(--cc)) drop-shadow(0 4px 8px #000c)}
.cc-TAP .ccart{--hr:70deg}.cc-FUN .ccart{--hr:0deg}.cc-REV .ccart{--hr:-30deg}.cc-ICO .ccart{--hr:150deg}.cc-FIC .ccart{--hr:15deg}.cc-AUR .ccart{--hr:230deg}
.ccart .ccsym{position:absolute;left:50%;top:56%;transform:translate(-50%,-50%);width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-style:normal;font-size:18px;color:#fff;background:radial-gradient(circle at 35% 30%,color-mix(in srgb,var(--cc) 60%,#fff),var(--cc) 70%);border:2px solid #ffe7a8;box-shadow:0 0 10px var(--cc)}
.ccart .ccpeek{position:absolute;right:-8px;top:-8px;width:34px;height:34px;border-radius:8px;overflow:hidden;border:2px solid var(--cc);box-shadow:0 2px 6px #000a;background:#000}
.ccart .ccpeek .colprev{width:100%!important;height:100%!important;border-radius:0;background-size:cover}
.ccart .ccpeek .colprev.colAUR .aura{inset:0}
.cchest{border-color:color-mix(in srgb,var(--cc,#6b5137) 60%,#6b5137)}
.cc-TAP{--cc:#3fa06a}.cc-FUN{--cc:#c8955a}.cc-REV{--cc:#c0533f}.cc-ICO{--cc:#4fb0c6}.cc-FIC{--cc:#e0a72c}.cc-AUR{--cc:#a77bff}
.cchest{background:radial-gradient(120% 100% at 0% 0%,color-mix(in srgb,var(--cc,#6b5137) 28%,#1a120f),#140d0a 70%)}
/* deck picker sheet (José, 29 nov) */
#ov3.dpicksheet{justify-content:flex-start}
.dpick{display:flex;flex-direction:column;gap:10px;width:100%;max-height:100%;min-height:0}
.dplist{display:flex;flex-direction:column;gap:8px;overflow-y:auto;min-height:0;flex:1 1 auto;max-height:62vh;padding:2px}
.dprow{display:flex;align-items:center;gap:12px;padding:8px 10px;border-radius:14px;border:2px solid #6b513788;background:linear-gradient(90deg,color-mix(in srgb,var(--c) 25%,#1a120f),#140d0a);color:#f4ead7;font:inherit;text-align:left;cursor:pointer}
.dprow:hover{filter:brightness(1.15)}
.dprow.on{border-color:var(--c);box-shadow:0 0 14px color-mix(in srgb,var(--c) 70%,transparent);background:linear-gradient(90deg,color-mix(in srgb,var(--c) 45%,#1a120f),#1a120f)}
.dprow .dph{width:54px;height:54px;border-radius:50%;object-fit:cover;object-position:50% 15%;border:2px solid var(--c);flex:none}
.dprow .dpi{display:flex;flex-direction:column;flex:1;min-width:0}.dprow .dpi b{font-size:22px}.dprow .dpi small{font-size:16px;color:#e8dcc4aa}.dprow em{color:#ffd36a;font-style:normal}
.dprow .dpc{display:flex;flex:none}.dprow .dpc img{width:34px;aspect-ratio:5/7;object-fit:cover;border-radius:4px;margin-left:-12px;box-shadow:-2px 0 4px #000a}
.qdeckbtn{align-self:center;min-width:60%}
#layer #ov3.dpicksheet{z-index:40;padding:30px 20px calc(30px + env(safe-area-inset-bottom,0px))}
/* José, 29 nov («añade animaciones» on the bottom menu): hover lifts the icon with a glow, pressing squashes it, the selected
   section bounces in and keeps a soft breathing glow with a light ring under it, and «Jugar» pulses like a beacon */
#nav button{cursor:pointer;transition:opacity .2s,color .2s}
#nav button img{transition:transform .22s cubic-bezier(.3,1.6,.5,1),filter .22s}
#nav button span{transition:transform .2s,letter-spacing .2s}
#nav button:hover{opacity:1}
#nav button:hover img{transform:translateY(-6px) scale(1.08);filter:drop-shadow(0 0 8px #ffd36a99) drop-shadow(0 6px 6px #000)}
#nav button:hover span{transform:translateY(-2px)}
#nav button:active img{transform:translateY(2px) scale(.9);transition-duration:.08s}
@keyframes navpop{0%{transform:scale(.6) translateY(8px)}55%{transform:scale(1.18) translateY(-8px)}80%{transform:scale(.96)}100%{transform:none}}
@keyframes navbreath{50%{filter:drop-shadow(0 0 16px #ffd36a) drop-shadow(0 3px 4px #000)}}
#nav button.on img{animation:navpop .55s cubic-bezier(.3,1.4,.5,1),navbreath 2.6s ease-in-out .55s infinite}
#nav button.on::after{content:'';position:absolute;left:50%;bottom:22px;width:56px;height:10px;margin-left:-28px;border-radius:50%;background:radial-gradient(ellipse,#ffd36acc,transparent 70%);animation:navring .55s ease-out both}
@keyframes navring{from{transform:scaleX(0);opacity:0}to{transform:none;opacity:1}}
@keyframes navbeacon{0%,100%{filter:drop-shadow(0 3px 4px #000)}50%{filter:drop-shadow(0 0 14px #ff9a3a) drop-shadow(0 3px 4px #000)}}
#nav button.mid:not(.on) img{animation:navbeacon 3s ease-in-out infinite}
#nav button.mid:not(.on):hover img{animation:none}
.still #nav button img,.still #nav button::after{animation:none!important;transition:none}
/* deck picker: centred and bigger, with edit/copy and new-deck buttons (José, 29 nov) */
#layer #ov3.dpicksheet{justify-content:center;align-items:center}
#layer .dpick{width:min(680px,100%);max-height:94%;padding:22px 18px;border-radius:22px;border:2px solid #8a6a3e;background:linear-gradient(180deg,#24180f,#100a07);box-shadow:0 20px 60px #000e;align-items:stretch}
#layer .dpick .title{text-align:center}#layer .dpick>.gnote{text-align:center;font-size:20px}
#layer .dplist{max-height:none;flex:1 1 auto;gap:10px}
#layer .dprow{padding:12px 14px;gap:14px;min-height:96px}
#layer .dprow .dph{width:72px;height:72px}
#layer .dprow .dpi b{font-size:26px}#layer .dprow .dpi small{font-size:18px}
#layer .dprow .dpc img{width:44px}
#layer .dprow .dped{flex:none;min-height:48px;padding:4px 14px;font-size:18px}
#layer .dpnew{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
#layer .dpnew .btn{flex:1 1 30%;min-height:52px;font-size:18px;padding:4px 8px;border-color:var(--c)}
#layer .dpick .row2 .btn{min-height:64px;font-size:24px}
/* deck builder (José, 29 nov): the deck as minis pinned at the top, grouped by type (gaps, no labels) */
#layer .bminis{position:sticky;top:-84px;z-index:6;width:calc(100% + 48px);margin:0 -24px;padding:8px 14px;display:flex;gap:14px;overflow-x:auto;scrollbar-width:thin;flex:none;min-height:76px;align-items:center;
  background:linear-gradient(180deg,#140d0af2,#140d0ad9);border-bottom:2px solid #6b5137;box-shadow:0 6px 12px #0008}
#layer .bmg{display:flex;gap:4px;flex:none;padding-right:14px;border-right:2px solid #6b513755}
#layer .bmg:last-child{border-right:0}
#layer .bmini{position:relative;width:44px;aspect-ratio:5/7;padding:0;border:0;border-radius:5px;overflow:hidden;background:#000;cursor:pointer;flex:none;box-shadow:0 2px 5px #000a;transition:transform .15s}
#layer .bmini:hover{transform:translateY(-3px)}
#layer .bmini img{width:100%;height:100%;object-fit:cover;display:block}
#layer .bmini i{display:flex;width:100%;height:100%;align-items:center;justify-content:center;font-style:normal;font-size:14px;color:#fff;background:var(--c)}
#layer .bmini b{position:absolute;right:1px;bottom:1px;font-size:13px;line-height:1;padding:1px 3px;border-radius:4px;background:#000c;color:#ffd36a}
#layer .bmempty{margin:0;font-size:18px;color:var(--muted)}
/* a card in the deck: gold frame + soft glow + a check seal in the corner; the art keeps its colours */
#layer .btile.in{outline:none;box-shadow:0 0 0 3px #ffd36a,0 0 16px #ffd36a77,0 6px 14px #000a}
#layer .btile.in::after{content:'✓';position:absolute;top:6px;left:6px;width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:19px;font-weight:bold;color:#2a1a10;background:radial-gradient(circle at 35% 30%,#fff3c4,#ffd36a 60%,#c8902a);box-shadow:0 2px 6px #000a;z-index:3}
/* José, 29 nov («el aura veo girando un cubo oscurecido como una sombra»): with the world map behind the menu, the logo block
   got its own stacking layer (z-index), so the halo's «screen» blend mixed with an empty layer and its dark square showed,
   spinning. The logo block stays in the page layer again, so the halo blends with what is behind it (only the light shows) */
#layer .screen.menu>.mm-logo{z-index:auto}

/* foil finishes from packs (José, 29 nov, PROPOSAL; effect in holo/holo.css) */
.hlw{display:block;position:relative;width:100%;height:100%}
.hlw img{width:100%;height:100%;object-fit:cover;display:block}
#layer .vcard .vfoil{height:auto;aspect-ratio:5/7;border-radius:4%}
#layer .vcard .vfoil img{object-fit:contain}
#layer .vcard{position:relative}
.vfoiltag{position:absolute;top:-6px;right:-6px;z-index:5;font-style:normal;font-size:20px;font-weight:bold;padding:4px 12px;border-radius:14px;color:#2a1a10;
  background:linear-gradient(90deg,#ffd6e8,#fff3b0,#c8f7ff,#e2d1ff);box-shadow:0 2px 8px #000a}
.pk-foil{position:absolute;left:50%;bottom:36px;translate:-50% 0;z-index:6;white-space:nowrap;font-size:15px;font-weight:bold;padding:2px 8px;border-radius:10px;color:#2a1a10;background:linear-gradient(90deg,#ff8fc4,#ffe27a,#7ae8ff,#c49bff);box-shadow:0 1px 4px #000a}
.pk-card.f3{box-shadow:0 0 22px #ffd36a,0 6px 14px #000a}
.pk-card.f3 .pk-foil{font-size:12.5px;padding:2px 5px}   /* «✦ Legendario» did not fit in the pack tile */

/* wallet cells are shortcuts to the shop (José, 29 nov) */
.wallet .wcell{font:inherit;color:inherit;background:none;border:0;cursor:pointer;border-radius:10px;transition:background .15s,transform .15s}
.wallet .wcell:hover{background:#ffd36a1f;transform:translateY(-2px)}
.wallet .wcell:active{transform:scale(.96)}

/* viewer: what sits now in the slot of the hand card (José, 29 nov) */
.vcmp{display:flex;gap:14px;align-items:flex-start;margin:12px 0;padding:12px;border-radius:12px;background:#ffffff0d;border:1px solid #c8955a66;text-align:left;font-size:22px}
.vcmp.free{display:block;border-style:dashed;color:#cfe8c0}
.vcmpimg{flex:none;width:110px;aspect-ratio:5/7}.vcmpimg .card{width:100%;height:100%}
.vcmp .vtext.small{font-size:20px;margin:4px 0}.vcmp small{color:#e8dcc4aa;font-size:18px}.vcmp .vup{color:#7ee08a;font-style:normal;font-weight:bold}
#layer .vcmp .vtext.small,#layer .vcmp .vtext.small p{font-size:20px;line-height:1.25}
#layer .vcmp{font-size:21px}
/* key number compared with the equipped card (José, 29 nov) */
.vcmp .vdelta{display:inline-block;margin-left:6px;padding:1px 8px;border-radius:8px;font-size:.85em;font-weight:bold;background:#0006;white-space:nowrap}
.vcmp .vdelta.up{color:#7de08a}.vcmp .vdelta.down{color:#ff7a6a}.vcmp .vdelta.eq{color:#e8dcc4}
/* Avisos (José, 29 nov): notice cards on the «Avisos» screen and in the start-up box */
.avm p{white-space:pre-line}
.avm .avimg{display:block;width:100%;max-height:230px;object-fit:cover;border-radius:12px;margin:8px 0 2px}   /* banner of a notice (Edition 2 opening) */
#layer .avlist .row2 .btn.main{padding-left:76px!important;padding-right:76px!important}   /* the label clears the flame medallions of the button art */
.avtag{display:inline-block;margin:6px 8px 0 0;padding:2px 12px;border-radius:12px;font-size:19px;background:#3a2c22;color:#f4ead7;border:1px solid #6b5137}
.avtag.av-mantenimiento{background:#5a1f1a;border-color:#c0533f}.avtag.av-evento{background:#3d2f5e;border-color:#8f7be0}.avtag.av-equilibrio{background:#1f3d4a;border-color:#3fa7c9}
.avtag.av-semana{background:#4a3a14;border-color:#d6a93a}.avtag.av-mision{background:#1f4024;border-color:#45c98a}.avtag.avnew{background:#ffd36a;border-color:#ffd36a;color:#2a1a10;font-weight:bold}
.avchk{display:flex;align-items:center;gap:12px;min-height:48px;font-size:22px;color:#e8dcc4;cursor:pointer}
.avchk input{width:30px;height:30px;accent-color:#d6a93a;flex:none}
#layer .overlay.dlg.avbox{justify-content:flex-start;gap:18px;padding:30px 24px}
#layer .overlay.dlg.avbox .avlist{flex:1 1 auto;min-height:0;overflow-y:auto;max-width:680px;-webkit-overflow-scrolling:touch}
#layer .overlay.dlg.avbox .row2{flex:none}
/* versions of a card in the Collection viewer (José, 29 nov): Normal / Holo / Arcoíris / Legendario / alternate art;
   the ones you do not own are grey with a lock and can still be tapped to preview */
.vvers{flex:none;display:flex;justify-content:center;gap:12px;width:100%}
.vver{flex:0 1 118px;min-width:0;padding:6px 4px 4px;border-radius:12px;border:2px solid #5a4636;background:#1a120fcc;color:#e8dccb;display:flex;flex-direction:column;align-items:center;gap:2px;font-family:inherit}
.vver.on{border-color:#ffd36a;background:#3a2a16;box-shadow:0 0 12px #ffd36a66}
.vver .vvimg{position:relative;display:block;width:100%;aspect-ratio:5/7;--hl-k:.8}
.vver .vvimg .hlw img{object-fit:contain}
.vver.off .vvimg .hlw{filter:grayscale(1) brightness(.5)}
.vver b{font-size:18px;line-height:1.1;white-space:nowrap}.vver small{font-size:16px;color:var(--muted);white-space:nowrap}
.vver.off b{color:#a99c8a}
.vvlock{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:34px;font-style:normal;text-shadow:0 2px 6px #000}
.vvdef{position:absolute;top:-8px;right:-6px;font-style:normal;font-size:20px;line-height:1;padding:3px 5px;border-radius:10px;color:#2a1a10;background:#ffd36a;box-shadow:0 1px 4px #000a}
.vfoiltag.prev{background:#d9d2c6;color:#2a1a10}
#layer .viewer.hasvers .vcard{width:min(520px,calc(100cqw - 48px),calc(43cqh * 5 / 7))}

/* José, 29 nov: the back button of the sub-screens stays put while scrolling (fixed inside the scaled #layer, which is its
   containing block); pinWallet() stacks the wallet and the zone bar below it */
#layer .screen>.btn.back{position:fixed;z-index:9;box-shadow:0 4px 14px #000d}
.wallet.w4.w5{grid-template-columns:repeat(5,1fr)}
.wallet.w4.w5 b{font-size:25px}.wallet.w4.w5 span{font-size:13px}
.wallet.w4 .ic.icsob{width:auto;height:44px;aspect-ratio:auto;filter:drop-shadow(0 2px 3px #000)}
/* «Suprema» (quality 6; José, 29 nov): gold on obsidian. Only the protector «Aurex Primordial» for now, and only for who owns it */
.q6,.qb6{--qc:#ffd36a}
.esttile.qb6{position:relative;border-color:#ffd36a;background:radial-gradient(circle at 50% 0,#3a2c10 0%,#0b0908 62%);box-shadow:0 0 0 1px #000,0 0 16px #ffd36a77,inset 0 0 18px #000}
.esttile.qb6 .qtag,.qtag.q6{background:linear-gradient(180deg,#1a1410,#050403);color:#ffd36a;border:1px solid #ffd36a;letter-spacing:.06em;text-transform:uppercase;font-weight:bold}
.esttile.qb6 b{color:#ffe7a8}

/* José, 29 nov: «en el menú pestañean partes del fondo y desapareció unos segundos el título»: the landmarks no longer dip
   under the map surface (3D intersection = z-fighting), every flat layer on the map sits a little above it, and the logo
   and buttons get their own composited layer so the 3D map can never paint over them */
.wm-site{transform:translateZ(2px)}
.wm-name{backface-visibility:hidden}
.wmap{isolation:isolate;contain:paint}
#layer .screen.menu .mm-fan,#layer .screen.menu .mlist{transform:translateZ(0);isolation:isolate;z-index:3}
#layer .screen.menu .mm-logo .mm-title{transform:translateZ(0)}   /* the logo block itself stays unisolated (its halo blends in «screen») */
/* Misiones (José, 29 nov: «más amistoso para los clientes»): camp background UI-F16, tabs, one card per mission with its
   icon, progress bar, prize icons and a big glowing «Reclamar». Sizes are layer px (720 wide): 84 px ≈ 45 px on a phone */
#layer .screen.mz{gap:18px;padding-left:28px;padding-right:28px;background-size:cover;background-position:center top;
  background-image:linear-gradient(180deg,#0000 0,#120a06a8 26%,#120a06cc 60%,#0c0705b0 100%),url(ui/f/UI-F16.webp)!important}
.mz-sub{font-size:26px;color:#f1e3c8;text-shadow:0 2px 6px #000}
.mz-tabs{display:flex;gap:8px;width:100%;padding:6px;border-radius:22px;background:#150d09e6;border:2px solid var(--line)}
.mz-tab{position:relative;flex:1;min-width:0;min-height:84px;padding:0 4px;border-radius:16px;border:2px solid transparent;background:none;color:#ead9b9;font:inherit;font-size:22px;cursor:pointer}
.mz-tab.on{background:linear-gradient(180deg,#f2cd7a,#c08a2c);border-color:#ffe7a8;color:#22140a;font-weight:bold;box-shadow:0 0 18px #f2cd7a55}
.mz-tab:focus-visible,.mz-card .btn:focus-visible{outline:4px solid #9fd0ff;outline-offset:2px}
.mz-tab small{position:absolute;top:-10px;right:-4px;min-width:34px;height:34px;padding:0 8px;border-radius:17px;background:#d43c2c;border:2px solid #fff3dc;color:#fff;font-size:20px;font-weight:bold;line-height:30px;text-align:center}
.mz-panel{width:100%;display:flex;flex-direction:column;gap:16px}
.mz-info{display:flex;flex-direction:column;gap:6px;align-items:center;text-align:center;font-size:23px;line-height:1.3;color:#e2d2b4;text-shadow:0 2px 5px #000}
.mz-info b{color:#ffe7a8;font-size:26px}.mz-info i{font-style:normal}
.mz-info .mz-free{color:#bfe6b4}
.mz-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:16px;width:100%}
.mz-card{position:relative;display:grid;grid-template-columns:104px 1fr;gap:12px 18px;align-items:center;padding:16px 18px;border-radius:20px;border:2px solid #7a5433;
  background:linear-gradient(180deg,#2e1f15f2,#1a110cf2);box-shadow:0 6px 16px #0009,inset 0 1px 0 #ffffff14}
.mz-ic{width:104px;height:104px;object-fit:contain;filter:drop-shadow(0 4px 6px #000a)}
.mz-body{min-width:0;display:flex;flex-direction:column;gap:10px}
.mz-card h3{margin:0;font-size:27px;line-height:1.2;color:#fbf0db;font-weight:bold}
.mz-bar{display:flex;align-items:center;gap:14px}
.mz-tr{flex:1;height:22px;border-radius:11px;background:#0a0604;border:2px solid #6b4a2e;overflow:hidden}
.mz-tr i{display:block;height:100%;min-width:0;border-radius:9px;background:linear-gradient(180deg,#ffe7a8,#d99a35);transition:width .5s}
.mz-bar b{min-width:64px;text-align:right;font-size:25px;color:#ffe7a8}
.mz-pzs{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;font-size:22px;color:#f4e6cb}
.mz-pl{color:#cdb894;font-size:21px}
.mz-pz{display:inline-flex;align-items:center;gap:6px;padding:4px 12px 4px 6px;border-radius:20px;background:#0a0604b8;border:1px solid #6b4a2e;white-space:nowrap}
.mz-pz img{width:40px;height:40px;object-fit:contain}
.mz-ft{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:10px 12px;align-items:center}.mz-ft .mz-pzs{flex:1;min-width:0}
.mz-act{flex:none;display:flex;gap:10px;justify-content:flex-end;align-items:center;margin-left:auto}.mz-card.ready .mz-act{flex:1 0 100%}
#layer .mz-card .btn,#layer .mz-claimall{min-height:84px;min-width:0;width:auto;flex:none;padding:8px 34px;font-size:25px}
#layer .mz-card .mz-swap{padding:8px 18px;background:#2a1c13;border:2px solid #8a6a45;border-color:#8a6a45;color:#f1e3c8}
#layer .mz-card .mz-claim,#layer .mz-claimall{flex:1;width:100%;font-size:29px;color:#2a1708;text-shadow:0 1px 0 #fff8;border-color:#fff0b8;
  background:linear-gradient(180deg,#ffe58f,#e2a630 55%,#b97a16);box-shadow:0 0 0 0 #ffd36a88;animation:mzGlow 1.6s ease-in-out infinite}
#layer .mz-claim:disabled{animation:none!important;opacity:1;filter:none}
.mz-card.ready{border-color:#ffd36a;background:linear-gradient(180deg,#4a3418f5,#261809f5);box-shadow:0 0 22px #ffd36a55,0 6px 16px #0009}
.mz-card.ready .mz-tr i{background:linear-gradient(180deg,#d6ffb8,#6fc24f)}
.mz-card.done{border-color:#4a3a2a;background:#17100cd9;box-shadow:none}
.mz-card.done .mz-ic,.mz-card.done .mz-pzs{opacity:.55}.mz-card.done h3{color:#cdbfa6}
.mz-card.done .mz-tr i{background:#6fa35c}.mz-card.done .mz-bar b{color:#a9d49a}
.mz-okk{min-height:48px;display:flex;align-items:center;font-size:23px;color:#a9d49a}
.mz-all{display:flex;align-items:center;gap:18px;padding:18px 22px;border-radius:20px;border:2px solid #7fb56a;background:linear-gradient(180deg,#22361cf2,#142010f2)}
.mz-all img{width:92px;height:92px;object-fit:contain}
.mz-all div{display:flex;flex-direction:column;gap:4px}.mz-all b{font-size:32px;color:#e4ffd6}.mz-all span{font-size:23px;color:#d5e8c8;line-height:1.3}
.mz-foot{font-size:21px;line-height:1.35;color:#d2c2a4;text-align:center;text-shadow:0 2px 5px #000;padding:0 10px}
.mz-fly{position:absolute;left:0;right:0;top:-14px;z-index:2;display:flex;justify-content:center;gap:10px;pointer-events:none;font-size:26px;font-weight:bold;color:#fff3c8;animation:mzFly .9s ease-out forwards}
.mz-fly .mz-pz{background:#2a1708f0;border:2px solid #ffd36a;box-shadow:0 0 16px #ffd36a99}
.mz-card.mz-pop{animation:mzPop .9s ease-out}
@keyframes mzGlow{0%,100%{box-shadow:0 0 10px 0 #ffd36a66;filter:brightness(1)}50%{box-shadow:0 0 26px 6px #ffd36acc;filter:brightness(1.12)}}
@keyframes mzPop{0%{transform:scale(1)}18%{transform:scale(1.035);filter:brightness(1.6)}100%{transform:scale(1);filter:brightness(1)}}
@keyframes mzFly{0%{transform:translateY(30px) scale(.7);opacity:0}25%{transform:translateY(0) scale(1.1);opacity:1}75%{opacity:1}100%{transform:translateY(-70px) scale(1);opacity:0}}
body.still .mz-claim,body.still .mz-card.mz-pop,body.still .mz-fly{animation:none!important}body.still .mz-fly{display:none}
@media (prefers-reduced-motion:reduce){.mz-claim,.mz-card.mz-pop{animation:none!important}.mz-fly{display:none}}
/* Ajustes (José, 29 nov: «más amigable… categorías y un buscador»): workshop background UI-F17, search box, category bar
   stacked under the back button (.esttabs + pinWallet), big controls. Sizes are layer px: 76 px ≈ 44 px on a phone */
#layer .screen.stg{gap:16px;background-size:cover;background-position:center top;
  background-image:linear-gradient(180deg,#0006 0,#120a06b8 22%,#120a06d0 60%,#0c0705b8 100%),url(ui/f/UI-F17.webp)!important}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.st-search{position:relative;display:flex;align-items:center;gap:10px;width:100%;min-height:84px;padding:0 14px;border-radius:42px;border:2px solid #8a6a45;background:#120b08f0;box-shadow:inset 0 2px 8px #000a}
.st-search:focus-within{border-color:#ffd36a;box-shadow:0 0 0 4px #ffd36a44,inset 0 2px 8px #000a}
.st-search label{display:flex;flex:none}.st-search label img{width:52px;height:52px;object-fit:contain}
.st-search input{flex:1;min-width:0;height:80px;border:0;outline:0;background:none;color:#fbf0db;font:inherit;font-size:27px;-webkit-appearance:none;appearance:none}
.st-search input::placeholder{color:#c9b796;opacity:1}
.st-search input::-webkit-search-cancel-button{display:none}
.st-qx{flex:none;width:64px;height:64px;border-radius:50%;border:2px solid #8a6a45;background:#2a1c13;color:#fbf0db;font-size:26px;cursor:pointer;position:relative}
.st-qx::after{content:'';position:absolute;inset:-8px}
#layer .esttabs.st-cats button{display:flex;align-items:center;gap:8px;min-height:76px;padding:8px 20px 8px 12px;font-size:23px}
#layer .esttabs.st-cats button img{width:46px;height:46px;object-fit:contain}
#layer .esttabs.st-cats button:focus-visible,.st-row button:focus-visible,.st-res:focus-visible,.st-qx:focus-visible{outline:4px solid #9fd0ff;outline-offset:2px}
.st-body{width:100%;display:flex;flex-direction:column;gap:14px}
.st-head{display:flex;align-items:center;gap:18px;padding:4px 6px}
.st-head img{width:92px;height:92px;object-fit:contain;filter:drop-shadow(0 4px 6px #000a)}
.st-head h2{margin:0;font-size:36px;color:#ffe7a8;text-shadow:0 2px 6px #000}.st-head span{font-size:23px;color:#e2d2b4;text-shadow:0 2px 5px #000}
.st-row{display:flex;flex-direction:column;gap:14px;padding:18px 20px;border-radius:20px;border:2px solid #7a5433;background:linear-gradient(180deg,#2e1f15f2,#1a110cf2);box-shadow:0 6px 16px #0009,inset 0 1px 0 #ffffff14;scroll-margin:200px 0}
.st-row.side{flex-direction:row;align-items:center;justify-content:space-between;gap:18px}
.st-tx{display:flex;flex-direction:column;gap:6px;min-width:0}
.st-tx b{font-size:28px;color:#fbf0db}.st-tx span{font-size:22px;line-height:1.3;color:#d8c8aa}
.st-seg{display:flex;gap:8px;width:100%}
.st-seg button{flex:1;min-width:0;min-height:76px;padding:6px 4px;border-radius:16px;border:2px solid #6b4a2e;background:#0f0906;color:#ead9b9;font:inherit;font-size:24px;cursor:pointer}
.st-seg button.on{background:linear-gradient(180deg,#f2cd7a,#c08a2c);border-color:#ffe7a8;color:#22140a;font-weight:bold;box-shadow:0 0 14px #f2cd7a55}
.st-row .switch{width:124px;height:70px;border-radius:35px}.st-row .switch i{width:52px;height:52px;top:6px;left:7px}.st-row .switch.on i{left:59px}
.st-row .switch::after{content:'';position:absolute;inset:-10px}
#layer .st-row .btn{flex:none;min-width:0;width:auto;min-height:76px;padding:8px 26px;font-size:24px}
.st-sl{display:flex;align-items:center;gap:14px;width:100%}.st-sl span{font-size:30px}
.st-sl output{min-width:112px;text-align:right;font-size:26px;font-weight:bold;color:#ffe7a8}
.st-sl input[type=range]{flex:1;min-width:0;height:76px;margin:0;background:none;-webkit-appearance:none;appearance:none;cursor:pointer;--p:50%}
.st-sl input[type=range]::-webkit-slider-runnable-track{height:20px;border-radius:10px;border:2px solid #6b4a2e;background:linear-gradient(90deg,#ffe7a8,#d99a35) 0/var(--p) 100% no-repeat,#0a0604}
.st-sl input[type=range]::-moz-range-track{height:16px;border-radius:10px;border:2px solid #6b4a2e;background:linear-gradient(90deg,#ffe7a8,#d99a35) 0/var(--p) 100% no-repeat,#0a0604}
.st-sl input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:56px;height:56px;margin-top:-20px;border-radius:50%;border:3px solid #fff3dc;background:radial-gradient(circle at 35% 30%,#ffe7a8,#b97a16);box-shadow:0 3px 10px #000c}
.st-sl input[type=range]::-moz-range-thumb{width:50px;height:50px;border-radius:50%;border:3px solid #fff3dc;background:radial-gradient(circle at 35% 30%,#ffe7a8,#b97a16);box-shadow:0 3px 10px #000c}
.st-sl input[type=range]:focus-visible{outline:4px solid #9fd0ff;outline-offset:2px;border-radius:12px}
.st-danger{display:flex;flex-direction:column;gap:12px;margin-top:22px;padding:18px;border-radius:22px;border:2px dashed #c9584a;background:#2a0f0cb8}
.st-danger h3{margin:0;font-size:27px;color:#ffb4a6}.st-danger p{margin:0;font-size:22px;line-height:1.3;color:#f0cfc6}
.st-danger .st-row{border-color:#8a3a30;box-shadow:none}
.st-rc{font-size:23px;color:#e2d2b4;text-shadow:0 2px 5px #000;padding:0 6px}
.st-res{display:flex;align-items:center;gap:16px;width:100%;min-height:96px;padding:12px 18px;text-align:left;border-radius:20px;border:2px solid #7a5433;background:linear-gradient(180deg,#2e1f15f2,#1a110cf2);color:#fbf0db;font:inherit;cursor:pointer}
.st-res img{flex:none;width:64px;height:64px;object-fit:contain}
.st-res span{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.st-res b{font-size:27px}
.st-res small{font-size:21px;color:#d8c8aa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st-res i{flex:none;font-style:normal;font-size:40px;color:#ffe7a8}
.st-none{display:flex;flex-direction:column;align-items:center;gap:10px;padding:36px 24px;text-align:center;border-radius:20px;border:2px solid #7a5433;background:#1a110cf2}
.st-none img{width:110px;height:110px;object-fit:contain;opacity:.85}.st-none b{font-size:32px;color:#ffe7a8}.st-none span{font-size:23px;line-height:1.35;color:#e2d2b4}
.st-row.st-hl{border-color:#ffd36a;animation:stHl 1.1s ease-in-out 3}
@keyframes stHl{0%,100%{box-shadow:0 0 0 0 #ffd36a00,0 6px 16px #0009}50%{box-shadow:0 0 0 6px #ffd36acc,0 0 30px #ffd36a88}}
body.still .st-row.st-hl{animation:none;box-shadow:0 0 0 6px #ffd36acc}
@media (prefers-reduced-motion:reduce){.st-row.st-hl{animation:none;box-shadow:0 0 0 6px #ffd36acc}}

/* deck builder (José, 29 nov): header and filters pinned while scrolling the cards */
#layer .screen.build>.colhead,#layer .screen.build>.bfilt{position:sticky;z-index:8;width:calc(100% + 48px);margin-left:-24px;margin-right:-24px;padding-left:24px;padding-right:24px;
  background:#140d0a}
#layer .screen.build>.colhead{padding-top:6px;padding-bottom:6px}
#layer .screen.build>.bfilt{display:flex;flex-direction:column;gap:8px;padding-bottom:10px;box-shadow:0 8px 14px #000a}
#layer .screen.build>.colhead .btn.back{position:absolute}
/* phones: the back button is wide compared with the 720 px layer -> smaller, still centred title */
body:not(.wide) #layer .screen.build .colhead .title{font-size:34px!important;padding:0 205px}

/* builder: the hero the deck is for (José, 29 nov) */
#layer .bhero{display:flex;align-items:center;gap:14px;width:100%;padding:8px 12px;border-radius:14px;border:2px solid var(--c);background:linear-gradient(90deg,color-mix(in srgb,var(--c) 30%,#140d0a),#140d0a)}
#layer .bhero img{width:64px;aspect-ratio:5/7;object-fit:cover;border-radius:6px;box-shadow:0 2px 8px #000a}
#layer .bhero b{display:block;font-size:24px;color:#ffe7a8}#layer .bhero small{display:block;font-size:17px;color:var(--muted);line-height:1.3}

/* wallet on the same row as the back button once it sticks (José, 29 nov) */
.wallet.w4.pinned.beside.stuck{margin-left:var(--bml);width:var(--bw);border-color:transparent;background:none;box-shadow:none;overflow:visible}
/* one header band across the whole width behind «Volver» and the wallet (same colour as the zone bar below): no odd box */
.wallet.w4.pinned.beside.stuck::before{content:'';position:absolute;z-index:-1;top:-10px;bottom:-2px;left:calc(-1 * var(--bml) - 26px);right:-400px;
  background:#140e0c;pointer-events:none}

/* Logros v2 (José, 29 nov): one Codex medal per family (tier tinted by code), collectible prize and «Reclamar» */
.lg{display:grid;grid-template-columns:100px minmax(0,1fr) 116px;gap:8px 14px;align-items:center;padding:12px;border-radius:16px;border:2px solid #3a2c22;background:#1a120fee}
.lg.ok{border-color:var(--rc);box-shadow:0 0 12px color-mix(in srgb,var(--rc) 35%,transparent)}
.lg.ready{border-color:#ffd36a;background:linear-gradient(180deg,#4a3418f5,#261809f5);box-shadow:0 0 22px #ffd36a55,0 6px 16px #0009}
.lgic{flex:none;width:100px;height:100px;display:flex;align-items:center;justify-content:center;font-style:normal}
.lgic img{width:100%;height:100%;object-fit:contain}
.lgic>b{width:76px;height:76px;border-radius:50%;border:3px dashed #7a644e;display:flex;align-items:center;justify-content:center;font-size:40px;color:#a8947a;background:#000a}
.lg:not(.ok) .lgic{opacity:.55}
.lgq1 img{filter:sepia(.35) saturate(.95) brightness(.84) hue-rotate(-20deg) drop-shadow(0 3px 4px #000a)}
.lgq2 img{filter:grayscale(.94) brightness(1.2) contrast(1.05) drop-shadow(0 3px 4px #000a)}
.lgq3 img{filter:saturate(1.1) brightness(1.06) drop-shadow(0 3px 4px #000a)}
.lgq4 img{filter:hue-rotate(228deg) saturate(.9) brightness(1.08) drop-shadow(0 0 6px #b479e8aa)}
.lgq5 img{filter:hue-rotate(128deg) saturate(.95) brightness(1.2) drop-shadow(0 0 8px #7ff0e0cc);animation:lgiri 6s linear infinite}
@keyframes lgiri{0%{filter:hue-rotate(128deg) saturate(.95) brightness(1.2) drop-shadow(0 0 8px #7ff0e0cc)}33%{filter:hue-rotate(250deg) saturate(.95) brightness(1.2) drop-shadow(0 0 8px #ff9be4cc)}66%{filter:hue-rotate(10deg) saturate(1.1) brightness(1.2) drop-shadow(0 0 8px #ffe08acc)}100%{filter:hue-rotate(128deg) saturate(.95) brightness(1.2) drop-shadow(0 0 8px #7ff0e0cc)}}
.still .lgq5 img,.lg:not(.ok) .lgq5 img{animation:none}
.lgbody{min-width:0;display:flex;flex-direction:column;gap:3px;text-align:left}
.lgbody>b{font-size:25px;color:#ffe7a8;line-height:1.15}.lgbody>small{font-size:18px;color:var(--rc);font-weight:bold}.lgbody>span{font-size:20px;color:#e8dccb;line-height:1.25}
.lgbody em{font-size:18px;font-style:normal;color:#8fe27a;white-space:nowrap}.lgbody em.mark{color:var(--muted)}
.lgbar{display:flex;align-items:center;gap:10px;margin-top:2px}.lgbar .pbar{flex:1;height:14px}
.lgpz{min-width:0;display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 4px;border-radius:12px;border:2px solid var(--qc);background:#0a0604cc;text-align:center}
.lgpz .lgpl{font-size:14px;color:#cdbfa6;text-transform:uppercase;letter-spacing:.06em}
.lgpz .colprev{flex:none;width:64px;height:64px;aspect-ratio:auto;position:relative;border-radius:8px;background-size:contain;background-repeat:no-repeat;background-position:center}
.lgpz .colprev.colTAP,.lgpz .colprev.colREV{width:46px;background-size:cover}
.lgpz>b{max-width:100%;font-size:15px;color:#f4e6cb;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lgpz .qtag{font-size:14px}
.lgpz.got{opacity:.6}.lg:not(.ok) .lgpz .colprev{filter:saturate(.75) brightness(.85)}
#layer .lgclaim{grid-column:1/-1;width:100%;min-height:72px;font-size:27px;color:#2a1708;text-shadow:0 1px 0 #fff8;border-color:#fff0b8;background:linear-gradient(180deg,#ffe58f,#e2a630 55%,#b97a16)}
#layer .lgall{flex:none;min-height:84px}
.lghead{width:100%;flex:none;display:flex;flex-direction:column;gap:8px}.lghead .pbar{height:16px}
.lgchips{width:100%;flex:none;display:flex;gap:10px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}.lgchips::-webkit-scrollbar{display:none}
.lgchips .fchip small{font-size:18px;color:var(--muted);font-weight:normal}.lgchips .fchip.hot{border-color:#ffd36a;color:#ffe7a8}.lgchips .fchip.hot small{color:#ffd36a}
.vcard2 .lgic{width:110px;height:110px}.vcard2 .lgpz{width:120px;margin-top:auto}.vcard2 .lgpz>b{font-size:15px}.vcard2 .lgpz .qtag{font-size:14px}.vcard2 .lgpz .lgpl{font-size:13px;color:#cdbfa6}
/* ---------- «Forja de Esencia» (José, 29 nov): its own screen + the Esencia cell of the wallet (6 cells: .w6) ---------- */
.wallet.w4.w6{grid-template-columns:repeat(6,1fr);padding:8px 2px}
.wallet.w4.w6 .wcell{padding:2px 2px;column-gap:4px}
.wallet.w4.w6 .ic{width:34px;height:34px}.wallet.w4.w6 .ic.icsob{width:auto;height:36px}
.wallet.w4.w6 b{font-size:23px}.wallet.w4.w6 span{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wallet.w4 .es b{color:#ffd98a}
.stabs.vtabs .stab[data-vt="forja"]{flex:1.35;border-color:#c8955a;color:#ffd98a}
#layer .htile.t-forja{--tc:#f0a03a;--tb:#40200a}#layer .htile.t-forja .hart{background:linear-gradient(180deg,#0000 40%,#120a06cc),url(ui/b/UI-B09.webp) center/cover,radial-gradient(90% 100% at 50% 70%,#8a4a14 0%,#1c0c06 75%)}
#layer .hforja img{height:140px;width:auto;filter:drop-shadow(0 0 18px #ffb347aa) drop-shadow(0 8px 12px #000c);animation:hbob 3.4s ease-in-out infinite}
.fjhero{position:relative;width:100%;flex:none;display:flex;flex-direction:column;align-items:center;gap:10px;padding:26px 22px 20px;border-radius:20px;border:3px solid #c8955a;text-align:center;overflow:hidden;
  background:linear-gradient(180deg,#0007,#0009 55%,#000c),var(--bg) center/cover,radial-gradient(90% 100% at 50% 60%,#7a3a12 0%,#160b06 75%);box-shadow:inset 0 0 40px #000a,0 8px 20px #000a}
.fjlead{margin:0;font-size:31px;line-height:1.22;font-weight:bold;color:#fff3d8;text-shadow:0 2px 6px #000,0 0 16px #000;max-width:620px;text-wrap:balance}
.fjess{display:flex;align-items:center;justify-content:center;gap:12px;padding:6px 26px 6px 14px;border-radius:60px;background:#000a;border:2px solid #ffd36a;box-shadow:0 0 22px #ffb34766}
.fjess img{height:84px;width:auto;filter:drop-shadow(0 0 12px #ffb347aa)}
.fjess b{font-size:72px;line-height:1;color:#ffe7a8;font-variant-numeric:tabular-nums;text-shadow:0 0 18px #ffb34788,0 3px 6px #000}
.fjess span{font-size:26px;color:#ffd98a}
.fjhow,.fjprice{font-size:21px;line-height:1.3;color:#eadcc4;text-shadow:0 1px 4px #000;max-width:640px}
.fjprice span{color:var(--rc);font-weight:bold;white-space:nowrap}
.fjchips{width:100%;display:flex;gap:10px;overflow-x:auto;flex:none;padding-bottom:6px;scrollbar-width:none}.fjchips::-webkit-scrollbar{display:none}
.fjchips .fchip .dot{width:14px;height:14px;border-radius:50%;background:var(--c);flex:none}
.fjcount{width:100%;flex:none;display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:22px;color:var(--muted)}.fjcount .btn{min-height:48px;padding:4px 14px;font-size:20px}
.fjsum b{color:#ffe7a8}
.fjlist{width:100%;flex:none;display:grid;grid-template-columns:repeat(auto-fill,minmax(430px,1fr));gap:12px}
.fjrow{--rc:#b9b2a6;display:flex;align-items:stretch;gap:14px;padding:10px;border-radius:16px;background:linear-gradient(180deg,#2a1d15f2,#140d0af2);border:2px solid #5a4330;border-left:6px solid var(--rc);min-width:0}
.fjthumb{flex:none;width:112px;aspect-ratio:5/7;padding:0;border:0;background:none;border-radius:9px;overflow:hidden;cursor:pointer;box-shadow:0 4px 10px #000a;position:relative}
.fjthumb img{width:100%;height:100%;display:block;object-fit:cover}.fjthumb .ttile{font-size:12px}
.fjthumb.notown>*:first-child{filter:grayscale(.85) brightness(.6)}
.fjthumb::after{content:'⌕';position:absolute;right:4px;bottom:4px;width:30px;height:30px;border-radius:50%;background:#000b;color:#ffe7a8;font-size:22px;line-height:28px;text-align:center}
.fjinfo{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:3px;text-align:left}
.fjinfo b{font-size:26px;line-height:1.15;color:#fff3d8;overflow-wrap:anywhere}
.fjrar{font-size:21px;font-weight:bold;color:var(--rc)}.fjmeta{font-size:19px;color:var(--muted)}
.fjown{font-size:22px;color:#ffe7a8}.fjdk{font-size:18px;line-height:1.25;color:#bfe3c8}
.fjbuy{flex:none;width:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}
.fjcost{display:flex;align-items:center;gap:4px;font-size:30px;font-weight:bold;color:#ffe7a8;font-variant-numeric:tabular-nums}.fjcost img{height:40px;width:auto}
.fjcost small{display:none}.fjcost.no{color:#ff9a7a}
.fjbuy .btn{width:100%;min-height:60px;padding:4px 8px;font-size:25px}
.fjbuy .btn.fjoff{opacity:.55;filter:grayscale(.6);cursor:not-allowed}
.fjlack{font-size:17px;color:#ff9a7a;text-align:center}
#layer .fjanim{position:absolute;inset:0;z-index:60;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;background:radial-gradient(60% 50% at 50% 50%,#3a1a06ee,#000e);animation:fjfade 1.25s ease both}
.fjanim .fjaglow{position:absolute;left:50%;top:50%;width:560px;height:560px;margin:-280px;border-radius:50%;background:radial-gradient(closest-side,#ffd36acc,#ff8a2a66 45%,#0000 70%);animation:fjglow 1.1s ease-out both}
.fjanim .fjacard{position:relative;width:300px;aspect-ratio:5/7;border-radius:16px;overflow:hidden;box-shadow:0 0 50px #ffb347,0 14px 30px #000;animation:fjcard 1.1s cubic-bezier(.2,1.4,.4,1) both}
.fjanim .fjacard img{width:100%;height:100%;display:block;object-fit:cover}
.fjanim>b{position:relative;font-size:46px;color:#ffe7a8;text-shadow:0 0 18px #ff8a2a,0 3px 6px #000;animation:fjcard 1.1s .15s cubic-bezier(.2,1.4,.4,1) both}
.fjanim .fjasparks{position:absolute;left:50%;top:50%}
.fjanim .fjasparks i{position:absolute;width:10px;height:10px;border-radius:50%;background:#ffd36a;box-shadow:0 0 12px #ff8a2a;animation:fjspark .9s .25s ease-out both}
.fjanim .fjasparks i:nth-child(1){--dx:-260px;--dy:-220px}.fjanim .fjasparks i:nth-child(2){--dx:240px;--dy:-250px}.fjanim .fjasparks i:nth-child(3){--dx:-300px;--dy:40px}
.fjanim .fjasparks i:nth-child(4){--dx:310px;--dy:10px}.fjanim .fjasparks i:nth-child(5){--dx:-180px;--dy:300px}.fjanim .fjasparks i:nth-child(6){--dx:200px;--dy:290px}
.fjanim .fjasparks i:nth-child(7){--dx:-90px;--dy:-330px}.fjanim .fjasparks i:nth-child(8){--dx:70px;--dy:-340px}.fjanim .fjasparks i:nth-child(9){--dx:-330px;--dy:-110px}
.fjanim .fjasparks i:nth-child(10){--dx:330px;--dy:-130px}.fjanim .fjasparks i:nth-child(11){--dx:-20px;--dy:350px}.fjanim .fjasparks i:nth-child(12){--dx:280px;--dy:180px}
@keyframes fjfade{0%{opacity:0}12%,85%{opacity:1}100%{opacity:0}}
@keyframes fjglow{0%{transform:scale(.2);opacity:0}35%{transform:scale(1.15);opacity:1}100%{transform:scale(1);opacity:.75}}
@keyframes fjcard{0%{transform:scale(.3) rotate(-8deg);opacity:0;filter:brightness(4)}45%{transform:scale(1.08);opacity:1;filter:brightness(1.8)}100%{transform:scale(1);opacity:1;filter:none}}
@keyframes fjspark{0%{transform:translate(0,0) scale(1);opacity:1}100%{transform:translate(var(--dx),var(--dy)) scale(.2);opacity:0}}
body.wide #scr>.fjhero{max-width:1040px;margin-left:auto;margin-right:auto}
body.wide #scr>.search#fjq{max-width:760px;margin-left:auto;margin-right:auto}

/* collectible thumbnails as <img> (fallback to the loose file): fill the tile like the old background */
.colprev:has(>.pkimg){position:relative;overflow:hidden}
.colprev>.pkimg{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;border-radius:inherit}
.chestgrid .colprev>.pkimg,.cchead .colprev>.pkimg,.colprev.colTAP>.pkimg,.colprev.colREV>.pkimg{object-fit:cover}
.colprev.colICO>.pkimg,.colprev.colFIC>.pkimg{object-fit:contain}

/* «Calidad de efectos: Ligera» (José, 29 nov): decorative loops off; game feedback (damage, traps, turn banners) stays */
.lite .wmap *:not(.wm-up):not(.wm-castle):not(.wm-site>span),.lite .wmap::before,.lite .wmap::after,.lite .wm-cam::before{animation:none!important}
.lite .wm-plane{animation:none!important;transform:rotateX(var(--rx))}
.lite .wm-cloud,.lite .wm-mist,.lite .wm-fx{display:none}
.lite .esttile.qb5::before,.lite .esttile.qb5::after,.lite .lgq5 img,.lite #scr .fabpk.has,.lite .mm-embers i,.lite .mm-halo{animation:none!important}
.lite #nav button img{animation:none!important}
.lite .chestanim .chray{animation-duration:.6s!important;animation-iteration-count:1!important}
/* victory / defeat art (José, 29 nov; tablet review): `#layer .overlay.sheet3` outranked `#ov3.endwin`, so the art never showed */
#layer #ov3.overlay.endwin{background:linear-gradient(#000c,#000a 40%,#000d),url(ui/f/UI-F12.webp) center/cover,#000}
#layer #ov3.overlay.endlose{background:linear-gradient(#000c,#000a 40%,#000d),url(ui/f/UI-F13.webp) center/cover,#000}
/* José, 30 nov: deck seen from «Ver» with the missing cards darkened */
#ov2 .dpeek{max-width:680px;margin:10px auto 14px;padding:4px;overscroll-behavior:contain}
#ov2 .dpeek .btile{flex:none;min-height:0}
.btile .pkmiss{position:absolute;left:50%;top:42%;transform:translate(-50%,-50%);background:rgba(20,14,10,.88);color:#ffcf7a;border:1px solid #c8955a;border-radius:8px;padding:4px 10px;font:600 22px/1.2 var(--fb,sans-serif);white-space:nowrap;pointer-events:none}
.bmini.miss{filter:grayscale(1) brightness(.45);outline:2px solid #c8955a55}
/* archetype rule (José, 30 nov): cards that cannot go with the hero, and the hero's archetype chips */
.btile .pkmiss.pkoff{color:#ffb4a0;border-color:#d8553a;background:rgba(40,10,8,.92)}
.bmini.miss.off{outline-color:#d8553a}
.barqs{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px;justify-content:inherit}
.barq{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border-radius:999px;border:1px solid var(--c);background:color-mix(in srgb,var(--c) 22%,#140d0a);color:#f3e6cf;font:600 17px/1.4 var(--fb,sans-serif);white-space:nowrap}
.barq i{width:10px;height:10px;border-radius:50%;background:var(--c);flex:none}
#layer .boff{display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;border-radius:14px;border:2px solid #d8553a;background:#2a0f0b;color:#ffd0c2;font-size:20px;line-height:1.3}
#layer .boff span{flex:1}#layer .boff .btn{min-height:82px;padding:6px 18px;flex:none}
.dk-arqs{display:flex;flex-direction:column;align-items:center;gap:2px;color:var(--muted);font-size:19px;text-align:center}.dk-arqs .barqs{justify-content:center}
.dk-miss.dk-off{color:#ffb4a0}
.pick.pickarq button .barqs{justify-content:center;margin-top:6px}.pick.pickarq .barq{font-size:14px;padding:1px 7px;gap:4px}.pick.pickarq .barq i{width:8px;height:8px}
#ov2 .pkwarn{color:#ffd0c2}#ov2 .pkwarn .barqs{justify-content:center;display:inline-flex;vertical-align:middle;margin:4px 0 0}

/* P01 (30 nov): Escudo / Armadura ghosts keep icon and name out of the 38 px the hero card covers; last play on one line (tap = full log) */
.field .ghost.gesc,.field .ghost.garm{align-items:center;text-align:center}
.field .ghost.gesc{padding:0 40px 0 0}.field .ghost.garm{padding:0 0 0 40px}
.field .ghost.gesc span,.field .ghost.garm span{font-size:21px}
.lastlog{display:block;white-space:nowrap;text-overflow:ellipsis;height:66px;line-height:66px}
.field .pile{position:absolute}.field .pile::after{content:'';position:absolute;inset:-12px -8px}

/* deck bar pinned to the bottom of the layer (José, 30 nov, tablet) */
#layer > .bbar.bfix{position:absolute;left:0;right:0;bottom:0;width:auto;margin:0;z-index:40}
/* deck guide boxes: the card guide's .gtype (150 px figures) was squeezing them (José, 30 nov, tablet) */
.guide .gtype{width:auto;flex:none;margin:0;cursor:auto}
/* a placeholder must not move an absolutely placed image (menu fan of heroes, José 30 nov) */
.mm-card.noimg[style*="url("]{position:absolute}

/* I03 (30 nov): Colección › Cartas, «Abrir sobres» and «Filtros» at least 44 real px tall */
#cpacks,#ftog{min-height:calc(44px / var(--lk,1))}
#layer .overlay.sheet3>.row2:last-child{position:relative;bottom:auto}
