/* Rediseño «Xtra» (referencia de diseño 27-10-2026): papel crema, tinta casi negra, acento naranja, tarjetas blancas con borde suave.
   Se carga al final: ajusta tokens del modo claro y la cabecera, Inicio, Mis mazos y Torneos. El modo oscuro conserva sus tokens. */
:root[data-theme=light]{
 --paper:#faf7f1;--sheet:#fff;--ink:#17181c;--muted:#65666e;--line:#ebe5da;--soft:#f3efe7;--edge:#ebe5da;
 --action:#d4420c;--action-hover:#b93a0a;--action-ink:#c23b09;--you:#2a63c9;--ok:#1f7d47;--ok-bg:#e7f5ec;--warn-bg:#fff4e5;
 --focus:#2f6fe0;--radius:10px;
 --shadow-1:0 1px 2px #17181c0a,0 2px 8px #17181c08;--shadow-2:0 10px 30px #17181c12;
}
:root{--xtra-pop:0 16px 40px #17181c24;--font-body:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;--font-display:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;--font-mono:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif}
body{font-family:var(--font-body);font-feature-settings:'cv11','ss01';-webkit-font-smoothing:antialiased}
h1,h2,h3,.brand{font-family:var(--font-display)}
h1,h2{letter-spacing:-.03em}
/* A 320 px, Inter a 20 px deja el título del diálogo en tres líneas y su cabecera pasa de 90 px. */
@media(max-width:360px){.modalhead h2{font-size:18px}}
[class*=count],.quantity span,.x-tab-n,.x-big,.x-pct,.x-bars b{font-variant-numeric:tabular-nums}

/* ---------- Cabecera ---------- */
.site-header{min-height:68px;padding-block:10px;gap:28px;background:color-mix(in srgb,var(--paper) 92%,transparent);backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid var(--line)}
.brand{font-size:27px;letter-spacing:-1.2px;font-weight:900}
.brand .brand-mark{display:none}
.brand .brand-text{font-weight:900}
.brand .brand-x{font-style:italic;letter-spacing:-.5px;padding-right:2px}
.section-nav{gap:4px;flex:0 1 auto}
.section-nav>a{position:relative;padding:12px 12px;border-radius:0;background:transparent!important;color:var(--ink);font-weight:500;font-size:14px}
.section-nav>a:hover{color:var(--action-ink)}
.section-nav>a[aria-current=page]{font-weight:700;color:var(--ink)}
.section-nav>a[aria-current=page]::after{display:block!important;content:"";position:absolute;left:12px;right:12px;bottom:-11px;height:2.5px;border-radius:2px;background:var(--action)}
.section-nav>a.nav-play svg{display:none}
.nav-play.is-pulsing::before{display:none}
.header-tools{display:flex;align-items:center;gap:10px;margin-left:auto}
.header-search{position:relative;display:flex;align-items:center}
.header-search svg{position:absolute;left:12px;width:17px;height:17px;color:var(--muted);pointer-events:none}
.header-search input{width:210px;min-height:40px;padding:0 12px 0 36px;border:1px solid transparent;border-radius:9px;background:var(--soft);font-size:13px}
.header-search input:focus{background:var(--sheet);border-color:var(--line)}
.header-search input::-webkit-search-cancel-button{cursor:pointer}
.icon-button,.avatar-button{position:relative;display:grid;place-items:center;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--ink)}
.icon-button:hover{background:var(--soft)}
.icon-button svg{width:22px;height:22px}
.notice-dot{position:absolute;top:9px;right:10px;width:9px;height:9px;border-radius:50%;background:var(--action);box-shadow:0 0 0 2px var(--paper)}
.avatar{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:linear-gradient(140deg,#ffb27a,#f2541b 55%,#2f6fe0);color:#fff;font-weight:800;font-size:15px;box-shadow:0 0 0 2px var(--sheet),0 0 0 3px var(--line)}
.avatar svg{width:22px;height:22px}
.avatar-button:hover .avatar{box-shadow:0 0 0 2px var(--sheet),0 0 0 3px var(--action)}
.header-pop-wrap{position:relative}
.header-pop{position:absolute;right:0;top:calc(100% + 10px);z-index:30;width:min(340px,calc(100vw - 24px));padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--sheet);box-shadow:var(--xtra-pop);animation:xtra-pop var(--t-quick,.18s) var(--e-out,ease-out)}
@keyframes xtra-pop{from{opacity:0;transform:translateY(-4px)}}
.header-pop h2{margin:0 0 10px;font-size:15px;letter-spacing:-.01em}
.notices-list{display:grid;gap:4px;margin:0;padding:0;list-style:none}
.notice button{display:flex;align-items:flex-start;gap:10px;width:100%;min-height:44px;padding:10px;border:0;border-radius:10px;background:transparent;text-align:left;font-weight:500;font-size:13px;line-height:1.45;color:var(--ink)}
.notice button:hover{background:var(--soft)}
.notice button::before{content:"";flex:none;width:8px;height:8px;margin-top:5px;border-radius:50%;background:var(--you)}
.notice-ok button::before{background:var(--ok)}.notice-warn button::before{background:#e8a317}
.notice.is-new button{font-weight:700}
.notice-empty{padding:10px;font-size:13px}
.account-menu-who{margin:0 0 12px;font-size:13px;color:var(--muted);overflow-wrap:anywhere}
.account-menu .account-tools{display:flex;flex-wrap:wrap;gap:8px;margin:0}
.account-menu .account-tools button{flex:1 1 auto;min-height:40px}
.account-menu .account-tools .theme-toggle{flex:0 0 44px}
.account-menu-links{display:grid;margin-top:12px;padding-top:8px;border-top:1px solid var(--line)}
.account-menu-links a{display:flex;align-items:center;min-height:40px;padding:0 6px;border-radius:8px;font-size:14px;font-weight:600;text-decoration:none;color:var(--ink)}
.account-menu-links a:hover{background:var(--soft);color:var(--action-ink)}

/* ---------- Inicio: hero ---------- */
#landingView .trainer-hero{grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:16px;min-height:540px;padding-block:52px 28px}
#landingView .hero-copy{gap:22px}
#landingView .hero-eyebrow{font-size:11px;letter-spacing:.2em;color:var(--muted)}
#landingView .hero-copy h1{font-size:clamp(50px,5.4vw,84px);font-weight:850;line-height:1;letter-spacing:-.04em;max-width:9.5ch}
#landingView .hero-copy h1 span{color:var(--action)}
#landingView .heading-note{max-width:44ch;font-size:16px;line-height:1.6;color:var(--muted);margin:0}
#landingView .hero-actions{gap:12px}
#landingView .hero-actions>a{gap:14px;min-height:50px;padding:12px 24px;border-radius:7px;font-size:15px}
#landingView .hero-actions>a svg{width:18px;height:18px}
#landingView .hero-secondary{border:1.5px solid var(--ink);background:transparent;color:var(--ink)}
#landingView .hero-secondary:hover{background:var(--ink);color:var(--paper)}
#landingView .hero-learn{font-size:13px}
#landingView .hero-collection::before{inset:-18% -14% -6% -6%;border-radius:0;background:url(hero-splash.svg) center/contain no-repeat;filter:none;opacity:1;transform:none}
:root[data-theme=dark] #landingView .hero-collection::before{opacity:.55}
#landingView .collection-fan{height:420px;max-width:600px}
#landingView .collection-card{width:clamp(150px,15.5vw,236px);border-radius:12px;box-shadow:0 22px 40px #17181c38}
#landingView .collection-card:nth-child(1){transform:translate(calc(-50% - 62%),calc(-50% + 4%)) rotate(-11deg)}
#landingView .collection-card:nth-child(2){transform:translate(-50%,calc(-50% - 9%)) rotate(1deg)}
#landingView .collection-card:nth-child(3){transform:translate(calc(-50% + 60%),calc(-50% + 2%)) rotate(10deg)}

/* Cuatro accesos con icono */
#landingView .product-paths{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;padding-block:8px 36px!important}
#landingView .product-paths>a{gap:14px;padding:6px 0;border:0!important;background:transparent}
#landingView .product-paths>a>span:last-child{margin-left:0;color:inherit;font-size:inherit}
#landingView .product-paths>a:hover strong{color:var(--action-ink)}
#landingView{overflow-x:clip}
.path-icon{display:grid;place-items:center;flex:none;width:44px;height:44px;border:1px solid var(--line);border-radius:10px;background:var(--sheet);color:var(--ink)}
.path-icon svg{width:22px;height:22px}
#landingView .product-paths strong{font-size:13px;font-weight:600}
#landingView .product-paths small{margin-top:0;font-size:13px;color:var(--muted)}

/* ---------- Tarjetas de mazo (recientes y Mis mazos) ---------- */
.recent-decks{padding-block:8px 48px}
.recent-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:16px}
.recent-head h2{margin:0;font-size:22px;letter-spacing:-.03em}
.see-all{display:inline-flex;align-items:center;min-height:24px;font-size:13px;font-weight:700;color:var(--you);text-decoration:none}
.see-all:hover{text-decoration:underline}
.deck-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:0;padding:0;list-style:none}
.deck-tile{position:relative;min-width:0}
.deck-tile-main{display:flex;align-items:center;gap:14px;width:100%;min-height:92px;padding:12px 40px 12px 12px;border:1px solid var(--line);border-radius:var(--radius,10px);background:var(--sheet);box-shadow:var(--shadow-1);text-align:left;font-weight:400;color:var(--ink);transition:border-color .16s,box-shadow .16s,transform .16s}
.deck-tile-main:hover{border-color:#d8cfc0;box-shadow:var(--shadow-2);transform:translateY(-1px)}
.deck-tile.is-open .deck-tile-main{border:1.5px solid var(--action);box-shadow:0 0 0 3px color-mix(in srgb,var(--action) 12%,transparent)}
.deck-tile-art{flex:none;width:64px;height:64px;overflow:hidden;border-radius:8px;background:var(--soft)}
.deck-tile-art img{width:100%;height:100%;object-fit:cover;object-position:50% 22%;transform:scale(1.55)}
.deck-tile-empty{display:block;width:100%;height:100%;background:repeating-linear-gradient(135deg,var(--soft) 0 6px,var(--line) 6px 7px)}
.deck-tile-info{display:grid;gap:2px;min-width:0}
.deck-tile-info strong{overflow:hidden;font-size:14px;font-weight:600;white-space:nowrap;text-overflow:ellipsis}
.deck-tile-info small{font-size:12px;color:var(--muted)}
.chip{justify-self:start;margin-top:6px;padding:3px 9px;border-radius:6px;background:var(--soft);font-size:12px;font-weight:600;color:var(--muted)}
.deck-tile-menu{position:absolute;top:8px;right:6px}
.deck-tile-menu summary{display:grid;place-items:center;width:32px;height:32px;border-radius:8px;color:var(--muted);cursor:pointer;list-style:none}
.deck-tile-menu summary::-webkit-details-marker{display:none}
.deck-tile-menu summary:hover,.deck-tile-menu[open] summary{background:var(--soft);color:var(--ink)}
.deck-tile-menu summary svg{width:18px;height:18px}
.deck-tile-pop{position:absolute;right:0;top:36px;z-index:5;display:grid;min-width:180px;padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--sheet);box-shadow:var(--xtra-pop)}
.deck-tile-pop button{justify-content:flex-start;min-height:40px;padding:0 10px;border:0;border-radius:8px;background:transparent;text-align:left;font-weight:600;font-size:13px}
.deck-tile-pop button:hover{background:var(--soft)}
.deck-tile-pop button[data-deck-delete]{color:#c0392b}
.deck-tile-new .deck-tile-main{border-style:dashed;box-shadow:none;background:transparent}
.deck-tile-plus{display:grid;place-items:center;flex:none;width:64px;height:64px;border-radius:8px;background:var(--soft);font-size:28px;font-weight:300;color:var(--action-ink)}

/* ---------- Vistas de Mis mazos y Torneos ---------- */
.library-view{padding-block:28px 56px}
.library-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:12px}
.library-head h1{margin:2px 0 4px;font-size:clamp(40px,4.4vw,60px);font-weight:850;letter-spacing:-.035em;line-height:1}
.library-head .muted{margin:0;font-size:14px}
.library-actions{display:flex;flex-wrap:wrap;gap:10px}
.library-note{margin:0 0 20px;font-size:13px}
.deck-tiles-all{grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}
.tournament-filters{margin:8px 0 18px}
.tournament-filters input{width:min(420px,100%);min-height:44px}
.tournament-list{display:grid;gap:12px;margin:0;padding:0;list-style:none}
.tournament-row{display:grid;grid-template-columns:48px 84px minmax(0,1fr) auto;align-items:start;gap:16px;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--sheet);box-shadow:var(--shadow-1)}
.tournament-rank{align-self:center;font-family:var(--font-mono,monospace);font-size:15px;font-weight:700;color:var(--muted)}
.tournament-art{width:84px;height:84px;overflow:hidden;border-radius:10px;background:var(--soft)}
.tournament-art img{width:100%;height:100%;object-fit:cover;object-position:50% 22%;transform:scale(1.5)}
.tournament-info h3{margin:0 0 4px;font-size:18px;letter-spacing:-.02em}
.tournament-info p{margin:0;font-size:13px}
.tournament-counts{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:8px!important;color:var(--muted)}
.tournament-counts b{color:var(--ink)}
.tournament-list-cards{margin-top:10px}
.tournament-list-cards summary{display:inline-flex;align-items:center;min-height:36px;font-size:13px;font-weight:700;color:var(--you);cursor:pointer}
.tournament-list-cards>div{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:4px 24px;padding-top:8px}
.tournament-list-cards h4{grid-column:1/-1;margin:8px 0 2px;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.tournament-list-cards ul{display:contents;list-style:none}
.tournament-list-cards li{font-size:13px}
.tournament-list-cards a{grid-column:1/-1;margin-top:8px;font-size:13px}
.tournament-actions{display:grid;gap:8px;align-self:center}
.tournament-empty{padding:24px}

/* ---------- Responsivo ---------- */
@media(max-width:1180px){.header-search input{width:160px}.site-header{gap:18px}.section-nav>a{padding-inline:9px}.section-nav>a[aria-current=page]::after{left:9px;right:9px}}
@media(max-width:1000px){
 .header-search{display:none}
 .nav-long{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .deck-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
 #landingView .product-paths{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){#landingView .trainer-hero{grid-template-columns:1fr;min-height:0}.tournament-row{grid-template-columns:40px 64px minmax(0,1fr)}.tournament-art{width:64px;height:64px}.tournament-actions{grid-column:1/-1;grid-template-columns:1fr 1fr}}
/* Táctiles de 44 px y cabecera en dos filas en tabletas (el menú largo ya no queda a media fila). */
@media(max-width:768px){.see-all,.deck-tile-menu summary{min-width:44px;min-height:44px}}
@media(max-width:768px){#workshop.x-editor :is(button,input,select,.x-back){min-height:44px!important}#workshop.x-editor button{min-width:44px!important}}
@media(min-width:651px) and (max-width:900px){:root{--header-offset:118px}.site-header{flex-wrap:wrap;row-gap:0}.section-nav{order:3;flex:1 0 100%}.section-nav>a[aria-current=page]::after{bottom:0}}
@media(max-width:650px){
 .site-header{min-height:60px;gap:8px}
 .brand{font-size:23px}
 .header-tools{gap:2px}
 .avatar{width:34px;height:34px}
 #landingView .trainer-hero{padding-block:24px 8px}
 #landingView .hero-copy h1{font-size:clamp(42px,12vw,58px)}
 #landingView .collection-fan{height:300px}
 #landingView .collection-card{width:clamp(110px,31vw,150px)}
 #landingView .hero-actions{display:grid;grid-template-columns:1fr 1fr}
 #landingView .hero-actions>a{padding-inline:12px;font-size:14px}
 #landingView .product-paths{gap:12px;padding-bottom:24px!important}
 #landingView .product-paths>a{padding:4px 0}
 .deck-tiles{grid-template-columns:1fr}
 .deck-tiles-all{grid-template-columns:1fr}
 .tournament-actions{grid-template-columns:1fr}
 .header-pop{position:fixed;left:12px;right:12px;top:64px;width:auto}
}
@media(prefers-reduced-motion:reduce){.header-pop{animation:none}.deck-tile-main{transition:none}.deck-tile-main:hover{transform:none}}
@media(forced-colors:active){.section-nav>a[aria-current=page]::after,.notice-dot{background:Highlight}.deck-tile.is-open .deck-tile-main{border-color:Highlight}}
/* Mis mazos y Torneos no muestran los atajos ni el cupo de la zona de juego (la cabecera ya los lleva). */
#playView[data-area=myDecks]>.play-shortcuts,#playView[data-area=tournaments]>.play-shortcuts,#playView[data-area=myDecks]>.access-banner,#playView[data-area=tournaments]>.access-banner{display:none}
@media(max-width:650px){
 .tournament-row{position:relative;grid-template-columns:64px minmax(0,1fr);gap:12px;padding:14px}
 .tournament-rank{position:absolute;top:8px;left:8px;z-index:1;padding:2px 6px;border-radius:6px;background:var(--ink);color:var(--paper);font-size:11px}
 .tournament-info h3{font-size:16px}
}

/* ---------- Editor y Colección (xtra.js: setupEditor/decorate) ---------- */
#workshop.x-editor .section-heading,#workshop.x-editor .collection-views,#workshop.x-editor .panelhead,#workshop.x-editor #mix,#workshop.x-editor .deck-legend,
#workshop.x-editor .collection-tools,#workshop.x-editor #deckAlert,#workshop.x-editor .deck-shortcuts,#workshop.x-editor #physicalCollectionStatus,#workshop.x-editor #collectionDashboard,
#workshop.x-editor #analysisTitle,#workshop.x-editor .editor-analysis-content{display:none!important}
#workshop.x-editor .editor-panel{padding:0;border:0;background:transparent;box-shadow:none}
#workshop.x-editor .deckbar{display:block;margin:0;padding:0;border:0;min-height:0}
.x-ed-head{padding-top:18px}
.x-back{display:inline-flex;align-items:center;gap:8px;min-height:32px;font-size:13px;font-weight:600;color:var(--muted);text-decoration:none}
.x-back:hover{color:var(--action-ink)}
.x-back svg{width:16px;height:16px}
.x-ed-titlebar{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:16px 24px;margin-top:6px}
.x-ed-title{display:flex;flex-direction:column;min-width:0}
#workshop.x-editor #workshopTitle{margin:0;font-size:clamp(42px,4.6vw,64px);font-weight:850;letter-spacing:-.035em;line-height:1}
.x-ed-name{display:flex;align-items:center;gap:10px;margin-top:6px}
#workshop.x-editor .deck-name-field{display:block;margin:0;padding:0;border:0;min-width:0}
#workshop.x-editor .deck-name-field>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
#workshop.x-editor #deckname{width:auto;min-width:6ch;max-width:min(62vw,720px);field-sizing:content;min-height:40px;padding:0 4px;margin-left:-4px;border:1px solid transparent;border-radius:8px;background:transparent;font-size:clamp(22px,2.2vw,30px);font-weight:800;letter-spacing:-.03em;color:var(--ink)}
#workshop.x-editor #deckname:hover{border-color:var(--line)}
#workshop.x-editor #deckname:focus{border-color:var(--line);background:var(--sheet)}
.x-pencil{display:grid;place-items:center;color:var(--muted)}.x-pencil svg{width:20px;height:20px}
.x-ed-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding-top:14px}
.x-ed-actions>button{display:inline-flex;align-items:center;gap:10px;min-height:46px;padding:0 20px;border:1px solid var(--line);border-radius:8px;background:var(--sheet);font-size:14px;font-weight:600}
.x-ed-actions>button svg{width:18px;height:18px}
.x-ed-actions>#deckBattle{min-width:220px;justify-content:center;border-color:var(--action);background:var(--action);color:#fff;font-weight:700;box-shadow:0 6px 16px color-mix(in srgb,var(--action) 25%,transparent)}
.x-ed-actions>#deckBattle:hover{background:var(--action-hover);border-color:var(--action-hover)}
.x-ed-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin-top:14px}
.x-ed-meta .chip{margin:0;padding:6px 14px;border:1px solid var(--line);border-radius:8px;background:var(--sheet);font-size:13px;font-weight:500;color:var(--ink)}
.x-desc{flex:1 1 320px;max-width:68ch;margin:0 0 0 8px;font-size:13px;line-height:1.5;color:var(--muted)}
.x-rival{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:14px 0 0;padding:10px 14px;border-radius:10px;background:var(--warn-bg);font-size:14px;font-weight:600}
.x-rival button{min-height:36px;padding:0 12px;font-size:13px}
.x-col-icon{display:none}

/* Pestañas por tipo + buscador */
#workshop.x-editor .editor-workspace{margin-top:24px;gap:28px;align-items:start}
.x-tabs-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 20px;margin-bottom:18px;border-bottom:1px solid var(--line)}
.x-tabs{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none}
.x-tabs button{flex:none;position:relative;display:inline-flex;align-items:center;gap:10px;min-height:48px;padding:0 16px;border:0;border-radius:0;background:transparent;font-size:14px;font-weight:500;color:var(--muted);white-space:nowrap}
.x-tabs button:hover{color:var(--ink);background:transparent}
.x-tabs button[aria-pressed=true]{color:var(--ink);font-weight:700}
.x-tabs button[aria-pressed=true]::after{content:"";position:absolute;left:10px;right:10px;bottom:-1px;height:2.5px;border-radius:2px;background:var(--action)}
.x-tab-n{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:var(--soft);font-size:12px;font-weight:700;color:var(--muted)}
.x-tabs button[aria-pressed=true] .x-tab-n{background:var(--action);color:#fff}
.x-tools{display:flex;align-items:center;gap:10px;padding-bottom:8px}
#workshop.x-editor .deck-find{display:flex;gap:8px;margin:0}
#workshop.x-editor #deckCategory{display:none}
#workshop.x-editor #deckFilter{width:220px;min-height:40px;font-size:13px}
#workshop.x-editor #searchOpen{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 14px;border:1px solid var(--line);border-radius:8px;background:var(--sheet);font-size:13px;font-weight:600;white-space:nowrap}
#workshop.x-editor #searchOpen svg{width:16px;height:16px}
.x-order{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.x-order select{min-height:40px;font-size:13px}
#workshop.x-editor .energy-quick-wrap{display:none;margin:0 0 16px}
#workshop.x-editor[data-xcat=Energy][data-xview=editor] .energy-quick-wrap{display:block}

/* Cartas: la carta entera con el contador encima, sin marco ni título */
#workshop.x-editor .decklist[data-layout=gallery]{grid-template-columns:repeat(auto-fill,minmax(min(100%,190px),1fr));gap:22px 18px}
#workshop.x-editor .decklist[data-layout=gallery] .grouphead{display:none}
#workshop.x-editor .decklist[data-layout=gallery] .cardrow{position:relative;padding:0;border:0;border-radius:12px;background:transparent;box-shadow:none}
#workshop.x-editor .decklist[data-layout=gallery] .cardrow:hover{box-shadow:none}
#workshop.x-editor .decklist[data-layout=gallery] .card-preview{display:block;padding:0;border-radius:12px;box-shadow:0 0 0 3px #ffd84d66,0 10px 24px #17181c1f}
#workshop.x-editor .decklist[data-layout=gallery] .card-preview::after{display:none}
#workshop.x-editor .decklist[data-layout=gallery] .cardtitle,#workshop.x-editor .decklist[data-layout=gallery] .reg{position:absolute;width:1px;height:1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);min-height:0}
#workshop.x-editor .decklist[data-layout=gallery] .quantity{position:absolute;left:50%;bottom:12px;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:6px;width:min(82%,170px);margin:0;padding:4px;border:0;border-radius:999px;background:#fff;box-shadow:0 4px 14px #17181c33;transform:translateX(-50%)}
#workshop.x-editor .decklist[data-layout=gallery] .quantity button{display:grid;place-items:center;width:38px;min-width:38px;height:38px;min-height:38px;padding:0;border:0;border-radius:50%;background:transparent;font-size:20px;font-weight:500;color:#17181c}
#workshop.x-editor .decklist[data-layout=gallery] .quantity button:hover:not(:disabled){background:#f1ede5}
#workshop.x-editor .decklist[data-layout=gallery] .quantity button:disabled{border:0;opacity:.35;background:transparent}
#workshop.x-editor .decklist[data-layout=gallery] .quantity span{font-size:18px;font-weight:700;color:#17181c;font-variant-numeric:tabular-nums}
#workshop.x-editor .decklist[data-layout=gallery] .over-chip{top:10px;left:10px}

/* Lateral: resumen y consejos */
#workshop.x-editor #deckDiagnostics{position:sticky;top:calc(var(--header-offset,80px) + 8px);padding:0;border:0;background:transparent;box-shadow:none}
.x-side{display:grid;gap:18px}
.x-card{padding:22px 24px;border:1px solid var(--line);border-radius:14px;background:var(--sheet);box-shadow:var(--shadow-1)}
.x-big{display:flex;align-items:baseline;gap:8px;margin:0}
.x-big strong{font-size:44px;font-weight:800;letter-spacing:-.04em;line-height:1}
.x-big span{font-size:30px;font-weight:700;letter-spacing:-.03em}
.x-big small{margin-left:8px;font-size:14px;color:var(--muted)}
.x-meter{height:10px;margin:14px 0 22px;overflow:hidden;border-radius:999px;background:var(--soft)}
.x-meter i{display:block;height:100%;border-radius:inherit;background:#f0a33a;transition:width .3s var(--e-out,ease-out)}
.x-meter.is-ok i{background:linear-gradient(90deg,#2c9a5a,#4cc47e)}
.x-meter.is-over i{background:#d64535}
.x-pct{display:grid;margin:0 0 18px}
.x-pct strong{font-size:34px;font-weight:800;letter-spacing:-.03em;line-height:1.1}
.x-pct span{font-size:14px;color:var(--muted)}
.x-bars{display:grid;gap:12px;margin:0;padding:0;list-style:none}
.x-bars li{display:grid;grid-template-columns:110px 1fr 28px;align-items:center;gap:12px;font-size:14px}
.x-bars b{text-align:right;font-variant-numeric:tabular-nums}
.x-bar{height:10px;overflow:hidden;border-radius:999px;background:var(--soft)}
.x-bar i{display:block;height:100%;border-radius:inherit}
.x-bar.pk i{background:#f2741b}.x-bar.tr i{background:#2f6fe0}.x-bar.en i{background:#e5484d}
.x-tips h3{display:flex;align-items:center;gap:10px;margin:0 0 6px;font-size:16px;letter-spacing:-.01em}
.x-tips h3 svg{width:20px;height:20px;color:var(--action)}
.x-tips ul{display:grid;margin:0;padding:0;list-style:none}
.x-tip{display:grid;grid-template-columns:34px 1fr;gap:12px;padding:14px 0;border-top:1px solid var(--line)}
.x-tip:first-child{border-top:0}
.x-tip-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;color:#fff}
.x-tip-icon svg{width:20px;height:20px}
.x-tip-ok .x-tip-icon{background:#2c9a5a}.x-tip-info .x-tip-icon{background:#2f6fe0}.x-tip-warn .x-tip-icon{background:transparent;color:#f0a020}
.x-tip-warn .x-tip-icon svg{width:30px;height:30px;fill:#f6b01e;stroke:#fff}
.x-tip strong{display:block;font-size:14px}
.x-tip small{display:block;margin-top:2px;font-size:13px;line-height:1.45;color:var(--muted)}

/* Colección */
#workshop.x-editor[data-xview=collection] :is(.x-back,.x-ed-name,.x-ed-meta,.x-ed-actions,#searchOpen,#deckDiagnostics){display:none!important}
#workshop.x-editor[data-xview=collection] .x-ed-title{flex-direction:row;align-items:center;gap:14px}
#workshop.x-editor[data-xview=collection] .x-col-icon{display:grid;place-items:center;color:var(--ink)}
#workshop.x-editor[data-xview=collection] .x-col-icon svg{width:44px;height:44px;stroke-width:2.2}
#workshop.x-editor[data-xview=collection] #workshopTitle{font-size:clamp(36px,3.6vw,52px)}
#workshop.x-editor[data-xview=collection] .x-ed-head{padding-top:28px}
#workshop.x-editor[data-xview=collection] .editor-workspace{grid-template-columns:minmax(0,1fr)}
#workshop.x-editor[data-xview=collection] .decklist[data-layout=gallery]{grid-template-columns:repeat(auto-fill,minmax(min(100%,170px),1fr));gap:14px}
#workshop.x-editor[data-xview=collection] .decklist[data-layout=gallery] .cardrow{padding:0 0 10px;border:1px solid var(--line);border-radius:12px;background:var(--sheet);box-shadow:var(--shadow-1);overflow:hidden}
#workshop.x-editor[data-xview=collection] .decklist[data-layout=gallery] .card-preview{margin:0 10px;border-radius:8px;box-shadow:0 0 0 2px #ffd84d55}
#workshop.x-editor[data-xview=collection] .decklist[data-layout=gallery] .quantity{bottom:44px;width:min(76%,140px)}
#workshop.x-editor[data-xview=collection] .decklist[data-layout=gallery] .quantity button{width:32px;min-width:32px;height:32px;min-height:32px;font-size:18px}
#workshop.x-editor[data-xview=collection] .physical-needed{display:none}
.x-own{display:block;margin-bottom:8px;padding:7px 10px;font-size:13px;font-weight:700;text-align:center}
.x-own.ok{background:#e9f6ee;color:#1f7a45}.x-own.miss{background:#fde8e4;color:#b0331b}
.x-foot{display:flex;justify-content:space-between;align-items:center;margin:10px 12px 0;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.x-foot b{font-size:13px;color:var(--ink)}
.x-progress{margin-top:28px;padding:20px 24px;border:1px solid var(--line);border-radius:14px;background:var(--sheet);box-shadow:var(--shadow-1)}
.x-progress h2{margin:0 0 14px;font-size:15px;letter-spacing:-.01em}
.x-progress-body{display:grid;grid-template-columns:56px minmax(140px,220px) 1fr auto auto;align-items:center;gap:18px}
.x-progress-art{width:56px;height:56px;overflow:hidden;border-radius:8px;background:var(--soft)}
.x-progress-art img{width:100%;height:100%;object-fit:cover;object-position:50% 22%;transform:scale(1.5)}
.x-progress-name strong{display:block;font-size:15px}.x-progress-name small{font-size:12px;color:var(--muted)}
.x-progress-bar{display:flex;height:12px;overflow:hidden;border-radius:999px;background:var(--soft)}
.x-progress-bar .have{background:#2c9a5a}.x-progress-bar .miss{background:#ee6b4f}
.x-progress-n{font-size:16px;font-variant-numeric:tabular-nums}
.x-progress-body button{min-height:40px;padding:0 16px;font-size:13px}
.x-progress-legend{display:flex;flex-wrap:wrap;gap:6px 22px;margin:12px 0 0 calc(56px + 18px + 240px);font-size:12px;color:var(--muted)}
.x-progress-legend .have::before,.x-progress-legend .miss::before{content:"";display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:50%;background:#2c9a5a}
.x-progress-legend .miss::before{background:#ee6b4f}

@media(max-width:1100px){#workshop.x-editor .editor-workspace{grid-template-columns:minmax(0,1fr) 300px}.x-ed-actions>#deckBattle{min-width:0}}
@media(max-width:900px){#workshop.x-editor .editor-workspace{grid-template-columns:minmax(0,1fr)}#workshop.x-editor #deckDiagnostics{position:static}.x-side{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}.x-progress-body{grid-template-columns:56px 1fr auto}.x-progress-bar{grid-column:1/-1;order:3}.x-progress-legend{margin-left:0}}
@media(max-width:650px){
 .x-ed-head{padding-top:6px}.x-back{display:none}
 .x-ed-titlebar{flex-wrap:nowrap;gap:8px}
 #workshop.x-editor #workshopTitle{font-size:34px}
 #workshop.x-editor #deckname{font-size:20px;max-width:70vw}
 .x-ed-actions{flex-wrap:nowrap;gap:4px;padding-top:0}
 .x-ed-actions>button:not(#deckBattle){display:none}
 .x-ed-actions>#deckBattle{position:fixed;right:16px;bottom:calc(var(--tabbar-h,64px) + 14px);z-index:11;min-height:48px;padding:0 18px;border-radius:999px}
 .x-desc{flex-basis:100%;margin:2px 0 0}
 .x-ed-meta{gap:6px}.x-ed-meta .chip{padding:4px 10px;font-size:12px}
 .x-tabs-row{gap:4px}
 .x-tabs button{min-height:44px;padding:0 10px;font-size:13px;gap:6px}
 .x-tools{flex:1 1 100%;padding-bottom:10px}
 #workshop.x-editor .deck-find{flex:1}#workshop.x-editor #deckFilter{width:100%}
 #workshop.x-editor .decklist[data-layout=gallery]{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px}
 #workshop.x-editor .decklist[data-layout=gallery] .quantity{bottom:8px;width:88%;padding:2px}
 #workshop.x-editor .decklist[data-layout=gallery] .quantity button{width:34px;min-width:34px;height:34px;min-height:34px}
 #workshop.x-editor[data-xview=collection] .decklist[data-layout=gallery]{grid-template-columns:repeat(2,minmax(0,1fr))}
 #workshop.x-editor[data-xview=collection] .x-col-icon svg{width:32px;height:32px}
 .x-order{flex:1 1 100%}
 .x-progress{padding:16px}.x-progress-body{gap:12px}
}
@media(prefers-reduced-motion:reduce){.x-meter i{transition:none}}
@media(forced-colors:active){.x-tabs button[aria-pressed=true]::after{background:Highlight}.x-card,.x-progress{border-color:CanvasText}}

/* ---------- Barra de mazos del editor y la colección (29-10-2026) ----------
   «Mazo abierto ▾» despliega la biblioteca (Mis mazos) para cambiar de mazo sin salir de la vista; al lado, el estado de guardado,
   «Guardar como mazo nuevo» (variante sin tocar el original) y «Mazo vacío». */
.x-ed-top{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px}
.x-deckbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;flex:1 1 auto}
.x-deckbar[hidden]{display:none}
.x-deckpick{position:relative}
.x-deckpick-btn{display:inline-flex;align-items:center;gap:10px;min-height:46px;max-width:min(420px,78vw);padding:5px 12px 5px 6px;border:1px solid var(--line);border-radius:12px;background:var(--sheet);color:var(--ink);text-align:left;cursor:pointer}
.x-deckpick-btn:hover,.x-deckpick-btn[aria-expanded=true]{border-color:var(--action);box-shadow:var(--xtra-pop)}
.x-deckpick-art{display:block;flex:none;width:34px;height:34px;overflow:hidden;border-radius:8px;background:var(--soft)}
.x-deckpick-art img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 22%}
.x-deckpick-txt{display:grid;min-width:0;line-height:1.2}
.x-deckpick-txt small{font-size:12px;font-weight:600;color:var(--muted)}
.x-deckpick-txt strong{overflow:hidden;font-size:15px;white-space:nowrap;text-overflow:ellipsis}
.x-deckpick-chev{flex:none;width:18px;height:18px;color:var(--muted);transition:transform .15s}
.x-deckpick-btn[aria-expanded=true] .x-deckpick-chev{transform:rotate(180deg)}
.x-deckbar-btn{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:6px 12px;border:1px solid var(--line);border-radius:10px;background:var(--sheet);color:var(--ink);font-size:13px;font-weight:600}
.x-deckbar-btn svg{width:16px;height:16px}
.x-deckbar-btn:hover:not(:disabled){border-color:var(--action);color:var(--action-ink)}
.x-save-state{font-size:12px;color:var(--muted)}
.x-save-state[data-state=ok]{color:#1f7a44}
.x-save-state[data-state=error]{color:var(--action-ink)}
.x-deckmenu{position:absolute;left:0;top:calc(100% + 8px);z-index:30;display:grid;gap:10px;width:min(440px,calc(100vw - 32px));max-height:min(70vh,560px);padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--sheet);box-shadow:var(--xtra-pop)}
.x-deckmenu[hidden]{display:none}
.x-deckmenu-head{display:flex;align-items:baseline;justify-content:space-between;margin:0 4px}
.x-deckmenu-head small{font-size:12px;color:var(--muted)}
.x-deckmenu-list{display:grid;gap:4px;min-height:0;margin:0;padding:0;overflow:auto;list-style:none}
.x-deckmenu-list li{display:flex;align-items:center;gap:6px;border-radius:10px}
.x-deckmenu-list li.is-open{background:var(--soft)}
.x-deckmenu-item{display:flex;flex:1 1 auto;align-items:center;gap:10px;min-width:0;min-height:52px;padding:6px 8px;border:0;border-radius:10px;background:none;color:var(--ink);text-align:left;cursor:pointer}
.x-deckmenu-item:hover{background:var(--soft)}
.x-deckmenu-art{flex:none;width:40px;height:40px;overflow:hidden;border-radius:8px;background:var(--soft)}
.x-deckmenu-art img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 22%}
.x-deckmenu-info{display:grid;min-width:0;line-height:1.25}
.x-deckmenu-info strong{overflow:hidden;font-size:14px;white-space:nowrap;text-overflow:ellipsis}
.x-deckmenu-info small{font-size:12px;color:var(--muted)}
.x-deckmenu-item em{margin-left:auto;padding:2px 8px;border-radius:999px;background:var(--action);color:var(--sheet);font-size:11px;font-style:normal;font-weight:700}
.x-deckmenu-empty{padding:12px;font-size:13px;color:var(--muted)}
.x-deckmenu-all{justify-self:start;margin:0 4px;font-size:13px;font-weight:600;color:var(--action-ink)}
#workshop.x-editor[data-xview=collection] .x-ed-top{margin-bottom:6px}
@media(max-width:700px){.x-ed-top{gap:8px}.x-deckbar-btn span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.x-deckbar-btn{padding:6px 10px}.x-save-state{flex:1 1 100%}}

/* ---------- Editor: herramientas junto a «Añadir carta» y ficha junto a «Importar» (29-10-2026) ----------
   Deshacer, Rehacer y Vaciar mazo pasan del menú «⋯» a la fila de pestañas, como botones de icono; «Ficha de torneo» va a la izquierda
   de «Importar». «Ver una mano inicial» y «Mostrar guía» no se muestran en este diseño. */
#workshop.x-editor :is(#deckPractice,#editorGuideShow){display:none!important}
.x-edit-tools{display:flex;align-items:center;gap:6px;padding-left:10px;border-left:1px solid var(--line)}
#workshop.x-editor .x-edit-tools>button{display:grid;place-items:center;width:40px;height:40px;min-height:40px;padding:0;border:1px solid var(--line);border-radius:8px;background:var(--sheet);color:var(--ink)}
#workshop.x-editor .x-edit-tools>button svg{width:18px;height:18px}
#workshop.x-editor .x-edit-tools>button:hover:not(:disabled){border-color:var(--ink)}
#workshop.x-editor .x-edit-tools>#clearDeck:hover:not(:disabled){border-color:var(--action);color:var(--action-ink)}
#workshop.x-editor .x-edit-tools>button:disabled{opacity:.4;cursor:not-allowed}
#workshop.x-editor[data-xview=collection] .x-edit-tools{display:none!important}
@media(max-width:650px){
 .x-tools{flex-wrap:wrap}
 .x-ed-actions>button#pdfButton{display:inline-flex;justify-content:center;width:46px;min-height:46px;padding:0}
 .x-ed-actions>#pdfButton span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
}

/* ---------- Editor sin menú «⋯» (29-10-2026) ----------
   Mi mazo ↔ Rival es un interruptor junto al título y Galería / Lista son dos botones de icono a la derecha de «Buscar cartas». */
.x-ed-h1{display:flex;flex-wrap:wrap;align-items:center;gap:10px 22px;min-width:0}
/* El título mide siempre lo que «Mazo rival»: al cambiar de mazo el interruptor no se desplaza bajo el puntero. */
#workshop.x-editor:not([data-xview=collection]) #workshopTitle{display:grid}
#workshop.x-editor:not([data-xview=collection]) #workshopTitle::after{content:"Mazo rival";height:0;overflow:hidden;visibility:hidden}
#workshop.x-editor .x-side-switch{display:inline-flex;flex:none;align-items:center;gap:10px;min-height:44px;padding:0 16px 0 8px;border:1px solid var(--line);border-radius:999px;background:var(--sheet);font-size:14px;font-weight:600;color:var(--muted);cursor:pointer}
#workshop.x-editor .x-side-switch:hover{border-color:var(--ink);background:var(--sheet);color:var(--ink)}
.x-sw-track{position:relative;flex:none;width:44px;height:26px;border-radius:999px;background:color-mix(in srgb,var(--muted) 45%,var(--line));transition:background-color .18s ease}
.x-sw-thumb{position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgb(0 0 0 / .3);transition:transform .18s ease}
#workshop.x-editor .x-side-switch[aria-checked=true]{border-color:var(--action);color:var(--ink)}
.x-side-switch[aria-checked=true] .x-sw-track{background:var(--action)}
.x-side-switch[aria-checked=true] .x-sw-thumb{transform:translateX(18px)}
#workshop.x-editor[data-xview=collection] .x-side-switch{display:none}
/* El lápiz sigue pegado al nombre aunque la fila del título (con el interruptor) sea más ancha. */
#workshop.x-editor .x-ed-name .deck-name-field{flex:0 1 auto;min-width:0}
@media(prefers-reduced-motion:reduce){.x-sw-track,.x-sw-thumb{transition:none}}
@media(forced-colors:active){.x-sw-track{border:1px solid CanvasText}.x-sw-thumb{background:CanvasText}.x-side-switch[aria-checked=true] .x-sw-track{background:Highlight}}
#workshop.x-editor .x-tools .layout-switch{display:inline-flex;flex:none;gap:2px;margin:0;padding:3px;border:1px solid var(--line);border-radius:8px;background:var(--soft);overflow:visible}
#workshop.x-editor .x-tools .layout-switch button{display:grid;place-items:center;flex:none;width:34px;height:32px;min-height:32px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--muted)}
#workshop.x-editor .x-tools .layout-switch button svg{width:18px;height:18px}
#workshop.x-editor .x-tools .layout-switch button:hover{background:transparent;color:var(--ink)}
#workshop.x-editor .x-tools .layout-switch button[aria-pressed=true],#workshop.x-editor .x-tools .layout-switch button[aria-pressed=true]:hover{background:var(--sheet);color:var(--ink);box-shadow:0 1px 2px rgb(0 0 0 / .14)}
#workshop.x-editor[data-xview=collection] .x-tools .layout-switch{display:none}
@media(max-width:650px){
 .x-ed-h1{gap:8px 12px}
 #workshop.x-editor .x-side-switch{min-height:40px;padding:0 12px 0 6px;font-size:13px}
 #workshop.x-editor .x-tools .deck-find{flex:1 1 100%}
 #workshop.x-editor .x-tools .layout-switch button{width:40px;height:36px;min-height:36px}
}

/* ---------- Mis mazos: eliminar con confirmación e imagen del mazo (29-10-2026) ---------- */
.deck-tile-pop:has(.deck-tile-confirm){width:240px}
.deck-tile-confirm{margin:4px 6px 8px;font-size:13px;line-height:1.45;color:var(--ink);overflow-wrap:anywhere}
.deck-tile-pop .deck-tile-danger{justify-content:center;background:#c0392b;color:#fff}
.deck-tile-pop .deck-tile-danger:hover{background:#a93226}
.deck-tile-pop button[data-deck-delete-no]{justify-content:center}
.x-deckmenu-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin:0 4px}
.x-deckmenu-foot .x-deckmenu-all{margin:0}
.x-deckmenu-cover{min-height:36px;padding:0 12px;border:1px solid var(--line);border-radius:8px;background:var(--sheet);font-size:13px;font-weight:600}
.x-deckmenu-cover:hover:not(:disabled){border-color:var(--ink)}
.x-cover-dialog{width:min(760px,calc(100vw - 24px));border-radius:14px}
.x-cover-hint{margin:0 0 16px;font-size:14px;line-height:1.5;color:var(--muted)}
.x-cover-hint b{color:var(--ink)}
.x-cover-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:12px;margin:0;padding:0;list-style:none}
.x-cover-pick{position:relative;display:grid;align-content:start;gap:8px;width:100%;height:100%;min-height:0;padding:6px 6px 10px;border:1.5px solid var(--line);border-radius:12px;background:var(--sheet);font-size:12px;font-weight:600;line-height:1.25;text-align:center;color:var(--ink)}
.x-cover-pick:hover{border-color:var(--ink);background:var(--sheet)}
.x-cover-art{display:block;aspect-ratio:1;overflow:hidden;border-radius:8px;background:var(--soft)}
.x-cover-art img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 22%;transform:scale(1.55)}
.x-cover-name{overflow-wrap:anywhere}
.x-cover-pick[aria-pressed=true]{border-color:var(--action);box-shadow:0 0 0 3px color-mix(in srgb,var(--action) 18%,transparent)}
.x-cover-pick[aria-pressed=true]::after{content:"✓";position:absolute;top:12px;right:12px;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--action);color:#fff;font-size:14px;font-weight:800}
.x-cover-empty{grid-column:1/-1;font-size:14px;color:var(--muted)}
.x-cover-actions{display:flex;justify-content:flex-end;margin-top:18px}
.x-cover-actions button{min-height:42px;padding:0 16px;border:1px solid var(--line);border-radius:8px;background:var(--sheet);font-size:13px;font-weight:600}
@media(max-width:650px){.x-cover-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}}
/* Miniaturas del mazo: el mismo recorte en todas (tarjeta, selector del editor y diálogo), solo la ilustración de la carta, sin el texto de ataques. */
:is(.deck-tile-art,.x-deckpick-art,.x-deckmenu-art,.x-cover-art) img{object-position:50% 0;transform:scale(1.8);transform-origin:50% 34.5%}

/* ---------- Mazo rival: nombre fijo y selector de mazos del ranking junto al nombre (29-10-2026) ---------- */
#workshop.x-editor[data-xside=rival] .x-pencil{display:none}
#workshop.x-editor #deckname[readonly]{cursor:default}
#workshop.x-editor #deckname[readonly]:hover,#workshop.x-editor #deckname[readonly]:focus{border-color:transparent;background:transparent}
.x-rivalpick{position:relative;flex:none}
.x-rivalpick[hidden]{display:none}
.x-rivalpick-btn{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 12px;border:1px solid var(--line);border-radius:10px;background:var(--sheet);color:var(--ink);font-size:13px;font-weight:600;white-space:nowrap}
.x-rivalpick-btn>svg{width:16px;height:16px}
.x-rivalpick-btn:hover{border-color:var(--action);background:var(--sheet);color:var(--action-ink)}
.x-rivalpick-btn[aria-expanded=true] .x-deckpick-chev{transform:rotate(180deg)}
.x-rivalmenu .x-rivalmenu-filter{width:100%;min-height:40px;font-size:13px}
.x-rival-rank{flex:none;min-width:30px;font-size:12px;font-weight:700;color:var(--muted);text-align:right}
@media(max-width:650px){#workshop.x-editor[data-xside=rival] .x-ed-name{flex-wrap:wrap}.x-rivalpick{flex-basis:100%}}
/* Menús de mazos largos (biblioteca y ranking): la lista se desplaza dentro del menú en vez de salirse de él. */
.x-deckmenu:not([hidden]){display:flex;flex-direction:column}
.x-deckmenu>*{flex:none}
.x-deckmenu>.x-deckmenu-list{flex:1 1 auto;min-height:0}
@media(max-width:650px){.x-deckmenu{max-height:min(60vh,520px)}}
/* Colección: la carta ocupa el ancho de su tarjeta menos el margen de 10 px a cada lado (con ancho 100 % más el margen se salía por la derecha y se recortaba). */
#workshop.x-editor[data-xview=collection] .decklist[data-layout=gallery] .card-preview{width:calc(100% - 20px)}

/* ---------- Inicio · Planes: propuesta sobre el fondo azul noche (29-10-2026) ----------
   Mismo marcado y textos; solo presentación. Panel redondeado con brillos suaves detrás de cada plan; las tres tarjetas comparten
   estructura (etiqueta, nombre, precio, lista con marcas, botón al pie) y el acabado de cada plan pasa al borde y al nombre:
   Gratuita en azul acero, Base en lámina dorada y Competitivo holográfico. «Recomendado» cuelga del borde superior como una pestaña. */
#landingView .plans-band{--pl-text:#eef3fb;--pl-muted:#a3b3cb;--pl-dim:#8394ae;--pl-line:#ffffff17;position:relative;isolation:isolate;overflow:hidden;gap:32px;padding-block:clamp(56px,6vw,96px) clamp(44px,5vw,72px);border:0;border-block:1px solid #22344f;
  background:#0e1828}
#landingView .plans-band .plans-head{align-items:center;gap:14px 24px}
#landingView .plans-band .plans-head h2{margin:0;font-size:clamp(34px,4vw,52px);font-weight:850;letter-spacing:-.04em;line-height:1}
#landingView .plans-band .plans-head p{padding:8px 14px;border:1px solid #ffffff1f;border-radius:999px;background:#ffffff0a;font-size:13px;color:var(--pl-muted)}
#landingView .plans-band .plans-grid{gap:20px}
/* Tarjeta común */
#landingView .plans-band .plan-card{gap:12px;padding:38px 28px 26px;border-radius:20px;color:var(--pl-text);box-shadow:0 30px 60px -36px #000c}
#landingView .plans-band .plans-grid>.plan-card:first-child{border:1.5px solid #2c4366;background:linear-gradient(180deg,#16253f,#111c31)}
#landingView .plans-band .plans-grid>.plan-card:first-child:hover{border-color:#43618d}
#landingView .plans-band .plan-card.featured{padding:38px 28px 26px}
#landingView .plans-band .plan-card.featured>*{margin-inline:0}
#landingView .plans-band .plan-card .eyebrow{margin:0;font-size:11px;font-weight:800;letter-spacing:.14em;color:#8fb2e8}
#landingView .plans-band .plan-card h3{margin:0;font:900 30px/1.05 var(--font-display);letter-spacing:-.01em;text-transform:uppercase;color:#fff}
#landingView .plans-band .plan-card p.plan-price{display:flex;align-items:baseline;gap:6px;margin:6px 0 0;font:850 46px/1 var(--font-display);letter-spacing:-.04em;color:#fff}
#landingView .plans-band .plan-price span{font:600 14px/1 var(--font-body);letter-spacing:0;color:var(--pl-muted)}
#landingView .plans-band .plan-local{margin:0;font-size:13px;line-height:20px;color:var(--pl-muted)}
/* Sin equivalente en moneda local, Gratuita deja el mismo hueco para que las listas empiecen a la misma altura. */
@media(min-width:900px){#landingView .plans-band .plans-grid:has(.plan-local:not([hidden])) .plan-card:not(:has(.plan-local:not([hidden]))) p.plan-price{margin-bottom:32px}}
#landingView .plans-band .plan-card ul{display:grid;gap:10px;margin:8px 0 6px;padding:18px 0 0;border-top:1px solid var(--pl-line);list-style:none;font-size:14.5px;line-height:1.5}
#landingView .plans-band .plans-grid>.plan-card li{display:flex;gap:10px;align-items:flex-start;color:#dfe7f3}
#landingView .plans-band .plan-card li::before{content:"";flex:none;width:18px;height:18px;margin-top:2px;border-radius:50%;background:#8fb2e8;-webkit-mask:var(--pl-check) center/contain no-repeat;mask:var(--pl-check) center/contain no-repeat}
#landingView .plans-band{--pl-check:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 1a11 11 0 1 0 0 22 11 11 0 0 0 0-22Zm5.2 8.2-6 6.3a1 1 0 0 1-1.4 0l-3-3a1 1 0 1 1 1.4-1.4l2.3 2.2 5.3-5.5a1 1 0 0 1 1.4 1.4Z'/%3E%3C/svg%3E")}
/* Pie común: botón y una nota breve debajo (la de Gratuita pasa también bajo su botón), con la misma altura para alinear los botones. */
#landingView .plans-band .plan-card .plan-action{margin:auto 0 0;width:100%;min-height:50px;border:0;border-radius:12px;font-size:15px;font-weight:700}
#landingView .plans-band .plan-card .plan-note{order:1;min-height:calc(3 * 1.5em);margin:0;font-size:12px;line-height:1.5;color:var(--pl-dim)}
#landingView .plans-band .plan-card .plan-note a{color:var(--pl-muted);text-underline-offset:2px}
#landingView .plans-band .plans-grid>.plan-card:first-child .plan-action{background:#f2f5fb;color:#0f1a2c}
#landingView .plans-band .plans-grid>.plan-card:first-child .plan-action:hover{background:#fff;color:#0f1a2c}
#landingView .plans-band .plan-card .plan-action.soon:disabled{min-height:50px;border:1px dashed #ffffff3d!important;background:#ffffff0a!important;color:#c3cfe0!important;font-weight:600;cursor:default}
/* Base: lámina dorada en el borde, el nombre y el botón; brillo cálido arriba y el destello que ya recorría la tarjeta. */
#landingView .plans-band .plan-card[data-finish=gold]{border:1.5px solid transparent;background:linear-gradient(180deg,#1c2236,#131a2d) padding-box,linear-gradient(135deg,#f8e08a 0%,#e6b52a 30%,#f9e7a0 52%,#dfa71d 76%,#f5d567 100%) border-box;box-shadow:0 24px 48px -30px #000}
#landingView .plans-band .plan-card[data-finish=gold]::before{inset:0;border:0;border-radius:inherit;background:radial-gradient(130% 70% at 50% -12%,#f5d5672e,transparent 62%)}
#landingView .plans-band .plan-card[data-finish=gold]::after{background:linear-gradient(105deg,transparent 38%,#fff3cc24 50%,transparent 62%)}
#landingView .plans-band .plan-card[data-finish=gold] .eyebrow{color:#f2c14e}
#landingView .plans-band .plan-card[data-finish=gold] h3{color:#f4c95d}
#landingView .plans-band .plan-card[data-finish=gold] li::before{background:#f2c14e}
#landingView .plans-band .plan-card[data-finish=gold] .plan-action:not(:disabled){background:linear-gradient(135deg,#f8e08a,#e6b52a 48%,#f5d567);color:#2b1d00}
/* Competitivo: borde y nombre holográficos, irisado suave solo en la parte alta (sigue el puntero con la inclinación de card3d.js). */
#landingView .plans-band .plan-card[data-finish=holo]{border:1.5px solid transparent;background:linear-gradient(180deg,#1d2142,#141a33) padding-box,linear-gradient(115deg,#ffb8d9,#ffe0a3 16%,#c4f4c0 32%,#b0e1ff 48%,#d6c2ff 64%,#ffb8d9 80%,#ffe0a3) border-box;box-shadow:0 28px 56px -30px #000}
#landingView .plans-band .plan-card[data-finish=holo]::before{opacity:.2;-webkit-mask-image:linear-gradient(180deg,#000,transparent 55%);mask-image:linear-gradient(180deg,#000,transparent 55%)}
#landingView .plans-band .plan-card[data-finish=holo]::after{opacity:.16}
#landingView .plans-band .plan-card[data-finish=holo] .eyebrow{color:#c6b5ff}
#landingView .plans-band .plan-card[data-finish=holo] h3{color:#d9ccff}
#landingView .plans-band .plan-card[data-finish=holo] li::before{background:#c6b5ff}
#landingView .plans-band .plan-card[data-finish=holo] .plan-action:not(:disabled){background:linear-gradient(100deg,#ffc6e2,#d6c2ff 50%,#b9e5ff);color:#1a1440}
#landingView .plans-band .plan-card.featured .plan-badge{position:absolute;z-index:2;top:0;left:50%;margin:0;padding:5px 14px 6px;border-radius:0 0 10px 10px;background:linear-gradient(100deg,#ffc6e2,#d6c2ff 50%,#b9e5ff);color:#1a1440;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;transform:translateX(-50%)}
#landingView .plans-band .plan-rates-note{margin:0;font-size:12px;text-align:center;color:var(--pl-dim)}
#landingView .plans-band #planMessage{margin:0;text-align:center;color:var(--pl-text)}
#landingView .plans-band #planMessage:empty{display:none}
@media(max-width:650px){#landingView .plans-band .plan-card{padding:36px 20px 22px}#landingView .plans-band .plan-card p.plan-price{font-size:40px}}
@media(forced-colors:active){#landingView .plans-band .plan-card li::before{background:CanvasText}}

/* ---------- Inicio a ancho completo y con identidad propia (29-10-2026) ----------
   Ancho: las secciones ocupan toda la pantalla y su contenido se alinea con la cabecera (mismo margen lateral, --page-gutter).
   Sin rasgos de plantilla: titulares en Big Shoulders Display (la letra de cartel de la marca) en vez de Inter en todo; titular de un solo
   color, sin etiqueta «A · B · C» encima; sin mancha de acuarela ni brillos de degradado; sin numeración 1-2-3 ni flechas decorativas;
   Planes con jerarquía (Gratuita sin caja, Competitivo destacado) y llamada final sobre el tapete de juego real. El fondo animado son
   los símbolos de Energía del juego (xtra.js, energyField), no partículas genéricas. */
#landingView>section{max-width:none}
#landingView :is(.hero-copy h1,.landing-section>h2,.report-head h2,.plans-head h2,.recent-head h2,.landing-cta h2){font-family:'Big Shoulders Display','Arial Narrow',sans-serif;font-weight:800;letter-spacing:0;text-transform:uppercase}
#landingView .landing-section>h2,#landingView .report-head h2{font-size:clamp(40px,4.6vw,72px);line-height:.95}
#landingView .recent-head h2{font-size:32px}
/* Portada */
#landingView .hero-eyebrow{display:none}
#landingView .hero-copy h1{max-width:10ch;font-size:clamp(64px,7.6vw,136px);line-height:.86}
#landingView .hero-copy h1 span{color:inherit}
#landingView .hero-collection::before{display:none}
#landingView .hero-learn span[aria-hidden]{display:none}
/* Campo de Energías */
.x-field{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none}
.x-field i{position:absolute;left:var(--x);top:var(--y);width:var(--s);height:var(--s);margin:calc(var(--s) / -2) 0 0 calc(var(--s) / -2);transform:rotate(var(--r))}
.x-field svg{display:block;width:100%;height:100%}
.x-field[data-tone=light] i{opacity:.34}
.x-field [data-type=G]{color:#3f9a4c}
.x-field [data-type=R]{color:#df5139}
.x-field [data-type=W]{color:#2f86cf}
.x-field [data-type=L]{color:#d29b0c}
.x-field [data-type=P]{color:#8e4fae}
.x-field [data-type=F]{color:#b8642d}
.x-field [data-type=D]{color:#3e4756}
.x-field [data-type=M]{color:#76818f}
.x-field[data-tone=dark] i{color:#b9cbea;opacity:.11}
/* Sobre el texto de la portada los símbolos casi desaparecen; se ven a la derecha, alrededor de las cartas. */
#landingView .trainer-hero>.x-field{-webkit-mask-image:linear-gradient(90deg,#0000001f,#0000004d 30%,#000 62%);mask-image:linear-gradient(90deg,#0000001f,#0000004d 30%,#000 62%)}
@media(prefers-reduced-motion:no-preference){.x-field i{animation:x-float var(--t) ease-in-out var(--d) infinite alternate;animation-play-state:paused}.x-field.is-live i{animation-play-state:running}}
@keyframes x-float{from{transform:translate(0,0) rotate(var(--r))}to{transform:translate(var(--dx),var(--dy)) rotate(calc(var(--r) + 36deg))}}
@media(forced-colors:active){.x-field{display:none}}
/* Tres mesas: sin números ni flechas de adorno */
#landingView .mesas a,#landingView .mesas li:first-child a,#landingView .mesas li:last-child a{grid-template-columns:1fr;grid-template-areas:"art" "title" "what" "go";border-radius:12px}
#landingView .mesas .n,#landingView .mesas .go i{display:none}
/* Planes: jerarquía en vez de tres cajas iguales */
#landingView .plans-band .plans-head h2{font-size:clamp(44px,5vw,80px)}
#landingView .plans-band .plan-card{border-radius:14px}
#landingView .plans-band .plans-grid>.plan-card:first-child{border-color:#ffffff24;background:transparent;box-shadow:none}
#landingView .plans-band .plan-card p.plan-price{font-family:'Big Shoulders Display','Arial Narrow',sans-serif;font-size:56px;font-weight:800;letter-spacing:0}
@media(min-width:900px){#landingView .plans-band .plans-grid{align-items:end}#landingView .plans-band .plan-card.featured{padding-top:58px}}
/* Llamada final: a lo ancho, sobre el tapete de duelo de la propia mesa */
#landingView .landing-cta{position:relative;isolation:isolate;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:16px 48px;margin:0;padding:clamp(64px,8vw,128px) var(--page-gutter);border:0;border-radius:0;background:#0b1422 url(mesa-duelo.webp) 70% center/cover no-repeat;color:#f2f5fb;text-align:left}
#landingView .landing-cta::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#0b1422f5 0%,#0b1422d9 42%,#0b142259 100%)}
#landingView .landing-cta .guide-mark{display:none}
#landingView .landing-cta>div{align-items:flex-start;gap:14px;max-width:760px}
#landingView .landing-cta h2{font-size:clamp(48px,6vw,104px);line-height:.9;color:#fff}
#landingView .landing-cta p{margin:0;font-size:18px;color:#c8d3e4}
#landingView .landing-cta .cta-play{margin-top:10px}

/* ---------- El mismo criterio en las demás vistas (29-10-2026) ----------
   Mazos, Colección, Combate, Ranking y Mi cuenta: a todo el ancho, títulos de página en la letra de cartel, sin etiquetas que repiten
   el título, Energías flotando en la cabecera de cada página y, en el Ranking, un solo botón de color por lista (el de la fila activa). */
#playView,#accountView,body>footer{max-width:none}
#workshop.x-editor #workshopTitle,.library-head h1,#practiceTitle,.account-head h1{font-family:'Big Shoulders Display','Arial Narrow',sans-serif;font-weight:800;letter-spacing:0;text-transform:uppercase;line-height:.9}
#workshop.x-editor #workshopTitle{font-size:clamp(52px,5.6vw,92px)}
#workshop.x-editor[data-xview=collection] #workshopTitle{font-size:clamp(48px,4.8vw,80px)}
.library-head h1{font-size:clamp(48px,5.4vw,88px)}
#practiceTitle{font-size:clamp(44px,4.6vw,76px)}
.account-head h1{font-size:clamp(40px,4.4vw,72px)}
@media(max-width:650px){#workshop.x-editor #workshopTitle{font-size:42px}#workshop.x-editor[data-xview=collection] #workshopTitle{font-size:40px}}
@media(max-width:380px){#workshop.x-editor #workshopTitle{font-size:36px}}
#myDecks .library-head .eyebrow,#accountView>.eyebrow,#practiceHub p.eyebrow{display:none}
/* Cabeceras con campo de Energías (xtra.js): tenue, a la derecha, lejos del título. */
#myDecks .library-head,#tournaments .library-head,#practiceHub>.section-heading,#accountView .account-head{position:relative;isolation:isolate}
#workshop .x-ed-head{position:relative;z-index:6}
.x-field[data-tone=head] i{opacity:.3}
.x-field[data-tone=head]{-webkit-mask-image:linear-gradient(90deg,#0000 22%,#00000059 50%,#000 82%);mask-image:linear-gradient(90deg,#0000 22%,#00000059 50%,#000 82%)}
/* Ranking: botones discretos; el de color aparece en la lista que señalas. */
#tournaments .tournament-actions .primary{border:1px solid var(--line);background:var(--sheet);color:var(--ink);box-shadow:none}
#tournaments .tournament-row:is(:hover,:focus-within) .tournament-actions .primary{border-color:var(--action);background:var(--action);color:#fff}


/* ---------- Accesibilidad según la auditoría de bordes (tests/edges.cjs, 29-10-2026) ----------
   Controles de 24 px como mínimo y de 44 px en pantallas táctiles (≤ 768 px). */
.see-all{display:inline-flex;align-items:center;min-height:24px}
@media(max-width:768px){
 .see-all,.x-back{min-height:44px}
 .deck-tile-menu summary{width:44px;height:44px}
 #workshop.x-editor .x-deckbar-btn{min-width:44px;min-height:44px}
 #workshop.x-editor :is(#deckname,#deckFilter,#searchOpen){min-height:44px}
 #workshop.x-editor .x-side-switch{min-height:44px}
 #workshop.x-editor .x-tools .layout-switch button{width:44px;height:44px;min-height:44px}
 #workshop.x-editor .x-edit-tools>button{width:44px;height:44px;min-height:44px}
 #workshop.x-editor .decklist[data-layout=gallery] .quantity button{width:44px;min-width:44px;height:44px;min-height:44px}
}

/* ---------- Jugar contra la IA en tres pasos (spec jugar-y-meta-v3) ---------- */
#duelSetup.duel-setup{max-width:none;padding:8px 0 24px;display:flex;flex-direction:column;gap:20px}
.duel-steps{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:16px;align-items:flex-start}
.duel-step{flex:1 1 280px;min-width:0;background:var(--sheet);border:1px solid var(--line);border-radius:12px;padding:20px;display:flex;flex-direction:column;gap:14px}
.duel-step-rival{flex:1.4 1 360px}
.duel-step-head{display:flex;align-items:center;gap:10px}
.duel-step-head h4{margin:0;font-size:18px;font-weight:700;font-family:var(--font-body)}
.duel-step-n{width:28px;height:28px;flex:none;border-radius:50%;background:var(--ink);color:var(--sheet);display:grid;place-items:center;font-size:14px;font-weight:700}
.duel-deck{display:flex;align-items:center;gap:14px;min-height:84px}
.duel-deck.is-rival{padding:12px;border-radius:10px;border:1.5px solid var(--rival);background:color-mix(in srgb,var(--rival) 8%,var(--sheet))}
.duel-deck-art{flex:none;width:58px;aspect-ratio:63/88;border-radius:6px;border:2px solid #ee8b4b;background:#172c48;overflow:hidden}
.duel-deck-art.is-rival{border-color:var(--rival)}
.duel-deck-art img{width:100%;height:100%;object-fit:cover;display:block}
.duel-deck-info{display:flex;flex-direction:column;gap:3px;min-width:0}
.duel-deck-info strong{font-size:18px;line-height:1.25;overflow-wrap:anywhere}
.duel-deck-tag{font-size:13px;font-weight:600;color:var(--rival)}
.duel-deck-detail{font-size:14px;color:var(--muted)}
.duel-ok{font-size:15px;font-weight:600;color:var(--ok)}
.duel-ok::before{content:'✓ '}
.duel-warn{font-size:15px;font-weight:600;color:var(--action-ink)}
.duel-step-links{margin-top:auto;display:flex;flex-wrap:wrap;gap:6px 18px}
.duel-step-links .text-link{background:none;border:0;padding:6px 0;min-height:32px;font:inherit;font-size:15px;font-weight:600;color:var(--action-ink);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.duel-step .rival-quick{display:flex;flex-wrap:wrap;gap:8px;margin:0}
.rival-quick-list{display:contents}
.duel-step .rival-quick button{min-height:44px;padding:6px 12px;border-radius:8px;border:1px solid var(--line);background:var(--sheet);color:var(--ink);font:inherit;font-size:14px;font-weight:600;cursor:pointer;display:inline-flex;flex-direction:column;align-items:flex-start;justify-content:center;line-height:1.2;text-align:left}
.duel-step .rival-quick button small{font-size:12px;font-weight:600;color:var(--ok)}
.duel-step .rival-quick button[aria-pressed=true]{border:1.5px solid var(--rival);background:color-mix(in srgb,var(--rival) 10%,var(--sheet))}
.duel-step .rival-quick button:disabled{opacity:.55;cursor:not-allowed}
.duel-rotation-note{margin:0;font-size:14px;line-height:1.5;color:var(--muted)}
.duel-rotation-note .duel-rotation-count{display:block;color:var(--ink);font-weight:600}
.duel-rotation-note .text-link{background:none;border:0;padding:0;font:inherit;font-weight:600;color:var(--action-ink);text-decoration:underline;cursor:pointer}
.duel-step .plan-lock{margin:0}
.duel-step .advanced-options{margin:0}
.coach-row{display:flex;align-items:center;gap:12px}
.coach-mark{width:40px;height:40px;flex:none;border-radius:50%;background:var(--ink);display:grid;place-items:center}
.coach-mark svg{width:20px;height:20px;fill:#f6c21c}
.coach-label{flex:1;font-size:16px;font-weight:600}
.switch{flex:none;width:52px;height:30px;border-radius:999px;border:0;padding:3px;background:#b9b3a8;cursor:pointer;display:flex;justify-content:flex-start;transition:background .18s cubic-bezier(.2,.8,.2,1)}
.switch[aria-checked=true]{background:var(--ok);justify-content:flex-end}
.switch-knob{width:24px;height:24px;border-radius:50%;background:#fff;display:block}
.switch:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
#dsCoachText{margin:0;font-size:15px;line-height:1.55}
.duel-coverage:empty{display:none}
.duel-start-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;background:var(--sheet);border:1px solid var(--line);border-radius:12px;padding:18px 22px}
.duel-start-info{flex:1 1 320px;min-width:0;display:flex;flex-direction:column;gap:4px}
.duel-start-info p{margin:0;font-size:15px;color:var(--muted)}
.duel-start-info .duel-rotation-left{color:var(--ink);font-weight:600}
.duel-start-info .duel-rotation-left:empty{display:none}
.duel-start-info .quota-help summary{cursor:pointer;font-size:14px;font-weight:600;color:var(--action-ink);min-height:32px;display:inline-flex;align-items:center}
.duel-start-bar .flow-actions{margin:0;display:flex;gap:10px;flex-wrap:wrap}
.duel-start-bar .duel-start{min-height:56px;padding:0 26px;font-size:17px}
.duel-start-bar .duel-start:not(:disabled):hover{transform:translateY(-2px);box-shadow:0 3px 0 var(--ink)}
@media (prefers-reduced-motion:reduce){.switch{transition:none}.duel-start-bar .duel-start:hover{transform:none}}
@media (max-width:720px){.duel-start-bar .flow-actions,.duel-start-bar .duel-start{width:100%}}

/* ---------- Meta: tabla compacta (spec jugar-y-meta-v3) ---------- */
#tournaments .tournament-filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px 24px}
#tournaments .tournament-search{display:flex;flex-direction:column;gap:6px}
#tournaments .tournament-search label{font-size:14px;font-weight:600}
#tournaments .tournament-free{display:inline-flex;align-items:center;gap:8px;min-height:44px;font-size:15px;font-weight:600;cursor:pointer}
#tournaments .tournament-free input{width:20px;height:20px;min-height:0;accent-color:var(--ok)}
#tournaments .tournament-rotation{margin:0 0 14px;font-size:15px;color:var(--muted)}
#tournaments .tournament-table-wrap{background:var(--sheet);border:1px solid var(--line);border-radius:12px;overflow-x:auto}
#tournaments .tournament-table{width:100%;border-collapse:collapse;font-size:15px}
#tournaments .tournament-table thead th{text-align:left;font-size:13px;font-weight:600;color:var(--muted);padding:12px;border-bottom:1px solid var(--line);white-space:nowrap}
#tournaments .tournament-table thead th:first-child{padding-left:20px}
#tournaments .tournament-table.is-comp .col-access{display:none}
#tournaments .tournament-table tr.tournament-row{display:table-row;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
#tournaments .tournament-table td{padding:10px 12px;border-bottom:1px solid var(--soft);vertical-align:middle}
#tournaments .tournament-table tr:last-child td{border-bottom:0}
#tournaments .tournament-table td.tournament-rank{padding-left:20px;font-family:var(--font-body);font-size:18px;font-weight:800;color:var(--muted);width:56px;position:static;background:none}
#tournaments .tournament-deck{min-width:260px}
#tournaments .tournament-deck>.tournament-art{float:left;width:36px;height:50px;margin-right:12px;border-radius:5px}
#tournaments .tournament-deck>.tournament-art img{transform:scale(1.6)}
#tournaments .tournament-info{display:flex;flex-direction:column;gap:2px;overflow:hidden}
#tournaments .tournament-info strong{font-size:16px}
#tournaments .tournament-info .muted{font-size:13px}
#tournaments .tournament-list-cards{margin-top:2px}
#tournaments .tournament-list-cards summary{min-height:28px;font-size:13px}
#tournaments .tournament-event{color:var(--muted);white-space:nowrap}
#tournaments .tournament-event small{display:block;font-size:13px}
#tournaments .tournament-table td.tournament-cta{text-align:right;width:1%;white-space:nowrap}
#tournaments .tournament-mix{font-variant-numeric:tabular-nums;white-space:nowrap}
#tournaments .access-chip{display:inline-block;padding:3px 10px;border-radius:999px;font-size:13px;font-weight:600;white-space:nowrap;background:var(--soft);color:var(--ink)}
#tournaments .access-chip.is-free{background:var(--ok-bg,#e6f3ec);color:var(--ok)}
#tournaments .access-chip.is-na{background:transparent;color:var(--muted);padding-left:0}
#tournaments .tournament-table .tournament-actions{display:inline-flex;justify-content:flex-end;align-items:center;gap:14px;white-space:nowrap}
#tournaments .tournament-table .tournament-actions .text-link{background:none;border:0;padding:6px 0;min-height:40px;font:inherit;font-size:14px;font-weight:600;color:var(--ink);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
#tournaments .tournament-table .tournament-actions .primary{min-height:40px;padding:0 14px;border:0;border-radius:8px;background:var(--action);color:#fff;font-weight:700}
#tournaments .tournament-table .tournament-row:is(:hover,:focus-within) .tournament-actions .primary{background:var(--action-hover,var(--action))}
#tournaments .tournament-table .tournament-actions .tour-locked{min-height:40px;padding:0 12px;border-radius:8px;border:1px solid var(--line);background:var(--sheet);color:var(--ink);font-weight:600}
#tournaments .tournament-more{display:block;margin:16px auto 0;min-height:44px;padding:0 20px;border-radius:8px;border:1px solid var(--line);background:var(--sheet);font-weight:600}
@media (max-width:720px){
 #tournaments .tournament-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
 #tournaments .tournament-table,#tournaments .tournament-table tbody{display:block}
 #tournaments .tournament-table tr.tournament-row{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 10px;padding:14px 16px;border-bottom:1px solid var(--soft)}
 #tournaments .tournament-table td{display:block;padding:0;border:0}
 #tournaments .tournament-table td.tournament-rank{padding:0;font-size:16px;width:auto}
 #tournaments .tournament-deck{min-width:0}
 #tournaments .tournament-event,#tournaments .tournament-mix,#tournaments .col-access{grid-column:2;white-space:normal;font-size:13px}
 #tournaments .tournament-event small{display:inline;margin-left:4px}
 #tournaments .tournament-mix::before{content:'Pokémon / Entren. / Energías: ';color:var(--muted)}
 #tournaments .tournament-table td.tournament-cta{grid-column:1/-1;width:auto;text-align:left;white-space:normal}
 #tournaments .tournament-table .tournament-actions{display:flex;flex-direction:column-reverse;align-items:stretch;gap:4px;margin-top:8px;white-space:normal}
 #tournaments .tournament-table .tournament-actions .primary,#tournaments .tournament-table .tournament-actions .tour-locked{width:100%;min-height:44px}
}

/* ---------- Celular (propuesta de diseño «Detalles», 30-10-2026) ----------
 * 1. Sin íconos encima del texto: en celular el texto ocupa todo el ancho y la máscara del campo de Energías no alcanza a apartarlos.
 * 2. El contador va bajo la carta: en la galería del editor ya no tapa el tipo ni la nota de la carta. */
@media(max-width:650px){
 .x-field{display:none}
 #workshop.x-editor .decklist[data-layout=gallery] .cardrow{display:flex;flex-direction:column;gap:8px}
 #workshop.x-editor .decklist[data-layout=gallery] .quantity,
 #workshop.x-editor[data-xview=collection] .decklist[data-layout=gallery] .quantity{position:static;left:auto;bottom:auto;transform:none;width:100%;margin:0;padding:0 4px;box-sizing:border-box;border:1px solid var(--line);box-shadow:none}
 #workshop.x-editor[data-xview=collection] .decklist[data-layout=gallery] .quantity{width:calc(100% - 20px);margin:0 10px}
}

/* ---------- Mazos oficiales (Battle Deck): primer mazo y sección en Mis mazos ---------- */
.official-decks{margin-top:36px;display:flex;flex-direction:column;gap:8px}
.official-decks h2{margin:0;font-size:22px}
.official-decks>p{margin:0 0 6px}
.official-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));gap:12px}
.official-deck{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"art info" "art act";gap:6px 14px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--sheet)}
.official-deck.is-soon{opacity:.75}
.official-art{grid-area:art;display:flex;align-self:center}
.official-art img{width:56px;aspect-ratio:63/88;object-fit:cover;border-radius:5px;background:#172c48;box-shadow:0 2px 6px #1421381f}
.official-info{grid-area:info;display:flex;flex-direction:column;gap:2px;min-width:0}
.official-info strong{font-size:16px}
.official-info small{color:var(--muted);font-size:13px}
.official-blurb{font-size:14px;line-height:1.4}
.official-deck>button,.official-deck>.official-soon{grid-area:act;justify-self:start;min-height:44px}
.official-soon{display:inline-flex;align-items:center;font-size:14px;font-weight:600;color:var(--muted)}
.starter-dialog{width:min(760px,calc(100vw - 24px))}
.starter-dialog .official-list{grid-template-columns:1fr}
.starter-physical{display:flex;align-items:center;gap:10px;min-height:44px;margin-top:14px;font-size:15px}
.starter-physical input{width:20px;height:20px}
.starter-other{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
.starter-other button{min-height:44px}
@media(max-width:650px){.official-deck{padding:12px;gap:6px 12px}.official-art img{width:44px}}
.official-empty{grid-column:1/-1;display:flex;flex-direction:column;gap:8px;max-width:1100px;width:100%;margin:8px auto 0;text-align:left}
.official-empty h3{margin:0;font-size:18px}
.official-empty>p{margin:0 0 4px}

/* Colección en celular y tablet (31-10-2026): el progreso del mazo pasa a una barra compacta fija al pie, sobre la navegación,
   en vez de quedar después de las 60 cartas; «Ver faltantes» ya no se parte letra por letra. */
@media(max-width:900px){
 .x-progress{position:sticky;bottom:calc(var(--tabbar-h,0px) + 8px);z-index:20;margin-top:16px;padding:10px 12px;box-shadow:0 -8px 28px #0006}
 .x-progress h2{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);margin:0}
 .x-progress-body{grid-template-columns:40px minmax(0,1fr) auto;gap:6px 10px}
 .x-progress-art{grid-row:1/3;width:40px;height:40px}
 .x-progress-name{grid-column:2;grid-row:1;min-width:0}
 .x-progress-name strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
 .x-progress-name small{display:none}
 .x-progress-body button{grid-column:3;grid-row:1;min-height:40px;padding:0 14px;white-space:nowrap}
 .x-progress-bar{grid-column:2;grid-row:2;order:0;height:8px;align-self:center}
 .x-progress-n{grid-column:3;grid-row:2;justify-self:end;font-size:13px}
 .x-progress-legend{display:none}
}
