/* ---------- telas pré-jogo (menu, loja, aberturas, baralhos, partida) ---------- */
#home { position: absolute; inset: 0; z-index: 80; display: none; }
#home.on { display: block; }
.scr { position: absolute; inset: 0; overflow: hidden; color: #fff7e0; font-family: var(--ui); background: radial-gradient(ellipse at 50% 25%, #1f7260 0, #0b2d27 78%); animation: scrIn .35s ease-out; }
@keyframes scrIn { from { opacity: 0; transform: scale(1.02); } }
.scr button { font-family: var(--ui); cursor: pointer; }
.scr button:disabled { cursor: default; }
.hdr { position: absolute; left: 0; right: 0; top: 0; height: 64px; display: flex; align-items: center; gap: 18px; padding: 0 20px; background: rgba(0,0,0,.35); z-index: 3; }
.hdr h1 { margin: 0; font: 400 34px 'Lilita One', var(--ui); color: #ffe27a; letter-spacing: 1px; }
.hdr-r { margin-left: auto; }
.back { border: 0; border-radius: 22px; padding: 8px 18px; font-weight: 800; font-size: 16px; color: #fff7e0; background: rgba(255,255,255,.14); }
.scr > .back { position: absolute; left: 20px; top: 16px; z-index: 5; }
.mom { font-size: 16px; opacity: .9; } .mom b { color: #ffe27a; }
.cta.sec { background: rgba(255,255,255,.14); color: #fff7e0; box-shadow: 0 5px 0 rgba(0,0,0,.35), 0 10px 18px rgba(0,0,0,.4); }
.scr .cta { position: static; padding: 10px 26px; font-size: 19px; }
.scr .cta:disabled { filter: grayscale(.8); opacity: .5; }
.link { border: 0; background: none; color: #ffe27acc; text-decoration: underline; font-size: 14px; }

/* menu */
.home-logo { position: absolute; left: 0; right: 0; top: 70px; text-align: center; }
.home-logo span { display: block; font: 400 44px 'Lilita One', var(--ui); letter-spacing: 12px; margin-bottom: -14px; }
.home-logo b { font: 400 104px/1 'Lilita One', var(--ui); color: #ffe27a; text-shadow: 0 6px 0 #c4780f, 0 12px 0 #7a410a, 0 22px 30px rgba(0,0,0,.6); -webkit-text-stroke: 3px #3a1a00; paint-order: stroke fill; }
.home-menu { position: absolute; left: 50%; top: 300px; transform: translateX(-50%); width: 480px; display: flex; flex-direction: column; gap: 14px; }
.hbig { position: relative; text-align: left; border: 0; border-radius: 22px; padding: 14px 26px; font: 800 28px var(--ui); color: #3a1a00; background: linear-gradient(#ffe27a, #f2a81c); box-shadow: 0 6px 0 #a8620a, 0 14px 22px rgba(0,0,0,.45); transition: transform .1s; }
.hbig:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 #a8620a; }
.hbig small { display: block; font: 600 14px var(--ui); opacity: .75; }
.hbig.off, .hbig:disabled { background: rgba(255,255,255,.12); color: #fff7e0aa; box-shadow: none; }
.badge { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); min-width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center; background: #e5532d; color: #fff; font: 800 18px var(--ui); font-style: normal; box-shadow: 0 2px 6px rgba(0,0,0,.4); animation: pulseB 1.2s infinite alternate; }
@keyframes pulseB { to { transform: translateY(-50%) scale(1.15); } }
.home-foot { position: absolute; left: 0; right: 0; bottom: 26px; text-align: center; font-size: 16px; opacity: .85; } .home-foot b { color: #ffe27a; } .home-foot .link { margin-left: 18px; }

/* loja */
.scr.shop { background: repeating-linear-gradient(90deg, rgba(0,0,0,.06) 0 3px, transparent 3px 11px), linear-gradient(#3b2514, #20130a); }
.shelves { position: absolute; left: 20px; top: 76px; width: 800px; }
.shelf { position: relative; height: 296px; margin-bottom: 10px; }
.shelf h3 { margin: 0; position: absolute; left: 14px; top: 0; font: 400 22px 'Lilita One', var(--ui); color: #f3d79a; letter-spacing: 1px; opacity: .9; }
.shelf .items { z-index: 1; position: absolute; left: 0; right: 0; bottom: 22px; display: flex; align-items: flex-end; justify-content: space-around; height: 250px; }
.shelf .board { z-index: 0; position: absolute; left: -8px; right: -8px; bottom: 0; height: 26px; border-radius: 4px; background: linear-gradient(#a8743c, #7a4e24 40%, #4e2f14); box-shadow: 0 8px 14px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,220,160,.4); }
.item { position: relative; border: 0; background: none; padding: 0; transition: transform .2s cubic-bezier(.3,1.5,.5,1), filter .2s; filter: drop-shadow(0 10px 8px rgba(0,0,0,.55)); }
.item.deck img { height: 212px; display: block; border-radius: 3px; } .item.pack img { height: 200px; display: block; }
.item:hover, .item.sel { transform: translateY(-14px) scale(1.04); filter: drop-shadow(0 18px 12px rgba(0,0,0,.6)) drop-shadow(0 0 14px rgba(255,226,122,.55)); }
.item .tag { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%) rotate(-3deg); background: #fff3c2; color: #3a1a00; font: 800 15px var(--ui); padding: 2px 12px; border-radius: 4px; box-shadow: 0 3px 5px rgba(0,0,0,.5); }
.detail { position: absolute; left: 840px; top: 76px; width: 420px; height: 590px; padding: 18px 22px; border-radius: 22px; background: rgba(10,6,2,.5); border: 1px solid rgba(255,220,160,.25); display: flex; flex-direction: column; align-items: center; text-align: center; }
.detail .dimg { height: 250px; display: grid; place-items: center; filter: drop-shadow(0 12px 10px rgba(0,0,0,.6)); } .detail .dimg img { max-height: 250px; max-width: 220px; }
.detail h2 { margin: 10px 0 2px; font: 400 28px 'Lilita One', var(--ui); color: #ffe27a; } .detail h2 small { display: block; font: 600 14px var(--ui); color: #fff7e0aa; }
.detail p { margin: 6px 0; font-size: 15px; line-height: 1.3; opacity: .9; min-height: 62px; }
.buyrow { display: flex; align-items: center; gap: 22px; margin: 6px 0 10px; }
.qty { display: flex; align-items: center; gap: 10px; } .qty button { width: 40px; height: 40px; border-radius: 50%; border: 0; font: 800 24px var(--ui); background: rgba(255,255,255,.16); color: #fff7e0; } .qty b { font-size: 28px; min-width: 36px; }
.total { font: 800 30px var(--ui); color: #ffe27a; }
.detail .buy { width: 100%; font-size: 22px; } .stockline { margin-top: 8px; font-size: 14px; opacity: .8; min-height: 20px; }
.athome { position: absolute; left: 20px; right: 20px; top: 684px; height: 104px; border-radius: 18px; background: rgba(0,0,0,.4); padding: 6px 16px; display: flex; align-items: center; gap: 18px; }
.athome > b { width: 110px; font-size: 14px; color: #f3d79a; line-height: 1.1; }
.tray { display: flex; gap: 14px; align-items: center; overflow-x: auto; flex: 1; touch-action: pan-x; padding: 4px; } .tray .empty { opacity: .6; }
.own { position: relative; border: 0; background: none; padding: 0; transition: transform .15s; } .own:active { transform: scale(.94); }
.own img { height: 80px; display: block; filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); } .own i { position: absolute; right: -8px; top: -6px; background: #e5532d; border-radius: 12px; padding: 1px 8px; font: 800 14px var(--ui); font-style: normal; }
.own.pulse { animation: ownPop .7s cubic-bezier(.3,1.6,.5,1); } @keyframes ownPop { from { transform: scale(2.2); opacity: 0; } }
.scr-toast { position: absolute; left: 50%; bottom: 120px; transform: translate(-50%, 10px); max-width: 760px; text-align: center; padding: 10px 22px; border-radius: 22px; background: rgba(0,0,0,.82); font-weight: 700; opacity: 0; pointer-events: none; transition: .25s; z-index: 20; }
.scr-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* aberturas */
.scr.open { background: radial-gradient(ellipse at 50% 45%, #2b3550 0, #0a0d18 80%); user-select: none; }
.scr.open.dim::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.55); z-index: 30; pointer-events: none; }
.spot { position: absolute; left: 50%; top: 400px; width: 900px; height: 900px; margin: -450px 0 0 -450px; background: radial-gradient(circle, rgba(255,226,122,.22), transparent 62%); pointer-events: none; }
.o-stage { position: absolute; inset: 0; }
.o-stage .card { cursor: pointer; }
.o-pack, .o-box { position: absolute; cursor: pointer; filter: drop-shadow(0 26px 22px rgba(0,0,0,.6)); }
.o-pack .pk-bottom { display: block; width: 100%; position: relative; } .o-pack .pk-top { position: absolute; left: 0; top: 0; width: 100%; }
.o-box .bx-body { display: block; width: 100%; position: relative; } .o-box .bx-flap { position: absolute; left: 0; top: 0; width: 100%; }
.box-inside { position: absolute; left: 3%; right: 3%; top: 11%; height: 6%; background: linear-gradient(#050505, #1a1a1a); border-radius: 4px; }
.o-hint { position: absolute; left: 0; right: 0; bottom: 34px; text-align: center; font: 700 24px var(--ui); letter-spacing: 1px; text-shadow: 0 2px 8px #000; animation: hint 1.2s infinite alternate; transition: opacity .3s; z-index: 40; }
@keyframes hint { to { opacity: .55; } } .o-hint.hide { opacity: 0; }
.o-info { position: absolute; left: 0; right: 0; top: 610px; text-align: center; font-size: 20px; z-index: 45; display: flex; justify-content: center; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.o-info b { font: 400 26px 'Lilita One', var(--ui); letter-spacing: 2px; } .r-holo { color: #ffd34d; text-shadow: 0 0 14px #ff9ad5; } .r-rare { color: #ffe27a; } .r-uncommon { color: #9fe0ff; } .r-common { color: #d8d8d8; }
.o-info .new { background: #e5532d; color: #fff; font-style: normal; font-weight: 800; padding: 1px 10px; border-radius: 10px; animation: ownPop .5s; }
.o-actions { position: absolute; left: 0; right: 0; top: 650px; display: flex; justify-content: center; gap: 14px; z-index: 46; }
.scr.open:not(.deckopen) .o-actions { top: 640px; }
.spark { position: absolute; width: 10px; height: 10px; margin: -5px; border-radius: 50%; pointer-events: none; z-index: 120; box-shadow: 0 0 10px currentColor; }
.deck-grid { position: absolute; left: 70px; right: 70px; top: 60px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px 12px; }
.dg-tile { position: relative; opacity: 0; animation: dgIn .5s cubic-bezier(.3,1.5,.5,1) forwards; border-radius: 6px; }
@keyframes dgIn { from { opacity: 0; transform: translateY(40px) scale(.6) rotate(-6deg); } to { opacity: 1; } }
.dg-tile img { width: 100%; display: block; border-radius: 6px; box-shadow: 0 6px 10px rgba(0,0,0,.55); }
.dg-tile i { position: absolute; right: -6px; bottom: -6px; background: #0b2d27; border: 2px solid #ffe27a; border-radius: 14px; padding: 0 8px; font: 800 15px var(--ui); font-style: normal; }
.dg-tile em { position: absolute; left: -6px; top: -6px; background: #e5532d; border-radius: 8px; padding: 0 7px; font: 800 12px var(--ui); font-style: normal; }
.dg-tile.r-holo img { box-shadow: 0 0 0 2px #ffd34d, 0 0 18px rgba(255,211,77,.8); }

/* montagem de baralhos */
.scr.builder { background: linear-gradient(#10382f, #0a2420); }
.b-left { position: absolute; left: 16px; top: 76px; width: 780px; bottom: 12px; }
.filters { display: flex; gap: 6px; align-items: center; height: 42px; }
.chip { border: 0; border-radius: 16px; padding: 6px 14px; font-weight: 800; font-size: 14px; color: #fff7e0; background: rgba(255,255,255,.12); } .chip.on { background: #ffe27a; color: #3a1a00; }
.sep { width: 10px; } .search { margin-left: auto; width: 150px; border: 0; border-radius: 16px; padding: 7px 14px; font: 600 14px var(--ui); background: rgba(0,0,0,.35); color: #fff7e0; outline: none; user-select: text; }
.grid { position: absolute; top: 50px; bottom: 0; left: 0; right: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-content: start; padding: 6px 4px 20px; touch-action: pan-y; }
.tile { position: relative; border-radius: 8px; transition: transform .12s; } .tile img { width: 100%; display: block; border-radius: 7px; box-shadow: 0 4px 8px rgba(0,0,0,.5); cursor: pointer; }
.tile.in img { box-shadow: 0 0 0 3px #ffe27a, 0 4px 10px rgba(0,0,0,.5); }
.tile .own { position: absolute; left: 4px; top: 4px; background: rgba(0,0,0,.75); border-radius: 10px; padding: 0 7px; font: 800 13px var(--ui); }
.tile .ind { position: absolute; right: 4px; top: 4px; min-width: 24px; height: 24px; border-radius: 12px; display: grid; place-items: center; background: #ffe27a; color: #3a1a00; font: 800 14px var(--ui); }
.tile .ctl { position: absolute; left: 0; right: 0; bottom: 0; display: flex; border-radius: 0 0 7px 7px; overflow: hidden; } .tile .ctl button { flex: 1; border: 0; height: 28px; font: 800 18px var(--ui); background: rgba(0,0,0,.65); color: #fff7e0; } .tile .ctl button:active { background: #ffe27a; color: #3a1a00; }
.none { opacity: .7; padding: 20px; }
.b-right { position: absolute; left: 812px; top: 76px; right: 16px; bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.deckbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .dsel { flex: 1; border: 0; border-radius: 12px; padding: 8px 10px; font: 700 15px var(--ui); background: rgba(0,0,0,.4); color: #fff7e0; }
.dname { flex: 1 1 100%; border: 0; border-radius: 12px; padding: 8px 12px; font: 800 18px var(--ui); background: rgba(255,255,255,.1); color: #ffe27a; outline: none; user-select: text; }
.mini { border: 0; border-radius: 12px; padding: 8px 12px; font-weight: 800; font-size: 14px; background: rgba(255,255,255,.14); color: #fff7e0; } .mini.danger { background: rgba(229,83,45,.5); }
.dlist { flex: 1; overflow-y: auto; border-radius: 12px; background: rgba(0,0,0,.28); padding: 4px 8px; touch-action: pan-y; }
.dlist h4 { margin: 8px 0 2px; font-size: 14px; letter-spacing: 1px; color: #f3d79a; text-transform: uppercase; } .dlist h4 span { opacity: .7; }
.row { display: flex; align-items: center; gap: 8px; padding: 2px 0; } .row img { width: 30px; border-radius: 3px; } .row .nm { flex: 1; font-weight: 700; font-size: 15px; }
.step { display: flex; align-items: center; gap: 6px; } .step button { width: 28px; height: 28px; border-radius: 50%; border: 0; font: 800 16px var(--ui); background: rgba(255,255,255,.16); color: #fff7e0; } .step b { min-width: 20px; text-align: center; }
.dfoot { background: rgba(0,0,0,.35); border-radius: 12px; padding: 8px 12px; }
.count { font: 400 40px 'Lilita One', var(--ui); line-height: 1; } .count small { font-size: 20px; opacity: .7; } .count.ok { color: #7dff9a; } .count.bad { color: #ff7a6b; }
.issues { font-size: 13px; color: #ffb3a8; min-height: 34px; margin: 4px 0; } .issues .good { color: #7dff9a; font-weight: 800; font-size: 15px; }
.ens { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 8px; } .ens span { opacity: .8; } .en { border: 0; padding: 0; background: none; } .en img { width: 34px; border-radius: 4px; display: block; box-shadow: 0 2px 4px rgba(0,0,0,.5); } .en:active { transform: scale(.9); }
.foot-btns { display: flex; gap: 8px; } .foot-btns .cta { flex: 1; padding: 8px 10px; font-size: 16px; }
.zoom { position: absolute; inset: 0; z-index: 30; background: rgba(0,0,0,.8); display: grid; place-items: center; } .zoom img { height: 700px; border-radius: 20px; box-shadow: 0 20px 60px #000; }

/* escolher partida */
.scr.play { background: radial-gradient(ellipse at 50% 20%, #1f7260 0, #0b2d27 80%); }
.scr.play section { position: absolute; top: 90px; bottom: 120px; border-radius: 22px; background: rgba(0,0,0,.3); padding: 16px 22px; }
.pl-you { left: 24px; width: 700px; } .pl-opp { left: 748px; right: 24px; }
.scr.play h3 { margin: 0 0 10px; font: 400 26px 'Lilita One', var(--ui); color: #ffe27a; } .scr.play h4 { margin: 14px 0 6px; font-size: 15px; letter-spacing: 1px; opacity: .8; }
.dk-list { display: flex; flex-wrap: wrap; gap: 14px; overflow-y: auto; max-height: 470px; touch-action: pan-y; padding: 4px; }
.dk, .ai { border: 3px solid transparent; border-radius: 16px; background: rgba(255,255,255,.08); color: #fff7e0; padding: 8px; text-align: center; transition: transform .15s; }
.dk { width: 150px; } .dk .cv { height: 150px; max-width: 120px; object-fit: contain; display: block; margin: 0 auto 6px; border-radius: 4px; filter: drop-shadow(0 6px 5px rgba(0,0,0,.5)); }
.dk b { display: block; font-size: 16px; } .dk small { display: block; font-size: 11px; opacity: .75; min-height: 28px; }
.dk.sel, .ai.sel { border-color: #ffe27a; background: rgba(255,226,122,.18); transform: translateY(-4px); box-shadow: 0 0 20px rgba(255,226,122,.35); } .dk.bad { opacity: .5; }
.cv.none { display: grid; place-items: center; height: 100px; font-size: 40px; }
.who { display: flex; gap: 10px; } .w { flex: 1; border: 2px solid transparent; border-radius: 14px; padding: 10px; font: 800 18px var(--ui); background: rgba(255,255,255,.08); color: #fff7e0; } .w.sel { border-color: #ffe27a; background: rgba(255,226,122,.18); } .w:disabled { opacity: .5; } .w small { font-weight: 600; }
.ai-list { display: flex; flex-wrap: wrap; gap: 10px; } .ai { width: 110px; } .ai .cv { height: 110px; display: block; margin: 0 auto 4px; object-fit: contain; } .ai b { font-size: 14px; }
.links { position: absolute; left: 22px; bottom: 10px; display: flex; gap: 18px; }
.scr.play .start { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); font-size: 30px; padding: 12px 70px; }
#home { z-index: 95; }
.o-hint.hide { animation: none; opacity: 0; }
.deckopen .deck-grid { grid-template-columns: repeat(8, 1fr); left: 60px; right: 60px; top: 56px; }
.deckopen .o-info { top: 684px; } .deckopen .o-actions { top: 728px; }
.deckopen .o-info b { font-size: 22px; color: #ffe27a; }

.fake { display: inline-block; margin-right: 12px; padding: 3px 12px; border-radius: 12px; background: #e5532d; color: #fff; font: 800 12px var(--ui); letter-spacing: 1px; vertical-align: middle; box-shadow: 0 2px 4px rgba(0,0,0,.4); }
.mom em { opacity: .7; font-style: normal; font-size: 13px; }
.fakeline { margin-top: 8px; font-size: 13px; color: #ffb59c; font-weight: 700; }
.item .tag::after { content: ' play'; font-size: 10px; opacity: .55; font-weight: 600; }
.chip { padding: 6px 11px; } .search { width: 118px; }
.item .tag { white-space: nowrap; }

/* ---------- fundos em tela cheia (o conteúdo continua no palco 1280x800) ---------- */
.scr { background: transparent !important; }
#stage.screen-on { background: transparent; }
#stage.screen-on > :not(#home):not(#title):not(.cl-ov) { visibility: hidden; }
#title { background: transparent !important; }
#viewport { transition: background .4s; }
#viewport[data-bg=home], #viewport[data-bg=play] { background: radial-gradient(ellipse at 50% 25%, #1f7260 0, #0b2d27 78%); }
#viewport[data-bg=shop] { background: repeating-linear-gradient(90deg, rgba(0,0,0,.06) 0 3px, transparent 3px 11px), linear-gradient(#3b2514, #20130a); }
#viewport[data-bg=open] { background: radial-gradient(ellipse at 50% 45%, #2b3550 0, #0a0d18 80%); }
#viewport[data-bg=builder] { background: linear-gradient(#10382f, #0a2420); }
#viewport::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .3s; pointer-events: none; }
#viewport.dim::before { opacity: 1; }

/* menu mais vivo */
.decor { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.decor .rays { position: absolute; left: 50%; top: 42%; width: 190vmax; height: 190vmax; margin: -95vmax 0 0 -95vmax; background: repeating-conic-gradient(rgba(255,255,255,.06) 0 5deg, transparent 5deg 13deg); -webkit-mask: radial-gradient(circle, #000 0, transparent 52%); mask: radial-gradient(circle, #000 0, transparent 52%); animation: spin 120s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.decor .dball { position: absolute; left: 50%; top: 42%; width: min(80vh, 70vw); margin: calc(min(80vh, 70vw) / -2) 0 0 calc(min(80vh, 70vw) / -2); fill: none; stroke: rgba(255,240,190,.09); stroke-width: 2.4; animation: spin 90s linear infinite reverse; }
.decor .dc { position: absolute; width: 240px; height: 336px; margin: -168px 0 0 -120px; transform: rotate(var(--r)) scale(calc(var(--s) * var(--k, 1))); translate: calc((var(--gx) - 50) * -.5px * var(--depth)) calc((var(--gy) - 50) * -.35px * var(--depth)); filter: drop-shadow(0 18px 14px rgba(0,0,0,.5)); }
.decor .dcf { width: 100%; height: 100%; animation: floaty 6s ease-in-out infinite alternate; }
@keyframes floaty { from { transform: translateY(-14px) rotate(-2deg); } to { transform: translateY(14px) rotate(2deg); } }
.decor .card { pointer-events: none; --glare: .6; --holo: .75; }
.decor .tw { position: absolute; width: var(--sz); height: var(--sz); background: #fff8d8; border-radius: 50%; box-shadow: 0 0 10px 2px rgba(255,240,170,.8); opacity: 0; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .9; transform: scale(1.5); } }
.home-logo b { animation: logoPulse 3.5s ease-in-out infinite alternate; } @keyframes logoPulse { to { filter: drop-shadow(0 0 18px rgba(255,226,122,.65)); } }
.home-menu .hbig { opacity: 0; animation: btnIn .5s cubic-bezier(.3,1.4,.5,1) forwards; transition: transform .15s, filter .15s; }
.home-menu .hbig:nth-child(1) { animation-delay: .1s; } .home-menu .hbig:nth-child(2) { animation-delay: .2s; } .home-menu .hbig:nth-child(3) { animation-delay: .3s; } .home-menu .hbig:nth-child(4) { animation-delay: .4s; }
@keyframes btnIn { from { opacity: 0; transform: translateX(-60px) scale(.9); } to { opacity: 1; } }
.home-menu .hbig:hover:not(:disabled) { transform: translateX(8px) scale(1.03); filter: brightness(1.08); }
.home-tag { position: absolute; left: 0; right: 0; top: 232px; text-align: center; font: 700 22px var(--ui); letter-spacing: 3px; color: #fff7e0; text-shadow: 0 2px 8px #000; }

.title-cards { display: none; }
#title .title-box { z-index: 1; }

.bonus-coin { position: absolute; width: 100px; height: 100px; z-index: 50; filter: drop-shadow(0 0 22px rgba(255,226,122,.9)) drop-shadow(0 8px 6px rgba(0,0,0,.6)); pointer-events: none; }
.coinline { display: inline-flex; align-items: center; gap: 8px; color: #ffe27a; font-weight: 800; } .coinline img { width: 34px; height: 34px; }

.item .setb { position: absolute; left: 50%; top: -9px; transform: translateX(-50%); padding: 1px 8px; border-radius: 8px; font: 800 10px var(--ui); letter-spacing: 1px; color: #fff; background: #3a6ad0; box-shadow: 0 2px 4px rgba(0,0,0,.5); }
.item .setb.jungle { background: #2f8f3a; }
.shelf .items { gap: 4px; }
.coinpick { position: absolute; left: 24px; bottom: 36px; display: flex; align-items: center; gap: 10px; font-weight: 800; }
.coinpick .cp { display: flex; align-items: center; gap: 6px; border: 2px solid transparent; border-radius: 22px; padding: 4px 14px 4px 6px; background: rgba(255,255,255,.1); color: #fff7e0; font: 700 14px var(--ui); } .coinpick .cp img { width: 32px; height: 32px; } .coinpick .cp.sel { border-color: #ffe27a; background: rgba(255,226,122,.2); }
/* prateleira: 6 caixas cabem na largura (800px) sem vazar para o painel de detalhes */
.item.deck img { height: auto; width: 112px; max-height: 215px; object-fit: contain; }
.item.pack img { height: auto; width: 96px; max-height: 200px; object-fit: contain; }
.shelf .items { padding: 0 6px; gap: 2px; }

/* prateleiras: filtro por set + área rolável (comporta quantas caixas vierem) */
.setfilter { position: absolute; left: 20px; top: 74px; display: flex; gap: 6px; z-index: 2; }
.shelves { top: 112px !important; height: 566px; overflow-y: auto; overflow-x: hidden; padding-top: 14px; touch-action: pan-y; scrollbar-width: thin; }
.shelf { height: 276px !important; margin-bottom: 4px !important; }
.shelves .shelf h3 { top: -8px; }

/* scrollbars no estilo do jogo (madeira/dourado) — vale para toda área rolável das telas */
.scr * { scrollbar-width: thin; scrollbar-color: #d9a54a rgba(0,0,0,.35); }
.scr ::-webkit-scrollbar { width: 12px; height: 12px; }
.scr ::-webkit-scrollbar-track { background: rgba(0,0,0,.35); border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255,226,122,.12); }
.scr ::-webkit-scrollbar-thumb { border-radius: 8px; border: 2px solid rgba(0,0,0,.35); background: linear-gradient(90deg, #ffe27a, #e0a02a 55%, #b8761a); box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.scr ::-webkit-scrollbar-thumb:hover { background: linear-gradient(90deg, #fff0a8, #f2b83a 55%, #c98620); }
.scr ::-webkit-scrollbar-corner { background: transparent; }
.shelves::-webkit-scrollbar-track { background: linear-gradient(90deg, #2a170a, #4e2f14); }
.shelves { scrollbar-color: #d9a54a #3a2211; }

.unop { border: 0; border-radius: 18px; padding: 6px 14px; margin-right: 12px; font: 800 15px var(--ui); color: #3a1a00; background: linear-gradient(#ffe27a, #f2a81c); box-shadow: 0 3px 0 #a8620a; position: relative; }
.unop i { font-style: normal; background: #e5532d; color: #fff; border-radius: 10px; padding: 0 7px; margin-left: 4px; }
.unopened { position: absolute; right: 16px; top: 70px; width: 520px; z-index: 12; padding: 12px 16px 10px; border-radius: 16px; background: rgba(8,24,20,.96); border: 1px solid rgba(255,226,122,.4); box-shadow: 0 16px 36px rgba(0,0,0,.6); animation: panelIn .25s cubic-bezier(.3,1.4,.5,1); }
.unopened h3 { margin: 0 0 8px; font: 400 20px 'Lilita One', var(--ui); color: #ffe27a; }
.unopened .tray { flex-wrap: wrap; overflow: visible; gap: 14px; } .unopened .own img { height: 110px; }
.unopened .link { margin-top: 6px; }

.item .setb.fossil { background: #8a5a2a; }

.coinrow { flex: 1 1 100%; display: flex; align-items: center; gap: 6px; font-size: 13px; }
.coinrow .cp { border: 2px solid transparent; border-radius: 50%; padding: 2px; background: rgba(255,255,255,.1); } .coinrow .cp img { width: 30px; height: 30px; display: block; } .coinrow .cp.sel { border-color: #ffe27a; background: rgba(255,226,122,.25); }
.dk { position: relative; } .dkcoin { position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }

/* treinadores */
.trainer-me { position: absolute; right: 18px; top: 8px; } .tbtn { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; color: #fff7e0; font: 700 12px var(--ui); } .tbtn img { height: 96px; filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); transition: transform .15s; } .tbtn:hover img { transform: scale(1.06); } .tbtn span { text-decoration: underline; opacity: .8; }
.trainer-opp { display: flex; align-items: flex-end; gap: 10px; margin: 8px 0 0; } .trainer-opp img { height: 96px; filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); }
.tpick { position: absolute; inset: 0; z-index: 40; background: rgba(2,10,8,.82); display: grid; place-items: center; backdrop-filter: blur(4px); }
.tp-box { width: 880px; max-height: 700px; padding: 18px 22px; border-radius: 22px; background: linear-gradient(#17463c, #0e3029); border: 2px solid rgba(255,226,122,.45); display: flex; flex-direction: column; gap: 10px; }
.tp-box h3 { margin: 0; font: 400 28px 'Lilita One', var(--ui); color: #ffe27a; }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; overflow-y: auto; max-height: 540px; padding: 4px; touch-action: pan-y; }
.tp { height: 100px; border: 3px solid transparent; border-radius: 14px; background: rgba(255,255,255,.08); padding: 2px; } .tp img { width: 100%; height: 100%; object-fit: contain; } .tp.sel { border-color: #ffe27a; background: rgba(255,226,122,.25); }

/* ===== escolher a partida: layout em grade (sem sobreposição) ===== */
.plv { position: absolute; left: 24px; right: 24px; top: 82px; bottom: 112px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; }
.plv-box { min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 16px 20px 12px; border-radius: 22px; background: rgba(0,0,0,.3); }
.plv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plv-head h3 { margin: 0; font: 400 28px 'Lilita One', var(--ui); color: #ffe27a; }
.plv .tbtn { flex-direction: row; gap: 8px; } .plv .tbtn img { height: 64px; } .plv .tbtn span { max-width: 80px; text-align: left; line-height: 1.1; }
.plv-scroll { flex: 1; min-height: 0; overflow-y: auto; touch-action: pan-y; padding: 4px 6px 4px 2px; }
.plv .dk-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-content: start; max-height: none; }
.plv .dk { width: auto; } .plv .dk .cv { height: 130px; }
.plv .ai-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; align-content: start; }
.plv .ai { width: auto; } .plv .ai .cv { height: 100px; }
.plv .who { display: flex; gap: 8px; } .plv .w { padding: 6px 12px; font-size: 15px; }
.plv .trainer-opp { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 0 12px; margin: 0; } .plv .trainer-opp img { height: 84px; grid-row: 1 / 3; } .plv .trainer-opp h4 { grid-column: 1 / 3; margin: 6px 0 0; } .plv .trainer-opp > div { display: flex; flex-direction: column; align-items: flex-start; font-weight: 800; }
.plv .links { position: static; display: flex; gap: 18px; padding-top: 2px; }
.plv-foot { position: absolute; left: 0; right: 0; bottom: 18px; display: grid; place-items: center; }
.scr.play .plv-foot .start { position: static; transform: none; font-size: 28px; padding: 10px 64px; }
.dk, .ai { transition: border-color .12s, background .12s, box-shadow .12s; } .dk.sel, .ai.sel { transform: none; }
/* seleção não deve piscar: sem animação de entrada ao re-renderizar */
.scr.play { animation: none; }
.scr.play .plv section.plv-box { position: static; inset: auto; width: auto; top: auto; bottom: auto; left: auto; right: auto; padding: 16px 20px 12px; }

/* tapetes: loja e escolha */
.item.mat img { width: 150px; height: auto; max-height: none; border-radius: 6px; box-shadow: 0 6px 10px rgba(0,0,0,.5); }
.dimg.mat img { max-width: 360px; max-height: 225px; border-radius: 10px; box-shadow: 0 8px 18px rgba(0,0,0,.6); }
.matrow { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; padding-top: 2px; }
.matrow .mt { border: 2px solid transparent; border-radius: 8px; padding: 2px; background: rgba(255,255,255,.1); } .matrow .mt img { width: 74px; height: 46px; object-fit: cover; display: block; border-radius: 5px; } .matrow .mt.sel { border-color: #ffe27a; background: rgba(255,226,122,.25); }

/* jogar com um amigo */
.friend { display: flex; flex-direction: column; gap: 12px; padding: 6px 4px; }
.fr-hint { margin: 0; opacity: .8; font-size: 14px; line-height: 1.4; }
.fr-card { background: rgba(255,255,255,.08); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; } .fr-card h4 { margin: 0; font: 400 20px 'Lilita One', var(--ui); color: #ffe27a; }
.fr-join { display: flex; gap: 10px; } .fr-join .code { flex: 1; min-width: 0; text-transform: uppercase; text-align: center; letter-spacing: 8px; font: 400 30px 'Lilita One', var(--ui); border-radius: 14px; border: 2px solid rgba(255,226,122,.4); background: rgba(0,0,0,.3); color: #fff7e0; padding: 4px 8px; }
.fr-status { min-height: 60px; text-align: center; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fr-code { font: 400 64px 'Lilita One', var(--ui); letter-spacing: 14px; color: #ffe27a; text-shadow: 0 3px 0 #a8620a, 0 6px 16px #000; padding-left: 14px; }

/* conta online / backup */
.cl-ov { position: absolute; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(5,8,20,.6); backdrop-filter: blur(3px); }
.cl-box { width: 460px; max-width: 92%; box-sizing: border-box; padding: 26px 30px 22px; border-radius: 22px; background: linear-gradient(#1c2347, #121734); border: 1px solid rgba(255,255,255,.15); box-shadow: 0 24px 60px rgba(0,0,0,.6); text-align: center; }
.cl-box h3 { margin: 0 0 8px; font-size: 26px; } .cl-box p { margin: 0 0 14px; opacity: .8; font-size: 16px; line-height: 1.35; } .cl-st { color: #9fe8a8; }
.cl-tabs { display: flex; gap: 8px; margin-bottom: 12px; } .cl-tabs button { flex: 1; padding: 9px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #fff; font-size: 15px; font-weight: 700; } .cl-tabs .on { background: #ffd24a; color: #2a2100; border-color: #ffd24a; }
.cl-i { display: block; width: 100%; box-sizing: border-box; margin-bottom: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.3); color: #fff; font-size: 17px; }
.cl-err { min-height: 20px; color: #ff9a9a; font-size: 14px; margin-bottom: 6px; }
.cl-b { display: block; width: 100%; box-sizing: border-box; margin: 6px 0; padding: 13px; border-radius: 14px; border: 0; background: #ffd24a; color: #2a2100; font-size: 17px; font-weight: 800; } .cl-b.alt { background: rgba(255,255,255,.12); color: #fff; } .cl-b:disabled { opacity: .5; }
.cl-row { display: flex; gap: 10px; } .cl-row .cl-b { flex: 1; font-size: 15px; }
.cl-sep { margin: 16px 0 4px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; opacity: .55; }
.cl-x { margin-top: 10px; border: 0; background: none; color: #ffe27acc; text-decoration: underline; font-size: 15px; }

.pname { width: 150px; box-sizing: border-box; padding: 9px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.3); color: #fff; font-size: 16px; font-weight: 700; }

.openall { flex: none; align-self: center; border: 2px solid #ffe27a; border-radius: 14px; background: linear-gradient(#e5532d, #b93a1a); color: #fff; font: 400 18px 'Lilita One', var(--ui); padding: 8px 14px; line-height: 1.1; } .openall small { display: block; font: 600 12px var(--ui); opacity: .85; } .openall:active { transform: scale(.95); }
.oa-grid { position: absolute; left: 70px; right: 70px; top: 70px; height: 520px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 12px; align-content: start; padding: 8px; }
.openall-sum .o-info { top: 600px; flex-direction: column; gap: 4px; } .openall-sum .o-actions { top: 664px; }
