/* #SECTION: DESKTOP RESPONSIVE */
/* ═══════ DESKTOP (1024px+) ═══════ */

@media(min-width:1024px){

  /* ── Global page head ── */
  .pg-head{padding:1.1rem 1.5rem .85rem}

  /* ── Items page: multi-col grid, no-scroll filters, bigger sprites ── */
  /* Grid on the outer container — .it-filter rows span full width, cards flow into cols */
  .items-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:0 1.25rem;padding:.85rem 2.5rem 2rem;max-width:none;align-content:start}
  .items-grid .it-filter{grid-column:1/-1;overflow-x:visible;flex-wrap:wrap;padding:.3rem 0 .55rem}
  /* Wider search area */
  #pg-items>div{padding:.65rem 2.5rem .4rem!important}
  /* Bigger sprites, polished cards */
  .it-card{border-radius:16px;padding:1rem;gap:.85rem;transition:border-color .15s,transform .18s,box-shadow .18s}
  .it-card:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(0,0,0,.25);border-color:var(--border2)}
  .it-sprite{width:60px;height:60px}
  .it-name{font-size:.92rem;font-weight:800}

  /* ── Dashboard: 4-across stat cards — bigger, more wow ── */
  .da-stats{grid-template-columns:repeat(4,1fr);padding:1.2rem 1.5rem 1rem;gap:.85rem}
  .da-stat{padding:1.3rem 1.5rem;min-height:124px;border-radius:16px;transition:transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s}
  .da-stat:hover{transform:translateY(-3px);box-shadow:0 10px 28px rgba(0,0,0,.28)}
  .da-stat-val{font-size:3rem;letter-spacing:-.03em}
  .da-stat-label{font-size:.65rem;letter-spacing:.07em}
  .da-stat-glow{opacity:.12}
  .da-stat-glow i{font-size:5.5rem}
  .da-stat-glow svg{width:90px;height:90px}

  /* ── Dashboard: 2-column body ── */
  /* DOM order: da-col-side first (mobile shows QA before feed), CSS order reverses on desktop */
  .da-body{display:flex;gap:1.25rem;padding:.6rem 1.5rem 2.5rem;align-items:flex-start}
  .da-col-main{flex:1;min-width:0;order:1}
  .da-col-side{width:268px;flex-shrink:0;order:2}

  /* Strip horizontal padding from section headings inside columns */
  .da-col-side .da-section,.da-col-main .da-section{padding:0}

  /* Section title: more prominent */
  .da-section-title{font-size:.72rem;padding:.85rem 0 .5rem}

  /* Feed: remove inline padding so it sits flush in its column */
  .da-col-main #daFeedBody{padding:0!important}

  /* Feed rows: more breathing room, bigger avatars */
  .da-feed-row{padding:.78rem .9rem;border-radius:14px;margin-bottom:.5rem}
  .da-feed-av{width:42px;height:42px;font-size:.88rem}
  .da-feed-img{width:42px;height:42px}
  .da-feed-name{font-size:.83rem}
  .da-feed-sub{font-size:.68rem;margin-top:3px}

  /* Quick action buttons: more polished vertical cards */
  .da-col-side .da-quick-row{flex-direction:column;padding:0;gap:.45rem}
  .da-col-side .da-qrow-btn{display:flex;align-items:center;gap:.7rem;padding:.8rem .9rem;text-align:left;flex:none;width:100%;border-radius:13px}
  .da-col-side .da-qrow-icon{font-size:1.1rem;margin-bottom:0;width:36px;height:36px;border-radius:10px;background:var(--surface);display:flex;align-items:center;justify-content:center;flex-shrink:0}
  .da-col-side .da-qrow-lbl{font-size:.88rem;color:var(--text2);font-weight:700}

  /* Hide mobile notif/search header buttons — not needed with sidebar + wide layout */
  .da-hd-btns{display:none!important}

  /* ── Signed-out home: 2-column desktop layout ── */
  .da-signout-wrap{display:flex;gap:1.5rem;padding:.6rem 1.5rem 2.5rem;align-items:flex-start}
  .da-signout-main{width:360px;flex-shrink:0}
  .da-signout-card{text-align:left;padding:2rem 1.8rem}
  .da-signout-icon{font-size:2.5rem}
  .da-signout-title{font-size:1.45rem;font-weight:900;letter-spacing:-.025em;margin-bottom:.5rem}
  .da-signout-desc{font-size:.88rem;max-width:none;line-height:1.6}
  .da-signout-btns{justify-content:flex-start;margin-top:1.3rem;gap:.65rem}
  .da-signout-btns .btn{padding:.65rem 1.5rem;font-size:.88rem;min-height:42px}
  .da-signout-feats{flex:1;grid-template-columns:1fr 1fr;gap:.85rem;margin-top:0;align-content:start}
  .da-signout-feat{padding:1.15rem 1.25rem;border-radius:16px;transition:transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s}
  .da-signout-feat:hover{transform:translateY(-3px);box-shadow:0 8px 20px rgba(0,0,0,.22)}
  .da-signout-feat-icon{font-size:1.5rem;margin-bottom:.5rem}
  .da-signout-feat-icon i{font-size:1.5rem}
  .da-signout-feat-title{font-size:.95rem;font-weight:900;letter-spacing:-.01em;margin-bottom:.28rem}
  .da-signout-feat-desc{font-size:.78rem;line-height:1.5}

  /* ── Pokédex: single-row filter bar ── */
  .dex-filter-bar{display:flex;align-items:center;gap:.75rem;padding:.75rem 1.5rem .6rem;flex-wrap:nowrap;position:relative}
  #dexSearch{width:280px;flex-shrink:0;margin-bottom:0!important}
  .dex-filter-strip{flex:1;padding-bottom:0;overflow-x:auto}

  /* Type dropdown: absolutely positioned below bar, 6-col grid */
  .dex-type-dropdown{
    position:absolute;top:100%;left:0;right:0;z-index:90;
    background:var(--bg2);border:1px solid var(--border);border-top:none;
    border-radius:0 0 12px 12px;box-shadow:0 8px 24px rgba(0,0,0,.2);
    grid-template-columns:repeat(6,1fr);padding:.65rem;gap:.3rem;
  }

  /* ── Pokédex: 4-column grid ── */
  .dex-grid{grid-template-columns:repeat(4,1fr);max-width:none;padding:.85rem 1.5rem 1.5rem;gap:.9rem}

  /* ── Premium desktop card ── */
  /* overflow:visible allows shiny holo border to extend beyond card bounds */
  .pb-card{padding:1rem .8rem .9rem;overflow:visible;border-radius:16px;border-width:1.5px;transition:border-color .15s,transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s}
  .pb-card:hover{transform:translateY(-4px);box-shadow:0 12px 32px rgba(0,0,0,.3);border-color:var(--border2)}

  /* Art: taller, inset shadow so sprite floats above the gradient */
  .pb-card-art{height:210px;border-radius:12px;overflow:hidden;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06),inset 0 -28px 36px rgba(0,0,0,.2)}
  .pb-card-art img{width:190px;height:190px}

  /* Text: bold and prominent */
  .pb-card-name{font-size:1.05rem;font-weight:900;margin-top:.6rem;letter-spacing:-.02em}
  .pb-card-dex{font-size:.68rem;font-weight:700;margin-top:3px;letter-spacing:.02em}
  .pb-card-types{margin-top:6px;gap:4px}
  .pb-card-types .type-pill{font-size:11px;padding:3px 11px}

  /* ── Shiny holo border — fixed ── */
  /* background-clip:padding-box stops card bg at the border edge.
     Transparent border lets the ::after gradient show through underneath.
     overflow:visible (above) ensures ::after isn't clipped. */
  .pb-card.shiny-holo{border:2.5px solid transparent;background-clip:padding-box}
  .pb-card.shiny-holo::after{inset:-2.5px;border-radius:18px;opacity:.88;z-index:-1}
  /* Soft glow layer behind the card */
  .pb-card.shiny-holo::before{
    content:'';position:absolute;inset:-2.5px;border-radius:18px;
    background:linear-gradient(135deg,#ff6b6b,#feca57,#48dbfb,#ff9ff3,#54a0ff,#5f27cd,#ff6b6b);
    background-size:300% 300%;animation:holoShift 3s ease infinite;
    filter:blur(8px);opacity:.45;z-index:-1;
  }
  .pb-card.shiny-holo:hover{box-shadow:0 12px 40px rgba(139,92,246,.35),0 4px 16px rgba(0,0,0,.3)}

  /* Quick-btns: slightly larger on desktop */
  .pb-quick-btn{width:26px;height:26px;font-size:.8rem}

  /* ── Pokédex detail panel ── */
  /* Wider panel — more room for stats, abilities, type chart */
  .panel-ct{max-width:560px}
  /* Taller hero with bigger sprite */
  .panel-art{height:440px;padding:1.5rem 1.2rem 2.2rem}
  .panel-art img{width:250px;height:250px;margin-bottom:2.5rem}
  .panel-art-types .type-pill{font-size:.78rem;padding:4px 14px}
  /* Panel header: bolder name */
  .p-header{padding:1.2rem 1.5rem .9rem}
  .p-header h2{font-size:1.35rem;font-weight:900;letter-spacing:-.02em}
  /* Abilities section */
  .dex-abl-section{padding:.9rem 1.5rem 1rem}
  .dex-abl-name{font-size:.85rem}
  /* Collapsible section toggles */
  .sec-tog{padding:.75rem 1.5rem}
  .sec-tog .sl{font-size:.88rem}
  /* Section content */
  .sec-body{padding:0 1.5rem 1.2rem}

  /* ── Build editor Step 2: full-width 2-column layout ── */
  .editor{padding:1rem 1.5rem 2rem}
  .ed-desktop-layout{flex-direction:row;align-items:flex-start;gap:1.25rem;margin-top:1.25rem}
  /* Left col: stat calc — sticky, shorter to avoid scroll even with hex chart */
  .ed-left-col{width:420px;flex-shrink:0;position:sticky;top:0;align-self:flex-start;max-height:calc(100vh - 140px);overflow-y:auto}
  .ed-right-col{flex:1;min-width:280px}
  .ed-left-col .ed-card h3{font-size:1rem}
  /* Hex chart: visible but not oversized — fits left col without scroll */
  .bs-hex-svg{max-width:260px}

  /* ── Item picker: keep as centered modal (complex list, works well) ── */
  .picker-ov{align-items:center!important;justify-content:center}
  .picker-sheet{border-radius:20px!important;max-height:78vh;margin:0}

  /* ── Desktop Finder-window: third picker column ── */
  /* Starts at width:0, slides to 380px. Height set by JS to match form col. */
  .ed-picker-col{
    width:0;overflow:hidden;flex-shrink:0;
    background:var(--card);
    border:1px solid transparent;
    transition:width .28s cubic-bezier(.4,0,.2,1),border-color .28s;
    position:sticky;top:0;align-self:flex-start;
    border-radius:14px;
  }
  .ed-picker-col.open{
    width:380px;overflow-y:auto;overflow-x:hidden;
    border-color:var(--border);
  }

  /* Right-arrows on desktop: move slots + item button point right → panel direction */
  .ms-chev{transform:rotate(-90deg)}
  .be-select .ph-caret-down{transform:rotate(-90deg)}

  /* Strategy: hide inline content on desktop (opens in third panel) */
  .ed-desktop-layout details>*:not(summary){display:none}
  .ed-desktop-layout details summary{cursor:pointer}
  .ed-strat-caret{margin-left:auto;flex-shrink:0;font-size:.85rem;color:var(--muted)}

  /* Item picker sheet inside the third panel — strip mobile-only chrome */
  .ed-picker-col .picker-handle{display:none}
  .ed-picker-col .picker-sheet{
    border-radius:0;border:none;max-height:none;padding:0;
    background:transparent;animation:none;
  }
  .ed-picker-col .picker-head{border-radius:0;padding:.5rem 0 .5rem}

  /* Panel body: just padding — parent panel's overflow-y:auto handles scrolling */
  .ed-picker-col .ed-dp-body{padding:.75rem 1.1rem .75rem}
  /* Strategy textareas — heights set by JS in _edStrategyClick to fill the panel */
  .ed-dp-strat-ta{resize:vertical;width:100%}

  /* Stat col: tighter card padding so hex fits without scrolling */
  .ed-left-col .ed-card{padding:.75rem .85rem}
  /* Hex chart: keep 260px but reduce outer SVG container padding */
  .ed-left-col .bs-hex-wrap{padding:0}

  /* Header: title + close button */
  .ed-dp-hdr{
    display:flex;align-items:center;justify-content:space-between;gap:.75rem;
    padding:.9rem 1.1rem .75rem;
    border-bottom:1px solid var(--border);
    position:sticky;top:0;background:var(--bg2);z-index:5;
  }
  .ed-dp-title{font-weight:900;font-size:.92rem;letter-spacing:-.01em;color:var(--text);flex:1}
  .ed-dp-close{
    width:28px;height:28px;border-radius:8px;border:1px solid var(--border);
    background:var(--surface);color:var(--muted);cursor:pointer;
    display:flex;align-items:center;justify-content:center;font-size:.8rem;
    font-family:inherit;transition:all .12s;flex-shrink:0;
  }
  .ed-dp-close:hover{border-color:var(--red);color:var(--red)}
  /* Scrollable body inside the picker panel */
  .ed-dp-body{padding:.75rem 1.1rem 2rem}

  /* Move picker: 4 persistent slot tabs */
  .ed-dp-slot-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:.4rem;margin-bottom:.8rem}
  .ed-dp-slot-tab{
    padding:.5rem .4rem;border-radius:10px;border:1.5px solid var(--border);
    background:var(--card);cursor:pointer;font-family:inherit;text-align:left;
    transition:border-color .15s,background .15s;
  }
  .ed-dp-slot-tab.active{border-color:var(--red);background:var(--red-bg)}
  .ed-dp-slot-n{display:block;font-size:.56rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:2px}
  .ed-dp-slot-tab.active .ed-dp-slot-n{color:var(--red)}
  .ed-dp-slot-lbl{display:block;font-size:.72rem;font-weight:700;color:var(--text2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .ed-dp-slot-tab.active .ed-dp-slot-lbl{color:var(--red)}
  /* Move list */
  .ed-dp-type-wrap{display:flex;gap:.3rem;flex-wrap:wrap;margin-bottom:.6rem}
  .ed-dp-move-list{display:flex;flex-direction:column;gap:2px;transition:opacity .15s ease}

  /* ── Selected Pokémon card: premium desktop treatment ── */
  .sel-card{padding:1rem 1.2rem;border-radius:18px;border-width:1.5px}
  .sel-content{padding:.45rem .5rem;border-radius:14px;gap:.9rem}
  .sel-img{width:90px;height:90px;filter:drop-shadow(0 4px 10px rgba(0,0,0,.25))}
  .sel-name{font-size:1.2rem;font-weight:900;letter-spacing:-.02em}
  .sel-dex{font-size:.65rem;margin-top:3px}
  .sel-types{margin-top:6px;gap:5px}
  .sel-types .type-pill{font-size:11px;padding:3px 11px}
  .sel-btn{padding:.45rem .8rem;font-size:.72rem;min-height:36px;border-radius:10px}
  .sel-bg{opacity:.2}

  /* ── Save bar: desktop — premium, right-aligned, not full-width ── */
  .save-bar{padding:.85rem 1.5rem;background:color-mix(in srgb,var(--bg2) 94%,transparent);border-top:1px solid var(--border2);justify-content:flex-end;gap:.65rem}
  .save-bar .btn{flex:0 0 auto;min-width:130px;padding:.65rem 1.6rem;font-size:.88rem;border-radius:12px;font-weight:700}
  /* Cancel: ghost outline, not full width */
  .save-bar .btn-ghost{border-color:var(--border2);color:var(--text2)}
  .save-bar .btn-ghost:hover{border-color:var(--red);color:var(--red)}
  /* Save: red with stronger shadow */
  .save-bar .btn-red{box-shadow:0 4px 14px rgba(239,68,68,.35)}

  /* ── Builds list: art-header cards, auto-fill grid ── */
  .bld-stack{display:grid;grid-template-columns:repeat(auto-fill,minmax(380px,1fr));gap:1.25rem;padding:1.5rem 2.5rem 2rem}
  .bld-card{border-radius:18px;transition:border-color .15s,transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s}
  .bld-card:hover{transform:translateY(-4px);box-shadow:0 14px 36px rgba(0,0,0,.35);border-color:var(--border2)}
  /* Art header: show on desktop, 160px tall */
  .bld-art{display:flex;height:160px;position:relative;overflow:hidden;align-items:flex-end;justify-content:center;padding-bottom:.65rem}
  .bld-art-sprite{width:130px;height:130px;object-fit:contain;filter:drop-shadow(0 5px 14px rgba(0,0,0,.55));position:relative;z-index:2}
  .bld-art-dex{position:absolute;top:-8px;right:2px;font-size:5rem;font-weight:900;opacity:.07;pointer-events:none;font-family:monospace;color:var(--text);z-index:1}
  .bld-art-types{position:absolute;bottom:.7rem;left:.85rem;display:flex;gap:.32rem;z-index:3}
  .bld-art-types .type-pill{font-size:.7rem;padding:3px 10px}
  .bld-art-badges{position:absolute;top:.65rem;right:.75rem;display:flex;flex-direction:column;align-items:flex-end;gap:.3rem;z-index:3}
  .bld-art-fav{font-size:.95rem;line-height:1}
  .bld-art-shiny{font-size:.62rem;font-weight:800;color:var(--purple);background:rgba(139,92,246,.2);padding:2px 7px;border-radius:6px;border:1px solid rgba(139,92,246,.25)}
  /* Hide mobile sprite+text row — art section takes over on desktop */
  .bld-head-left{display:none}
  /* Mini stat bars */
  .bld-mini-stats{display:flex;flex-direction:column;gap:4px;margin-bottom:.7rem}
  .bld-stat-row{display:flex;align-items:center;gap:.4rem}
  .bld-stat-lbl{width:26px;font-size:.56rem;font-weight:800;color:var(--muted2);text-align:right;flex-shrink:0;letter-spacing:.02em}
  .bld-stat-track{flex:1;height:5px;background:var(--surface2);border-radius:3px;overflow:hidden}
  .bld-stat-fill{height:100%;border-radius:3px}
  .bld-stat-val{width:28px;font-size:.63rem;font-weight:800;text-align:right;font-variant-numeric:tabular-nums;flex-shrink:0}
  /* Type-coloured move pills */
  .bld-move-pills{display:flex;flex-wrap:wrap;gap:.35rem}
  .bld-move-pill{font-size:.65rem;font-weight:700;padding:3px 9px;border-radius:7px;color:#fff;white-space:nowrap}
  /* Move body: padding tweak with art section showing */
  .bld-card .bld-body-area{padding-top:.85rem}

  /* ── Build detail: 2-col layout — full viewport height ── */
  .bd-stack{max-width:none;margin:0;padding:0;display:flex;flex-direction:column;flex:1}
  .bd-desktop-wrap{display:flex;flex-direction:row;align-items:stretch;flex:1}
  /* Left col: wider art panel, stretches full height */
  .bd-left{width:380px;flex-shrink:0;border-right:1px solid var(--border);background:var(--bg2);display:flex;flex-direction:column}
  .bd-left .bd-hero{border-radius:0!important;border:none!important;min-height:300px;padding:2rem 1.5rem 1.5rem}
  .bd-left .bd-hero img{width:220px;height:220px}
  .bd-left .bd-summary{padding:.75rem 1.4rem;border-bottom:1px solid var(--border)}
  /* Only strip card styling from non-hero cards — preserves inline gradient on hero */
  .bd-left .card:not(.bd-hero){border-radius:0!important;border:none!important;border-bottom:1px solid var(--border)!important;background:transparent!important;padding:1rem 1.4rem}
  /* Right col: scrollable detail */
  .bd-right{flex:1;min-width:0;padding:1.35rem 2rem 3rem;display:flex;flex-direction:column;gap:1rem;overflow-y:auto}
  /* 4-wide move grid in right col */
  .bd-right .bd-moves{grid-template-columns:repeat(4,1fr);gap:10px}
  .bd-right .bd-move{height:60px;min-height:60px;max-height:60px;border-radius:12px;cursor:pointer}
  /* Hex chart: bigger in the wide right col */
  .bd-right .bs-hex-wrap{display:flex;justify-content:center}
  .bd-right .bs-hex-svg{max-width:460px}

  /* ── Teams list: auto-fill so 1 team = full width, 2+ = 2 cols ── */
  .tml-stack{display:grid;grid-template-columns:repeat(auto-fill,minmax(480px,1fr));gap:1.25rem;padding:1.25rem 2.5rem 2rem}
  .tml-card{padding:1.35rem 1.35rem 1.1rem;border-radius:18px;transition:border-color .15s,transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s}
  .tml-card:hover{transform:translateY(-3px);box-shadow:0 12px 32px rgba(0,0,0,.28);border-color:var(--border2)}
  .tml-name{font-size:1.1rem;font-weight:900;letter-spacing:-.015em}
  .tml-members{overflow-x:visible;flex-wrap:nowrap;gap:.65rem;margin:.75rem 0 .55rem}
  .tml-mem{width:88px}
  .tml-mem-img{width:76px;height:76px;border-radius:16px}
  .tml-mem-empty{width:76px;height:76px;border-radius:16px}
  .tml-mem-name{font-size:.7rem}
  .tml-mem-name{font-size:.67rem}

  /* ── Team detail hero banner ── */
  .td-hero{
    display:flex;align-items:flex-end;justify-content:space-around;gap:1rem;
    padding:1.75rem 2.5rem 1.35rem;
    background:var(--bg2);border-bottom:1px solid var(--border);
  }
  .td-hero-mem{display:flex;flex-direction:column;align-items:center;flex:1;max-width:150px;cursor:pointer}
  .td-hero-img{width:112px;height:112px;object-fit:contain;filter:drop-shadow(0 4px 14px rgba(0,0,0,.38));transition:transform .18s}
  .td-hero-mem:hover .td-hero-img{transform:translateY(-5px) scale(1.06)}
  .td-hero-name{font-size:.75rem;font-weight:700;margin-top:.5rem;text-align:center;color:var(--muted)}
  .td-hero-empty-img{width:112px;height:112px;border-radius:18px;border:2px dashed var(--border);display:flex;align-items:center;justify-content:center;color:var(--muted2);font-size:1.5rem}
  .td-hero-slot-empty .td-hero-name{opacity:.35}

  /* ── Team detail: 2-column member grid ── */
  .td-stack{max-width:none;margin:0;padding:1rem 2.5rem 2rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}
  .td-stack>:not(.td-member){grid-column:1/-1}
  /* Odd last member spans full width so it doesn't leave an empty half-row */
  .td-member:last-child:nth-child(odd){grid-column:1/-1}
  /* View toggle: constrained width so it doesn't stretch across the full page */
  .td-view-toggle{max-width:260px}
  .td-mem-head{padding:.9rem 1.1rem}
  .td-mem-img{width:72px;height:72px}
  .td-mem-compact-stats{font-size:.67rem;gap:8px}
  /* Empty slots: taller on desktop */
  .td-empty-slot{padding:2rem 1.25rem;font-size:.85rem}

  /* ── Team editor: left/right 2-col split ── */
  .td-stack.te-editor{display:flex;flex-direction:row;align-items:flex-start;gap:1.5rem;max-width:none;margin:0}
  .te-left{width:460px;flex-shrink:0;position:sticky;top:0;align-self:flex-start;display:flex;flex-direction:column;gap:.85rem;max-height:calc(100vh - 130px);overflow-y:auto}
  .te-left::-webkit-scrollbar{width:0}
  .te-right{flex:1;min-width:0;display:flex;flex-direction:column;gap:.85rem}
  .te-right .td-empty-slot{padding:2.25rem 1.25rem}
  /* Identity pickers: wrap on desktop instead of horizontal scroll */
  .te-left .ti-picker{overflow-x:visible;flex-wrap:wrap;padding-bottom:0}
  /* Form inputs: more comfortable padding in left col */
  .te-left .ed-input,.te-left .ed-select{padding:.6rem .8rem;font-size:.88rem}
  .te-left .ed-textarea{padding:.6rem .8rem;font-size:.88rem;min-height:90px}
  .te-left .ed-label{font-size:.65rem;margin-top:.7rem}

  /* ── Build editor Step 1: Pokémon picker — WOW factor ── */
  .epc-grid{grid-template-columns:repeat(5,1fr);gap:.7rem;margin-top:.6rem}

  /* Cards: premium feel matching the Pokédex grid treatment */
  .epc-card{
    border-radius:16px;border-width:1.5px;
    overflow:visible;           /* allows shiny holo to extend */
    transition:border-color .15s,transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s;
  }
  .epc-card:hover{transform:translateY(-4px);box-shadow:0 12px 28px rgba(0,0,0,.3);border-color:var(--border2)}
  .epc-card.selected{border-color:var(--green);box-shadow:0 0 0 2.5px var(--green),0 8px 24px rgba(34,197,94,.25)}

  /* Art: tall with inset shadow so sprite floats above gradient */
  .epc-art{height:140px;overflow:hidden;border-radius:0}
  .epc-art img{width:118px;height:118px}
  /* Amplify the Pokéball watermark on desktop */
  .epc-art .wm{opacity:.1}
  /* Inset shadow depth on art */
  .epc-card .epc-art{box-shadow:inset 0 -24px 32px rgba(0,0,0,.22),inset 0 0 0 1px rgba(255,255,255,.05)}

  /* Text: bolder and more legible */
  .epc-name{font-size:.82rem;font-weight:900;letter-spacing:-.015em}
  .epc-dex{font-size:.62rem;font-weight:700}
  .epc-top{padding:.5rem .6rem .25rem}
  .epc-bot{padding:.38rem .6rem .55rem;gap:4px}
  .epc-bot .type-pill{font-size:9.5px;padding:2px 8px}

  /* Shiny holo — same fix as pb-card (overflow:visible + transparent border) */
  .epc-card.shiny-holo{border:2.5px solid transparent;background-clip:padding-box}
  .epc-card.shiny-holo::after{
    content:'';position:absolute;inset:-2.5px;border-radius:18px;
    background:linear-gradient(135deg,#ff6b6b,#feca57,#48dbfb,#ff9ff3,#54a0ff,#5f27cd,#ff6b6b);
    background-size:300% 300%;animation:holoShift 3s ease infinite;
    z-index:-1;opacity:.88;
  }
  .epc-card.shiny-holo::before{
    content:'';position:absolute;inset:-2.5px;border-radius:18px;
    background:linear-gradient(135deg,#ff6b6b,#feca57,#48dbfb,#ff9ff3,#54a0ff,#5f27cd,#ff6b6b);
    background-size:300% 300%;animation:holoShift 3s ease infinite;
    filter:blur(8px);opacity:.45;z-index:-1;
  }
  .epc-card.shiny-holo:hover{box-shadow:0 12px 40px rgba(139,92,246,.35),0 4px 16px rgba(0,0,0,.3)}

  /* Filter rows: no scrolling needed on desktop — all pills visible */
  .epc-filter-scroll{overflow-x:visible;flex-wrap:wrap;padding-bottom:0}

  /* ── Reference page ── */
  /* Tab bar + search blocks: wider padding */
  .ref-tab-bar{padding:0 1.5rem}
  .ref-search-block{padding:.65rem 1.5rem .5rem}
  .abl-alpha-hdr{padding:.5rem 1.5rem .15rem}
  /* Abilities: 2-column grid — alpha headers span both cols */
  .abl-list{display:grid;grid-template-columns:1fr 1fr;padding:0 1.5rem 2rem;gap:0 1.5rem}
  .abl-alpha-hdr{grid-column:1/-1}
  .abl-card{padding:.8rem .6rem .8rem 0}
  .abl-card:hover{filter:brightness(1.08);background:var(--surface2)}
  /* Natures: 4-column — bigger cards, taller eq bars */
  .nat-hybrid-grid{grid-template-columns:repeat(4,1fr)!important;padding:.9rem 2.5rem 2rem;gap:.9rem}
  .nat-hybrid{padding:1rem 1rem .85rem;border-radius:16px}
  .nat-hybrid-name{font-size:.95rem;font-weight:900;margin-bottom:.55rem}
  .eq-track{height:40px!important}
  .eq-lbl{font-size:.62rem;margin-top:5px}
  /* Archetype list: 3-column, category headers span full width */
  .ref-arch-list{display:grid;grid-template-columns:repeat(3,1fr);gap:.65rem;padding:.9rem 2.5rem 2rem}
  .ref-arch-cat{grid-column:1/-1;margin:.6rem 0 .25rem;font-size:.68rem}
  .ref-arch-cat:first-child{margin-top:.1rem}
  .ref-arch-card{padding:.9rem 1rem;border-radius:14px;margin-bottom:0}
  /* Reference detail sheet → centred modal on desktop */
  .ref-det-ov{align-items:center;justify-content:center}
  .ref-det-sheet{border-radius:20px!important;max-height:82vh;width:520px;max-width:90vw;transform:translateY(16px) scale(.97);padding-bottom:1.5rem}
  .ref-det-ov.open .ref-det-sheet{transform:translateY(0) scale(1)}
  .ref-det-handle{display:none}

  /* ── Profile page: 2-col desktop layout ── */
  #profileContent{display:flex;flex-direction:row;align-items:flex-start;gap:1.5rem;padding:1rem 1.5rem 3rem!important}
  .prof-left{width:380px;flex-shrink:0;position:sticky;top:0;align-self:flex-start;display:flex;flex-direction:column;gap:.75rem}
  .prof-right{flex:1;min-width:0}
  /* Trainer card: fills left col, good horizontal space */
  .trainer-card{padding:1.5rem 1.75rem;border-radius:18px}
  /* Stats row: never wrap */
  .tc-stats{flex-wrap:nowrap;gap:1.5rem}
  /* Social stats: flush in left col */
  .prof-social-stats{padding:.6rem 0 .25rem;gap:.7rem}
  /* Friends: card style in left col */
  .fr-collapse{border-radius:12px;border:1px solid var(--border);background:var(--card);margin:0}
  /* Right col section headers */
  .prof-right .prof-sec-hdr{padding:.85rem 0}
  /* Achievements: 3-col auto-fill */
  .ach-grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:.8rem;padding:.5rem 0 1.5rem}
  /* Flush padding on right-col inner content */
  .prof-right .prof-account-actions{padding:.5rem 0 1.5rem}
  .prof-right .activity-list{padding:.2rem 0 .5rem}
}

/* ═══════ WIDESCREEN (1600px+) ═══════ */

@media(min-width:1600px){
  /* Pokédex: 5 columns at true widescreen */
  .dex-grid{grid-template-columns:repeat(5,1fr)}
  /* Build picker: 6 columns at widescreen */
  .epc-grid{grid-template-columns:repeat(6,1fr)}
}
