:root{color-scheme:dark;--bg:#080c14;--surface:#101723;--surface2:#141e2e;--line:#243043;--muted:#96a4ba;--text:#edf3ff;--blue:#4285ff;--cyan:#91beff;--green:#75dfb5;--red:#ff9b9b;--amber:#efce83;font:16px/1.55 'Segoe UI',Arial,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}button,input,textarea,select{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,.button{display:inline-flex;align-items:center;justify-content:center;gap:.6rem;border:1px solid var(--line);border-radius:7px;background:#172131;color:var(--text);padding:.7rem 1rem;font-weight:600;cursor:pointer;text-decoration:none;min-height:44px}button:hover,.button:hover{background:#21304a;border-color:#5578ad}button:disabled{opacity:.45;cursor:not-allowed}.primary{background:var(--blue);border-color:var(--blue);color:#fff}.primary:hover{background:#5a96ff}.danger{color:var(--red)}.ghost{background:transparent}.small{font-size:.875rem;padding:.45rem .75rem}a{color:var(--cyan);text-decoration:none}a:hover{text-decoration:underline}svg.icon{width:20px;height:20px;stroke:currentColor;stroke-width:1.6;fill:none;flex-shrink:0}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(1.8rem,3vw,2.6rem);line-height:1.15;letter-spacing:-.035em;margin-bottom:.7rem}h2{font-size:1.3rem;line-height:1.3;letter-spacing:-.02em}h3{font-size:1rem}p{color:var(--muted)}.muted{color:var(--muted)}.eyebrow{font-size:.75rem;letter-spacing:.14em;font-weight:700;text-transform:uppercase;color:var(--cyan);margin-bottom:1rem}.wordmark{font-size:1.7rem;font-weight:900;letter-spacing:-.05em}.wordmark span{font-size:.85rem;letter-spacing:.12em;font-weight:600;color:#b7c4d9}.logo-box{height:38px;width:38px;background:var(--blue);border-radius:8px;font-size:1.25rem;font-weight:900;display:grid;place-items:center}.brand{display:flex;gap:.8rem;align-items:center;color:white}.brand-name{font-size:1rem;font-weight:800;letter-spacing:.035em;line-height:1.2}.brand-name small{display:block;font-size:.65rem;letter-spacing:.2em;color:var(--muted);margin-top:.3rem}.sidebar{position:fixed;inset:0 auto 0 0;width:226px;border-right:1px solid #1c2637;padding:30px 20px;display:flex;flex-direction:column;z-index:10;background:#0b101b}.sidebar .brand{margin:0 8px 38px}.nav-label{color:#73849e;font-size:.7rem;font-weight:700;letter-spacing:.14em;padding:0 12px;margin:25px 0 10px}.nav-item{display:flex;gap:13px;align-items:center;padding:11px 13px;border-radius:7px;color:#a3b0c5;font-size:.9rem;margin-bottom:5px;position:relative}.nav-item:hover{color:#fff;background:#141e2f;text-decoration:none}.nav-item.active{color:#8fb8ff;background:#172c4f}.nav-item.active:before{content:'';position:absolute;left:-20px;height:25px;width:3px;background:#629bff;border-radius:0 3px 3px 0}.side-bottom{margin-top:auto;padding-top:35px}.mini-map{padding:16px 12px;border:1px solid var(--line);border-radius:8px;background:linear-gradient(125deg,#13223c,#101620)}.mini-map small{display:block;color:var(--muted);font-size:.7rem;letter-spacing:.1em}.mini-map strong{display:block;margin:7px 0;font-size:.98rem;letter-spacing:.02em}.legal{font-size:.7rem;color:#77869b;margin:20px 5px 0}.layout{margin-left:226px}.topbar{height:82px;border-bottom:1px solid #1c2637;display:flex;align-items:center;justify-content:space-between;padding:0 38px;gap:20px;background:#0b1019}.global-search{display:flex;gap:10px;align-items:center;color:var(--muted);max-width:350px;flex:1}.global-search input{border:0;background:none;padding:8px 0;min-width:0;width:100%;font-size:.875rem}.top-actions,.row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.top-actions .button{font-size:.875rem}.avatar{width:36px;height:36px;border-radius:50%;background:#24385b;color:#b4d0ff;display:inline-grid;place-items:center;font-weight:700;overflow:hidden}.avatar img{width:100%;height:100%}.page{padding:34px 38px 50px;max-width:1700px;margin:auto}.page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px}.page-head p{margin:8px 0 0;font-size:.9rem}.breadcrumb{font-size:.75rem;color:var(--muted);margin-bottom:18px}.badge{display:inline-flex;align-items:center;gap:7px;padding:5px 9px;font-size:.72rem;line-height:1.3;border:1px solid #35445d;border-radius:5px;color:#b9c9e0;white-space:nowrap;font-weight:600}.badge.green{background:#10352b;color:var(--green);border-color:#245243}.badge.blue{background:#142c52;color:#9ac3ff;border-color:#284d81}.badge.red{background:#391e2c;color:var(--red);border-color:#613445}.badge.amber{background:#332b18;color:var(--amber);border-color:#5f4c27}.live-dot{width:6px;height:6px;background:currentColor;border-radius:50%}.devbar{background:#272111;color:#e1c887;padding:7px 20px;text-align:center;font-size:.75rem;border-bottom:1px solid #574822}.devbar button{min-height:26px;padding:1px 10px;margin-left:10px;font-size:.75rem;background:#38301b;border-color:#62522b}.hero-grid{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(270px,1fr);gap:22px}.feature{min-height:370px;border:1px solid #304668;border-radius:12px;padding:30px;background:radial-gradient(ellipse at 90% 20%,#234b7b55,transparent 65%),linear-gradient(135deg,#122440,#111925 70%);position:relative;overflow:hidden}.feature h2{font-size:clamp(2.4rem,4vw,4.1rem);line-height:1.02;letter-spacing:-.045em;max-width:600px;margin:23px 0}.feature .edition{font-size:.9rem;letter-spacing:.22em;color:#a5b7d1;font-weight:600}.feature-meta{display:flex;gap:26px;flex-wrap:wrap;font-size:.85rem;color:#b1bfd3;margin:25px 0}.feature-meta span{display:flex;align-items:center;gap:8px}.feature .row{margin-top:24px}.feature-foot{margin:24px -30px -30px;padding:15px 30px;border-top:1px solid #2d4260;background:#080e1944;display:flex;align-items:center;justify-content:space-between;color:#adc0de;font-size:.8rem}.panel{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:24px}.panel h2{margin-bottom:18px}.match-callout{display:flex;flex-direction:column}.match-callout .accent-icon{display:grid;place-items:center;width:46px;height:46px;border:1px solid #2a4771;background:#132947;color:var(--cyan);border-radius:10px;margin:20px 0}.match-callout h2{font-size:1.65rem;letter-spacing:-.03em}.match-callout p{font-size:.9rem}.match-callout .button{margin-top:auto}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:22px 0 32px}.stat{padding:20px 22px;display:flex;align-items:center;justify-content:space-between;background:#0e1622;border:1px solid #233045;border-radius:9px}.stat strong{display:block;font-size:1.65rem;line-height:1.2;letter-spacing:-.035em}.stat small{font-size:.78rem;color:var(--muted)}.stat .icon{color:#7092c3;width:25px;height:25px}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:26px 0 16px}.section-title h2{margin:0}.section-title a{font-size:.85rem}.grid2{display:grid;grid-template-columns:1.5fr 1fr;gap:22px}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:20px}.tournament-card{display:flex;flex-direction:column;gap:15px}.tournament-card p{margin:0}.tournament-card .button{margin-top:auto}.map-strip{border:1px solid #315783;background:linear-gradient(100deg,#172b47,#101927);border-radius:10px;padding:22px;display:flex;align-items:center;justify-content:space-between;gap:20px;margin:24px 0}.map-strip strong{display:block;font-size:1.45rem;letter-spacing:.08em}.map-strip small{color:#95abc9;font-size:.7rem;letter-spacing:.15em}.list-line{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:15px 0;border-bottom:1px solid #253042}.list-line:last-child{border:0}.step{display:flex;gap:15px;margin:20px 0}.step-no{flex-shrink:0;width:28px;height:28px;border:1px solid #324666;border-radius:50%;display:grid;place-items:center;font-size:.75rem;color:#9abbee}.step strong{font-size:.9rem}.step p{font-size:.8rem;margin:4px 0}.empty{text-align:center;padding:48px 24px}.empty .icon{width:35px;height:35px;color:#7590b8;margin-bottom:18px}.empty h2{margin-bottom:10px}.empty p{max-width:520px;margin:0 auto 22px}.toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:20px}.toolbar input{max-width:280px}.toolbar label{font-size:.85rem;color:var(--muted)}input,textarea,select{background:#0b121e;border:1px solid #34435a;border-radius:6px;color:var(--text);padding:10px 12px;min-height:44px;max-width:100%}input::placeholder{color:#7c8da7}input:focus,textarea:focus,select:focus{outline:2px solid #659cff;outline-offset:2px}:focus-visible{outline:2px solid #91beff;outline-offset:3px}label.field{display:flex;flex-direction:column;gap:7px;font-size:.9rem;margin-bottom:17px}textarea{min-height:130px;resize:vertical}input[type=checkbox]{min-height:auto;width:18px;height:18px;accent-color:var(--blue)}.check{display:flex;align-items:flex-start;gap:12px;color:var(--muted);margin:20px 0;font-size:.875rem}.check input{margin-top:4px}.bracket-shell{position:relative;background:radial-gradient(circle at 50% 30%,#101d32,#0b111c 70%);border:1px solid #25354e;border-radius:10px;overflow:auto;padding:26px;min-height:440px;max-height:760px;touch-action:pan-x pan-y pinch-zoom}.bracket-tree{display:flex;align-items:stretch;gap:58px;min-width:max-content}.round-col{width:240px;display:flex;flex-direction:column}.round-label{color:#93a7c5;font-size:.75rem;letter-spacing:.12em;text-transform:uppercase;margin-bottom:22px;display:flex;justify-content:space-between}.round-matches{display:flex;flex-direction:column;justify-content:space-around;gap:22px;flex:1}.match-card{position:relative;background:#131e30;border:1px solid #334665;border-radius:7px;min-height:112px;transition:border-color .25s;flex-shrink:0}.match-card.playing{border-color:#527ec7;box-shadow:0 0 20px #246cff0c}.match-card.disputed{border-color:#a56757}.match-card:after{content:'';position:absolute;left:100%;top:50%;width:30px;border-top:1px solid #375175}.round-col:last-child .match-card:after{display:none}.match-meta{padding:6px 10px;display:flex;justify-content:space-between;font-size:.65rem;color:#a0b0c6;border-bottom:1px solid #293b56}.player-line{padding:8px 10px;display:flex;align-items:center;gap:9px;font-size:.85rem;min-height:37px}.player-line+.player-line{border-top:1px solid #26354c}.player-line.winner{background:#213c5b;color:#cbe3ff}.player-line .seed{font-size:.65rem;color:#9aaac0;width:19px}.player-line a{color:inherit;flex:1}.player-line .score{margin-left:auto;font-weight:700}.player-line.unknown{color:#8b9ab0}.bracket-shell.zoom-small .round-col{width:205px}.bracket-shell.zoom-small .player-line{font-size:.75rem;padding:6px 8px}.bracket-shell.zoom-large .round-col{width:285px}.bracket-shell.zoom-large .player-line{font-size:1rem;padding:10px 12px}.pagination{display:flex;justify-content:center;align-items:center;gap:15px;margin:20px 0;color:var(--muted);font-size:.85rem}.notice{padding:14px 18px;border-left:3px solid #538feb;background:#112440;color:#b6ceed;border-radius:0 6px 6px 0;margin:20px 0;font-size:.875rem}.notice.warning{border-color:#cea751;background:#2c2517;color:#e2cc9c}.notice.error{border-color:#eb8484;background:#321c26;color:#ffbaba}.rules{white-space:pre-wrap;line-height:1.8;color:#bac7da;max-width:900px}.versus{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:20px;text-align:center;padding:35px 15px}.versus strong{font-size:clamp(1.15rem,2vw,1.8rem);display:block}.versus .avatar{height:58px;width:58px;font-size:1.3rem;margin-bottom:12px}.versus .vs{font-style:italic;font-weight:800;color:#7892b6}.score-display{font-size:2.4rem;font-weight:800;text-align:center;margin-bottom:20px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:.85rem}th{text-align:left;font-size:.72rem;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:#95a7c3;background:#121f32}th,td{padding:14px 16px;border-bottom:1px solid #253248}td small{display:block;color:var(--muted)}.admin-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:22px}.admin-tabs a{padding:8px 12px;border-radius:5px;color:var(--muted);font-size:.8rem;border:1px solid transparent}.admin-tabs a.active{background:#172d50;color:#a7caff;border-color:#304c76}.admin-tabs a:hover{background:#152035;text-decoration:none}.admin-layout{display:grid;gap:22px}.forms-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.notification{padding:15px 0;border-bottom:1px solid var(--line)}.notification p{color:var(--text);margin-bottom:4px}.notification time{font-size:.75rem;color:var(--muted)}dialog{background:#101927;color:var(--text);border:1px solid #3a5278;border-radius:12px;padding:28px;width:min(600px,calc(100% - 30px));max-height:85vh;box-shadow:0 20px 100px #000a}dialog::backdrop{background:#030815cf;backdrop-filter:blur(5px)}.modal-head{display:flex;justify-content:space-between;gap:15px;align-items:center;margin-bottom:20px}.modal-head h2{margin:0}.modal-head button{min-height:32px;padding:2px 10px;font-size:1.3rem}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.evidence-grid{display:flex;gap:10px;flex-wrap:wrap}.evidence-grid img{width:130px;height:90px;object-fit:cover;border-radius:5px;border:1px solid var(--line)}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);max-width:min(560px,90vw);background:#223754;color:#ecf4ff;border:1px solid #6487bd;padding:14px 22px;border-radius:8px;z-index:100;box-shadow:0 10px 40px #0007;display:none}#toast.show{display:block}.skip{position:fixed;top:-100px;left:10px;z-index:100;background:#223754;padding:10px}.skip:focus{top:10px}.boot{max-width:900px;margin:12vh auto;padding:30px}.mobile-brand{display:none}.connection{font-size:.75rem;color:var(--green);display:flex;align-items:center;gap:6px}.connection.offline{color:var(--amber)}.champion{border-color:#947740;background:radial-gradient(ellipse at top,#493c2166,#131b28 75%);text-align:center}.champion strong{font-size:2.5rem;color:#f0dca3}.champion .icon{height:48px;width:48px;color:#e7c36d}.search-results{display:grid;gap:12px}.search-results a{border:1px solid var(--line);padding:14px;border-radius:7px}.search-results small{display:block;color:var(--muted)}details{margin:15px 0}summary{cursor:pointer;color:var(--cyan);padding:10px 0}.form-error{color:var(--red);font-size:.9rem}.route-loading{padding:40px;color:var(--muted)}
@media(min-width:1500px){.feature{min-height:400px}.page{padding:40px 50px}.feature h2{font-size:4.5rem}}
@media(max-width:1100px){.sidebar{width:190px;padding:26px 14px}.layout{margin-left:190px}.nav-item.active:before{left:-14px}.page{padding:28px 24px}.topbar{padding:0 24px}.hero-grid{grid-template-columns:1.5fr 1fr}.feature{padding:24px}.feature-foot{margin:24px -24px -24px;padding:15px 24px}.feature h2{font-size:2.7rem}.stats{gap:10px}.stat{padding:16px}.grid2{grid-template-columns:1fr}.side-bottom .legal{font-size:.65rem}}
@media(max-width:800px){.sidebar{position:static;width:auto;display:block;padding:0;border-right:0;border-bottom:1px solid var(--line)}.sidebar .brand,.nav-label,.side-bottom{display:none}.sidebar nav{display:flex;overflow:auto;padding:8px 12px;gap:5px}.nav-item{white-space:nowrap;margin:0;padding:8px 10px;font-size:.8rem}.nav-item .icon{width:17px}.nav-item.active:before{display:none}.layout{margin-left:0}.topbar{height:auto;min-height:72px;padding:14px 18px;flex-wrap:wrap}.mobile-brand{display:flex}.global-search{order:3;min-width:100%;border-top:1px solid #203047;padding-top:8px}.top-actions{gap:8px}.top-actions .button{padding:8px 10px;font-size:.75rem}.page{padding:24px 18px}.page-head{align-items:flex-start}.page-head .row .button{padding:8px}.hero-grid{grid-template-columns:1fr}.feature{min-height:335px}.match-callout{min-height:220px}.match-callout .accent-icon{display:none}.stats{grid-template-columns:repeat(2,1fr);margin:18px 0 26px}.stat strong{font-size:1.5rem}.stat .icon{width:21px}.feature h2{font-size:3.2rem}.map-strip{padding:18px;gap:10px}.map-strip strong{font-size:1.1rem}.map-strip button{font-size:.8rem;padding:8px}.forms-grid{grid-template-columns:1fr}.bracket-shell{padding:18px;min-height:340px;max-height:620px}.bracket-tree{gap:34px}.round-col{width:230px}.match-card:after{width:18px}.toolbar{gap:8px}.toolbar input{max-width:100%}.connection{font-size:.65rem}.devbar{font-size:.65rem}.versus{gap:8px;padding:25px 0}.versus strong{overflow-wrap:anywhere}.panel{padding:20px}.page-head h1{font-size:1.9rem}.admin-tabs{gap:3px}.admin-tabs a{padding:7px 9px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

@media(max-width:480px){.feature h2{font-size:clamp(1.8rem,9vw,2.7rem)}.page-head{flex-wrap:wrap}.page-head>.button{padding:.5rem .8rem}.feature-meta{gap:14px}.feature-foot{flex-wrap:wrap;gap:8px}.top-actions{margin-left:auto}.stats .stat strong{font-size:1.25rem}.nav-item{min-height:44px}}
.round-matches .match-card:nth-child(odd):not(:last-child):before{content:'';position:absolute;left:calc(100% + 29px);top:50%;height:calc(100% + 22px);border-left:1px solid #375175}.round-col:last-child .match-card:before{display:none}.path-tree .match-card:before{display:none}.cards .match-card:before,.cards .match-card:after{display:none}@media(max-width:800px){.round-matches .match-card:nth-child(odd):not(:last-child):before{left:calc(100% + 17px)}}

.map-strip{min-height:170px;background-image:linear-gradient(90deg,rgba(5,13,29,.82),rgba(5,13,29,.24) 62%,rgba(5,13,29,.60)),url('/map-coco.png');background-size:cover;background-position:center 48%;border-color:#447fb5}.map-strip small{color:#e0eeff;text-shadow:0 1px 5px #000}.map-strip strong{text-shadow:0 2px 8px #000}.map-strip button{background:rgba(7,18,38,.82);border-color:#7aabd0}@media(max-width:480px){.map-strip{min-height:160px;background-position:42% center;flex-wrap:wrap}}
.home-map-artwork{
    margin:18px 0 20px;
    overflow:hidden;
    border-radius:18px;
    border:1px solid rgba(255,255,255,.12);
    background:#0b0f17;
    aspect-ratio:16/9;
  }
  
  .home-map-artwork img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
  }


/* =========================================================
   BUILD FIGHT ARENA — GLASS UI
   Modern glassmorphism layer. Existing structure preserved.
   ========================================================= */

:root{
  --bg:#06101d;
  --surface:rgba(15,28,48,.56);
  --surface2:rgba(20,38,63,.64);
  --line:rgba(157,196,255,.16);
  --line-strong:rgba(166,205,255,.28);
  --muted:#9fb2cb;
  --text:#f3f7ff;
  --blue:#5d9cff;
  --cyan:#a9ceff;
  --green:#73e1bd;
  --red:#ff9ca8;
  --amber:#f0cf83;
  --glass:rgba(11,24,42,.54);
  --glass-strong:rgba(13,29,51,.72);
  --glass-soft:rgba(255,255,255,.035);
  --shadow:0 18px 45px rgba(0,0,0,.26);
  --shadow-soft:0 10px 26px rgba(0,0,0,.18);
  --glass-blur:blur(22px) saturate(145%);
}

html{background:#06101d}
body{
  min-height:100vh;
  background:
    radial-gradient(circle at 14% 7%,rgba(58,126,255,.18),transparent 29rem),
    radial-gradient(circle at 84% 18%,rgba(65,184,255,.12),transparent 33rem),
    radial-gradient(circle at 68% 82%,rgba(80,98,255,.10),transparent 34rem),
    linear-gradient(145deg,#050b14 0%,#071321 42%,#09111d 100%);
  background-attachment:fixed;
  color:var(--text);
}

body::before,
body::after{
  content:"";
  position:fixed;
  pointer-events:none;
  z-index:-1;
  border-radius:999px;
  filter:blur(70px);
  opacity:.34;
}
body::before{
  width:360px;height:360px;
  left:7%;top:14%;
  background:rgba(68,133,255,.30);
}
body::after{
  width:420px;height:420px;
  right:2%;bottom:3%;
  background:rgba(55,178,255,.18);
}

::selection{background:rgba(91,156,255,.36);color:#fff}
*{scrollbar-color:rgba(121,166,224,.48) rgba(9,18,31,.35)}
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-track{background:rgba(9,18,31,.28)}
*::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,rgba(113,165,235,.55),rgba(71,117,185,.45));
  border:2px solid rgba(5,12,21,.35);
  border-radius:999px;
}

/* Real map artwork as compact brand mark */
.logo-box{display:none!important}
.brand-map-logo{
  position:relative;
  width:60px;
  height:36px;
  flex:0 0 60px;
  overflow:hidden;
  border-radius:11px;
  border:1px solid rgba(195,220,255,.34);
  background:rgba(255,255,255,.06);
  box-shadow:
    0 8px 24px rgba(0,0,0,.26),
    inset 0 1px 0 rgba(255,255,255,.22);
}
.brand-map-logo::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(145deg,rgba(255,255,255,.16),transparent 45%);
  pointer-events:none;
}
.brand-map-logo img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:center;
}
.brand{gap:.75rem}
.brand-name{
  color:#f8fbff;
  font-weight:850;
  letter-spacing:.045em;
  text-shadow:0 2px 15px rgba(65,133,255,.13);
}
.brand-name small{color:#91a9ca}

/* Sidebar: floating frosted rail */
.sidebar{
  width:228px;
  inset:12px auto 12px 12px;
  height:auto;
  padding:22px 14px;
  border:1px solid rgba(167,204,255,.14);
  border-radius:24px;
  background:
    linear-gradient(180deg,rgba(15,29,50,.76),rgba(7,17,31,.62));
  box-shadow:
    0 24px 70px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter:var(--glass-blur);
  -webkit-backdrop-filter:var(--glass-blur);
  overflow:hidden;
}
.sidebar::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 18% 2%,rgba(97,157,255,.16),transparent 34%),
    linear-gradient(110deg,rgba(255,255,255,.025),transparent 35%);
}
.sidebar>*{position:relative;z-index:1}
.sidebar .brand{margin:4px 8px 28px}
.layout{margin-left:252px}
.nav-label{
  color:#6f89ad;
  padding:0 12px;
  margin:18px 0 10px;
}
.nav-item{
  border:1px solid transparent;
  border-radius:13px;
  padding:11px 12px;
  color:#a7b7cb;
  margin-bottom:6px;
  transition:background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease;
}
.nav-item:hover{
  color:#fff;
  background:rgba(255,255,255,.055);
  border-color:rgba(159,199,255,.12);
  transform:translateX(2px);
  text-decoration:none;
}
.nav-item.active{
  color:#dcecff;
  background:
    linear-gradient(135deg,rgba(80,143,255,.24),rgba(72,151,255,.10));
  border-color:rgba(129,180,255,.23);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 8px 22px rgba(30,88,180,.13);
}
.nav-item.active:before{
  left:-15px;
  width:3px;
  height:28px;
  background:linear-gradient(#9bc6ff,#538df5);
  box-shadow:0 0 16px rgba(94,154,255,.55);
}
.mini-map{
  border-radius:16px;
  border-color:rgba(157,199,255,.18);
  background:
    linear-gradient(110deg,rgba(10,25,46,.74),rgba(17,34,57,.42)),
    url('/map-coco.png') center/cover;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
  overflow:hidden;
}
.mini-map small,.mini-map strong{text-shadow:0 2px 10px rgba(0,0,0,.8)}
.legal{color:#7185a2}

/* Top navigation glass bar */
.topbar{
  height:76px;
  margin:12px 14px 0 0;
  padding:0 20px;
  border:1px solid rgba(161,201,255,.13);
  border-radius:20px;
  background:rgba(8,20,35,.52);
  box-shadow:
    0 14px 36px rgba(0,0,0,.20),
    inset 0 1px 0 rgba(255,255,255,.055);
  backdrop-filter:var(--glass-blur);
  -webkit-backdrop-filter:var(--glass-blur);
}
.global-search{
  max-width:410px;
  padding:6px 8px 6px 14px;
  border:1px solid rgba(154,196,255,.12);
  border-radius:14px;
  background:rgba(255,255,255,.035);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.global-search:focus-within{
  border-color:rgba(116,173,255,.34);
  background:rgba(255,255,255,.052);
  box-shadow:0 0 0 4px rgba(83,145,255,.07);
}
.global-search input{
  color:#edf6ff;
  outline:0!important;
}
.global-search button{
  width:38px;
  min-height:38px;
  padding:0;
  border-radius:10px;
}
.connection{
  padding:8px 11px;
  border:1px solid rgba(114,225,189,.12);
  border-radius:999px;
  background:rgba(35,112,88,.10);
}
.avatar{
  width:40px;height:40px;
  border:1px solid rgba(177,210,255,.18);
  background:rgba(69,114,181,.28);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 8px 22px rgba(0,0,0,.18);
}

/* Main content spacing */
.page{padding:34px 34px 56px}
.breadcrumb{color:#8198b6}
.page-head{margin-bottom:26px}

/* Universal glass surfaces */
.panel,
.feature,
.stat,
.map-strip,
.match-card,
.bracket-shell,
.table-wrap,
.admin-tabs,
.toolbar,
.notice,
.notification,
details,
.search-results>a,
.devbar{
  backdrop-filter:var(--glass-blur);
  -webkit-backdrop-filter:var(--glass-blur);
}

.panel,
.stat,
.match-card,
.table-wrap{
  background:
    linear-gradient(145deg,rgba(19,37,62,.64),rgba(9,21,37,.52));
  border:1px solid rgba(157,198,255,.14);
  box-shadow:
    var(--shadow-soft),
    inset 0 1px 0 rgba(255,255,255,.055);
}

.panel{
  border-radius:18px;
  padding:23px;
}
.panel:hover{
  border-color:rgba(164,204,255,.21);
}

.feature{
  min-height:390px;
  border:1px solid rgba(158,200,255,.20);
  border-radius:22px;
  background:
    radial-gradient(circle at 82% 12%,rgba(92,159,255,.22),transparent 30%),
    linear-gradient(140deg,rgba(19,43,73,.76),rgba(7,18,33,.54) 70%);
  box-shadow:
    0 24px 62px rgba(0,0,0,.26),
    inset 0 1px 0 rgba(255,255,255,.075);
}
.feature::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border-radius:inherit;
  background:linear-gradient(120deg,rgba(255,255,255,.035),transparent 30%);
}
.feature h2{
  text-shadow:0 8px 30px rgba(0,0,0,.28);
}
.feature-foot{
  border-top-color:rgba(165,203,255,.13);
  background:rgba(3,11,22,.22);
  backdrop-filter:blur(16px);
}
.home-map-artwork{
  border-radius:20px;
  border-color:rgba(196,221,255,.18);
  background:rgba(5,14,25,.50);
  box-shadow:
    0 18px 42px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.08);
}

.match-callout{
  background:
    radial-gradient(circle at 20% 8%,rgba(74,144,255,.15),transparent 33%),
    linear-gradient(145deg,rgba(18,35,58,.66),rgba(8,20,35,.52));
}
.match-callout .accent-icon{
  border-radius:14px;
  border-color:rgba(133,185,255,.20);
  background:rgba(73,136,229,.14);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
}

/* Stat bubbles */
.stats{gap:14px}
.stat{
  border-radius:17px;
  padding:19px 20px;
  background:
    linear-gradient(145deg,rgba(19,39,66,.58),rgba(8,20,35,.48));
  transition:transform .18s ease,border-color .18s ease,background .18s ease;
}
.stat:hover{
  transform:translateY(-2px);
  border-color:rgba(162,204,255,.24);
  background:
    linear-gradient(145deg,rgba(24,48,80,.67),rgba(11,25,43,.54));
}
.stat .icon{color:#8ab7f3}

/* Buttons: glossy glass */
button,.button{
  position:relative;
  overflow:hidden;
  border-radius:12px;
  border:1px solid rgba(163,202,255,.18);
  background:rgba(255,255,255,.055);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.075),
    0 8px 22px rgba(0,0,0,.12);
  transition:transform .16s ease,background .16s ease,border-color .16s ease,box-shadow .16s ease;
}
button::before,.button::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(115deg,rgba(255,255,255,.09),transparent 35%);
  opacity:.72;
}
button:hover,.button:hover{
  transform:translateY(-1px);
  background:rgba(115,168,240,.11);
  border-color:rgba(151,196,255,.33);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 10px 28px rgba(0,0,0,.19);
  text-decoration:none;
}
.primary{
  background:linear-gradient(135deg,rgba(74,142,255,.92),rgba(53,112,225,.88));
  border-color:rgba(137,184,255,.56);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.25),
    0 12px 30px rgba(32,91,190,.25);
}
.primary:hover{
  background:linear-gradient(135deg,rgba(89,154,255,.98),rgba(62,124,236,.94));
}

/* Forms */
input,textarea,select{
  border-radius:12px;
  border:1px solid rgba(160,201,255,.16);
  background:rgba(4,13,25,.42);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
  backdrop-filter:blur(12px);
}
input:focus,textarea:focus,select:focus{
  outline:0;
  border-color:rgba(112,171,255,.52);
  box-shadow:0 0 0 4px rgba(87,149,255,.10);
}
input::placeholder{color:#758aa6}

/* Badges / pills */
.badge{
  border-radius:999px;
  padding:6px 10px;
  border-color:rgba(162,202,255,.18);
  background:rgba(255,255,255,.04);
}
.badge.green{background:rgba(26,108,82,.22);border-color:rgba(100,225,184,.23)}
.badge.blue{background:rgba(42,99,177,.24);border-color:rgba(111,167,244,.25)}
.badge.red{background:rgba(136,46,66,.23);border-color:rgba(255,134,153,.23)}
.badge.amber{background:rgba(118,91,30,.24);border-color:rgba(239,198,111,.24)}

/* Cards, strips, list rows */
.tournament-card{
  border-radius:19px;
  transition:transform .18s ease,border-color .18s ease;
}
.tournament-card:hover{transform:translateY(-2px)}
.map-strip{
  border-radius:18px;
  border-color:rgba(174,210,255,.22);
  background-image:
    linear-gradient(90deg,rgba(5,16,31,.76),rgba(8,21,37,.30) 62%,rgba(5,15,29,.62)),
    url('/map-coco.png');
  box-shadow:
    0 18px 42px rgba(0,0,0,.21),
    inset 0 1px 0 rgba(255,255,255,.06);
}
.map-strip button{background:rgba(7,20,37,.58)}
.list-line{border-bottom-color:rgba(157,198,255,.10)}
.step-no{
  background:rgba(86,143,225,.08);
  border-color:rgba(140,189,255,.22);
}

/* Tournament bracket */
.bracket-shell{
  border-radius:20px;
  border:1px solid rgba(158,200,255,.15);
  background:
    radial-gradient(circle at 50% 22%,rgba(61,119,206,.14),transparent 38%),
    rgba(5,15,28,.42);
  box-shadow:var(--shadow-soft),inset 0 1px 0 rgba(255,255,255,.04);
}
.match-card{
  border-radius:15px;
  background:
    linear-gradient(150deg,rgba(22,42,69,.66),rgba(8,19,33,.60));
}
.match-card.playing{
  border-color:rgba(97,165,255,.40);
  box-shadow:0 0 0 1px rgba(74,142,255,.09),0 12px 28px rgba(30,83,169,.13);
}
.match-card.disputed{border-color:rgba(255,141,158,.34)}
.player-line{border-color:rgba(157,198,255,.10)}
.round-label{color:#9fbbdd}

/* Admin */
.admin-tabs{
  padding:6px;
  gap:5px;
  border:1px solid rgba(157,198,255,.13);
  border-radius:16px;
  background:rgba(7,18,32,.46);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}
.admin-tabs a{
  border-radius:11px;
  border:1px solid transparent;
}
.admin-tabs a.active{
  color:#e8f3ff;
  background:rgba(83,145,234,.15);
  border-color:rgba(131,180,247,.20);
}
.toolbar{
  padding:10px;
  border:1px solid rgba(157,198,255,.11);
  border-radius:15px;
  background:rgba(8,20,35,.37);
}

/* Tables */
.table-wrap{border-radius:17px;overflow:auto}
table{border-collapse:separate;border-spacing:0}
th{
  background:rgba(10,24,42,.74);
  color:#b8cbe4;
  backdrop-filter:blur(16px);
}
td,th{border-color:rgba(157,198,255,.09)!important}

/* Modals */
dialog{
  border:1px solid rgba(181,213,255,.18);
  border-radius:22px;
  background:
    linear-gradient(145deg,rgba(18,36,61,.90),rgba(7,18,33,.86));
  color:var(--text);
  box-shadow:
    0 32px 100px rgba(0,0,0,.48),
    inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter:blur(30px) saturate(150%);
  -webkit-backdrop-filter:blur(30px) saturate(150%);
}
dialog::backdrop{
  background:rgba(2,8,16,.68);
  backdrop-filter:blur(10px);
}
.modal-head{
  padding-bottom:14px;
  border-bottom:1px solid rgba(158,199,255,.10);
}
.modal-head button{
  border-radius:11px;
  background:rgba(255,255,255,.045);
}

/* Notices, notifications and search results */
.notice,.notification{
  border-radius:14px;
  border:1px solid rgba(159,199,255,.13);
  background:rgba(69,116,183,.075);
}
.search-results a{
  border-radius:14px;
  background:rgba(255,255,255,.035);
}
.search-results a:hover{
  background:rgba(96,152,230,.08);
  border-color:rgba(154,197,255,.22);
}

/* Champion / toast */
.champion{
  border-color:rgba(237,196,100,.28);
  background:
    radial-gradient(circle at top,rgba(166,124,45,.19),transparent 48%),
    linear-gradient(145deg,rgba(35,37,45,.70),rgba(12,22,36,.54));
}
#toast{
  border-radius:14px;
  background:rgba(21,48,79,.80);
  border-color:rgba(142,192,255,.30);
  box-shadow:0 18px 46px rgba(0,0,0,.32),inset 0 1px 0 rgba(255,255,255,.09);
  backdrop-filter:blur(20px) saturate(145%);
}

/* Dev bar */
.devbar{
  margin:8px 14px 0 0;
  border:1px solid rgba(227,197,126,.13);
  border-radius:12px;
  background:rgba(92,71,26,.16);
}

/* Responsiveness */
@media(max-width:1100px){
  .sidebar{width:198px;inset:10px auto 10px 10px}
  .layout{margin-left:218px}
  .brand-map-logo{width:52px;height:32px;flex-basis:52px}
  .brand-name{font-size:.87rem}
  .brand-name small{font-size:.58rem}
}
@media(max-width:800px){
  .sidebar{
    position:static;
    width:auto;
    margin:8px;
    padding:8px;
    border-radius:17px;
  }
  .sidebar .brand,.nav-label,.side-bottom{display:none}
  .sidebar nav{padding:0;gap:6px}
  .layout{margin-left:0}
  .topbar{
    margin:8px;
    border-radius:17px;
    padding:12px 14px;
  }
  .mobile-brand{display:flex}
  .mobile-brand .brand-map-logo{width:52px;height:31px;flex-basis:52px}
  .global-search{
    border-top:1px solid rgba(157,198,255,.10);
    background:rgba(255,255,255,.025);
  }
  .page{padding:22px 16px 44px}
  .panel{border-radius:16px}
  .feature{border-radius:19px}
}
@media(max-width:480px){
  .brand-name{font-size:.78rem}
  .brand-name small{font-size:.53rem}
  .brand-map-logo{width:46px;height:28px;flex-basis:46px;border-radius:9px}
  .topbar{padding:10px}
  .panel{padding:17px}
  .feature{padding:20px}
}


/* =========================================================
   BUILD FIGHT ARENA — SNAP SPACE THEME
   Inspired by the user's Snapchat background:
   dark galaxy, purple nebula, bubble icons, neon violet.
   ========================================================= */

:root{
  --bg:#090718;
  --surface:rgba(12,10,27,.60);
  --surface2:rgba(18,14,36,.72);
  --line:rgba(150,123,255,.16);
  --line-strong:rgba(179,151,255,.28);
  --muted:#a9a8c9;
  --text:#f5f2ff;
  --blue:#79b7ff;
  --cyan:#91d9ff;
  --green:#78deb6;
  --red:#ff8faf;
  --amber:#f0cd79;
  --violet:#b047ff;
  --violet-2:#6f4cff;
  --glass:rgba(13,10,30,.58);
  --glass-strong:rgba(18,14,37,.78);
  --glass-soft:rgba(255,255,255,.04);
  --shadow:0 24px 64px rgba(0,0,0,.34);
  --shadow-soft:0 10px 30px rgba(0,0,0,.22);
  --glass-blur:blur(24px) saturate(155%);
}

html{background:#090718}
body{
  min-height:100vh;
  color:var(--text);
  background:
    radial-gradient(circle at 12% 14%,rgba(110,66,255,.32),transparent 18rem),
    radial-gradient(circle at 88% 8%,rgba(166,76,255,.20),transparent 22rem),
    radial-gradient(circle at 74% 68%,rgba(71,153,255,.16),transparent 25rem),
    radial-gradient(circle at 28% 86%,rgba(208,87,255,.18),transparent 23rem),
    linear-gradient(180deg,#05040b 0%,#0b0820 32%,#06040e 100%);
  background-attachment:fixed;
}

body::before,
body::after{
  content:"";
  position:fixed;
  pointer-events:none;
  z-index:-1;
  border-radius:999px;
  filter:blur(72px);
  opacity:.42;
}
body::before{
  width:380px;height:380px;
  left:-4%;top:14%;
  background:rgba(163,72,255,.34);
}
body::after{
  width:420px;height:420px;
  right:0%;bottom:4%;
  background:rgba(81,118,255,.20);
}

::selection{background:rgba(145,104,255,.34);color:#fff}

*{scrollbar-color:rgba(125,108,220,.48) rgba(10,8,22,.35)}
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-track{background:rgba(8,6,18,.35)}
*::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,rgba(151,93,255,.62),rgba(83,114,244,.46));
  border:2px solid rgba(7,5,15,.45);
  border-radius:999px;
}

/* Brand */
.brand-name{
  color:#ffffff;
  letter-spacing:.045em;
  text-shadow:0 0 18px rgba(151,98,255,.12);
}
.brand-name small{color:#b7afd8}
.brand-map-logo{
  border-color:rgba(205,197,255,.26);
  background:rgba(255,255,255,.07);
  box-shadow:
    0 12px 28px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.14);
}
.brand-map-logo::after{
  background:linear-gradient(145deg,rgba(255,255,255,.22),transparent 48%);
}

/* Sidebar */
.sidebar{
  border-color:rgba(188,165,255,.14);
  background:
    linear-gradient(180deg,rgba(12,10,27,.84),rgba(7,5,18,.72));
  box-shadow:
    0 26px 80px rgba(0,0,0,.38),
    inset 0 1px 0 rgba(255,255,255,.05);
}
.sidebar::before{
  background:
    radial-gradient(circle at 18% 2%,rgba(177,90,255,.18),transparent 34%),
    linear-gradient(110deg,rgba(255,255,255,.03),transparent 36%);
}
.nav-label{color:#7f7da7}
.nav-item{
  color:#b7b5d7;
}
.nav-item:hover{
  color:#ffffff;
  background:rgba(255,255,255,.05);
  border-color:rgba(173,149,255,.12);
}
.nav-item.active{
  color:#ffffff;
  background:
    linear-gradient(135deg,rgba(116,76,255,.36),rgba(174,71,255,.16));
  border-color:rgba(188,148,255,.26);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 10px 24px rgba(80,42,170,.18);
}
.nav-item.active:before{
  background:linear-gradient(#d5b1ff,#8b64ff);
  box-shadow:0 0 18px rgba(179,105,255,.42);
}
.mini-map{
  border-color:rgba(195,171,255,.16);
  background:
    linear-gradient(110deg,rgba(14,11,32,.75),rgba(23,16,45,.42)),
    url('/map-coco.png') center/cover;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
.legal{color:#78769e}

/* Topbar */
.topbar{
  border-color:rgba(188,166,255,.12);
  background:rgba(10,8,25,.56);
  box-shadow:
    0 14px 42px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.05);
}
.global-search{
  border-color:rgba(183,154,255,.12);
  background:rgba(255,255,255,.03);
}
.global-search:focus-within{
  border-color:rgba(171,132,255,.28);
  background:rgba(255,255,255,.05);
  box-shadow:0 0 0 4px rgba(140,98,255,.08);
}
.global-search input{color:#f3f0ff}
.global-search input::placeholder{color:#8f8aae}
.connection{
  color:#82e0bd;
  border-color:rgba(120,222,182,.12);
  background:rgba(47,91,78,.14);
}
.avatar{
  border-color:rgba(205,189,255,.16);
  background:rgba(106,84,171,.28);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 8px 22px rgba(0,0,0,.18);
}

/* Text */
h1,h2,h3,strong{color:#fff}
.page-head p,
.muted,
small{color:#a39fc5}
.breadcrumb{color:#8a86ac}
a{color:#bcb5ff}
a:hover{color:#ddd8ff}

/* Universal glass */
.panel,
.stat,
.match-card,
.table-wrap{
  background:
    linear-gradient(145deg,rgba(17,13,35,.72),rgba(8,6,20,.58));
  border-color:rgba(187,167,255,.14);
  box-shadow:
    0 14px 35px rgba(0,0,0,.20),
    inset 0 1px 0 rgba(255,255,255,.045);
}
.panel:hover{
  border-color:rgba(193,170,255,.22);
}
.feature{
  border-color:rgba(184,162,255,.18);
  background:
    radial-gradient(circle at 84% 10%,rgba(173,79,255,.22),transparent 30%),
    radial-gradient(circle at 18% 88%,rgba(80,117,255,.14),transparent 28%),
    linear-gradient(140deg,rgba(20,15,43,.78),rgba(7,5,20,.56) 70%);
  box-shadow:
    0 24px 62px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.06);
}
.feature::after{
  background:linear-gradient(120deg,rgba(255,255,255,.04),transparent 28%);
}
.feature-foot{
  border-top-color:rgba(190,170,255,.12);
  background:rgba(3,2,10,.22);
}
.home-map-artwork{
  border-color:rgba(202,184,255,.18);
  background:rgba(9,7,20,.54);
  box-shadow:
    0 18px 42px rgba(0,0,0,.26),
    inset 0 1px 0 rgba(255,255,255,.08);
}
.match-callout{
  background:
    radial-gradient(circle at 20% 8%,rgba(176,79,255,.16),transparent 33%),
    linear-gradient(145deg,rgba(17,13,35,.72),rgba(8,6,20,.58));
}
.match-callout .accent-icon{
  border-color:rgba(180,156,255,.18);
  background:rgba(137,78,234,.15);
  color:#d8cdff;
}

/* Stats */
.stat{
  background:
    linear-gradient(145deg,rgba(18,14,37,.68),rgba(8,6,20,.56));
}
.stat:hover{
  border-color:rgba(190,169,255,.24);
  background:
    linear-gradient(145deg,rgba(23,17,48,.75),rgba(10,8,23,.60));
}
.stat .icon{color:#cdb7ff}

/* Buttons */
button,.button{
  color:#f5f2ff;
  border-color:rgba(189,167,255,.18);
  background:rgba(255,255,255,.055);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 8px 22px rgba(0,0,0,.12);
  border-radius:14px;
}
button::before,.button::before{
  background:linear-gradient(115deg,rgba(255,255,255,.12),transparent 35%);
}
button:hover,.button:hover{
  color:#fff;
  background:rgba(165,104,255,.12);
  border-color:rgba(189,154,255,.34);
}
.primary{
  color:#fff;
  background:linear-gradient(135deg,#6d4cff,#b238ff);
  border-color:rgba(203,167,255,.42);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.20),
    0 12px 30px rgba(118,59,201,.26);
}
.primary:hover{
  background:linear-gradient(135deg,#7759ff,#bf45ff);
}
.ghost{color:#cabdff}

/* Forms */
input,textarea,select{
  color:#f3f0ff;
  border-color:rgba(182,154,255,.16);
  background:rgba(5,4,14,.42);
}
input:focus,textarea:focus,select:focus{
  border-color:rgba(171,129,255,.48);
  box-shadow:0 0 0 4px rgba(144,95,255,.10);
}
input::placeholder{color:#8f8aae}
select option{background:#120d28;color:#f3f0ff}

/* Badges */
.badge{
  color:#e8e4ff;
  border-color:rgba(188,167,255,.18);
  background:rgba(255,255,255,.04);
}
.badge.green{background:rgba(30,105,83,.22);border-color:rgba(100,225,184,.22)}
.badge.blue{background:rgba(44,82,177,.24);border-color:rgba(118,154,255,.24)}
.badge.red{background:rgba(132,42,78,.24);border-color:rgba(255,138,172,.24)}
.badge.amber{background:rgba(118,89,26,.24);border-color:rgba(241,206,119,.24)}

/* Tournament strips */
.tournament-card{border-radius:20px}
.map-strip{
  border-color:rgba(198,175,255,.20);
  background-image:
    linear-gradient(90deg,rgba(7,5,19,.72),rgba(12,9,27,.28) 62%,rgba(7,5,18,.64)),
    url('/map-coco.png');
  box-shadow:
    0 18px 42px rgba(0,0,0,.21),
    inset 0 1px 0 rgba(255,255,255,.06);
}
.list-line{border-bottom-color:rgba(191,170,255,.10)}
.step-no{
  color:#dccfff;
  background:rgba(138,83,234,.12);
  border-color:rgba(193,170,255,.22);
}

/* Bracket */
.bracket-shell{
  border-color:rgba(186,165,255,.15);
  background:
    radial-gradient(circle at 50% 22%,rgba(119,82,255,.16),transparent 38%),
    rgba(6,4,16,.42);
}
.match-card{
  background:
    linear-gradient(150deg,rgba(22,17,45,.70),rgba(8,6,19,.60));
}
.match-card.playing{
  border-color:rgba(180,136,255,.36);
  box-shadow:0 0 0 1px rgba(171,131,255,.08),0 12px 28px rgba(98,48,170,.12);
}
.match-card.disputed{border-color:rgba(255,141,158,.26)}
.player-line{border-color:rgba(193,172,255,.09)}
.round-label{color:#a69fcb}

/* Admin / table */
.admin-tabs{
  border-color:rgba(188,166,255,.13);
  background:rgba(8,7,21,.46);
}
.admin-tabs a{color:#b3aed0}
.admin-tabs a.active{
  color:#fff;
  background:rgba(141,92,255,.18);
  border-color:rgba(191,167,255,.20);
}
.toolbar{
  border-color:rgba(188,166,255,.11);
  background:rgba(8,20,35,.30);
}
th{
  background:rgba(15,11,31,.78);
  color:#c9c4e6;
}
td,th{border-color:rgba(188,166,255,.08)!important}

/* Dialogs */
dialog{
  border-color:rgba(197,177,255,.18);
  background:
    linear-gradient(145deg,rgba(17,13,36,.92),rgba(7,5,20,.88));
  box-shadow:
    0 32px 100px rgba(0,0,0,.48),
    inset 0 1px 0 rgba(255,255,255,.08);
}
dialog::backdrop{
  background:rgba(4,3,10,.70);
  backdrop-filter:blur(10px);
}
.modal-head{
  border-bottom-color:rgba(190,170,255,.10);
}
.modal-head button{
  background:rgba(255,255,255,.04);
}

/* Notices / search */
.notice,.notification{
  border-color:rgba(188,166,255,.13);
  background:rgba(125,71,255,.10);
}
.search-results a{
  border-radius:14px;
  background:rgba(255,255,255,.03);
}
.search-results a:hover{
  background:rgba(145,92,255,.10);
  border-color:rgba(190,166,255,.22);
}

/* Toast */
#toast{
  border-radius:14px;
  background:rgba(20,14,41,.88);
  border-color:rgba(195,171,255,.26);
  box-shadow:0 18px 46px rgba(0,0,0,.32),inset 0 1px 0 rgba(255,255,255,.08);
}

/* Floating bubble action buttons feel */
.topbar button,
.modal-head button,
.global-search button{
  border-radius:999px;
}

/* Mobile keeps the same space mood */
@media(max-width:800px){
  .sidebar{
    background:rgba(10,8,24,.76);
    border-color:rgba(188,166,255,.12);
  }
  .topbar{
    background:rgba(10,8,24,.68);
  }
  .global-search{
    background:rgba(255,255,255,.03);
    border-top-color:rgba(188,166,255,.10);
  }
}


/* =========================================================
   PUBLIC PLAYER PROFILE — SNAP STYLE
   ========================================================= */
.player-profile-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:14px;
  overflow:hidden;
}
.player-profile-identity{
  display:flex;
  align-items:center;
  gap:18px;
}
.player-profile-avatar{
  display:grid;
  place-items:center;
  width:72px;
  height:72px;
  flex:0 0 72px;
  border-radius:24px;
  color:#fff;
  font-size:1.25rem;
  font-weight:900;
  letter-spacing:.04em;
  border:1px solid rgba(200,177,255,.26);
  background:
    radial-gradient(circle at 28% 20%,rgba(255,255,255,.18),transparent 30%),
    linear-gradient(145deg,rgba(113,74,255,.76),rgba(177,56,255,.52));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 14px 35px rgba(92,50,171,.20);
}
.player-profile-identity h2{
  margin:.2rem 0 .65rem;
  font-size:clamp(1.45rem,2vw,2rem);
}
.player-public-stats{
  grid-template-columns:repeat(6,minmax(0,1fr));
  margin-bottom:18px;
}
.player-profile-grid{
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  gap:18px;
}
.player-tournament-row{
  gap:14px;
}
.player-tournament-row>div:first-child{
  display:grid;
  gap:3px;
  min-width:0;
}
.player-match-history{
  display:grid;
  gap:9px;
}
.player-match-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:13px 14px;
  border:1px solid rgba(187,166,255,.11);
  border-radius:14px;
  background:rgba(255,255,255,.025);
  color:inherit;
  text-decoration:none;
  transition:background .16s ease,border-color .16s ease,transform .16s ease;
}
.player-match-row:hover{
  background:rgba(145,92,255,.08);
  border-color:rgba(190,166,255,.20);
  transform:translateY(-1px);
  text-decoration:none;
}
.player-match-row>div:first-child{
  display:grid;
  gap:4px;
  min-width:0;
}
.player-match-result{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
}
@media(max-width:1100px){
  .player-public-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:800px){
  .player-profile-grid{grid-template-columns:1fr}
  .player-public-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:520px){
  .player-profile-identity{align-items:flex-start}
  .player-profile-avatar{
    width:58px;height:58px;flex-basis:58px;border-radius:18px;
  }
  .player-match-row{
    align-items:flex-start;
    flex-direction:column;
  }
  .player-match-result{width:100%;justify-content:space-between}
}


/* =========================================================
   GLOBAL LEADERBOARD — SNAP STYLE
   ========================================================= */
.leaderboard-intro{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}
.leaderboard-intro h2{
  margin:.25rem 0 .35rem;
}
.leaderboard-intro p{
  margin:0;
  color:var(--muted);
}

.leaderboard-podium{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}
.podium-card{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:9px;
  min-height:185px;
  padding:24px 18px 20px;
  border:1px solid rgba(190,166,255,.14);
  border-radius:20px;
  color:inherit;
  text-decoration:none;
  background:
    radial-gradient(circle at 50% 0%,rgba(150,87,255,.15),transparent 45%),
    linear-gradient(145deg,rgba(20,15,42,.76),rgba(8,6,20,.58));
  box-shadow:
    0 16px 38px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.05);
  overflow:hidden;
  transition:transform .16s ease,border-color .16s ease;
}
.podium-card:hover{
  transform:translateY(-3px);
  border-color:rgba(199,171,255,.28);
  text-decoration:none;
}
.podium-1{
  background:
    radial-gradient(circle at 50% 0%,rgba(242,198,99,.17),transparent 44%),
    linear-gradient(145deg,rgba(29,23,43,.80),rgba(10,7,20,.60));
  border-color:rgba(236,201,119,.22);
}
.podium-2{
  background:
    radial-gradient(circle at 50% 0%,rgba(192,204,230,.15),transparent 44%),
    linear-gradient(145deg,rgba(22,18,40,.78),rgba(9,7,20,.60));
}
.podium-3{
  background:
    radial-gradient(circle at 50% 0%,rgba(209,137,89,.15),transparent 44%),
    linear-gradient(145deg,rgba(26,18,38,.78),rgba(9,7,20,.60));
}
.podium-place{
  position:absolute;
  top:12px;
  left:14px;
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:999px;
  font-weight:900;
  color:#fff;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.07);
}
.podium-avatar{
  display:grid;
  place-items:center;
  width:68px;
  height:68px;
  border-radius:23px;
  font-weight:900;
  color:#fff;
  font-size:1.2rem;
  border:1px solid rgba(198,174,255,.24);
  background:
    radial-gradient(circle at 28% 20%,rgba(255,255,255,.18),transparent 30%),
    linear-gradient(145deg,rgba(113,74,255,.78),rgba(177,56,255,.54));
  box-shadow:0 12px 28px rgba(88,48,161,.18);
}
.podium-card>strong{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.podium-card>small{
  text-align:center;
  color:var(--muted);
}

.leaderboard-panel{
  padding:10px;
  overflow:hidden;
}
.leaderboard-head,
.leaderboard-row{
  display:grid;
  grid-template-columns:48px minmax(180px,1.7fr) repeat(5,minmax(78px,.72fr)) minmax(120px,.9fr);
  align-items:center;
  gap:10px;
}
.leaderboard-head{
  padding:10px 13px 12px;
  color:#817ba6;
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.leaderboard-list{
  display:grid;
  gap:7px;
}
.leaderboard-row{
  padding:11px 13px;
  border:1px solid rgba(190,166,255,.08);
  border-radius:14px;
  color:inherit;
  text-decoration:none;
  background:rgba(255,255,255,.022);
  transition:background .16s ease,border-color .16s ease,transform .16s ease;
}
.leaderboard-row:hover{
  background:rgba(145,92,255,.08);
  border-color:rgba(190,166,255,.18);
  transform:translateY(-1px);
  text-decoration:none;
}
.leaderboard-rank{
  display:grid;
  place-items:center;
  width:31px;
  height:31px;
  border-radius:10px;
  color:#aaa5c9;
  background:rgba(255,255,255,.035);
  font-weight:900;
}
.leaderboard-rank.top-1{
  color:#f1d58a;
  background:rgba(179,137,39,.15);
}
.leaderboard-rank.top-2{
  color:#d5daea;
  background:rgba(150,160,188,.12);
}
.leaderboard-rank.top-3{
  color:#d5a17f;
  background:rgba(165,94,50,.13);
}
.leaderboard-player{
  display:flex;
  align-items:center;
  gap:11px;
  min-width:0;
}
.leaderboard-player>span:last-child{
  display:grid;
  gap:2px;
  min-width:0;
}
.leaderboard-player strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.leaderboard-avatar{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  flex:0 0 38px;
  border-radius:13px;
  color:#fff;
  font-size:.75rem;
  font-weight:900;
  border:1px solid rgba(196,173,255,.16);
  background:linear-gradient(145deg,rgba(102,72,215,.58),rgba(159,61,215,.40));
}
.leaderboard-stat{
  display:grid;
  gap:2px;
}
.leaderboard-stat small{
  display:none;
}
.leaderboard-stat strong{
  font-size:.9rem;
}
.leaderboard-open{
  justify-self:end;
  color:#b9afff;
  font-size:.78rem;
  white-space:nowrap;
}

@media(max-width:1180px){
  .leaderboard-head,
  .leaderboard-row{
    grid-template-columns:44px minmax(180px,1.7fr) repeat(3,minmax(72px,.7fr)) minmax(110px,.85fr);
  }
  .leaderboard-head span:nth-child(5),
  .leaderboard-row .leaderboard-stat:nth-child(5),
  .leaderboard-head span:nth-child(7),
  .leaderboard-row .leaderboard-stat:nth-child(7){
    display:none;
  }
}
@media(max-width:800px){
  .leaderboard-intro{
    align-items:flex-start;
    flex-direction:column;
  }
  .leaderboard-podium{
    grid-template-columns:1fr;
  }
  .podium-card{
    min-height:0;
    flex-direction:row;
    justify-content:flex-start;
    padding:16px;
  }
  .podium-place{
    position:static;
    flex:0 0 30px;
  }
  .podium-avatar{
    width:48px;height:48px;flex:0 0 48px;border-radius:16px;
  }
  .podium-card>small{
    margin-left:auto;
    text-align:right;
  }
  .leaderboard-head{display:none}
  .leaderboard-row{
    grid-template-columns:42px minmax(0,1fr) auto;
    gap:10px;
  }
  .leaderboard-row .leaderboard-stat{
    display:none!important;
  }
  .leaderboard-open{
    font-size:0;
  }
  .leaderboard-open .icon{
    width:18px;height:18px;
  }
}
@media(max-width:520px){
  .podium-card>small{display:none}
  .leaderboard-panel{padding:8px}
  .leaderboard-row{padding:10px}
}


/* =========================================================
   ALL-TIME POINTS & RANKS — SNAP STYLE
   ========================================================= */
.rank-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:4px 9px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  font-size:.69rem;
  line-height:1;
  font-weight:900;
  letter-spacing:.045em;
  text-transform:uppercase;
  white-space:nowrap;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
.rank-bronze{
  color:#e0a77f;
  background:rgba(156,84,48,.17);
  border-color:rgba(207,134,91,.22);
}
.rank-silver{
  color:#d8deeb;
  background:rgba(139,151,178,.14);
  border-color:rgba(191,200,222,.20);
}
.rank-gold{
  color:#f3d47b;
  background:rgba(171,128,36,.16);
  border-color:rgba(239,199,97,.23);
}
.rank-platinum{
  color:#a9e3e0;
  background:rgba(56,137,145,.16);
  border-color:rgba(127,215,215,.22);
}
.rank-diamond{
  color:#9bc8ff;
  background:rgba(55,105,194,.17);
  border-color:rgba(126,178,255,.24);
}
.rank-champion{
  color:#e0b4ff;
  background:linear-gradient(135deg,rgba(118,65,233,.22),rgba(193,66,255,.17));
  border-color:rgba(204,147,255,.30);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10),0 0 18px rgba(156,83,255,.09);
}

.rank-progress{
  display:grid;
  gap:8px;
}
.rank-progress-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.rank-progress-head span{
  color:#bcb4df;
  font-weight:800;
}
.rank-progress-head strong{
  color:#fff;
}
.rank-bar{
  height:10px;
  overflow:hidden;
  border-radius:999px;
  border:1px solid rgba(189,166,255,.12);
  background:rgba(255,255,255,.035);
}
.rank-bar span{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#6c4cff,#b238ff);
  box-shadow:0 0 18px rgba(147,71,255,.24);
}
.rank-progress small{
  color:#8f8aae;
}
.rank-scoring-note{
  margin:12px 0 0;
  font-size:.8rem;
}
.player-rank-card{
  margin-bottom:18px;
}
.profile-rank-block{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid rgba(190,166,255,.10);
}
.profile-rank-block .section-title,
.player-rank-card .section-title{
  margin-bottom:12px;
}
.ranks-explainer{
  margin-top:18px;
}
.rank-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:10px;
}
.rank-tier{
  display:grid;
  gap:9px;
  justify-items:start;
  padding:13px;
  border:1px solid rgba(190,166,255,.10);
  border-radius:14px;
  background:rgba(255,255,255,.025);
}
.rank-tier strong{
  font-size:.82rem;
}
.leaderboard-points strong{
  color:#d9c9ff;
}
.search-results .rank-badge{
  margin-right:4px;
  transform:translateY(-1px);
}
.leaderboard-player small{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:5px;
}
.leaderboard-head-alltime,
.leaderboard-row-alltime{
  grid-template-columns:48px minmax(190px,1.7fr) repeat(5,minmax(78px,.72fr)) minmax(120px,.9fr);
}

@media(max-width:1180px){
  .rank-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .leaderboard-head-alltime,
  .leaderboard-row-alltime{
    grid-template-columns:44px minmax(190px,1.7fr) repeat(3,minmax(75px,.7fr)) minmax(110px,.85fr);
  }
  .leaderboard-head-alltime span:nth-child(5),
  .leaderboard-row-alltime .leaderboard-stat:nth-child(5),
  .leaderboard-head-alltime span:nth-child(7),
  .leaderboard-row-alltime .leaderboard-stat:nth-child(7){
    display:none;
  }
}
@media(max-width:800px){
  .rank-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .leaderboard-row-alltime{
    grid-template-columns:42px minmax(0,1fr) auto;
  }
  .leaderboard-row-alltime .leaderboard-stat{
    display:none!important;
  }
}
@media(max-width:520px){
  .rank-grid{grid-template-columns:1fr}
}


/* =========================================================
   ADVANCED PUBLIC PLAYER STATS — SNAP STYLE
   ========================================================= */
.player-career-card{
  margin-bottom:18px;
}
.player-career-card .section-title{
  align-items:flex-start;
  margin-bottom:14px;
}
.player-career-card .section-title h2{
  margin:.2rem 0 0;
}
.career-global-rank{
  display:inline-flex;
  align-items:baseline;
  gap:5px;
  padding:8px 11px;
  border:1px solid rgba(190,166,255,.14);
  border-radius:13px;
  color:#fff;
  background:rgba(147,88,255,.09);
  font-weight:900;
}
.career-global-rank small{
  font-size:.68rem;
  font-weight:700;
  color:#9d97bd;
}
.career-stat-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.career-stat{
  display:grid;
  align-content:start;
  gap:5px;
  min-height:105px;
  padding:14px;
  border:1px solid rgba(190,166,255,.09);
  border-radius:15px;
  background:
    linear-gradient(145deg,rgba(255,255,255,.032),rgba(119,72,216,.025));
}
.career-stat small{
  color:#8f8aae;
  font-size:.7rem;
  font-weight:800;
  letter-spacing:.035em;
  text-transform:uppercase;
}
.career-stat strong{
  color:#fff;
  font-size:1.08rem;
  line-height:1.25;
  overflow-wrap:anywhere;
}
.career-stat span{
  color:#a9a4c6;
  font-size:.76rem;
}
.recent-form-line{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:12px;
  padding:12px 14px;
  border:1px solid rgba(190,166,255,.08);
  border-radius:14px;
  background:rgba(255,255,255,.02);
}
.recent-form-line>span{
  color:#bcb5d7;
  font-size:.77rem;
  font-weight:800;
}
.recent-form-line>small{
  margin-left:auto;
}
.recent-form{
  display:flex;
  align-items:center;
  gap:6px;
}
.form-dot{
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  border-radius:10px;
  font-size:.68rem;
  font-weight:900;
  border:1px solid rgba(255,255,255,.10);
}
.form-dot.win{
  color:#8ce6c3;
  background:rgba(31,113,87,.20);
  border-color:rgba(110,225,187,.18);
}
.form-dot.loss{
  color:#ff9db4;
  background:rgba(130,42,71,.21);
  border-color:rgba(255,138,169,.18);
}

@media(max-width:1000px){
  .career-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:650px){
  .career-stat-grid{grid-template-columns:1fr}
  .career-stat{min-height:0}
  .recent-form-line{
    align-items:flex-start;
    flex-wrap:wrap;
  }
  .recent-form-line>small{
    width:100%;
    margin-left:0;
  }
}

/* =========================================================
   MOBILE V2 — BUILD FIGHT ARENA
   Responsive pass for iPhone / Android / small tablets.
   Desktop styling above is intentionally preserved.
   ========================================================= */

html{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}

body{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
}

img,video,canvas{
  max-width:100%;
}

button,input,select,textarea{
  max-width:100%;
}

.page,
.layout,
.topbar,
.sidebar,
.panel,
.feature,
.stat,
.map-strip,
.list-line,
.section-title,
.player-profile-grid,
.player-profile-identity,
.leaderboard-row,
.leaderboard-player{
  min-width:0;
}

@media(max-width:800px){

  /* ---------- Main mobile shell ---------- */
  .sidebar{
    position:relative !important;
    inset:auto !important;
    z-index:30;
    width:auto !important;
    height:auto !important;
    margin:8px 10px 0 !important;
    padding:7px !important;
    border:1px solid rgba(188,166,255,.13) !important;
    border-radius:18px !important;
    background:rgba(10,8,24,.82) !important;
    box-shadow:0 12px 34px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.045) !important;
    backdrop-filter:blur(18px) saturate(145%);
    -webkit-backdrop-filter:blur(18px) saturate(145%);
    overflow:hidden !important;
  }

  .sidebar .brand,
  .sidebar .nav-label,
  .sidebar .side-bottom{
    display:none !important;
  }

  .sidebar nav{
    display:flex !important;
    gap:6px !important;
    width:100%;
    padding:0 !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    scroll-snap-type:x proximity;
  }

  .sidebar nav::-webkit-scrollbar{
    display:none;
  }

  .nav-item{
    flex:0 0 auto !important;
    min-height:42px !important;
    margin:0 !important;
    padding:9px 12px !important;
    gap:8px !important;
    border-radius:13px !important;
    font-size:.82rem !important;
    white-space:nowrap !important;
    scroll-snap-align:start;
  }

  .nav-item .icon{
    width:18px !important;
    height:18px !important;
  }

  .nav-item.active:before{
    display:none !important;
  }

  .layout{
    width:100% !important;
    max-width:100% !important;
    margin-left:0 !important;
  }

  /* ---------- Header: no more overlap ---------- */
  .topbar{
    position:relative !important;
    z-index:20;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-areas:
      "brand"
      "actions"
      "search" !important;
    align-items:stretch !important;
    justify-content:stretch !important;
    width:auto !important;
    height:auto !important;
    min-height:0 !important;
    margin:8px 10px 0 !important;
    padding:13px !important;
    gap:11px !important;
    border-radius:18px !important;
  }

  .mobile-brand{
    grid-area:brand;
    display:flex !important;
    width:100%;
    min-width:0;
    margin:0 !important;
    padding:0 !important;
    align-items:center;
  }

  .mobile-brand .brand-map-logo{
    width:55px !important;
    height:34px !important;
    flex:0 0 55px !important;
    border-radius:11px !important;
  }

  .mobile-brand .brand-name{
    min-width:0;
    font-size:.9rem !important;
    line-height:1.16;
    letter-spacing:.035em;
  }

  .mobile-brand .brand-name small{
    margin-top:.18rem;
    font-size:.57rem !important;
    letter-spacing:.17em;
  }

  .top-actions{
    grid-area:actions;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    width:100%;
    min-width:0;
    gap:8px !important;
    flex-wrap:nowrap !important;
  }

  .top-actions .connection{
    flex:0 0 auto;
    min-height:38px;
    padding:7px 10px;
    font-size:.7rem !important;
  }

  .top-actions .button{
    flex:1 1 auto;
    min-width:0;
    min-height:44px;
    padding:9px 12px !important;
    font-size:.82rem !important;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .top-actions > .ghost.small{
    flex:0 0 42px;
    width:42px;
    min-width:42px;
    padding:0 !important;
  }

  .top-actions .avatar{
    flex:0 0 40px;
    width:40px;
    height:40px;
  }

  .global-search{
    grid-area:search;
    order:initial !important;
    display:flex !important;
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    margin:0 !important;
    padding:6px 7px 6px 12px !important;
    border:1px solid rgba(183,154,255,.15) !important;
    border-radius:14px !important;
    background:rgba(255,255,255,.035) !important;
  }

  .global-search input{
    width:100%;
    min-width:0 !important;
    padding:8px 2px !important;
    font-size:16px !important; /* avoids iOS zoom */
  }

  .global-search button{
    flex:0 0 40px;
    width:40px !important;
    min-width:40px;
    min-height:40px !important;
  }

  /* ---------- Page spacing / headings ---------- */
  .page{
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:20px 14px calc(40px + env(safe-area-inset-bottom)) !important;
  }

  .page-head{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    align-items:start !important;
    justify-content:stretch !important;
    gap:10px !important;
    margin:4px 0 20px !important;
  }

  .page-head > div{
    min-width:0;
  }

  .breadcrumb{
    margin:0 0 8px !important;
    font-size:.69rem !important;
    line-height:1.4;
  }

  .page-head h1{
    max-width:100%;
    margin:0 0 7px !important;
    font-size:clamp(1.9rem,8.2vw,2.45rem) !important;
    line-height:1.05 !important;
    letter-spacing:-.04em !important;
    overflow-wrap:anywhere;
  }

  .page-head p{
    max-width:100%;
    margin:0 !important;
    font-size:.94rem !important;
    line-height:1.5;
  }

  .page-head > .button,
  .page-head > .row{
    justify-self:start;
    max-width:100%;
  }

  /* ---------- Home / hero ---------- */
  .hero-grid,
  .grid2,
  .forms-grid,
  .player-profile-grid{
    grid-template-columns:minmax(0,1fr) !important;
    gap:14px !important;
  }

  .feature{
    min-height:0 !important;
    padding:18px !important;
    border-radius:18px !important;
  }

  .feature h2{
    max-width:100% !important;
    margin:18px 0 !important;
    font-size:clamp(2rem,9.2vw,2.65rem) !important;
    line-height:.99 !important;
    letter-spacing:-.045em !important;
    overflow-wrap:anywhere;
  }

  .feature .edition{
    font-size:.72rem !important;
    letter-spacing:.14em !important;
  }

  .home-map-artwork{
    margin:14px 0 17px !important;
    border-radius:15px !important;
  }

  .feature-meta{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px 12px !important;
    margin:18px 0 !important;
    font-size:.78rem !important;
  }

  .feature-meta span{
    min-width:0;
    align-items:flex-start;
  }

  .feature .row{
    gap:9px !important;
  }

  .feature .row .button{
    flex:1 1 150px;
    min-width:0;
  }

  .feature-foot{
    margin:18px -18px -18px !important;
    padding:13px 18px !important;
    gap:8px 14px !important;
    flex-wrap:wrap !important;
    font-size:.72rem !important;
  }

  .match-callout{
    min-height:0 !important;
    padding:18px !important;
  }

  .match-callout .accent-icon{
    display:grid !important;
    width:40px;
    height:40px;
    margin:4px 0 14px !important;
  }

  .match-callout h2{
    margin-bottom:10px;
    font-size:1.42rem !important;
  }

  .match-callout p{
    margin-bottom:16px;
    font-size:.88rem !important;
  }

  .match-callout .button{
    width:100%;
    margin-top:0 !important;
  }

  /* ---------- Cards / stats ---------- */
  .panel{
    padding:16px !important;
    border-radius:16px !important;
  }

  .panel h2{
    margin-bottom:14px;
  }

  .stats{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:9px !important;
    margin:16px 0 22px !important;
  }

  .stat{
    min-width:0;
    padding:13px 12px !important;
    gap:8px;
    border-radius:14px !important;
  }

  .stat strong{
    font-size:1.3rem !important;
  }

  .stat small{
    display:block;
    margin-top:2px;
    font-size:.68rem !important;
    line-height:1.25;
  }

  .stat .icon{
    width:20px !important;
    height:20px !important;
  }

  .cards{
    grid-template-columns:minmax(0,1fr) !important;
    gap:12px !important;
  }

  .section-title{
    align-items:flex-start !important;
    flex-wrap:wrap !important;
    margin:22px 0 12px !important;
  }

  .section-title h2{
    font-size:1.18rem;
  }

  .section-title a{
    font-size:.78rem !important;
  }

  .list-line{
    align-items:flex-start !important;
    flex-wrap:wrap !important;
    gap:8px 12px !important;
    padding:13px 0 !important;
  }

  .list-line > *{
    min-width:0;
    max-width:100%;
  }

  .step{
    margin:16px 0 !important;
  }

  .empty{
    padding:34px 17px !important;
  }

  .empty h2{
    font-size:1.45rem !important;
  }

  .empty p{
    margin-bottom:18px !important;
  }

  /* ---------- Map card ---------- */
  .map-strip{
    min-height:205px !important;
    margin:18px 0 !important;
    padding:17px !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    justify-content:flex-end !important;
    gap:12px !important;
    border-radius:17px !important;
    background-position:center center !important;
  }

  .map-strip > div{
    max-width:100%;
  }

  .map-strip small{
    font-size:.66rem !important;
    letter-spacing:.12em !important;
  }

  .map-strip strong{
    margin-top:5px;
    font-size:clamp(1.35rem,6.5vw,1.75rem) !important;
    letter-spacing:.055em !important;
    overflow-wrap:anywhere;
  }

  .map-strip button{
    min-height:44px;
    padding:9px 13px !important;
  }

  /* ---------- Forms / toolbar / dialogs ---------- */
  .toolbar{
    align-items:stretch !important;
    gap:8px !important;
  }

  .toolbar input,
  .toolbar select{
    width:100%;
    max-width:none !important;
  }

  input,
  textarea,
  select{
    font-size:16px; /* prevents iOS auto zoom */
  }

  dialog{
    width:calc(100% - 20px) !important;
    max-width:600px;
    max-height:min(88dvh,760px) !important;
    padding:18px !important;
    border-radius:18px !important;
  }

  .modal-head{
    margin-bottom:15px !important;
  }

  .modal-head h2{
    font-size:1.25rem;
  }

  .modal-actions{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:8px !important;
    margin-top:18px !important;
  }

  .modal-actions .button,
  .modal-actions button{
    width:100%;
  }

  .search-results a{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
    padding:12px !important;
  }

  /* ---------- Match / bracket ---------- */
  .bracket-shell{
    width:100% !important;
    min-height:330px !important;
    max-height:68dvh !important;
    padding:15px !important;
    border-radius:16px !important;
  }

  .bracket-tree{
    gap:32px !important;
  }

  .round-col{
    width:220px !important;
  }

  .versus{
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) !important;
    gap:7px !important;
    padding:22px 0 !important;
  }

  .versus strong{
    font-size:1rem !important;
    overflow-wrap:anywhere;
  }

  .score-display{
    font-size:2rem !important;
  }

  .table-wrap{
    max-width:100%;
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch;
  }

  /* ---------- Player profile ---------- */
  .player-profile-hero{
    padding:16px !important;
  }

  .player-profile-identity{
    width:100%;
    gap:12px !important;
  }

  .player-profile-avatar{
    width:58px !important;
    height:58px !important;
    flex:0 0 58px !important;
    border-radius:18px !important;
  }

  .player-profile-identity h2{
    max-width:100%;
    margin:.1rem 0 .45rem !important;
    font-size:1.35rem !important;
    overflow-wrap:anywhere;
  }

  .player-public-stats{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .player-match-row{
    align-items:flex-start !important;
  }

  /* ---------- Leaderboard ---------- */
  .leaderboard-intro{
    align-items:flex-start !important;
    flex-direction:column !important;
    gap:12px !important;
  }

  .leaderboard-podium{
    grid-template-columns:minmax(0,1fr) !important;
    gap:10px !important;
  }

  .podium-card{
    min-height:0 !important;
    padding:13px !important;
    flex-direction:row !important;
    justify-content:flex-start !important;
  }

  .podium-place{
    position:static !important;
    flex:0 0 30px;
  }

  .podium-avatar{
    width:46px !important;
    height:46px !important;
    flex:0 0 46px !important;
    border-radius:15px !important;
  }

  .podium-card>small{
    margin-left:auto;
    text-align:right;
  }

  .leaderboard-panel{
    padding:8px !important;
  }

  .leaderboard-head{
    display:none !important;
  }

  .leaderboard-row,
  .leaderboard-row-alltime{
    grid-template-columns:38px minmax(0,1fr) auto !important;
    gap:8px !important;
    padding:10px !important;
  }

  .leaderboard-row .leaderboard-stat,
  .leaderboard-row-alltime .leaderboard-stat{
    display:none !important;
  }

  .leaderboard-player{
    gap:9px !important;
  }

  .leaderboard-player strong{
    max-width:100%;
  }

  .leaderboard-open{
    font-size:0 !important;
  }

  /* ---------- Career / ranks ---------- */
  .rank-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .career-stat-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .recent-form-line{
    flex-wrap:wrap !important;
  }

  /* ---------- Toast / safe areas ---------- */
  #toast{
    bottom:calc(14px + env(safe-area-inset-bottom)) !important;
    width:calc(100% - 24px);
    max-width:none !important;
    padding:12px 15px !important;
  }
}

@media(max-width:520px){

  .sidebar{
    margin:6px 8px 0 !important;
    border-radius:16px !important;
  }

  .nav-item{
    min-height:40px !important;
    padding:8px 10px !important;
    font-size:.77rem !important;
  }

  .topbar{
    margin:7px 8px 0 !important;
    padding:12px !important;
    gap:9px !important;
    border-radius:16px !important;
  }

  .mobile-brand .brand-map-logo{
    width:50px !important;
    height:31px !important;
    flex-basis:50px !important;
  }

  .mobile-brand .brand-name{
    font-size:.82rem !important;
  }

  .mobile-brand .brand-name small{
    font-size:.52rem !important;
  }

  .top-actions{
    gap:7px !important;
  }

  .top-actions .connection{
    min-height:36px;
    padding:6px 9px;
  }

  .top-actions .button{
    font-size:.78rem !important;
    padding:8px 10px !important;
  }

  .page{
    padding:17px 11px calc(34px + env(safe-area-inset-bottom)) !important;
  }

  .page-head{
    margin-top:2px !important;
    margin-bottom:17px !important;
  }

  .page-head h1{
    font-size:clamp(1.78rem,8.6vw,2.16rem) !important;
  }

  .page-head p{
    font-size:.88rem !important;
  }

  .feature{
    padding:15px !important;
  }

  .feature h2{
    font-size:clamp(1.82rem,9vw,2.18rem) !important;
    margin:15px 0 !important;
  }

  .feature-meta{
    grid-template-columns:minmax(0,1fr) !important;
    gap:8px !important;
  }

  .feature-foot{
    margin:16px -15px -15px !important;
    padding:12px 15px !important;
  }

  .panel{
    padding:14px !important;
  }

  .stats{
    gap:8px !important;
  }

  .stat{
    padding:12px 10px !important;
  }

  .stat strong{
    font-size:1.18rem !important;
  }

  .stat small{
    font-size:.64rem !important;
  }

  .map-strip{
    min-height:190px !important;
    padding:15px !important;
  }

  .map-strip strong{
    font-size:1.32rem !important;
  }

  .rank-grid,
  .career-stat-grid{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .player-public-stats{
    gap:8px !important;
  }

  .player-match-row{
    flex-direction:column !important;
    gap:9px !important;
  }

  .player-match-result{
    width:100%;
    justify-content:space-between !important;
  }

  .podium-card>small{
    display:none !important;
  }

  .recent-form-line>small{
    width:100%;
    margin-left:0 !important;
  }
}

@media(max-width:380px){
  .connection{
    display:none !important;
  }

  .top-actions .button{
    width:100%;
  }

  .stats{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .player-public-stats{
    grid-template-columns:minmax(0,1fr) !important;
  }
}
