/* ui-skin.css (owner 2026-11-10: "fix UI placements, more depth, AAA sheen, everything lines up").
   Loaded LAST in index.html. CSS only: no blur, no backdrop-filter, no animation added. Works with every LOOK preset because it only reads
   the existing vars (--card --ink --field --line --hi --lo --red --blurple --accent*), plus fixed shades of black/white for depth.
   GRID: one column per screen = 16 px gutters, max 400 px (--col). Spacing steps 4 / 8 / 12 / 16 / 24. One pill = 40 px high.
   TYPE SCALE: 11 (labels) / 12.5 / 14.5 / 17 / 23 (--fs-xs .. --fs-xl); nothing under 11 px. */
:root{--col:400px;--g:16px;--pill:40px;
  --bev:inset 0 1px 0 rgba(255,255,255,.10),inset 0 -2px 0 rgba(0,0,0,.30);          /* top light + bottom shade */
  --rim:linear-gradient(180deg,rgba(255,255,255,.22),rgba(255,255,255,.04) 40%,rgba(0,0,0,.35));   /* gradient rim (border-box layer) */
  --lift:0 2px 0 rgba(0,0,0,.45),0 6px 12px rgba(0,0,0,.22)}

/* ---------- 1. ONE COLUMN ---------- */
#col .ov:where(:not(#home):not(#sheet)){padding-left:var(--g);padding-right:var(--g)}
#col .ov:where(:not(#home):not(#sheet))>:where(*:not(canvas):not(.fog):not(button):not(.tabs):not(.money)){width:100%;max-width:var(--col);box-sizing:border-box}
#col .cards,#col .results,#col .statgrid,
#col .row,#col .pagehead,#col .sect,#col .exch,#col .note,#col .sub,#col .box,#col .buybar,#col #options .sect,#col #buyedit .sect,
#col .bxtabs,#col #bxTabs,#col .bxnote,#col .bxsum,#col .bxlock,#col .bxtree,#col .bxrespec,#col #startBuild,#col button.bxc,#col .gm-msg{max-width:var(--col)}
#col .row,#col .cards .card{max-width:none}
#col #options .box,#col #buyedit .box{max-width:var(--col);width:100%}
#col .money{margin-bottom:var(--g)}
#col .navbar{max-width:var(--col)}
/* home uses the same 16 px gutter */
#col #home .hwrap{max-width:none;padding-left:var(--g);padding-right:var(--g)}
@media (min-width:481px){#col #home .hwrap{max-width:448px}}
#col #home .note,#col #home .best{max-width:none}

/* ---------- 2. DEPTH: every panel = gradient rim + bevel + soft drop ---------- */
#col .row,#col .statgrid,#col .box,#col .exch,#col .bxsum,#col .bxlock,#col .callout,#col .results .tiles div,#col .cxBox{
  box-shadow:var(--bev),var(--lift) !important}
#col .row:not(.newgear):not(.yellow):not(.issue):not(.eq){border-color:transparent;
  background:linear-gradient(var(--hi),transparent 55%) padding-box,linear-gradient(var(--card),var(--card)) padding-box,var(--rim) border-box;border-width:1px}
#col .row.yellow,#col .row.issue{box-shadow:inset 4px 0 0 var(--blurple),var(--bev),var(--lift) !important}
#col .row.issue{box-shadow:inset 4px 0 0 #7b3fe4,var(--bev),var(--lift) !important}
#col .row.eq{box-shadow:inset 0 0 0 2px var(--ink),var(--lift) !important}
#col .row.newgear{box-shadow:inset 4px 0 0 #2f9e4f,0 0 12px rgba(47,158,79,.35),var(--lift) !important}
#col .statgrid{border-color:transparent;background:linear-gradient(var(--hi),transparent 70%) padding-box,linear-gradient(var(--card),var(--card)) padding-box,var(--rim) border-box}
#col .card{box-shadow:var(--bev),0 4px 0 var(--shade),0 8px 14px rgba(0,0,0,.24),0 0 14px var(--rg)}
#col .card.r2,#col .card.rp{box-shadow:none}      /* those have their own animated glow: leave */
#col .tile,#col #home .pick{box-shadow:var(--bev),0 2px 0 rgba(0,0,0,.5) !important}
/* a faint floor light under the header so the screen has a top-lit feel */
#col .ov:where(:not(#home):not(.dim):not(#sheet))::before{content:"";position:absolute;left:0;right:0;top:0;height:140px;pointer-events:none;background:linear-gradient(rgba(255,255,255,.05),transparent);z-index:0}
/* title: stronger plate */
#col h2{max-width:var(--col);text-shadow:0 1px 0 var(--hi),0 2px 6px var(--lo),0 0 14px var(--hlA,rgba(143,123,255,.3))}
#col h2::before,#col h2::after{height:3px;opacity:.65;background:linear-gradient(90deg,transparent,var(--blurple,currentColor))}
/* sticky PLAY / BACK bar: a raised dock with a hairline, same width as the column */
#col .navbar{padding-top:12px !important;padding-bottom:12px !important;gap:var(--g) !important}
#col .navbar::before{background:linear-gradient(transparent,var(--field) 12px) !important;border-top:0 !important}
#col .navbar button{flex:1 1 0;min-width:0;margin:0}

/* ---------- 3. ONE PILL / BUTTON SYSTEM ---------- */
#col .tabs button,#col button.small,#col .hset button,#col #bxTabs button,#col .bxtabs button,#col #options .opt button,#col .buybar button.ghost{
  min-height:var(--pill);border-radius:999px;padding:0 16px;margin:0;font-size:var(--fs-s);font-weight:bold;letter-spacing:.8px;line-height:1.1;min-width:var(--pill);
  display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box}
#col .tabs{gap:8px;flex-wrap:wrap;justify-content:center}
#col #bxTabs,#col .bxtabs{gap:8px}
#col .tabs button.on,#col button.small:not(.ghost),#col #options .opt button:not(.ghost){box-shadow:var(--bev),0 2px 0 rgba(0,0,0,.45) !important}
#col .tabs button:not(.on),#col button.ghost.small,#col #options .opt button.ghost{background-image:none;box-shadow:inset 0 1px 0 var(--hi) !important}
#col .tabs button:not(.on){border-width:2px}
#col #options .opt button{min-width:96px}
#col #options .opt .tabs{margin:0;max-width:none;justify-content:flex-start}
#col #options .opt .tabs button{min-width:0}

#col button.small.claim,#col #home .collect{min-height:var(--pill)}
/* tab group inside builds: stop the coloured underline bar from looking like a different component */
#col .bxtabs button,#col #bxTabs button{border-bottom-width:2px !important}
/* money chips: same height as pills */
#col .money span{min-height:32px;box-sizing:border-box;box-shadow:var(--bev),0 2px 0 rgba(0,0,0,.35)}
#col .money span b{font-size:var(--fs-m)}
/* big stacked buttons in game over / win / pause: one width, one rhythm */
#col #over>button,#col #win>button,#col #pause>button{width:100%;max-width:340px;min-width:0;margin:0 0 8px;box-sizing:border-box}
#col #over .hset,#col #win .hset,#col #pause .hset{width:100%;max-width:340px;justify-content:stretch;gap:8px;margin:0 0 8px !important}
#col #over .hset button,#col #win .hset button,#col #pause .hset button{flex:1 1 0;min-width:0;max-width:none}
#col #over .results .tiles,#col #over .stats4{max-width:340px}

/* ---------- 4. TEXT FLOORS (nothing under 11 px) ---------- */
#col #home .pick small,#col .gm-acc em,#col .gm-part em,#col .gm-acc small,#col .gm-part small,#col .card .tag,#col .newtag,#col .mk,#col .bxnewtag,#col .bxk,#col .cxBox small,#col #home .tile em,#col .tile em{font-size:11px}
#col .gm-acc em,#col .gm-part em{letter-spacing:1.2px}
#col .cxBox small{font-size:11px}
#col .sect{font-size:11px}
/* gear badges (the little S / L / W discs on the patches pill) must not be tiny */
#col .gm-badge,#col .gm-b,#col [class*=gm-bdg]{font-size:11px}

/* ---------- 5. HOME ---------- */
#col #home .tiles{gap:8px;margin-bottom:12px}
#col #home .tile:last-child:nth-child(3n+1){grid-column:1/-1;flex-direction:row;min-height:44px;gap:12px}   /* OPTIONS alone on its row = full width */
#col #home .pickrow{gap:8px}
#col #home .pick{min-height:56px}
#col #home .money{margin-bottom:12px}
@media (max-height:700px){#col #home .tile:last-child:nth-child(3n+1){min-height:40px}}

/* ---------- 6. SHEETS (World / Hell / Mode pickers) ---------- */
#col #sheet .sh{max-width:480px;padding:16px var(--g) 24px;border-radius:20px 20px 0 0;
  background:linear-gradient(var(--hi),transparent 70px) padding-box,linear-gradient(var(--field),var(--field)) padding-box,var(--rim) border-box;border:1px solid transparent;border-bottom:0;
  box-shadow:0 -8px 0 rgba(0,0,0,.18),0 -12px 24px rgba(0,0,0,.55)}
#col #sheet .sh::before{content:"";display:block;width:40px;height:4px;border-radius:4px;margin:-6px auto 10px;background:var(--line)}
#col #sheet .grid{gap:8px}
#col #sheet .grid button,#col #sheet .grid.two button{min-height:48px;border-radius:var(--r-s)}
#col #sheet .close{min-height:48px;margin-top:16px}

/* ---------- 7. PHONE: nothing in the owner's dead patch (x > W-90, y 120-280) ---------- */
@media (max-width:480px){
  #col #options .opt{flex-direction:row-reverse;justify-content:flex-end;gap:12px;padding:8px 0}
  #col #options .opt>span{flex:1 1 0;min-width:0;max-width:calc(100% - 76px - 108px);text-align:left}
  #col #options .opt:has(>.tabs){flex-direction:column;align-items:flex-start;gap:8px}
  #col #options .opt:has(>.tabs)>span{max-width:calc(100% - 76px)}
  #col #options .opt .tabs{width:100%}
  #col #bxTabs,#col #builds .bxtabs{max-width:calc(100% - 76px) !important;margin-left:0 !important;margin-right:auto !important}
  #col #bxRows>.bxnote:first-child{max-width:calc(100% - 76px) !important;margin-left:0 !important}
  #col #over>*:not(h2):not(.results),#col #pause>*:not(h2):not(.statgrid){align-self:flex-start;width:calc(100% - 76px) !important;max-width:324px !important}
  #col #over .navbar,#col #pause .hset{flex-wrap:wrap}
  #col #over .navbar button,#col #pause .hset button{flex:1 1 40%}
  #col #pause .statgrid,#col #kit #kitStats,#col #over #overText,#col #fusions .cxBox,#col #fusions #fusionHelp{margin-left:0 !important;width:calc(100% - 76px) !important;max-width:324px !important}
  #col #manual .pagehead{margin-left:0;max-width:calc(100% - 76px)}
  #col #shopTabs,#col #kit .tabs,#col #manual .tabs:not(:has([data-act=pgjump])){margin-left:0;max-width:calc(100% - 76px);justify-content:flex-start}
  #col #manual #manSum .statgrid b{margin-right:76px}
  /* paragraphs that start inside the patch wrap around it (a float the same height as the patch) */
  #col #help .cards::before,#col #evolve>.note::before,#col #bonus .sub::before,#col #valor .bxnote::before{content:"";float:right;width:76px;height:1px}
  #col #help .cards>*:first-child,#col #evolve>.note,#col #orders>.note,#col #bonusSub,#col #valor .note{padding-right:76px;box-sizing:border-box}
  #col #evolve .row small,#col #shop .row small,#col #orders .row small,#col .row .rt small{padding-right:0}
  #col #start h2,#col #bonus h2,#col #pause h2,#col #over h2{max-width:calc(100% - 76px);margin-right:auto;margin-left:0;justify-content:flex-start;font-size:20px;letter-spacing:1.5px;white-space:nowrap}
  #col #start h2::before,#col #bonus h2::before,#col #pause h2::before,#col #over h2::before{display:none}
  #col #evolve>.note,#col #orders>.note,#col #valor .note{text-align:left}
  #col #bonusSub{text-align:left}
}
@media (max-width:380px){#col .tabs button{padding:0 12px}#col .money span{padding-right:10px}}

/* ---------- 8. DESKTOP: a lit stage behind the phone-width column ---------- */
@media (min-width:600px){
  html,body{background:radial-gradient(120% 90% at 50% 40%,#23222c 0%,#121218 60%,#0a0a0d 100%)}
  #col{box-shadow:0 0 0 1px rgba(255,255,255,.07),0 0 60px rgba(0,0,0,.7)}
}

/* ---------- 9. gear-mask.css floors (it shrinks labels to 9.5-10.5 px on narrow phones; nothing may go under 11) ---------- */
#col .gm-root .gm-pill span,#col .gm-root .gm-pill small{font-size:11px}
@media (max-width:380px){#col .gm-root .gm-pill span,#col .gm-root .gm-pill small{font-size:11px}}
#col .gm-root .gm-accn em,#col .gm-root .gm-rt b u,#col .gm-root .gm-chip.own i,#col .gm-root .gm-money span{font-size:11px}

/* ---------- 10. VALOR: the three pick buttons sit in one tidy row (they were space-between = misaligned) ---------- */
#col .row.vnew{justify-content:flex-start !important;gap:8px}
#col .row.vnew button{margin:0 !important;flex:0 0 auto}
@media (max-width:480px){#col .row.vnew{max-width:calc(100% - 0px)}#col .row.vnew button{max-width:calc(50% - 4px)}}

/* ---------- 11. 8 px rhythm between stacked cards ---------- */
#col button.bxc{margin-bottom:8px}
#col .bxline{height:8px}
#col .gm-root .gm-acc{margin-bottom:8px}
#col .guide p{margin:8px 0}

/* ---------- 12. HOME round 2: Hell/Mode row clear of the dead patch, COLLECT >= 40 px, fits 360x640 ---------- */
#col #homePay button.small{min-height:40px;padding:0 20px;margin:0 6px;vertical-align:middle}
#col #home .tile:last-child:nth-child(3n+1){min-height:40px}
@media (max-width:480px){#col #home .pickrow{width:calc(100% - 76px);align-self:flex-start}}
@media (max-height:700px){
  #col #home .hwrap{padding-top:8px;padding-bottom:6px}
  #col #home .tile{min-height:46px;padding:5px 4px;gap:3px}
  #col #home .tile svg{width:20px;height:20px}
  #col #home .tile:last-child:nth-child(3n+1){min-height:36px}
  #col #home .pick{min-height:48px;padding-top:4px;padding-bottom:4px}
  #col #home button.play{padding-top:8px;padding-bottom:8px;margin-bottom:6px}
  #col #home .note{margin-bottom:6px;line-height:1.25}
  #col #home .money{margin-bottom:8px}
  #col #home .tiles{gap:6px;margin-bottom:6px}
  #col #home .best{margin-bottom:2px}
}

/* ---------- 13. Phone: first rows of lists keep their text out of the dead patch (x > W-90, y 120-280) ---------- */
#col #manual #pageNote{margin-bottom:12px}
@media (max-width:480px){
  #col #shopRows>.row:nth-child(1) .rt,#col #evoRows>.row:nth-child(1) .rt,#col #orderRows>.row:nth-child(1) .rt,#col #pageRows .row:nth-child(1) .rt,
  #col #shopRows>.row:nth-child(1)>div:not(.ico),#col #evoRows>.row:nth-child(1)>div:not(.ico){padding-right:60px;box-sizing:border-box}
  #col #manSum .statgrid{width:calc(100% - 76px);align-self:flex-start}
  #col #manSum .sect{width:calc(100% - 76px);align-self:flex-start}
}
@media (max-width:380px){
  #col #home .money{justify-content:flex-start}
  #col #manSum .statgrid{width:calc(100% - 92px)}
  #col .row.vnew button{flex:1 1 100%;max-width:none}
}

/* ---------- ENDLESS note + auto-pick ask on the win screen (owner 2026-11-11) ---------- */
#col #win .endlessNote{width:100%;max-width:340px;box-sizing:border-box;margin:0 0 10px;padding:8px 12px;font-size:15px;font-weight:700;line-height:1.35;text-align:center;
  color:var(--ink);background:linear-gradient(var(--hi),transparent 70%) padding-box,linear-gradient(var(--card),var(--card)) padding-box,var(--rim) border-box;border:1px solid transparent;border-radius:10px}
#col #win .endlessAsk{width:100%;max-width:340px;box-sizing:border-box;margin:0 0 8px;padding:10px 12px;text-align:center;color:var(--ink);
  background:linear-gradient(var(--hi),transparent 70%) padding-box,linear-gradient(var(--card),var(--card)) padding-box,var(--rim) border-box;border:1px solid transparent;border-radius:10px}
#col #win .endlessAsk p{margin:0 0 6px;font-size:16px;font-weight:700;line-height:1.3}
#col #win .endlessAsk p.small{font-size:14px;font-weight:400;opacity:.9}
#col #win .endlessAsk .hset{margin:8px 0 0 !important}

/* ---- BONUS SCREEN (owner 2026-11-12): compact cards + FUSIONS READY side box + YOUR ATTACKS chips + recipe tree (ui.js drawBonus / fitBonus) ---- */
#col #bonusWrap{display:flex;gap:8px;width:100%;max-width:448px;align-items:flex-start;justify-content:center;box-sizing:border-box}
#col #bonusWrap>.cards{flex:1 1 0;min-width:0;max-width:340px;margin:0}
#col #bonus .card{padding:7px 10px 7px 16px;margin:4px 0}
#col #bonus .card b{font-size:15px;margin-bottom:1px}
#col #bonus .card span{font-size:12px;line-height:1.3}
#col #bonus .card .tag{font-size:11px;margin-bottom:3px}
#col #bonus .card.dz{padding-right:84px}
#col #fuseBox{flex:0 0 40%;min-width:0;box-sizing:border-box;padding:6px 6px 4px;border:2px solid #ff3c96;border-radius:12px;background:rgba(12,4,14,.82);box-shadow:0 0 18px rgba(255,60,150,.4),inset 0 0 0 1px rgba(255,255,255,.08)}
#col #fuseBox h4{margin:0 0 3px;font-size:12px;letter-spacing:1.5px;text-align:center;color:#ff9fd0}
#col #fuseBox .cards{width:100%;max-width:none;margin:0}
#col #fuseBox .card{padding:6px 7px 6px 12px}
#col #fuseBox .card b{font-size:14px}
#col #fuseBox .card span{font-size:11.5px}
#col #fuseAllBtn{width:100%;margin:3px 0 2px;min-height:36px;background:#d6307f;color:#fff;border-color:#ff9fd0}
#col #haveBox{width:100%;max-width:448px;margin-top:6px;text-align:left;box-sizing:border-box}
#col #haveBox small{display:block;font-size:11px;letter-spacing:.5px;color:#e9e6f5;opacity:.9;margin-bottom:3px}
#col .skchips{display:flex;flex-wrap:wrap;gap:5px}
#col .skchip{display:inline-flex;align-items:center;box-sizing:border-box;user-select:none;font:inherit;font-size:12px;font-weight:bold;min-height:32px;padding:4px 10px;border-radius:999px;border:1.5px solid #8f7df0;background:rgba(28,22,52,.92);color:#f1eeff;cursor:pointer}
#col .skchip.fz{border-color:#ff3c96;background:rgba(52,10,34,.92);color:#ffd3ea}
#col .pop{position:absolute;inset:0;z-index:80;display:none;flex-direction:column;align-items:center;gap:8px;padding:18px 16px 22px;box-sizing:border-box;overflow-y:auto;background:rgba(8,6,14,.97);color:#f4f3ee}
#col .pop.on{display:flex}
#col .pop h2{margin:0;font-size:20px;letter-spacing:1.5px;color:#fff;max-width:calc(100% - 84px);align-self:flex-start}
#col .pop .sub{margin:0;color:#d9d6e6;align-self:flex-start;max-width:calc(100% - 84px);text-align:left}
#col .pop .cards{width:100%;max-width:448px}
#col #skillBody{width:100%;max-width:448px;text-align:left}
#col .tnode{position:relative;margin:6px 0 0;padding:8px 10px 8px 12px;border-radius:10px;border:1.5px solid #8f7df0;background:rgba(28,22,52,.9)}
#col .tnode.fz{border-color:#ff3c96;background:rgba(40,10,30,.9)}
#col .tnode>.tag{display:inline-block;font-size:11px;font-weight:bold;letter-spacing:1px;padding:1px 8px;border-radius:999px;background:#6e5bd6;color:#fff}
#col .tnode.fz>.tag{background:#d6307f}
#col .tnode>b{display:block;font-size:15px;margin:3px 0 1px;color:#fff}
#col .tnode>span{font-size:12.5px;line-height:1.35;color:#e6e3f2}
#col .tnode .tmade{display:block;margin:7px 0 0;font-size:11px;letter-spacing:1px;color:#a6f03a}
#col .tkids{margin-left:4px;padding-left:10px;border-left:2px solid #a6f03a}
/* ---- AUTO-BAN screen (ui.js drawAB): everything stays left of the dead patch of the phone; row buttons on the left ---- */
#col #autoBan>*{width:calc(100% - 84px);max-width:400px;align-self:flex-start;box-sizing:border-box;margin-left:0;margin-right:0}
#col #autoBan h4{margin:6px 0 0;font-size:12px;letter-spacing:1px;color:#a6f03a;text-align:left}
#col .abrow{display:flex;align-items:center;gap:5px;margin:4px 0;padding:4px 6px;border-radius:10px;border:1.5px solid #8f7df0;background:rgba(28,22,52,.92);touch-action:none}
#col .abrow.drag{border-color:#a6f03a;background:rgba(40,60,14,.92)}
#col .abrow b{font-size:14px;color:#fff;flex:1 1 auto;min-width:0;text-align:left}
#col .abrow em{font-style:normal;font-size:12px;color:#c9c4e6;min-width:16px;text-align:right}
#col .abgrip{font-size:20px;line-height:36px;width:34px;height:36px;text-align:center;cursor:grab;color:#e9e6f5;touch-action:none;user-select:none}
#col .abb{display:inline-flex;align-items:center;justify-content:center;flex:0 0 34px;box-sizing:border-box;user-select:none;font:inherit;font-size:13px;width:34px;height:36px;padding:0;border-radius:8px;border:1.5px solid #8f7df0;background:#1a1530;color:#fff;cursor:pointer}
#col .abb.x{border-color:#d4143a;color:#ff9fb4}
#col .abrow b small,#col .abopt small{display:block;font-size:11.5px;font-weight:normal;line-height:1.3;color:#cfcbe6;margin-top:1px}
#col #autoBan h5{margin:8px 0 2px;font-size:11px;letter-spacing:1px;color:#c9c4e6;text-align:left}
#col .abopt{margin:4px 0;padding:6px 10px;border-radius:10px;border:1.5px solid #8f7df0;background:rgba(28,22,52,.92);text-align:left;cursor:pointer;user-select:none}
#col .abopt.fz{border-color:#ff3c96;background:rgba(52,10,34,.92)}
#col .abopt b{font-size:13.5px;color:#fff}
#col .abrow b,#col .abrow b small{text-align:left !important;display:block}
