/* =====================================================================
   ADMIN MODALS — shared "console" modal shell (.cm-*) + Manage Players (.pm-*)
   Loads after style.css / admin-console.css. Uses the site theme tokens so
   it follows Gold and Neon. Class prefixes avoid "ad-" / "ads" on purpose:
   ad blockers hide elements with those names.
   ===================================================================== */

/* ---------- overlay + shell ---------- */
.modal-overlay.cm-overlay{z-index:1100; background:rgba(3,5,4,.72); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);}
.modal.cm-modal{
  display:flex; flex-direction:column; padding:0; overflow:hidden;
  width:100%; max-width:560px; max-height:calc(100vh - 48px);
  border-radius:18px; border:1px solid rgba(var(--gold-rgb),.24);
  background:
    radial-gradient(90% 50% at 100% 0%, rgba(var(--gold-rgb),.09), transparent 60%),
    linear-gradient(180deg, var(--panel-2), var(--panel) 30%);
  box-shadow:0 40px 90px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.05);
}
.modal-overlay.open .modal.cm-modal{animation:cmIn .24s cubic-bezier(.2,.9,.25,1) both;}
@keyframes cmIn{from{opacity:0; transform:translateY(10px) scale(.98);} to{opacity:1; transform:none;}}
.cm-modal::before{content:""; flex:none; height:2px; background:linear-gradient(90deg,transparent,var(--gold) 25%,var(--gold-soft) 55%,transparent); opacity:.85;}

.cm-head{display:flex; align-items:center; gap:14px; padding:18px 20px 14px;}
.cm-head-ico{
  flex:none; width:44px; height:44px; display:grid; place-items:center; color:var(--on-gold);
  background:linear-gradient(135deg,var(--gold-hover),var(--gold));
  clip-path:polygon(9px 0,100% 0,calc(100% - 9px) 100%,0 100%);
  filter:drop-shadow(0 0 10px rgba(var(--gold-rgb),.4));
}
.cm-head-ico svg{width:22px; height:22px;}
.cm-head-txt{flex:1; min-width:0;}
.modal.cm-modal h3{
  margin:0; font-family:'Teko',sans-serif; font-size:28px; font-weight:600; line-height:1; letter-spacing:.03em;
  color:var(--text); text-transform:none;
}
.cm-head-sub{margin:4px 0 0; font-family:'Manrope',sans-serif; font-size:12.5px; font-weight:500; color:var(--muted);}
.cm-modal .cm-head .cm-x{
  all:unset; box-sizing:border-box; flex:none; width:36px; height:36px; display:grid; place-items:center; cursor:pointer; align-self:center; margin:0;
  border-radius:10px; border:1px solid var(--line); background:transparent; color:var(--muted);
  transition:color .15s, border-color .15s, background .15s;
}
.cm-modal .cm-x svg{width:16px; height:16px;}
.cm-modal .cm-head .cm-x:hover{color:var(--gold); border-color:rgba(var(--gold-rgb),.6); background:rgba(var(--gold-rgb),.08);}
.cm-modal .cm-x:focus-visible,.cm-chip:focus-visible,.cm-search input:focus-visible,.cm-btn:focus-visible,.pm-act:focus-visible{outline:2px solid var(--gold); outline-offset:2px;}

/* toolbar: search + filter chips */
.cm-toolbar{display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:0 20px 14px;}
.cm-modal .cm-search{
  flex:1 1 220px; min-width:0; display:flex; align-items:center; gap:9px; height:40px; padding:0 12px;
  border-radius:12px; border:1px solid var(--line); background:rgba(0,0,0,.22); color:var(--muted);
  transition:border-color .15s, box-shadow .15s;
}
.cm-modal .cm-search:focus-within{border-color:rgba(var(--gold-rgb),.7); box-shadow:0 0 0 3px rgba(var(--gold-rgb),.12); color:var(--gold);}
.cm-modal .cm-search svg{flex:none; width:16px; height:16px;}
.cm-modal .cm-search input{
  all:unset; box-sizing:border-box; flex:1; min-width:0; height:100%;
  font-family:'Manrope',sans-serif; font-size:13.5px; font-weight:500; color:var(--text);
  text-transform:none; letter-spacing:normal; width:100%; max-width:none; padding:0; border:0; background:transparent; box-shadow:none;
}
.cm-modal .cm-search input::placeholder{color:var(--muted); opacity:.8;}
.cm-chips{display:flex; gap:6px; flex-wrap:wrap;}
.cm-chip{
  all:unset; box-sizing:border-box; cursor:pointer; display:inline-flex; align-items:center; gap:7px; height:34px; padding:0 12px;
  border-radius:999px; border:1px solid var(--line); color:var(--muted);
  font-family:'Manrope',sans-serif; font-size:12.5px; font-weight:700; transition:all .15s;
}
.cm-chip b{font-weight:800; font-size:11.5px; padding:1px 7px; border-radius:999px; background:rgba(255,255,255,.07); color:var(--text);}
.cm-chip:hover{color:var(--text); border-color:rgba(var(--gold-rgb),.45);}
.cm-chip[aria-pressed="true"]{color:var(--on-gold); background:linear-gradient(135deg,var(--gold-hover),var(--gold)); border-color:transparent;}
.cm-chip[aria-pressed="true"] b{background:rgba(0,0,0,.18); color:var(--on-gold);}

/* body + footer */
.cm-body{flex:1; min-height:0; overflow-y:auto; padding:0 20px 6px; scrollbar-width:thin; scrollbar-color:rgba(var(--gold-rgb),.3) transparent;}
.cm-foot{
  flex:none; display:flex; align-items:center; justify-content:flex-end; gap:10px; padding:14px 20px;
  border-top:1px solid rgba(var(--gold-rgb),.1); background:rgba(0,0,0,.18);
}
.cm-btn{
  all:unset; box-sizing:border-box; cursor:pointer; display:inline-flex; align-items:center; gap:8px; height:38px; padding:0 16px;
  border-radius:10px; border:1px solid var(--line); color:var(--text);
  font-family:'Manrope',sans-serif; font-size:13px; font-weight:700; transition:all .15s;
}
.cm-btn svg{width:16px; height:16px;}
.cm-btn:hover{border-color:rgba(var(--gold-rgb),.6); color:var(--gold); background:rgba(var(--gold-rgb),.07);}
.cm-btn.is-primary{color:var(--on-gold); border-color:transparent; background:linear-gradient(135deg,var(--gold-hover),var(--gold));}
.cm-btn.is-primary:hover{color:var(--on-gold); filter:brightness(1.08);}
.cm-btn.is-quiet{color:var(--muted); margin-right:auto;}
.cm-btn:disabled{opacity:.5; cursor:default;}

/* ---------- Manage Players ---------- */
.modal.pm-modal{max-width:920px;}
.pm-list{display:flex; flex-direction:column; gap:8px; padding-bottom:12px;}
.pm-empty{padding:40px 10px; text-align:center; font-family:'Manrope',sans-serif; font-size:13.5px; color:var(--muted);}

.pm-row{
  display:grid; grid-template-columns:auto minmax(0,1fr) 150px 330px; align-items:center; gap:14px;
  padding:11px 12px; border-radius:14px; font-family:'Manrope',sans-serif;
  background:linear-gradient(180deg, rgba(var(--gold-rgb),.05), rgba(var(--gold-rgb),.015));
  border:1px solid rgba(var(--gold-rgb),.12);
  transition:border-color .15s, background .15s;
}
.pm-row:hover{border-color:rgba(var(--gold-rgb),.35); background:rgba(var(--gold-rgb),.07);}
.pm-row.is-inactive .pm-av,.pm-row.is-inactive .pm-main{opacity:.62;}
.pm-row.is-banned{border-color:rgba(var(--red-rgb),.4); background:linear-gradient(180deg, rgba(var(--red-rgb),.09), rgba(var(--red-rgb),.02));}

.pm-av{
  position:relative; width:46px; height:46px; border-radius:12px; overflow:hidden; flex:none;
  display:grid; place-items:center; background:rgba(var(--gold-rgb),.14); border:1px solid rgba(var(--gold-rgb),.28);
  font-family:'Teko',sans-serif; font-size:24px; font-weight:600; color:var(--gold);
}
.pm-av img{width:100%; height:100%; object-fit:cover; display:block;}
.pm-av::after{                      /* presence-style status dot: active / inactive / banned */
  content:""; position:absolute; right:3px; bottom:3px; width:10px; height:10px; border-radius:50%;
  background:#3be88a; box-shadow:0 0 0 2px var(--panel), 0 0 8px rgba(59,232,138,.7);
}
.pm-row.is-inactive .pm-av::after{background:var(--muted); box-shadow:0 0 0 2px var(--panel);}
.pm-row.is-banned .pm-av::after{background:var(--red); box-shadow:0 0 0 2px var(--panel), 0 0 8px rgba(var(--red-rgb),.7);}

.pm-main{min-width:0;}
.pm-name{display:flex; align-items:center; flex-wrap:wrap; gap:8px; font-size:14.5px; font-weight:800; color:var(--text); line-height:1.2;}
.pm-name > span:first-child{overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%;}
.pm-tag{
  font-size:10.5px; font-weight:800; padding:2px 8px; border-radius:999px; letter-spacing:.01em;
  color:#3be88a; background:rgba(59,232,138,.12); border:1px solid rgba(59,232,138,.3);
}
.pm-tag.is-off{color:var(--muted); background:rgba(255,255,255,.05); border-color:var(--line);}
.pm-tag.is-ban{color:#ff8a93; background:rgba(var(--red-rgb),.14); border-color:rgba(var(--red-rgb),.4);}
.pm-meta{display:flex; flex-wrap:wrap; gap:3px 12px; margin-top:4px; font-size:12px; font-weight:500; color:var(--muted);}
.pm-meta span{white-space:nowrap;}
.pm-meta .pm-reason{white-space:normal; color:#ff8a93;}

.pm-lvl{min-width:0;}
.pm-lvl-top{display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-bottom:6px;}
.pm-lvl-top b{white-space:nowrap; font-family:'Teko',sans-serif; font-size:20px; font-weight:600; line-height:1; color:var(--gold); letter-spacing:.03em;}
.pm-lvl-top span{white-space:nowrap; font-size:11.5px; font-weight:600; color:var(--muted);}
.pm-bar{height:5px; border-radius:99px; background:rgba(255,255,255,.08); overflow:hidden;}
.pm-bar i{display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--pitch),var(--gold));}

.pm-actions{display:flex; align-items:center; justify-content:flex-end; gap:6px;}
.pm-act{
  all:unset; box-sizing:border-box; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:6px;
  height:34px; min-width:34px; padding:0 9px; border-radius:10px;
  border:1px solid var(--line); color:var(--muted); background:rgba(0,0,0,.16);
  font-size:12px; font-weight:800; transition:all .15s;
}
.pm-act svg{width:16px; height:16px; flex:none;}
.pm-act:hover{color:var(--gold); border-color:rgba(var(--gold-rgb),.6); background:rgba(var(--gold-rgb),.1);}
.pm-act.is-main{color:var(--on-gold); border-color:transparent; background:linear-gradient(135deg,var(--gold-hover),var(--gold)); padding:0 12px;}
.pm-act.is-main:hover{color:var(--on-gold); filter:brightness(1.08);}
.pm-act.is-danger:hover{color:#fff; background:var(--red); border-color:var(--red);}
.pm-act.is-ok{color:#3be88a; border-color:rgba(59,232,138,.4);}
.pm-act.is-ok:hover{color:#06130b; background:#3be88a; border-color:#3be88a;}

@media (max-width:820px){
  .pm-row{grid-template-columns:auto minmax(0,1fr) 130px;}
  .pm-actions{grid-column:1 / -1; justify-content:flex-start; flex-wrap:wrap; padding-top:10px; border-top:1px solid rgba(var(--gold-rgb),.1);}
}
@media (max-width:560px){
  .modal-overlay.cm-overlay{padding:10px; align-items:flex-end;}
  .modal.cm-modal{max-height:calc(100vh - 20px); border-radius:18px;}
  .pm-row{grid-template-columns:auto minmax(0,1fr);}
  .pm-lvl{grid-column:1 / -1;}
  .cm-head{padding:16px 14px 12px;} .cm-toolbar{padding:0 14px 12px;} .cm-body{padding:0 14px 6px;} .cm-foot{padding:12px 14px;}
}
@media (prefers-reduced-motion:reduce){ .modal-overlay.open .modal.cm-modal{animation:none;} }

/* =====================================================================
   SKIN for every upgraded admin window (.cm-skin) — forms, footer, lists
   ===================================================================== */
#loginOverlay .cm-modal{max-width:420px;} #addPlayerOverlay .cm-modal{max-width:440px;}
#manageAdminsOverlay .cm-modal{max-width:460px;} #editRulesOverlay .cm-modal{max-width:600px;}
#lateAddOverlay .cm-modal{max-width:520px;} #announceOverlay .cm-modal{max-width:620px;}
#seasonThemeOverlay .cm-modal{max-width:520px;} #manageDuoTeamsOverlay .cm-modal{max-width:820px;}
#editPlayerOverlay .cm-modal{max-width:760px;} #patchNotesAdminOverlay .cm-modal{max-width:680px;}
#countdownOverlay .cm-modal{max-width:440px;} #scheduleModalOverlay .cm-modal{max-width:460px;}
#seasonBannerOverlay .cm-modal{max-width:520px;} #hsNoticeOverlay .cm-modal{max-width:520px;}
#bannedIpsOverlay .cm-modal{max-width:560px;}
#playerLoginOverlay .cm-modal,#emailVerifyOverlay .cm-modal{max-width:420px;}
#registerOverlay .cm-modal{max-width:460px;}
#videoOverlay .cm-modal{max-width:480px;}
#chessOverOverlay .cm-modal,#chessPromoOverlay .cm-modal,#chessConfirmOverlay .cm-modal{max-width:400px;}

/* ---------- auth family (login / register / email-verify) joining cm-skin ----------
   These three keep their existing .auth-modal class (its CSS still positions the
   .input-wrap icon + .pw-toggle eye button, and the step dots on Register), they
   just also become .cm-modal.cm-skin now for the shared header/icon/footer chrome.
   A couple of .auth-modal rules fight that header layout, so narrow them here. */
.auth-modal.cm-skin h3{text-align:left; margin:0;}
.auth-modal.cm-skin .auth-steps{margin-top:2px;}
/* Register/Email-verify keep their Cancel/Next/Back row *inside* each wizard
   step (so only the active step's buttons show) instead of one shared footer —
   cmUpgradeModal() correctly leaves those alone rather than hoisting them into
   .cm-foot. Give that in-body row the same look as a real .cm-foot so it still
   matches the rest of the upgraded modal. */
.cm-skin .wizard-step .modal-actions{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px;
  margin:18px 0 2px; padding-top:14px; border-top:1px solid rgba(var(--gold-rgb),.1);
}
.cm-skin .wizard-step .modal-actions button{
  all:unset; box-sizing:border-box; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:8px;
  height:40px; padding:0 18px; border-radius:11px; border:1px solid var(--line); color:var(--text);
  font-family:'Manrope',sans-serif; font-size:13px; font-weight:700; transition:all .15s;
}
.cm-skin .wizard-step .modal-actions button:hover{border-color:rgba(var(--gold-rgb),.6); color:var(--gold); background:rgba(var(--gold-rgb),.07);}
.cm-skin .wizard-step .modal-actions button:focus-visible{outline:2px solid var(--gold); outline-offset:2px;}
.cm-skin .wizard-step .modal-actions button.primary{color:var(--on-gold); border-color:transparent; background:linear-gradient(135deg,var(--gold-hover),var(--gold));}
.cm-skin .wizard-step .modal-actions button.primary:hover{filter:brightness(1.08);}
/* cm-skin's own input styling (.cm-skin .cm-body input) is more specific
   than .auth-modal .input-wrap input, so without this it would win and
   collapse the left gutter the .input-icon sits in, overlapping the text.
   ID selectors trivially out-rank both, regardless of class order. */
#playerLoginOverlay .input-wrap input,#emailVerifyOverlay .input-wrap input,#registerOverlay .input-wrap input{padding-left:34px;}
#playerLoginOverlay .input-wrap input[type="password"],#emailVerifyOverlay .input-wrap input[type="password"],#registerOverlay .input-wrap input[type="password"]{padding-right:38px;}

.cm-skin .cm-body{padding:2px 20px 18px; font-family:'Manrope',sans-serif; color:var(--text);}
.cm-skin .cm-body > p{font-size:13px; line-height:1.55; color:var(--muted); margin:0 0 4px;}
.cm-skin .cm-body label:not(.season-theme-option):not(.sb-check):not(.remember-row){
  display:block; margin:16px 0 7px; font-size:12.5px; font-weight:700; color:var(--muted);
  text-transform:none; letter-spacing:normal; line-height:1.35;
}
.cm-skin .cm-body > label:first-child,.cm-skin .cm-body > :first-child{margin-top:4px;}
.cm-skin .cm-body input:not([type=radio]):not([type=checkbox]):not([type=range]),
.cm-skin .cm-body select,.cm-skin .cm-body textarea{
  box-sizing:border-box; width:100%; max-width:none; min-height:42px; padding:0 13px; border-radius:12px;
  border:1px solid var(--line); background:rgba(0,0,0,.22); color:var(--text);
  font-family:'Manrope',sans-serif; font-size:14px; font-weight:500; text-transform:none; letter-spacing:normal;
  transition:border-color .15s, box-shadow .15s;
}
.cm-skin .cm-body textarea{padding:11px 13px; line-height:1.5; resize:vertical; min-height:96px;}
.cm-skin .cm-body select{appearance:none; -webkit-appearance:none; padding-right:36px; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23a8a8a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 12px center;}
.cm-skin .cm-body select[size]{padding:6px; background-image:none; height:auto;}
.cm-skin .cm-body select[size] option{padding:8px 10px; border-radius:8px;}
.cm-skin .cm-body input:not([type=radio]):not([type=checkbox]):focus,.cm-skin .cm-body select:focus,.cm-skin .cm-body textarea:focus{
  outline:none; border-color:rgba(var(--gold-rgb),.75); box-shadow:0 0 0 3px rgba(var(--gold-rgb),.14);}
.cm-skin .cm-body input::placeholder,.cm-skin .cm-body textarea::placeholder{color:var(--muted); opacity:.75;}
.cm-skin .cm-body .field-optional{font-weight:500; opacity:.7;}
.cm-skin .cm-body .hint{font-size:12.5px; color:var(--muted);}
.cm-skin .cm-body h3{font-size:20px; margin:22px 0 10px;}

.cm-modal .error{
  display:none; margin:14px 0 0; padding:10px 12px; border-radius:10px; font-size:12.5px; font-weight:600; line-height:1.4;
  color:#ff8a93; background:rgba(var(--red-rgb),.1); border:1px solid rgba(var(--red-rgb),.35);
}
.cm-modal .error.show{display:block;}
.cm-modal .admin-save-status{min-height:0; margin:12px 0 0; font-size:12.5px; font-weight:600;}
.cm-modal .admin-save-status:empty{display:none;}

/* footer buttons (the original .modal-actions, moved into the footer) */
.cm-modal .cm-foot{margin:0; flex-wrap:wrap;}
.cm-modal .cm-foot button{
  all:unset; box-sizing:border-box; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:8px;
  height:40px; padding:0 18px; border-radius:11px; border:1px solid var(--line); color:var(--text);
  font-family:'Manrope',sans-serif; font-size:13px; font-weight:700; transition:all .15s;
}
.cm-modal .cm-foot button:hover{border-color:rgba(var(--gold-rgb),.6); color:var(--gold); background:rgba(var(--gold-rgb),.07);}
.cm-modal .cm-foot button:focus-visible{outline:2px solid var(--gold); outline-offset:2px;}
.cm-modal .cm-foot button.primary{color:var(--on-gold); border-color:transparent; background:linear-gradient(135deg,var(--gold-hover),var(--gold));}
.cm-modal .cm-foot button.primary:hover{color:var(--on-gold); filter:brightness(1.08);}
.cm-modal .cm-foot button.danger,.cm-modal .cm-foot button[id*="Clear"]{margin-right:auto; color:#ff8a93; border-color:rgba(var(--red-rgb),.4);}
.cm-modal .cm-foot button.danger:hover,.cm-modal .cm-foot button[id*="Clear"]:hover{color:#fff; background:var(--red); border-color:var(--red);}
.cm-modal .cm-foot button:disabled{opacity:.5; cursor:default;}

/* small buttons + badges used inside lists */
.cm-sbtn{
  all:unset; box-sizing:border-box; cursor:pointer; display:inline-flex; align-items:center; gap:6px; height:32px; padding:0 12px;
  border-radius:9px; border:1px solid var(--line); color:var(--muted); background:rgba(0,0,0,.16);
  font-family:'Manrope',sans-serif; font-size:12px; font-weight:800; white-space:nowrap; transition:all .15s;
}
.cm-sbtn:hover{color:var(--gold); border-color:rgba(var(--gold-rgb),.6); background:rgba(var(--gold-rgb),.1);}
.cm-sbtn:focus-visible{outline:2px solid var(--gold); outline-offset:2px;}
.cm-sbtn.is-danger{color:#ff8a93; border-color:rgba(var(--red-rgb),.35);}
.cm-sbtn.is-danger:hover{color:#fff; background:var(--red); border-color:var(--red);}
.cm-sbtn:disabled{opacity:.5; cursor:default;}
.cm-badge{font-size:10.5px; font-weight:800; padding:2px 8px; border-radius:999px; color:var(--gold); background:rgba(var(--gold-rgb),.12); border:1px solid rgba(var(--gold-rgb),.3);}

/* generic list row */
.cm-list{display:flex; flex-direction:column; gap:8px;}
.cm-row{
  display:flex; align-items:center; gap:12px; padding:11px 12px; border-radius:14px; font-family:'Manrope',sans-serif;
  background:linear-gradient(180deg, rgba(var(--gold-rgb),.05), rgba(var(--gold-rgb),.015)); border:1px solid rgba(var(--gold-rgb),.12);
  transition:border-color .15s, background .15s;
}
.cm-row:hover{border-color:rgba(var(--gold-rgb),.35); background:rgba(var(--gold-rgb),.07);}
.cm-row-ico{flex:none; width:40px; height:40px; display:grid; place-items:center; border-radius:11px; color:var(--gold);
  background:rgba(var(--gold-rgb),.1); border:1px solid rgba(var(--gold-rgb),.22); font-family:'Teko',sans-serif; font-size:22px; font-weight:600;}
.cm-row-ico svg{width:19px; height:19px;}
.cm-row-main{flex:1; min-width:0;}
.cm-row-title{display:flex; align-items:center; flex-wrap:wrap; gap:8px; font-size:14px; font-weight:800; color:var(--text); line-height:1.25; word-break:break-word;}
.cm-row-sub{margin-top:3px; font-size:12px; font-weight:500; color:var(--muted); line-height:1.4;}
.cm-row-text{margin-top:6px; font-size:13px; font-weight:500; color:var(--text); line-height:1.5; white-space:pre-wrap; word-break:break-word;}
.cm-row-acts{flex:none; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; max-width:60%;}
.cm-empty{padding:26px 12px; text-align:center; font-size:13px; font-weight:500; color:var(--muted); border:1px dashed var(--line); border-radius:14px;}
.cm-section{margin-top:22px; padding-top:18px; border-top:1px solid rgba(var(--gold-rgb),.1);}
.cm-section-title{margin:0 0 4px; font-family:'Teko',sans-serif; font-size:22px; font-weight:600; letter-spacing:.03em; color:var(--text);}
.cm-section-sub{margin:0 0 12px; font-size:12.5px; color:var(--muted);}
.cm-ghost-add{margin-bottom:14px;}

/* duo teams modal: list scrolls with the modal body */
#manageDuoTeamsList{max-height:none !important; overflow:visible !important; margin:12px 0 0 !important;}
#manageDuoTeamsList.cm-list{display:flex;}
#manageAdminsOverlay #adminListWrap{margin-bottom:6px !important;}
#announceList,#patchNotesAdminList{max-height:none !important; overflow:visible !important; display:flex; flex-direction:column; gap:8px;}

/* patch notes (existing markup, re-skinned) */
.cm-skin .patch-notes-admin-existing{margin-top:22px; padding-top:18px; border-top:1px solid rgba(var(--gold-rgb),.1);}
.cm-skin .patch-notes-admin-existing-head{display:flex; flex-direction:column; gap:2px; margin-bottom:12px;}
.cm-skin .patch-notes-admin-existing-head strong{font-family:'Teko',sans-serif; font-size:22px; font-weight:600; letter-spacing:.03em; color:var(--text);}
.cm-skin .patch-notes-admin-existing-head span{font-size:12.5px; color:var(--muted);}
.cm-skin .patch-note-admin-row{padding:11px 12px; border-radius:14px; border:1px solid rgba(var(--gold-rgb),.12); background:linear-gradient(180deg, rgba(var(--gold-rgb),.05), rgba(var(--gold-rgb),.015));}
.cm-skin .patch-note-admin-info strong{font-size:14px; font-weight:800;}
.cm-skin .patch-note-admin-empty{border-radius:14px; border-color:var(--line); font-size:13px;}
.cm-skin .patch-note-delete-btn{all:unset; box-sizing:border-box; cursor:pointer; height:32px; padding:0 12px; border-radius:9px; display:inline-flex; align-items:center;
  font-family:'Manrope',sans-serif; font-size:12px; font-weight:800; color:#ff8a93; border:1px solid rgba(var(--red-rgb),.35);}
.cm-skin .patch-note-delete-btn:hover{color:#fff; background:var(--red); border-color:var(--red);}

/* season theme: selectable cards */
.cm-skin .season-theme-options{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:14px;}
.cm-skin .season-theme-option{
  position:relative; display:flex; align-items:center; gap:12px; padding:12px; margin:0; cursor:pointer; border-radius:14px;
  border:1px solid var(--line); background:rgba(0,0,0,.16); transition:all .15s;
}
.cm-skin .season-theme-option:first-child{grid-column:1 / -1;}
.cm-skin .season-theme-option:hover{border-color:rgba(var(--gold-rgb),.5); background:rgba(var(--gold-rgb),.06);}
.cm-skin .season-theme-option input{position:absolute; opacity:0; pointer-events:none;}
.cm-skin .season-theme-option .stt-ico{flex:none; width:38px; height:38px; display:grid; place-items:center; border-radius:11px; color:var(--muted); background:rgba(255,255,255,.05); border:1px solid var(--line); transition:all .15s;}
.cm-skin .season-theme-option .stt-ico svg{width:19px; height:19px;}
.cm-skin .season-theme-option .stt-txt{display:flex; flex-direction:column; gap:2px; min-width:0;}
.cm-skin .season-theme-option .stt-title{text-transform:none; letter-spacing:normal; font-size:13.5px; font-weight:800; color:var(--text);}
.cm-skin .season-theme-option .stt-sub{text-transform:none; letter-spacing:normal; font-size:11.5px; font-weight:500; color:var(--muted); line-height:1.3;}
.cm-skin .season-theme-option::after{content:""; position:absolute; top:10px; right:10px; width:16px; height:16px; border-radius:50%; border:1.5px solid var(--line); transition:all .15s;}
.cm-skin .season-theme-option:has(input:checked){border-color:var(--gold); background:rgba(var(--gold-rgb),.1); box-shadow:0 0 0 1px rgba(var(--gold-rgb),.35), 0 10px 24px -14px rgba(var(--gold-rgb),.8);}
.cm-skin .season-theme-option:has(input:checked) .stt-ico{color:var(--on-gold); background:linear-gradient(135deg,var(--gold-hover),var(--gold)); border-color:transparent;}
.cm-skin .season-theme-option:has(input:checked)::after{border-color:var(--gold); background:radial-gradient(circle, var(--gold) 0 45%, transparent 50%);}
.cm-skin .season-theme-option:has(input:focus-visible){outline:2px solid var(--gold); outline-offset:2px;}

/* season banner editor */
.cm-skin .sb-preview{margin:6px 0 4px; border-radius:14px; overflow:hidden;}
.cm-skin .sb-tones{display:flex; gap:8px; margin-top:8px;}
.cm-skin .sb-tone{all:unset; box-sizing:border-box; cursor:pointer; height:34px; padding:0 16px; border-radius:999px; border:1px solid var(--line); color:var(--muted);
  font-family:'Manrope',sans-serif; font-size:12.5px; font-weight:800; transition:all .15s;}
.cm-skin .sb-tone:hover{color:var(--text); border-color:rgba(var(--gold-rgb),.5);}
.cm-skin .sb-tone[aria-pressed="true"]{color:var(--on-gold); background:linear-gradient(135deg,var(--gold-hover),var(--gold)); border-color:transparent;}
.cm-skin .sb-field{display:block; margin-top:16px; font-size:12.5px; font-weight:700; color:var(--muted);}
.cm-skin .sb-field input{margin-top:7px;}
.cm-skin .sb-check{display:flex; align-items:center; gap:10px; margin-top:16px; font-size:13px; font-weight:600; color:var(--text); cursor:pointer;}
.cm-skin .sb-check input{width:18px; height:18px; accent-color:var(--gold);}

/* edit player avatars */
.cm-skin .avatar-grid{margin-top:2px;}
.cm-skin .avatar-option{border-radius:14px;}
.cm-skin #adminAvatarGrid{max-height:300px; overflow-y:auto; padding:4px; scrollbar-width:thin; scrollbar-color:rgba(var(--gold-rgb),.3) transparent;}

/* =====================================================================
   DIALOG (askConfirm / askPrompt / askAlert)
   ===================================================================== */
.cm-dlg-overlay{position:fixed; inset:0; z-index:1300; display:flex; align-items:center; justify-content:center; padding:20px;
  background:rgba(3,5,4,.72); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); opacity:0; transition:opacity .16s;}
.cm-dlg-overlay.is-open{opacity:1;}
.cm-dlg{
  box-sizing:border-box; width:100%; max-width:440px; padding:22px; border-radius:18px; font-family:'Manrope',sans-serif; color:var(--text);
  display:grid; grid-template-columns:auto 1fr; gap:4px 14px; transform:translateY(8px) scale(.98); transition:transform .2s cubic-bezier(.2,.9,.25,1);
  border:1px solid rgba(var(--gold-rgb),.28);
  background:radial-gradient(90% 60% at 100% 0%, rgba(var(--gold-rgb),.1), transparent 60%), linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow:0 40px 90px -20px rgba(0,0,0,.85), 0 0 0 1px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.05);
}
.cm-dlg-overlay.is-open .cm-dlg{transform:none;}
.cm-dlg.is-danger{border-color:rgba(var(--red-rgb),.5);}
.cm-dlg-ico{width:44px; height:44px; display:grid; place-items:center; border-radius:12px; color:var(--gold); background:rgba(var(--gold-rgb),.12); border:1px solid rgba(var(--gold-rgb),.3);}
.cm-dlg-ico svg{width:23px; height:23px;}
.cm-dlg.is-danger .cm-dlg-ico{color:#ff8a93; background:rgba(var(--red-rgb),.14); border-color:rgba(var(--red-rgb),.4);}
.cm-dlg-txt h4{margin:2px 0 0; font-family:'Teko',sans-serif; font-size:24px; font-weight:600; line-height:1.1; letter-spacing:.02em; color:var(--text);}
.cm-dlg-txt p{margin:8px 0 0; font-size:13px; line-height:1.55; color:var(--muted); white-space:pre-line;}
.cm-dlg-input,.cm-dlg-secret,.cm-dlg-actions{grid-column:1 / -1;}
.cm-dlg-input{
  box-sizing:border-box; width:100%; margin-top:14px; min-height:44px; padding:0 14px; border-radius:12px; border:1px solid var(--line);
  background:rgba(0,0,0,.25); color:var(--text); font-family:'Manrope',sans-serif; font-size:14.5px; font-weight:500; text-transform:none; letter-spacing:normal;
}
textarea.cm-dlg-input{padding:11px 14px; line-height:1.5; resize:vertical;}
.cm-dlg-input:focus{outline:none; border-color:rgba(var(--gold-rgb),.8); box-shadow:0 0 0 3px rgba(var(--gold-rgb),.15);}
.cm-dlg-secret{display:flex; align-items:center; gap:12px; margin-top:14px; padding:12px 14px; border-radius:12px; background:rgba(0,0,0,.28); border:1px dashed rgba(var(--gold-rgb),.45);}
.cm-dlg-secret > div{flex:1; min-width:0; display:flex; flex-direction:column; gap:3px;}
.cm-dlg-secret span{font-size:11.5px; font-weight:700; color:var(--muted);}
.cm-dlg-secret code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:17px; font-weight:700; color:var(--gold); word-break:break-all; user-select:all;}
.cm-dlg-copy{all:unset; box-sizing:border-box; cursor:pointer; display:inline-flex; align-items:center; gap:7px; height:34px; padding:0 12px; border-radius:9px; border:1px solid rgba(var(--gold-rgb),.45);
  color:var(--gold); font-size:12px; font-weight:800; transition:all .15s;}
.cm-dlg-copy svg{width:15px; height:15px;} .cm-dlg-copy:hover{background:rgba(var(--gold-rgb),.12);} .cm-dlg-copy.is-done{color:#3be88a; border-color:rgba(59,232,138,.5);}
.cm-dlg-actions{display:flex; justify-content:flex-end; gap:10px; margin-top:18px;}
.cm-dlg-btn{all:unset; box-sizing:border-box; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; height:40px; padding:0 18px; border-radius:11px;
  border:1px solid var(--line); color:var(--text); font-size:13px; font-weight:700; transition:all .15s;}
.cm-dlg-btn:hover{border-color:rgba(var(--gold-rgb),.6); color:var(--gold); background:rgba(var(--gold-rgb),.07);}
.cm-dlg-btn.is-primary{color:var(--on-gold); border-color:transparent; background:linear-gradient(135deg,var(--gold-hover),var(--gold));}
.cm-dlg-btn.is-primary:hover{color:var(--on-gold); filter:brightness(1.08);}
.cm-dlg-btn.is-primary.is-danger{color:#fff; background:linear-gradient(135deg,#ff6b73,var(--red));}
.cm-dlg-btn:focus-visible,.cm-dlg-copy:focus-visible{outline:2px solid var(--gold); outline-offset:2px;}
@media (max-width:480px){ .cm-dlg{padding:18px;} .cm-dlg-actions{flex-direction:column-reverse;} .cm-dlg-btn{width:100%;} .cm-skin .season-theme-options{grid-template-columns:1fr;} .cm-row{flex-wrap:wrap;} .cm-row-acts{max-width:none; width:100%; justify-content:flex-start;} }
@media (prefers-reduced-motion:reduce){ .cm-dlg,.cm-dlg-overlay{transition:none;} }

.cm-modal .cm-row-sub,.cm-modal .cm-row-title,.cm-modal .cm-row-text,.cm-modal .cm-section-sub,.cm-modal .cm-badge,.cm-modal .cm-empty,.cm-modal .cm-sbtn{text-transform:none; letter-spacing:normal;}
.cm-modal .cm-badge{letter-spacing:.01em;}

/* admin windows sit above the site header; sub-pickers opened from them must sit above those */
#changeAvatarOverlay{z-index:1150;} #avatarCropOverlay{z-index:1160;}

/* =====================================================================
   PLAYER-FACING WINDOWS using the same shell + global layering
   ===================================================================== */
/* every popup sits above the site header (z 1000) and its menus; follow-up popups stack above their parent */
.modal-overlay{z-index:1100;}
#incomingCallOverlay{z-index:1170;}
.daily-xp-gate{z-index:1200;}
.app-toast-container,.friend-toast-container{z-index:1400;}

#tournamentRulesOverlay .cm-modal{max-width:520px;} #changeAvatarOverlay .cm-modal{max-width:560px;}
#avatarCropOverlay .cm-modal{max-width:460px;} #onevoneConfirmOverlay .cm-modal{max-width:440px;}
#duoComposeOverlay .cm-modal{max-width:440px;} #duoInviteOverlay .cm-modal,#duelInviteOverlay .cm-modal{max-width:420px;}
#teamModalOverlay .cm-modal{max-width:520px;}
.cm-skin .modal-x-btn,.cm-skin .duel-invite-ico{display:none !important;}
.cm-skin .duel-invite-sub{font-size:13.5px; line-height:1.55; color:var(--muted); margin:2px 0 0; text-align:left;}
.cm-skin .cm-body > p{margin-top:2px;}
.cm-skin .rules-scroll-box{max-height:46vh; overflow-y:auto; padding:14px 16px; border-radius:12px; border:1px solid var(--line); background:rgba(0,0,0,.22); font-size:13.5px; line-height:1.6; scrollbar-width:thin; scrollbar-color:rgba(var(--gold-rgb),.3) transparent;}
.cm-skin label.remember-row{display:flex; align-items:center; gap:10px; margin:14px 0 0; font-size:13px; font-weight:600; color:var(--text); cursor:pointer;}
.cm-skin label.remember-row input{width:18px; height:18px; accent-color:var(--gold); flex:none;}
.cm-skin .crop-viewport{border-radius:16px; margin:2px auto 4px;}
.cm-skin input[type=range]{accent-color:var(--gold); width:100%;}
.cm-skin .tm-modal-row{margin:0;}
.cm-skin label.remember-row,.cm-skin label.remember-row span{text-transform:none; letter-spacing:normal;}
