/* =====================================================================================
   1.0n R3: THE HQ PAGE (UI redesign B4). Built by public/js/nl-r3-hq.js; every rule is scoped under #hqScr.nlR3
   (the class exists only while NL.on('R3') paints the page, so with the switch off the old page is untouched).
   Night screen tokens: --ink #1b1430, --panel2 #2e2358, rim #4d4190, accent #a999ed, gold --pow, cyan #46d5ed.
   ===================================================================================== */
#hqScr.nlR3{
  --r3-gut:clamp(8px,3.4vw,14px);
  background:linear-gradient(180deg,#2a2160 0%,#1b1430 55%,#1b1430 100%);
  padding-left:calc(var(--r3-gut) + var(--sa-left,env(safe-area-inset-left,0px)));
  padding-right:calc(var(--r3-gut) + var(--sa-right,env(safe-area-inset-right,0px)));
  padding-top:calc(6px + var(--sa-top,env(safe-area-inset-top,0px)));
  padding-bottom:calc(14px + var(--sa-bottom,env(safe-area-inset-bottom,0px)));
  justify-content:flex-start;gap:10px;
}
#hqScr.nlR3::before{display:none;}
#hqScr.nlR3 > .scrTitle,#hqScr.nlR3 > #hqSub,#hqScr.nlR3 > .backBtn,#hqScr.nlR3 > .topBack{display:none !important;}
#hqScr.nlR3 > #nlR3Top,#hqScr.nlR3 > #hqTabs,#hqScr.nlR3 > #hqBody{width:100%;max-width:520px;box-sizing:border-box;margin:0;}
#hqScr.nlR3 *{box-sizing:border-box;}
/* nothing in the page column may be squeezed below its content (an explicit min-height would otherwise let a flex row shrink) */
#hqScr.nlR3 > *,#nlR3Top > *,#hqScr.nlR3 #hqBody > *,#hqScr.nlR3 .nlR3List > *,#hqScr.nlR3 .nlR3Goals > *,#hqScr.nlR3 .nlR3Card > *{flex-shrink:0;}
#hqScr.nlR3 .nlR3Ic{display:inline-flex;flex:0 0 auto;line-height:0;}
#hqScr.nlR3 .nlR3Ic svg{display:block;}
#hqScr.nlR3 .nlR3Num{font-variant-numeric:tabular-nums;white-space:nowrap;}
#hqScr.nlR3 .nlR3Ell{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;}
#hqScr.nlR3 button{font-family:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;}
#hqScr.nlR3 button:focus-visible{outline:3px solid #46d5ed;outline-offset:2px;}
#nlR3Top{display:flex;flex-direction:column;gap:10px;}

/* ---------- sub bar ---------- */
#hqScr.nlR3 .nlR3Sub{display:flex;align-items:center;gap:10px;height:48px;}
#hqScr.nlR3 .nlR3Ghost{width:44px;flex:0 0 44px;}
#hqScr.nlR3 .nlR3Title{flex:1;min-width:0;margin:0;text-align:center;font:400 26px/1 'Bangers',cursive;letter-spacing:1px;color:#fff;text-shadow:0 2px 0 #082942;}
#hqScr.nlR3 .nlR3Q{width:44px;height:44px;flex:0 0 44px;border-radius:22px;background:var(--ink,#1b1430);border:2px solid var(--pow,#ffd23f);
  box-shadow:0 3px 0 #0f0b22;display:grid;place-items:center;font:400 24px/1 'Bangers',cursive;color:#fff;padding:0;}
#hqScr.nlR3 .nlR3Back{flex:0 0 auto;height:44px;min-width:44px;padding:0 14px;border-radius:22px;background:var(--pow,#ffd23f);color:var(--ink,#1b1430);
  border:2px solid var(--ink,#1b1430);box-shadow:0 3px 0 var(--ink,#1b1430);font:400 19px/1 'Bangers',cursive;letter-spacing:1px;}
#hqScr.nlR3 .nlR3Sub .nlR3Back + .nlR3Title{margin-right:0;}

/* ---------- identity card: the HQ's own banner pattern, speed lines behind the emblem ---------- */
#hqScr.nlR3 .nlR3Id{--nlr3-p:#ffd23f;--nlr3-s1:#4a3f72;--nlr3-s2:#3b3260;--ex:22%;--ey:45%;
  position:relative;overflow:hidden;border-radius:18px;border:2px solid var(--pow,#ffd23f);box-shadow:0 4px 0 #0f0b22;padding:14px 12px 12px;
  background:var(--nlr3-s2);}
#hqScr.nlR3 .nlR3Id::before,#hqScr.nlR3 .nlR3Id::after{content:"";position:absolute;inset:0;pointer-events:none;}
/* the pattern layer, one per saved banner key */
#hqScr.nlR3 .nlR3Id[data-banner="rays"]::before{background:repeating-conic-gradient(from 0deg at var(--ex) var(--ey),var(--nlr3-s1) 0deg 9deg,var(--nlr3-s2) 9deg 18deg);}
#hqScr.nlR3 .nlR3Id[data-banner="stripes"]::before{background:repeating-linear-gradient(135deg,var(--nlr3-s1) 0 16px,var(--nlr3-s2) 16px 32px);}
#hqScr.nlR3 .nlR3Id[data-banner="chevrons"]::before{background:linear-gradient(135deg,var(--nlr3-s1) 25%,transparent 25%) -18px 0/36px 36px,linear-gradient(225deg,var(--nlr3-s1) 25%,transparent 25%) -18px 0/36px 36px,
  linear-gradient(315deg,var(--nlr3-s1) 25%,transparent 25%) 0 0/36px 36px,linear-gradient(45deg,var(--nlr3-s1) 25%,var(--nlr3-s2) 25%) 0 0/36px 36px;}
#hqScr.nlR3 .nlR3Id[data-banner="halftone"]::before{background:radial-gradient(circle,var(--nlr3-s1) 3px,transparent 3.6px) 0 0/12px 12px,var(--nlr3-s2);}
#hqScr.nlR3 .nlR3Id[data-banner="split"]::before{background:linear-gradient(115deg,var(--nlr3-s1) 0 48%,var(--nlr3-s2) 48% 100%);}
#hqScr.nlR3 .nlR3Id[data-banner="orbit"]::before{background:repeating-radial-gradient(circle at var(--ex) var(--ey),var(--nlr3-s1) 0 14px,var(--nlr3-s2) 14px 28px);}
/* glow + speed lines radiating from the emblem (static) */
#hqScr.nlR3 .nlR3Id::after{
  background:radial-gradient(circle at var(--ex) var(--ey),rgba(255,210,63,.36) 0,transparent 40%),
    repeating-conic-gradient(from 2deg at var(--ex) var(--ey),rgba(255,255,255,0) 0 5.2deg,rgba(255,255,255,.19) 5.2deg 6deg);
  background:radial-gradient(circle at var(--ex) var(--ey),color-mix(in srgb,var(--nlr3-p) 36%,transparent) 0,transparent 40%),
    repeating-conic-gradient(from 2deg at var(--ex) var(--ey),rgba(255,255,255,0) 0 5.2deg,rgba(255,255,255,.19) 5.2deg 6deg);
  -webkit-mask:radial-gradient(circle at var(--ex) var(--ey),#000 0,#000 30%,transparent 72%);mask:radial-gradient(circle at var(--ex) var(--ey),#000 0,#000 30%,transparent 72%);}
#hqScr.nlR3 .nlR3IdRow{position:relative;z-index:1;display:flex;align-items:center;gap:12px;}
#hqScr.nlR3 .nlR3Em{flex:0 0 auto;width:calc(var(--nlr3-em,96px) + 8px);height:calc(var(--nlr3-em,96px) + 8px);min-width:44px;min-height:44px;padding:4px;margin:-4px;border:0;background:none;border-radius:18px;
  filter:drop-shadow(0 4px 0 #0f0b22) drop-shadow(0 0 14px rgba(255,210,63,.5));}
#hqScr.nlR3 .nlR3Em svg{display:block;width:var(--nlr3-em,96px);height:var(--nlr3-em,96px);}
#hqScr.nlR3 .nlR3Em:active{transform:scale(.96);}
#hqScr.nlR3 .nlR3IdTx{flex:1 1 auto;min-width:0;}
#hqScr.nlR3 .nlR3Name{margin:0;font:400 clamp(22px,7.6vw,30px)/.98 'Bangers',cursive;letter-spacing:1px;color:#fff;text-shadow:0 3px 0 #0f0b22;
  overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;padding-top:2px;}
#hqScr.nlR3 .nlR3Chips{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px;}
#hqScr.nlR3 .nlR3Chip{display:inline-flex;align-items:center;height:24px;padding:0 9px;border-radius:12px;white-space:nowrap;
  background:rgba(15,11,34,.82);color:#fff;border:1.5px solid rgba(255,210,63,.6);font:800 11.5px/1 'Nunito',sans-serif;letter-spacing:.3px;}
#hqScr.nlR3 .nlR3Chip.g{background:var(--pow,#ffd23f);color:var(--ink,#1b1430);border-color:var(--ink,#1b1430);font:400 14px/1 'Bangers',cursive;letter-spacing:1px;}
#hqScr.nlR3 .nlR3Chip.full{border-color:#51cf66;color:#b8f5c3;}
#hqScr.nlR3 .nlR3Lvl{position:relative;z-index:1;display:flex;align-items:center;gap:8px;width:100%;min-height:44px;margin:6px 0 -6px;padding:0;border:0;background:none;
  font:400 15px/1 'Bangers',cursive;letter-spacing:1px;color:#fff;white-space:nowrap;text-shadow:0 2px 0 #0f0b22;}
#hqScr.nlR3 .nlR3Lvl .nlR3Bar{flex:1;min-width:0;height:10px;background:#0f0b22;border-color:#0f0b22;}
#hqScr.nlR3 .nlR3Bar{display:block;height:8px;border-radius:5px;background:#140f2c;border:1px solid #0f0b22;overflow:hidden;}
#hqScr.nlR3 .nlR3Bar > i{display:block;height:100%;border-radius:5px;background:linear-gradient(90deg,#46d5ed,#9cf1ff);}
#hqScr.nlR3 .nlR3Bar.gold > i{background:linear-gradient(90deg,#f0b838,#ffe577);}

/* the CHAT bar (hidden until CHAT) */
#hqScr.nlR3 .nlR3IdBar{display:none;align-items:center;gap:10px;width:100%;height:52px;padding:0 12px 0 6px;border-radius:14px;border:2px solid var(--pow,#ffd23f);box-shadow:0 3px 0 #0f0b22;
  background:repeating-conic-gradient(from 0deg at 10% 50%,var(--nlr3-s1,#4a3f72) 0deg 9deg,var(--nlr3-s2,#3b3260) 9deg 18deg);text-align:left;color:#fff;}
#hqScr.nlR3 .nlR3IdBar svg{flex:0 0 auto;width:40px;height:40px;}
#hqScr.nlR3 .nlR3IdBarName{flex:1;min-width:0;font:400 20px/1.1 'Bangers',cursive;letter-spacing:1px;color:#fff;text-shadow:0 2px 0 #0f0b22;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#hqScr.nlR3 .nlR3IdBarSeats{flex:0 0 auto;font:800 12px/1 'Nunito',sans-serif;color:#e6defc;white-space:nowrap;}

/* ---------- HQ CLASH card ---------- */
#hqScr.nlR3 .nlR3War{display:flex;align-items:center;gap:6px;min-height:74px;padding:6px 7px 6px 10px;border-radius:16px;
  background:linear-gradient(110deg,#5a1630,#2e2358 80%);border:2px solid #ff8787;box-shadow:0 4px 0 #0f0b22;}
#hqScr.nlR3 .nlR3War.goal{background:linear-gradient(110deg,#3b2a78,#2e2358 80%);border-color:#a999ed;}
#hqScr.nlR3 .nlR3WarTx{flex:1;min-width:0;}
#hqScr.nlR3 .nlR3WarHd{display:flex;gap:3px;font:800 11.5px/1.2 'Nunito',sans-serif;color:#ffc9c9;letter-spacing:.1px;white-space:nowrap;}
#hqScr.nlR3 .nlR3War.goal .nlR3WarHd{color:#d9d0ff;}
#hqScr.nlR3 .nlR3WarT{flex:0 0 auto;color:#fff;}
#hqScr.nlR3 .nlR3WarK{flex:0 0 auto;}
#hqScr.nlR3 .nlR3Vs{display:flex;align-items:center;gap:7px;margin-top:4px;min-width:0;}
#hqScr.nlR3 .nlR3Side{display:flex;align-items:center;gap:4px;flex:0 0 auto;}
#hqScr.nlR3 .nlR3Side svg{width:28px;height:28px;flex:0 0 28px;}
#hqScr.nlR3 .nlR3Side b{font:400 24px/1 'Bangers',cursive;letter-spacing:.5px;color:#fff;text-shadow:0 2px 0 #0f0b22;}
#hqScr.nlR3 .nlR3VsW{font:400 14px/1 'Bangers',cursive;font-style:normal;color:#ffc9c9;}
#hqScr.nlR3 .nlR3Goal{display:flex;align-items:center;gap:8px;margin-top:6px;}
#hqScr.nlR3 .nlR3Goal .nlR3Bar{flex:1;min-width:0;height:10px;}
#hqScr.nlR3 .nlR3Goal b{font:400 17px/1 'Bangers',cursive;letter-spacing:.5px;color:#fff;}
#hqScr.nlR3 .nlR3Btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;min-width:44px;padding:0 14px;border-radius:13px;
  border:2px solid #082942;box-shadow:0 3px 0 #082942;font:400 18px/1 'Bangers',cursive;letter-spacing:1px;white-space:nowrap;color:#082942;}
#hqScr.nlR3 .nlR3Btn:active{transform:translateY(2px);box-shadow:0 1px 0 #082942;}
#hqScr.nlR3 .nlR3Btn:disabled{opacity:.45;filter:grayscale(.6);cursor:default;transform:none;box-shadow:0 3px 0 #082942;}
#hqScr.nlR3 .nlR3Btn.gold{background:linear-gradient(180deg,#ffe577,#ffd23f);}
#hqScr.nlR3 .nlR3Btn.green{background:linear-gradient(180deg,#8ce99a,#51cf66);color:#0b3a1a;}
#hqScr.nlR3 .nlR3Btn.ghost{background:#140f2c;color:#e6defc;border-color:#6a5cc0;box-shadow:0 3px 0 #0f0b22;}
#hqScr.nlR3 .nlR3Fight{flex:0 0 auto;min-height:48px;font-size:20px;padding:0 10px;letter-spacing:.6px;}
#hqScr.nlR3 .nlR3WarStrip{display:none;align-items:center;gap:8px;min-height:44px;padding:2px 3px 2px 12px;border-radius:12px;background:linear-gradient(110deg,#5a1630,#2e2358 80%);border:2px solid #ff8787;}
#hqScr.nlR3 .nlR3StripT{flex:1;min-width:0;font:400 17px/1.1 'Bangers',cursive;letter-spacing:.8px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#hqScr.nlR3 .nlR3StripGo{min-height:36px;height:36px;font-size:16px;padding:0 14px;box-shadow:0 2px 0 #082942;}
#hqScr.nlR3 .nlR3StripGo::after{content:"";position:absolute;inset:-5px -2px;}
#hqScr.nlR3 .nlR3StripGo{position:relative;}

/* CHAT: card -> bar, clash card -> strip (a class on the page, no animation) */
#hqScr.nlR3.nlR3Chat{gap:8px;padding-bottom:calc(6px + var(--sa-bottom,env(safe-area-inset-bottom,0px)));}
#hqScr.nlR3.nlR3Chat #nlR3Top{gap:8px;}
#hqScr.nlR3.nlR3Chat .nlR3Id,#hqScr.nlR3.nlR3Chat .nlR3War{display:none;}
#hqScr.nlR3.nlR3Chat .nlR3IdBar,#hqScr.nlR3.nlR3Chat .nlR3WarStrip{display:flex;}

/* ---------- tabs: TEAM / CHAT / GIVE; labels can never overflow ---------- */
#hqScr.nlR3 #hqTabs.nlR3Tabs{display:flex;align-items:stretch;grid-template-columns:none;height:auto;gap:3px;margin:0;padding:3px;border-radius:13px;background:#140f2c;border:2px solid #3d3470;}
#hqScr.nlR3 #hqTabs.nlR3Tabs:empty{display:none;}
#hqScr.nlR3 #hqTabs .nlR3Tab{flex:1 1 0;min-width:0;min-height:44px;height:44px;padding:0 4px;margin:0;border:0;border-radius:10px;box-shadow:none;background:transparent;
  display:flex;align-items:center;justify-content:center;gap:5px;position:relative;overflow:hidden;color:#a999ed;font:400 clamp(16px,5vw,19px)/1 'Bangers',cursive;letter-spacing:1px;white-space:nowrap;}
#hqScr.nlR3 #hqTabs .nlR3Tab.on{background:linear-gradient(180deg,#5b4bb0,#43378a);color:#fff;box-shadow:inset 0 -3px 0 var(--pow,#ffd23f);border:0;}
#hqScr.nlR3 #hqTabs .nlR3TabW{min-width:0;overflow:hidden;text-overflow:clip;}
#hqScr.nlR3 #hqTabs .nlR3Dot{flex:0 0 auto;width:12px;height:12px;border-radius:6px;background:var(--red,#e03131);border:2px solid #140f2c;}

/* ---------- TEAM ---------- */
#hqScr.nlR3 #hqBody{display:flex;flex-direction:column;gap:8px;text-align:left;}
#hqScr.nlR3 .nlR3Lh{display:flex;justify-content:space-between;align-items:baseline;gap:8px;padding:2px 2px 0;}
#hqScr.nlR3 .nlR3H2{font:400 21px/1 'Bangers',cursive;letter-spacing:1px;color:#fff;white-space:nowrap;}
#hqScr.nlR3 .nlR3LhR{font:800 11.5px/1 'Nunito',sans-serif;color:#a999ed;letter-spacing:.4px;white-space:nowrap;}
#hqScr.nlR3 .nlR3List{display:flex;flex-direction:column;gap:6px;margin:0;padding:0;border:0;background:none;box-shadow:none;border-radius:0;}
/* repair 1: the old .hqList cap (9 rows, overflow:auto) must not turn the roster into a box that scrolls inside the page */
#hqScr.nlR3 .hqList.nlR3List{max-height:none;overflow:visible;}
#hqScr.nlR3 .hqRow.nlR3M{cursor:pointer;display:flex;align-items:center;gap:8px;min-height:62px;margin:0;padding:6px 2px 6px 8px;border-radius:14px;background:#2e2358;border:2px solid #4d4190;box-shadow:none;}
#hqScr.nlR3 .hqRow.nlR3M.me{border-color:#46d5ed;background:linear-gradient(110deg,#1d4f75,#2e2358);}
#hqScr.nlR3 .hqRow.nlR3M.ccPremGlow{border-color:#ffd23f;}
#hqScr.nlR3 .nlR3Av{position:relative;flex:0 0 48px;width:48px;height:48px;padding:0;margin:0;border:0;background:none;}
#hqScr.nlR3 .nlR3AvClip{position:absolute;left:2px;top:2px;width:44px;height:44px;border-radius:50%;overflow:hidden;display:grid;place-items:center;
  background:radial-gradient(circle at 50% 35%,#7fe6f6,#1b6d97 75%);border:2px solid #fff8e7;}
#hqScr.nlR3 .nlR3AvClip canvas,#hqScr.nlR3 .nlR3AvClip img{width:100% !important;height:100% !important;object-fit:cover;display:block;}
/* repair 3: head-and-shoulders crop, the face fills the round clip as in the mockup (clip keeps overflow hidden) */
#hqScr.nlR3 .nlR3AvClip .nlR3AvArt{transform:scale(2);transform-origin:50% 0;}
#hqScr.nlR3 .nlR3AvIni{font:400 22px/1 'Bangers',cursive;color:#fff;text-shadow:0 2px 0 #082942;}
#hqScr.nlR3 .nlR3Pip{position:absolute;left:-3px;top:-4px;filter:drop-shadow(0 1px 0 #0f0b22);}
#hqScr.nlR3 .nlR3On{position:absolute;right:0;bottom:0;width:14px;height:14px;border-radius:7px;background:#51cf66;border:2px solid #2e2358;}
#hqScr.nlR3 .nlR3Mm{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px;}
#hqScr.nlR3 .nlR3Who{display:block;max-width:100%;min-height:0;padding:0;margin:0;border:0;background:none;text-align:left;box-shadow:none;
  font:800 15.5px/1.2 'Nunito',sans-serif;color:#fff;white-space:normal;overflow-wrap:anywhere;letter-spacing:.2px;}
#hqScr.nlR3 .nlR3Small{display:block;max-width:100%;font:800 11px/1.25 'Nunito',sans-serif;color:#b8b0dc;letter-spacing:.3px;white-space:normal;overflow-wrap:anywhere;}
#hqScr.nlR3 .nlR3Rank{white-space:nowrap;}
#hqScr.nlR3 .nlR3Rank{font-style:normal;color:#b8b0dc;}
#hqScr.nlR3 .nlR3R-owner .nlR3Rank{color:var(--pow,#ffd23f);}
#hqScr.nlR3 .nlR3R-second .nlR3Rank,#hqScr.nlR3 .nlR3R-officer .nlR3Rank{color:#c9bbff;}
#hqScr.nlR3 .nlR3Small .ccVetTag{margin-right:4px;}
#hqScr.nlR3 .nlR3Tr{flex:0 0 auto;display:flex;align-items:center;gap:3px;font:400 21px/1 'Bangers',cursive;letter-spacing:.5px;color:var(--pow,#ffd23f);}
#hqScr.nlR3 .nlR3More{flex:0 0 44px;width:44px;height:44px;padding:0;margin:0;border:0;background:none;color:#a999ed;font:900 15px/1 'Nunito',sans-serif;letter-spacing:1px;border-radius:10px;}
#hqScr.nlR3 .nlR3More:active{background:#43378a;}
#hqScr.nlR3 .nlR3Seat{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;border-radius:14px;border:2px dashed #4d4190;color:#8e84c4;font:400 18px/1 'Bangers',cursive;letter-spacing:1px;}
#hqScr.nlR3 .nlR3Seat.full{border-style:solid;border-color:#2f6b3e;color:#b8f5c3;}
#hqScr.nlR3 .nlR3Empty{padding:14px;text-align:center;color:#a999ed;font:800 13px/1.3 'Nunito',sans-serif;}
#hqScr.nlR3 .nlR3Doors{display:flex;gap:8px;margin-top:4px;}
#hqScr.nlR3 .nlR3Doors .nlR3Btn{flex:1 1 0;min-width:0;}
#hqScr.nlR3 .nlR3Leave{align-self:center;min-height:44px;margin:2px 0 4px;padding:0 14px;border:0;background:none;color:#ff8787;
  font:400 16px/1 'Bangers',cursive;letter-spacing:1px;text-decoration:underline;text-underline-offset:3px;}

/* ---------- GIVE ---------- */
#hqScr.nlR3 .nlR3Stats{border-radius:14px;background:#2e2358;border:2px solid #8ce99a;padding:8px 10px 10px;}
#hqScr.nlR3 .nlR3StatsH{display:block;font:400 17px/1 'Bangers',cursive;letter-spacing:1px;color:#fff;margin-bottom:7px;}
#hqScr.nlR3 .nlR3StatsRow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;}
#hqScr.nlR3 .nlR3Stat{display:flex;align-items:center;gap:6px;min-width:0;padding:6px;border-radius:10px;background:#140f2c;}
#hqScr.nlR3 .nlR3Stat.used{opacity:.6;}
#hqScr.nlR3 .nlR3StatT{display:flex;flex-direction:column;min-width:0;}
#hqScr.nlR3 .nlR3StatT b{font:400 clamp(14px,4.4vw,18px)/1 'Bangers',cursive;letter-spacing:.5px;color:#8ce99a;}
#hqScr.nlR3 .nlR3StatT small{font:800 11px/1.2 'Nunito',sans-serif;color:#b8b0dc;letter-spacing:.3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#hqScr.nlR3 .nlR3Note{padding:8px 10px;border-radius:12px;background:#140f2c;border:2px solid #4d4190;color:#e6defc;font:800 12px/1.35 'Nunito',sans-serif;text-align:center;}
#hqScr.nlR3 .nlR3Check{align-self:center;}
#hqScr.nlR3 .nlR3Card{border-radius:14px;background:#2e2358;border:2px solid #4d4190;padding:10px;display:flex;flex-direction:column;gap:8px;}
#hqScr.nlR3 .nlR3CardHd{display:flex;align-items:center;gap:8px;min-width:0;}
#hqScr.nlR3 .nlR3H3{flex:1;min-width:0;font:400 19px/1 'Bangers',cursive;letter-spacing:1px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#hqScr.nlR3 .nlR3CardR{flex:0 0 auto;display:inline-flex;align-items:center;gap:3px;font:400 16px/1 'Bangers',cursive;letter-spacing:.5px;color:var(--pow,#ffd23f);white-space:nowrap;}
#hqScr.nlR3 .nlR3Give{display:grid;grid-template-columns:repeat(auto-fit,minmax(64px,1fr));gap:6px;margin:0;}
#hqScr.nlR3 .nlR3Give .nlR3Btn{padding:0 6px;font-size:18px;}
#hqScr.nlR3 .nlR3Why{font:800 11.5px/1.35 'Nunito',sans-serif;color:#ffb3a7;text-align:center;}
#hqScr.nlR3 .nlR3CopyGrid{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;margin:0;}
#hqScr.nlR3 .nlR3Copy{display:flex;align-items:center;gap:7px;min-width:0;min-height:58px;padding:5px 6px;margin:0;border-radius:12px;background:#1d1640;border:2px solid #4d4190;text-align:left;color:#fff;white-space:normal;box-shadow:0 2px 0 #0f0b22;}
#hqScr.nlR3 .nlR3Copy:active{transform:translateY(1px);}
#hqScr.nlR3 .nlR3Copy:disabled{opacity:.5;filter:grayscale(.6);cursor:default;transform:none;}
#hqScr.nlR3 .nlR3CopyPic{flex:0 0 40px;width:40px;height:40px;border-radius:10px;overflow:hidden;border:2px solid #fff;background:linear-gradient(180deg,#7fe6f6,#1b6d97);}
#hqScr.nlR3 .nlR3CopyPic canvas,#hqScr.nlR3 .nlR3CopyPic img{width:100% !important;height:100% !important;display:block;object-fit:cover;}
#hqScr.nlR3 .nlR3CopyTx{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:1px;}
#hqScr.nlR3 .nlR3CopyName{font:800 13px/1.2 'Nunito',sans-serif;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:.3px;}
#hqScr.nlR3 .nlR3CopyTx small{font:800 11px/1.2 'Nunito',sans-serif;color:#b8e6c0;white-space:nowrap;}
#hqScr.nlR3 .nlR3CopyGo{flex:0 0 auto;padding:9px 14px;font-size:17px !important;border-radius:9px;background:linear-gradient(180deg,#8ce99a,#51cf66);color:#0b3a1a;border:2px solid #082942;font:400 14px/1 'Bangers',cursive;letter-spacing:.8px;}
#hqScr.nlR3 .nlR3Goals{display:flex;flex-direction:column;gap:6px;}
#hqScr.nlR3 .nlR3Gr{display:flex;align-items:center;gap:10px;min-height:62px;padding:6px 8px;border-radius:14px;background:#2e2358;border:2px solid #4d4190;}
#hqScr.nlR3 .nlR3Gr.done{border-color:#51cf66;}
#hqScr.nlR3 .nlR3Gi{flex:0 0 36px;display:grid;place-items:center;}
#hqScr.nlR3 .nlR3GrTx{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px;}
#hqScr.nlR3 .nlR3GrName{font:800 13px/1.2 'Nunito',sans-serif;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:.3px;}
#hqScr.nlR3 .nlR3GrRow{display:flex;align-items:center;gap:6px;}
#hqScr.nlR3 .nlR3GrRow .nlR3Bar{flex:1;min-width:0;}
#hqScr.nlR3 .nlR3GrN{font:800 11.5px/1 'Nunito',sans-serif;color:#b8b0dc;}
#hqScr.nlR3 .nlR3Rc{flex:0 0 40px;display:grid;place-items:center;}
#hqScr.nlR3 .nlR3Chest{width:40px;height:auto;display:block;filter:drop-shadow(0 2px 0 #0f0b22);}

/* ---------- no HQ yet / offline ---------- */
#hqScr.nlR3 .nlR3None{position:relative;overflow:hidden;display:flex;flex-direction:column;align-items:center;gap:8px;padding:16px 14px 16px;border-radius:18px;
  border:2px solid var(--pow,#ffd23f);box-shadow:0 4px 0 #0f0b22;text-align:center;
  background:radial-gradient(circle at 50% 30%,rgba(255,210,63,.28) 0,transparent 45%),repeating-conic-gradient(from 0deg at 50% 30%,#4a3f72 0deg 9deg,#3b3260 9deg 18deg);}
#hqScr.nlR3 .nlR3NoneArt{width:min(220px,62%);height:auto;display:block;filter:drop-shadow(0 4px 0 #0f0b22);}
#hqScr.nlR3 .nlR3NoneH{margin:0;font:400 clamp(26px,8vw,34px)/1 'Bangers',cursive;letter-spacing:1px;color:#fff;text-shadow:0 3px 0 #0f0b22;}
#hqScr.nlR3 .nlR3NoneP{margin:0;font:800 13px/1.35 'Nunito',sans-serif;color:#e6defc;}
#hqScr.nlR3 .nlR3NoneBtns{display:flex;gap:8px;width:100%;margin-top:4px;}
#hqScr.nlR3 .nlR3NoneBtns .nlR3Btn{flex:1 1 0;min-width:0;min-height:50px;font-size:20px;}
#hqScr.nlR3 .nlR3Again{justify-content:center;margin-top:0;}
#hqScr.nlR3 .nlR3Again .nlR3Btn{flex:0 1 auto;min-height:44px;padding:0 22px;font-size:16px;}   /* online fix O5: the quiet retry under the front door */

/* ---------- CHAT: the game's chat, in the page's colours ---------- */
#hqScr.nlR3 .hcRoot{gap:6px;}
#hqScr.nlR3 .hcRoot > .hcHead{display:none;}
#hqScr.nlR3 .hcNote{font-size:11.5px;color:#a999ed;}
#hqScr.nlR3 .hcCount{font-size:11px;}
#hqScr.nlR3 .hcMeta{font-size:11px;}
#hqScr.nlR3 .hcList,#hqScr.nlR3 .hcHead.hvChatHeading~.hcListWrap .hcList,#hqScr.nlR3 .hcRoot.hvStaffAnnounce .hcHead.hvChatHeading~.hcListWrap .hcList{
  height:clamp(150px,calc(100vh - var(--cc-bar-h,0px) - 462px),640px);height:clamp(150px,calc(100dvh - var(--cc-bar-h,0px) - 462px),640px);
  border:0;background:transparent;padding:6px 2px;}
/* a short chat reads from the top, as in the mockup (the list now fills the screen) */
#hqScr.nlR3 .hcLine.hcFirst{margin-top:0;}
#hqScr.nlR3 .hcBubble{background:#2e2358;border-color:#4d4190;color:#fff;}
#hqScr.nlR3 .hcBubble::after{background:#2e2358;}
#hqScr.nlR3 .hcLine.mine .hcBubble{background:#1d4f75;color:#fff;border-color:#46d5ed;}
#hqScr.nlR3 .hcLine.mine .hcBubble::after{background:#1d4f75;}
#hqScr.nlR3 .hcWho{color:var(--pow,#ffd23f);}
#hqScr.nlR3 .hvDock,#hqScr.nlR3 .hcRow{background:#1b1430;}
#hqScr.nlR3 .hcInput{background:#140f2c;border-color:#4d4190;border-radius:14px;}
#hqScr.nlR3 .hvDock button:not(.hvReact){font-family:'Bangers',cursive;font-weight:400;font-size:18px;letter-spacing:1px;}
#hqScr.nlR3 .bigBtn.hcSend{font-family:'Bangers',cursive;font-weight:400;font-size:21px;letter-spacing:1px;background:linear-gradient(180deg,#7fe6f6,#46d5ed);color:#082942;border:2px solid #082942;box-shadow:0 3px 0 #082942;border-radius:13px;}
/* the keyboard is up: the bottom bar steps aside so the chat box sits on the keyboard */
body.kb-open{--cc-bar-h:0px;}
body.kb-open #ccTabBar{display:none !important;}

@media (max-width:330px){
  #hqScr.nlR3 .nlR3Tr{font-size:18px;}
  #hqScr.nlR3 .nlR3Fight{font-size:18px;padding:0 10px;}
  #hqScr.nlR3 .nlR3Side b{font-size:21px;}
  #hqScr.nlR3 .nlR3StatsRow{gap:4px;}
  #hqScr.nlR3 .nlR3Stat{padding:5px 4px;gap:4px;}
}
@media (max-width:300px){
  #hqScr.nlR3 .nlR3Stat > .nlR3Ic{display:none;}
}
@media (prefers-reduced-motion:reduce){#hqScr.nlR3 *{animation:none !important;transition:none !important;}}
html[data-anim="none"] #hqScr.nlR3 *{animation:none !important;transition:none !important;}

/* ---------- repair 2: R3's own night sheets in the shared #netCard (HQ details, HQ level) ---------- */
#netCard .nlR3Sheet{display:flex;flex-direction:column;gap:10px;text-align:left;color:#fff;}
#netCard .nlR3Sheet *{box-sizing:border-box;}
#netCard .nlR3Sheet .nlR3Num{font-variant-numeric:tabular-nums;white-space:nowrap;}
#netCard .nlR3SHero{--nlr3-p:#ffd23f;--nlr3-s1:#4a3f72;--nlr3-s2:#3b3260;--ex:18%;--ey:50%;
  position:relative;overflow:hidden;display:flex;align-items:center;gap:12px;padding:12px;border-radius:16px;border:2px solid var(--pow,#ffd23f);
  box-shadow:0 4px 0 #0f0b22;background:var(--nlr3-s2);}
#netCard .nlR3SHero::before,#netCard .nlR3SHero::after{content:"";position:absolute;inset:0;pointer-events:none;}
#netCard .nlR3SHero[data-banner="rays"]::before{background:repeating-conic-gradient(from 0deg at var(--ex) var(--ey),var(--nlr3-s1) 0deg 9deg,var(--nlr3-s2) 9deg 18deg);}
#netCard .nlR3SHero[data-banner="stripes"]::before{background:repeating-linear-gradient(135deg,var(--nlr3-s1) 0 16px,var(--nlr3-s2) 16px 32px);}
#netCard .nlR3SHero[data-banner="chevrons"]::before{background:linear-gradient(135deg,var(--nlr3-s1) 25%,transparent 25%) -18px 0/36px 36px,linear-gradient(225deg,var(--nlr3-s1) 25%,transparent 25%) -18px 0/36px 36px,
  linear-gradient(315deg,var(--nlr3-s1) 25%,transparent 25%) 0 0/36px 36px,linear-gradient(45deg,var(--nlr3-s1) 25%,var(--nlr3-s2) 25%) 0 0/36px 36px;}
#netCard .nlR3SHero[data-banner="halftone"]::before{background:radial-gradient(circle,var(--nlr3-s1) 3px,transparent 3.6px) 0 0/12px 12px,var(--nlr3-s2);}
#netCard .nlR3SHero[data-banner="split"]::before{background:linear-gradient(115deg,var(--nlr3-s1) 0 48%,var(--nlr3-s2) 48% 100%);}
#netCard .nlR3SHero[data-banner="orbit"]::before{background:repeating-radial-gradient(circle at var(--ex) var(--ey),var(--nlr3-s1) 0 14px,var(--nlr3-s2) 14px 28px);}
#netCard .nlR3SHero::after{background:radial-gradient(circle at var(--ex) var(--ey),rgba(255,210,63,.32) 0,transparent 42%),
    repeating-conic-gradient(from 2deg at var(--ex) var(--ey),rgba(255,255,255,0) 0 5.2deg,rgba(255,255,255,.17) 5.2deg 6deg);
  -webkit-mask:radial-gradient(circle at var(--ex) var(--ey),#000 0,#000 28%,transparent 70%);mask:radial-gradient(circle at var(--ex) var(--ey),#000 0,#000 28%,transparent 70%);}
#netCard .nlR3SEm,#netCard .nlR3SHeroTx{position:relative;z-index:1;}
#netCard .nlR3SEm{flex:0 0 auto;line-height:0;filter:drop-shadow(0 3px 0 rgba(15,11,34,.8));}
#netCard .nlR3SHeroTx{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px;}
#netCard .nlR3SName{margin:0;font:400 25px/1.02 'Bangers',cursive;letter-spacing:1px;color:#fff;text-shadow:0 2px 0 #0f0b22,0 0 8px rgba(15,11,34,.7);
  overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
#netCard .nlR3SLevels .nlR3SName{font-size:22px;}
#netCard .nlR3SChips{display:flex;flex-wrap:wrap;gap:5px;}
#netCard .nlR3SChip{display:inline-flex;align-items:center;min-height:24px;padding:2px 8px;border-radius:12px;background:rgba(15,11,34,.82);border:1.5px solid #6a5cc0;
  font:800 12px/1 'Nunito',sans-serif;letter-spacing:.4px;color:#e6defc;white-space:nowrap;}
#netCard .nlR3SChip.g{border-color:var(--pow,#ffd23f);color:var(--pow,#ffd23f);}
#netCard .nlR3SChip.ok{border-color:#51cf66;color:#8ce99a;}
#netCard .nlR3SBy{margin:0;padding:0 4px;font:italic 800 13px/1.35 'Nunito',sans-serif;color:#d8d2ea;overflow-wrap:anywhere;}
#netCard .nlR3SGrid{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
#netCard .nlR3STile{display:flex;flex-direction:column;gap:4px;padding:9px 10px;border-radius:13px;background:#2e2358;border:2px solid #4d4190;min-width:0;}
#netCard .nlR3STileL{display:flex;align-items:center;gap:5px;font:800 11px/1.1 'Nunito',sans-serif;letter-spacing:.6px;color:#a999ed;}
#netCard .nlR3STileL svg{flex:0 0 auto;display:block;}
#netCard .nlR3STile b{font:400 24px/1 'Bangers',cursive;letter-spacing:.8px;color:#fff;overflow:hidden;text-overflow:ellipsis;}
#netCard .nlR3SLv{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:2px;}
#netCard .nlR3SLv b{font:400 34px/1 'Bangers',cursive;letter-spacing:1px;color:#fff;text-shadow:0 3px 0 #0f0b22;}
#netCard .nlR3SLv .nlR3SLvB{color:var(--pow,#ffd23f);}
#netCard .nlR3SArr{font:900 26px/1 'Nunito',sans-serif;color:var(--pow,#ffd23f);}
#netCard .nlR3SBar{position:relative;height:16px;border-radius:8px;background:#140f2c;border:2px solid #4d4190;overflow:hidden;}
#netCard .nlR3SBar i{position:absolute;left:0;top:0;bottom:0;border-radius:6px;background:linear-gradient(180deg,#ffe577,#ffb800);}
#netCard .nlR3SPts{text-align:center;font:800 13px/1 'Nunito',sans-serif;letter-spacing:.5px;color:#e6defc;}
#netCard .nlR3SLine{margin:0;text-align:center;font:800 13px/1.3 'Nunito',sans-serif;color:#d8d2ea;}
#netCard .nlR3SDoors{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;}
#netCard .nlR3SFoot{display:flex;gap:8px;}
#netCard .nlR3SFoot > *{flex:1;}
#netCard .nlR3SBtn{display:inline-flex;align-items:center;justify-content:center;min-height:46px;min-width:44px;padding:0 10px;border-radius:13px;cursor:pointer;
  border:2px solid #082942;box-shadow:0 3px 0 #082942;font:400 19px/1 'Bangers',cursive;letter-spacing:1px;white-space:nowrap;color:#082942;-webkit-tap-highlight-color:transparent;}
#netCard .nlR3SBtn:active{transform:translateY(2px);box-shadow:0 1px 0 #082942;}
#netCard .nlR3SBtn:focus-visible{outline:3px solid #46d5ed;outline-offset:2px;}
#netCard .nlR3SBtn.gold{background:linear-gradient(180deg,#ffe577,#ffd23f);}
#netCard .nlR3SBtn.ghost{background:#140f2c;color:#e6defc;border-color:#6a5cc0;box-shadow:0 3px 0 #0f0b22;}
body.cc-rm #netCard .nlR3SBtn:active{transform:none;}
/* a player card opened from the HQ page: the two leftover notes stay hidden (card, actions, REPORT / BLOCK unchanged) */
/* also the 'NOT AVAILABLE' lines (stats, leader, lineup) a teammate without a shared profile gets */
#netOv[data-nl-r3] .clPublicUnavailable,#netOv[data-nl-r3] .clProfileMissing,#netOv[data-nl-r3] .hvMemberIntelNote{display:none !important;}
#netOv[data-nl-r3] .frHead{margin-top:14px;}
/* repair 3: the ranks sheet behind the ? */
#netCard .nlR3SRankList{display:flex;flex-direction:column;gap:8px;}
#netCard .nlR3SRank{display:flex;flex-direction:column;gap:7px;padding:9px 10px;border-radius:13px;background:#2e2358;border:2px solid #4d4190;}
#netCard .nlR3SRank.me{border-color:#46d5ed;background:linear-gradient(110deg,#1d4f75,#2e2358);}
#netCard .nlR3SRankTop{display:flex;align-items:center;gap:7px;min-width:0;}
#netCard .nlR3SRankIc{flex:0 0 auto;line-height:0;}
#netCard .nlR3SRankName{flex:1;min-width:0;font:400 20px/1.05 'Bangers',cursive;letter-spacing:1px;color:#fff;overflow-wrap:anywhere;}
#netCard .nlR3SRank[data-rank="owner"] .nlR3SRankName{color:var(--pow,#ffd23f);}
#netCard .nlR3SRankYou{flex:0 0 auto;font:800 12px/1 'Nunito',sans-serif;letter-spacing:.6px;color:#46d5ed;}
#netCard .nlR3SRankActs{display:flex;flex-wrap:wrap;gap:5px;}
/* repair 3: the player card opened from the new HQ (mark data-nl-r3 only; FRIENDS and LEADERBOARD keep the shared shell as it is) */
#netOv[data-nl-r3] .clPublicIdentity .cppBrand small{display:none !important;}
#netOv[data-nl-r3] .clPublicIdentity .cppCard{border-color:var(--pow,#ffd23f);background:#1d1640;}
#netOv[data-nl-r3] .hvMemberIntel{border:2px solid #4d4190;border-top:3px solid var(--pow,#ffd23f);background:radial-gradient(ellipse at 10% 0%,#3b2f72 0%,transparent 65%),#241a4a;}
#netOv[data-nl-r3] .hvMemberIntelFact{border:2px solid #4d4190;border-radius:12px;background:#2e2358;}
#netOv[data-nl-r3] .hvMemberIntelFact dt{font:800 12px/1.15 'Nunito',sans-serif;letter-spacing:.6px;text-transform:uppercase;color:#a999ed;}
#netOv[data-nl-r3] .hvMemberIntelFact dd{text-transform:uppercase;color:#fff;}
#netOv[data-nl-r3] .hvMemberIntelFact[data-nl-r3-empty]{display:none !important;}
/* repair 3: the identity chips fit on one row at 360 (mockup) */
@media (max-width:380px){#hqScr.nlR3 .nlR3Chips{gap:4px;}#hqScr.nlR3 .nlR3Chip{padding:0 6px;letter-spacing:0;}#hqScr.nlR3 .nlR3Chip.g{letter-spacing:.5px;}}
