/* Main lobby (boss approved design/lobby/lobby-concept-v1.png). Logic: lobby.js. Same visual language as the hero
   select (heroes.css): dark glass, gold trim, the hero's theme colour as soft light, Cinzel serif for labels (Luckiest Guy only on the hero plate and sheet titles).
   Phone landscape first (844x390). lobby.js sets on #menu: --sx/--sy (stage centre in px, from the cover-fitted
   background), --hh (hero height), --sw (stage width), --z (UI scale: 1 on phones, up to 1.6 on desktop), --hc/--hc2. */
#menu { --gold: #ffd36b; --gold2: #f5a623; --trim: rgba(255,214,120,.7); --glass: rgba(16,10,34,.78); --ink: #0c0818;
  --sx: 40%; --sy: 74%; --hh: 240px; --sw: 300px; --z: 1; --hc: #ff5a36; --hc2: rgba(255,90,54,.4);
  --serif: 'Cinzel', Georgia, 'Times New Roman', serif; --rim: linear-gradient(180deg, #fff0b8, #e2aa45 45%, #9a6416);
  --glass2: linear-gradient(180deg, rgba(30,20,52,.86), rgba(12,8,26,.9));
  display: block; padding: 0; overflow: hidden; background: #1a1036; color: #fff; }
#menu[hidden] { display: none !important; }
#menu .lb-layer { position: absolute; inset: 0; }
#menu #lbBgLayer { pointer-events: none; }
#menu .lb-bg { position: absolute; inset: 0; transition: opacity .35s; background-color: #2a1850; background-size: cover; background-position: 75% 60%;
  background-image: radial-gradient(60% 40% at 45% 78%, rgba(255,200,90,.45), transparent 70%), linear-gradient(170deg, #2a1a5c 0%, #6b3a8c 45%, #e3866a 80%, #ffcf8a 100%); }
#menu .lb-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,6,26,.62) 0%, rgba(10,6,26,0) 24%),
              linear-gradient(0deg, rgba(8,5,20,.66) 0%, rgba(8,5,20,0) 26%),
              linear-gradient(90deg, rgba(8,5,20,.45) 0%, rgba(8,5,20,0) 16%, rgba(8,5,20,0) 70%, rgba(8,5,20,.38) 100%); }

/* ---------- the hero on the stage ---------- */
#menu .lb-stage { position: absolute; inset: 0; pointer-events: none; }
#menu .lb-aura { position: absolute; left: var(--sx); top: calc(var(--sy) - var(--hh) * .5); width: calc(var(--hh) * 1.7); aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, var(--hc2), rgba(255,200,110,.12) 55%, transparent 100%);
  transition: background .5s; animation: lbAura 4s ease-in-out infinite; }
#menu .lb-ring { position: absolute; left: var(--sx); top: var(--sy); width: var(--sw); height: calc(var(--sw) * .2); transform: translate(-50%, -50%);
  border-radius: 50%; background: radial-gradient(closest-side, rgba(255,240,190,.75), rgba(255,190,80,.35) 45%, transparent 100%);
  mix-blend-mode: screen; animation: lbRing 3.4s ease-in-out infinite; }
#menu .lb-shadow { position: absolute; left: var(--sx); top: var(--sy); width: calc(var(--hh) * .78); height: calc(var(--hh) * .1);
  transform: translate(-50%, -55%); border-radius: 50%; background: radial-gradient(closest-side, rgba(20,8,0,.62), transparent);
  animation: lbShadow 3.4s ease-in-out infinite; }
#menu .lb-hero { position: absolute; left: var(--sx); top: calc(var(--sy) - var(--hh) * 0.98); height: var(--hh); width: calc(var(--hh) * 1.2);
  transform: translateX(-50%); padding: 0; background: none; pointer-events: auto; display: block; }
#menu .lb-float { display: flex; height: 100%; width: 100%; align-items: flex-end; justify-content: center; animation: lbFloat 3.4s ease-in-out infinite; }
#menu .lb-hero img { max-height: 100%; max-width: 100%; object-fit: contain; object-position: center bottom; -webkit-user-drag: none;
  filter: drop-shadow(0 0 1px rgba(255,255,255,.55)) drop-shadow(0 0 14px var(--hc2)) drop-shadow(0 12px 12px rgba(0,0,0,.45));
  transition: opacity .18s, transform .18s; }
#menu .lb-hero img.out { opacity: 0; transform: translateX(-26px) scale(.96); }
#menu .lb-hero img.in { animation: lbHeroIn .5s cubic-bezier(.2,.9,.25,1.12); }
#menu .lb-hero:active img { transform: scale(.98); }
#menu .lb-plate { position: absolute; left: var(--plx, 80px); top: var(--ply, 60%); transform: scale(var(--z)); transform-origin: 0 0;
  pointer-events: auto; display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center;
  padding: 5px 10px 5px 12px; min-height: 44px; border-radius: 10px; text-align: left;
  background: linear-gradient(90deg, rgba(14,9,30,.88), rgba(14,9,30,.62)); border: 1px solid rgba(255,214,120,.55); box-shadow: 0 4px 14px rgba(0,0,0,.4); }
#menu .lb-plate b { font: 700 15px/1.1 var(--serif); letter-spacing: .03em; color: var(--hc); text-shadow: 0 1px 2px rgba(0,0,0,.9), 0 0 6px rgba(0,0,0,.4); grid-row: 1; }
#menu .lb-plate small { grid-row: 2; font: 600 9.5px/1.2 var(--serif); letter-spacing: .08em; color: #d8cfee; }
#menu .lb-plate span { grid-row: 1 / 3; grid-column: 2; font: 700 9.5px/1 var(--serif); letter-spacing: .06em; color: #3a1d00;
  background: linear-gradient(#fff1b8, var(--gold) 50%, var(--gold2)); padding: 5px 7px; border-radius: 6px; }
@keyframes lbFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes lbShadow { 0%, 100% { transform: translate(-50%, -55%) scale(1); opacity: 1; } 50% { transform: translate(-50%, -55%) scale(.9); opacity: .8; } }
@keyframes lbRing { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes lbAura { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }
@keyframes lbHeroIn { from { opacity: 0; transform: translateX(34px) scale(.94); } to { opacity: 1; transform: none; } }

/* ---------- the UI layer: designed at 844x390, scaled up as one piece on bigger screens (--z) ----------
   Look copied from the approved concept (design/lobby/lobby-concept-v1.png, boss 26 Nov 2026: "ikot concept yg betul"):
   painted icons (assets/ui/icons), dark glass with thin gold trim, Cinzel serif for every label. */
#menu .lb-ui { position: absolute; left: 0; top: 0; width: calc(100% / var(--z)); height: calc(100% / var(--z)); transform: scale(var(--z));
  transform-origin: 0 0; pointer-events: none; --pw: clamp(222px, 31%, 300px);
  --pl: max(12px, env(safe-area-inset-left)); --pr: max(12px, env(safe-area-inset-right)); --pt: max(8px, env(safe-area-inset-top)); --pb: max(6px, env(safe-area-inset-bottom)); }
#menu .lb-ui > *, #menu .lb-top > *, #menu .lb-right > * { pointer-events: auto; }
#menu .lb-top, #menu .lb-right { pointer-events: none; }
#menu svg { width: 22px; height: 22px; fill: none; stroke: url(#lbGold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#menu .lb-ui img { -webkit-user-drag: none; user-select: none; pointer-events: none; }

/* top bar */
#menu .lb-top { position: absolute; left: var(--pl); right: var(--pr); top: var(--pt); height: 66px; }
/* profile card: picture in a gold laurel + "Lv. N" ribbon, then the name plate */
#menu .lb-me { position: absolute; left: 0; top: 0; display: flex; align-items: center; padding: 0; background: none; text-align: left; max-width: 300px; min-height: 44px; }
#menu .lb-avw { position: relative; z-index: 2; flex: none; width: 62px; height: 62px; display: grid; place-items: center; }
#menu svg.lb-laurel { position: absolute; left: -13px; top: -12px; width: 88px; height: 86px; fill: url(#lbLaurelG); stroke: rgba(70,40,5,.55); stroke-width: .6;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.55)); }
#menu .lb-av { position: relative; width: 50px; height: 50px; border-radius: 50%; padding: 2px; margin-top: -2px; background: var(--rim);
  box-shadow: 0 0 0 1px rgba(40,22,4,.8), 0 3px 8px rgba(0,0,0,.5); }
#menu .lb-av > i { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, #4b3a78, #1a1230); }
#menu .lb-av canvas.avatar { width: 100% !important; height: 100% !important; }
#menu .lb-av svg { width: 28px; height: 28px; }
#menu .lb-lv { position: absolute; z-index: 3; left: 50%; bottom: -4px; transform: translateX(-50%); white-space: nowrap;
  font: 700 10px/1 var(--serif); letter-spacing: .03em; color: #fff3d2; padding: 3px 7px 3px; border-radius: 6px;
  background: linear-gradient(180deg, #2c1d4e, #140c28) padding-box, var(--rim) border-box; border: 1px solid transparent; box-shadow: 0 2px 5px rgba(0,0,0,.6); }
#menu .lb-pl { position: relative; z-index: 1; margin-left: -6px; min-width: 0; padding: 1px; background: linear-gradient(90deg, rgba(185,120,26,.7), #f3d27e 45%, #a8701c);
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 50%, calc(100% - 13px) 100%, 0 100%); }
#menu .lb-pi { display: flex; flex-direction: column; justify-content: center; min-height: 50px; padding: 4px 24px 4px 20px; min-width: 0;
  background: linear-gradient(90deg, rgba(14,9,30,.94), rgba(26,17,48,.88)); clip-path: polygon(0 0, calc(100% - 12.5px) 0, 100% 50%, calc(100% - 12.5px) 100%, 0 100%); }
#menu .lb-nrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
#menu .lb-name { font: 600 15px/1.15 var(--serif); letter-spacing: .02em; color: #fbf4e2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 176px;
  text-shadow: 0 1px 2px rgba(0,0,0,.8); }
#menu .lb-name i { font-style: normal; color: var(--gold); margin-right: 4px; }
#menu svg.lb-edit { flex: none; width: 13px; height: 13px; margin-left: auto; stroke-width: 2; opacity: .9; }
#menu .lb-hr { display: block; height: 1px; margin: 3px 0 3px; background: linear-gradient(90deg, rgba(255,214,120,.6), rgba(255,214,120,.08)); }
#menu .lb-rank { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
#menu .lb-rank .badge { margin: -4px 0 -4px -3px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
#menu .lb-rt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
#menu .lb-rn { font: 600 11.5px/1.1 var(--serif); color: #e9dcc0; letter-spacing: .02em; }
#menu .lb-rn.lb-unr { color: #c4b8dc; }
#menu .lb-st { display: flex; gap: 1px; font-size: 11px; line-height: 1; color: #ffcf4a; text-shadow: 0 1px 1px rgba(0,0,0,.6); }
#menu .lb-st i { font-style: normal; color: rgba(150,140,170,.55); }
#menu .lb-st i.on { color: #ffcf4a; }

#menu .lb-logo { position: absolute; left: 50%; top: -4px; transform: translateX(-50%); height: 60px; pointer-events: none; transition: opacity .2s; }
#menu .lb-logo img { height: 100%; width: auto; display: block; filter: drop-shadow(0 4px 8px rgba(0,0,0,.55)); }
#menu .lb-logo.off { opacity: 0; }

/* top right: one glass pill (coins | Ruby +), then round gold-rim buttons */
#menu .lb-right { position: absolute; right: 0; top: 0; display: flex; align-items: center; gap: 7px; height: 46px; }
#menu .lb-wallet { display: flex; align-items: center; height: 34px; padding: 0 4px; border-radius: 17px; pointer-events: auto;
  background: var(--glass2) padding-box, linear-gradient(180deg, rgba(255,226,150,.75), rgba(160,100,24,.6)) border-box; border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 3px 10px rgba(0,0,0,.4); }
#menu .lb-cur { position: relative; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px 0 0; background: none; border: 0;
  font: 700 13px/1 system-ui, 'Segoe UI', sans-serif; font-variant-numeric: tabular-nums; color: #fff8e6; letter-spacing: .02em; }
#menu .lb-wdiv { width: 1px; height: 18px; background: rgba(255,214,120,.45); margin: 0 6px 0 2px; }
#menu .lb-coin, #menu .lb-ruby { flex: none; width: 24px; height: 24px; display: block; }
#menu .lb-coin { border-radius: 50%; background: radial-gradient(circle at 38% 32%, #fff6c4 0 18%, #ffd24a 40%, #d58a12 75%, #8c5206 100%);
  box-shadow: inset 0 0 0 2px rgba(255,236,160,.6), inset 0 0 0 4px rgba(150,90,8,.45), 0 1px 3px rgba(0,0,0,.5); }
#menu .lb-ruby { width: 22px; height: 20px; clip-path: polygon(22% 4%, 78% 4%, 100% 34%, 50% 98%, 0 34%);
  background: linear-gradient(160deg, #ffd6df 0%, #ff4f78 26%, #d0103e 58%, #6d0420 100%); }
#menu button.lb-cur.ruby { padding: 0; min-height: 44px; }
#menu .lb-plus { display: grid; place-items: center; width: 22px; height: 22px; margin-left: 2px; border-radius: 5px; font: 800 17px/1 system-ui, sans-serif; color: #3a1d00;
  background: linear-gradient(180deg, #fff3c0, #ffd36b 45%, #d9901c); box-shadow: inset 0 -1px 0 rgba(0,0,0,.25), 0 1px 3px rgba(0,0,0,.5); }
#menu .lb-round { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; padding: 0;
  background: radial-gradient(circle at 50% 32%, #34245c, #120b26 78%) padding-box, var(--rim) border-box; border: 1.5px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 3px 10px rgba(0,0,0,.45); }
#menu .lb-round::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; }   /* 44 px tap area */
#menu .lb-round img { width: 27px; height: 27px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
#menu .lb-dot { position: absolute; top: 0; right: 0; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ff8a8a, #e01818 60%);
  box-shadow: 0 0 0 1.5px #1a0f2e, 0 0 6px rgba(255,40,40,.7); }
#menu .lb-dot[hidden] { display: none; }
#menu .lb-round:active, #menu .lb-sb:active .lb-ic, #menu .lb-cur:active { transform: scale(.93); }

/* link reminder (groupb.js): under the logo */
#menu #lbBanner { position: absolute; top: calc(var(--pt) + 62px); left: 50%; transform: translateX(-50%); width: min(460px, 56%); }
#menu #lbBanner:empty { display: none; }
#menu #linkBan { margin: 0; font-size: 12px; padding: 6px 8px; background: rgba(16,10,34,.88); border: 1px solid var(--trim); }

/* left edge: events, daily missions, season pass (not built: a tap says "coming soon"; no tags, no padlocks) */
#menu .lb-side { position: absolute; left: calc(var(--pl) + 1px); top: calc(var(--pt) + 76px); display: flex; flex-direction: column; gap: 3px; }
#menu .lb-sb { position: relative; width: 62px; display: flex; flex-direction: column; align-items: center; padding: 0; background: none; }
#menu .lb-ic { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 32%, #3a2864, #120b26 78%) padding-box, var(--rim) border-box; border: 1.5px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 3px 10px rgba(0,0,0,.45); }
#menu .lb-ic img { width: 33px; height: 33px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.55)); }
#menu .lb-ic .lb-dot { top: 1px; right: 1px; }
#menu .lb-sl { position: relative; margin-top: -7px; font: 600 9px/1.05 var(--serif); letter-spacing: .01em; text-align: center; white-space: nowrap; color: #f6eedb;
  padding: 2px 7px; border-radius: 6px; text-shadow: 0 1px 1px rgba(0,0,0,.7);
  background: rgba(12,8,26,.9) padding-box, linear-gradient(180deg, rgba(255,226,150,.7), rgba(150,95,20,.55)) border-box; border: 1px solid transparent; }

/* bottom right: message, mode pill, BATTLE */
#menu .lb-play { position: absolute; right: var(--pr); bottom: var(--pb); width: var(--pw); display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
#menu .lb-msg { font-size: 12px; font-weight: 800; color: var(--gold); text-align: right; text-shadow: 0 1px 3px #000, 0 0 8px rgba(0,0,0,.6); line-height: 1.25; }
#menu .lb-msg:empty { display: none; }
#menu .lb-search { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 12px; background: var(--glass); border: 1px solid var(--trim); flex-wrap: wrap; }
#menu .lb-search[hidden] { display: none; }
#menu .lb-search b { font-size: 12px; font-weight: 800; flex: 1; white-space: nowrap; }
#menu .lb-search #btnPractice { width: 100%; margin: 0; min-height: 40px; font-size: 11px; padding: 6px 8px; border-color: var(--trim); background: rgba(255,255,255,.08); }
#menu .lb-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,214,120,.3); border-top-color: var(--gold); animation: lbSpin .8s linear infinite; }
@keyframes lbSpin { to { transform: rotate(360deg); } }
#menu .lb-modes { display: grid; grid-template-columns: repeat(4, 1fr); padding: 3px; height: 38px; margin: 0 2px; border-radius: 19px;
  background: var(--glass2) padding-box, linear-gradient(180deg, rgba(255,226,150,.75), rgba(160,100,24,.6)) border-box; border: 1px solid transparent;
  box-shadow: 0 4px 14px rgba(0,0,0,.4); }
#menu .lb-modes button { position: relative; border-radius: 15px; font: 600 11.5px/1 var(--serif); letter-spacing: 0; color: #e9e0cc; background: none; white-space: nowrap; padding: 0 2px;
  border: 1px solid transparent; }
#menu .lb-modes button + button::before { content: ''; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 1px; background: rgba(255,214,120,.35); }
#menu .lb-modes button.on::before, #menu .lb-modes button.on + button::before { display: none; }
#menu .lb-modes button::after { content: ''; position: absolute; inset: -4px 0; }   /* 44 px tap height */
#menu .lb-modes button.on { color: #fff6dc; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.7);
  background: linear-gradient(180deg, rgba(170,110,30,.6), rgba(90,52,10,.75)) padding-box, var(--rim) border-box;
  box-shadow: inset 0 1px 0 rgba(255,240,190,.35), 0 0 10px rgba(255,190,70,.35); }
/* RANKED locked below level 15 (FEATURES-BRIEF 35): a gold lock on the tab, a plate over BATTLE, BATTLE dimmed */
#menu .lb-modes .lb-lk { display: none; width: 12px; height: 12px; margin: 0 3px -1px 0; vertical-align: -1px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.7)); }
#menu .lb-modes button.locked .lb-lk { display: inline-block; }
#menu .lb-modes button.locked:not(.on) { color: #b9ad94; }
#menu .lb-lock { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; border: 1px solid transparent;
  background: var(--glass2) padding-box, linear-gradient(90deg, #7a4c10, #f6d98a 30%, #b47a22 60%, #7a4c10) border-box; }
#menu .lb-lock[hidden] { display: none; }
#menu .lb-lock svg { width: 26px; height: 26px; flex: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); }
#menu .lb-lock span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#menu .lb-lock b { font: 700 12.5px/1.1 var(--serif); color: #ffe7a6; letter-spacing: .03em; }
#menu .lb-lock small { font: 600 9.5px/1.2 var(--serif); color: #d9cfb4; }
#menu .lb-battle.locked { animation: none; filter: grayscale(.7) brightness(.75) drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
#menu .lb-battle { position: relative; height: 64px; width: 100%; padding: 0 18px; display: flex; align-items: center; justify-content: center; gap: 10px; background: none;
  filter: drop-shadow(0 0 3px rgba(255,210,110,.9)) drop-shadow(0 0 12px rgba(255,110,20,.8)) drop-shadow(0 4px 6px rgba(0,0,0,.5)); animation: lbGlow 2.2s ease-in-out infinite; }
#menu .lb-bfill, #lobby .lb-bfill { position: absolute; inset: 0; clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 18px 100%, 0 50%);
  background: linear-gradient(180deg, #fff6d0, #f3c35a 40%, #a95a0c); overflow: hidden; }
#menu .lb-bfill::before, #lobby .lb-bfill::before { content: ''; position: absolute; inset: 2.5px; clip-path: polygon(16.5px 0, calc(100% - 16.5px) 0, 100% 50%, calc(100% - 16.5px) 100%, 16.5px 100%, 0 50%);
  background: radial-gradient(70% 80% at 50% 0%, rgba(255,236,170,.6), transparent 62%), radial-gradient(60% 60% at 50% 110%, rgba(255,70,0,.55), transparent 70%),
    linear-gradient(180deg, #ffad3a 0%, #f57d16 45%, #d4500a 78%, #8e2c06 100%); }
#menu .lb-bfill::after, #lobby .lb-bfill::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: 0; transform: translateX(-150%) skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: lbShine 3.2s ease-in-out infinite; will-change: transform; }
#menu .lb-sw { position: relative; width: 38px; height: 38px; filter: drop-shadow(0 2px 1px rgba(90,30,0,.7)); }
#menu .lb-bt { position: relative; display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
#menu .lb-bt b { font: 800 27px/1 var(--serif); letter-spacing: .06em; color: #fff9ea;
  -webkit-text-stroke: .6px rgba(110,40,0,.55); text-shadow: 0 2px 0 rgba(110,36,0,.9), 0 0 10px rgba(255,220,150,.45); }
#menu .lb-bt small { display: none; font: 700 9.5px/1 var(--serif); letter-spacing: .1em; color: #e6dcff; margin-top: 3px; }
#menu .lb-battle.busy .lb-bt small { display: block; }
#menu .lb-battle:active { transform: scale(.97); }
#menu .lb-battle.busy .lb-bfill::before { background: linear-gradient(180deg, #6d5a9a, #3c2a6e 60%, #251847); }
#menu .lb-battle.busy { animation: none; filter: drop-shadow(0 0 8px rgba(160,120,255,.6)) drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
@keyframes lbGlow { 50% { filter: drop-shadow(0 0 4px rgba(255,225,140,1)) drop-shadow(0 0 20px rgba(255,120,20,.95)) drop-shadow(0 4px 6px rgba(0,0,0,.5)); } }
/* the shine slides with transform (compositor only; it used to animate left = a layout every frame) */
@keyframes lbShine { 0%, 55% { transform: translateX(-150%) skewX(-20deg); } 100% { transform: translateX(325%) skewX(-20deg); } }
/* GRAPHICS LOW: the glow / pulse animations stop (drop-shadow filters repainting every frame are slow on cheap phones) */
html.gfx-low #menu .lb-aura, html.gfx-low #menu .lb-ring, html.gfx-low #menu .lb-battle, html.gfx-low #lobby .rm-go,
html.gfx-low #menu .lb-bfill::after, html.gfx-low #lobby .lb-bfill::after, html.gfx-low #lobby .seat.empty b { animation: none; }

/* bottom bar: icons over labels, thin gold dividers, framed by an ornate gold edge */
#menu .lb-bar { position: absolute; left: var(--pl); bottom: var(--pb); right: calc(var(--pr) + var(--pw) + 14px); max-width: 640px; height: 64px;
  display: flex; align-items: stretch; padding: 0 6px; border-radius: 12px; border: 2px solid transparent;
  background: linear-gradient(180deg, rgba(36,24,60,.9), rgba(12,8,24,.94)) padding-box,
              linear-gradient(90deg, #7a4c10, #f6d98a 18%, #b47a22 40%, #ffe9a8 60%, #b47a22 82%, #7a4c10) border-box;
  box-shadow: inset 0 0 0 2px rgba(8,5,18,.85), inset 0 0 0 3px rgba(255,214,120,.22), 0 8px 22px rgba(0,0,0,.5); }
#menu .lb-bar::before, #menu .lb-bar::after { content: ''; position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; transform: rotate(45deg);
  background: linear-gradient(135deg, #fff3c4, #d49a2e 60%, #8a5a12); box-shadow: 0 0 0 1px rgba(40,22,4,.8), 0 0 6px rgba(255,200,90,.5); }
#menu .lb-bar::before { left: -6.5px; }
#menu .lb-bar::after { right: -6.5px; }
#menu .lb-bar button { position: relative; flex: 1; min-width: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: none; padding: 0 2px; border-radius: 10px; }
#menu .lb-bar button + button::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 1px;
  background: linear-gradient(transparent, rgba(255,214,120,.65), transparent); }
#menu .lb-bar img { width: 36px; height: 36px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
#menu .lb-bar span { font: 700 11px/1 var(--serif); letter-spacing: .05em; color: #fbf1d8; text-shadow: 0 1px 2px #000; }
#menu .lb-bar button:active { background: rgba(255,214,120,.12); }
#menu .lb-bar button:active img { transform: scale(.92); }
#menu .lb-n { position: absolute; top: 4px; right: calc(50% - 26px); font: 800 9.5px/1 system-ui, sans-serif; color: var(--ink);
  background: var(--gold); border-radius: 6px; padding: 2px 4px; }
#menu .lb-n:empty { display: none; }

/* entrance */
#menu.lb-in .lb-top { animation: lbFromTop .45s cubic-bezier(.2,.9,.3,1) both; }
#menu.lb-in .lb-bar { animation: lbFromBottom .45s cubic-bezier(.2,.9,.3,1) .05s both; }
#menu.lb-in .lb-play { animation: lbFromRight .45s cubic-bezier(.2,.9,.3,1) .1s both; }
#menu.lb-in .lb-side { animation: lbFromLeft .45s cubic-bezier(.2,.9,.3,1) .1s both; }
#menu.lb-in .lb-hero img { animation: lbHeroIn .6s cubic-bezier(.2,.9,.25,1.12) both; }
@keyframes lbFromTop { from { opacity: 0; transform: translateY(-20px); } }
@keyframes lbFromBottom { from { opacity: 0; transform: translateY(20px); } }
@keyframes lbFromRight { from { opacity: 0; transform: translateX(30px); } }
@keyframes lbFromLeft { from { opacity: 0; transform: translateX(-24px); } }

/* chat button: above the bar on the left while the lobby or the room shows (social.js places it elsewhere in a match) */
body.inlobby #chatBtn { left: calc(max(12px, env(safe-area-inset-left)) + 8px); bottom: calc(max(6px, env(safe-area-inset-bottom)) + 72px * var(--lbz, 1));
  width: 46px; height: 46px; border-radius: 50%; font-size: 20px; transform: scale(var(--lbz, 1)); transform-origin: 0 100%;
  background: radial-gradient(circle at 50% 32%, #3a2864, #120b26 78%) padding-box, linear-gradient(180deg, #fff0b8, #e2aa45 45%, #9a6416) border-box;
  border: 1.5px solid transparent; }

/* narrow phones (667 wide and less): tighter top bar */
#menu.lb-narrow .lb-cur.ruby b { display: none; }
#menu.lb-narrow .lb-right { gap: 5px; }
#menu.lb-narrow .lb-name { max-width: 130px; }
#menu.lb-narrow .lb-plate { display: none; }
#menu.lb-narrow .lb-modes button { font-size: 10.5px; }
/* short screens (UI under 385 px tall, e.g. 667x375): smaller left column so the chat button fits under it */
#menu.lb-short .lb-side { top: calc(var(--pt) + 72px); gap: 1px; }
#menu.lb-short .lb-ic { width: 38px; height: 38px; }
#menu.lb-short .lb-ic img { width: 30px; height: 30px; }

/* ---------- Look v3 (boss 26 Nov 2026: "lg2 transparent interface, icon gold n ruby", "font pun lain..x nampak mahal",
   "nama dan avatar...ikot sample"): see-through glass (.45-.6) with the thin gold trim, painted coin / ruby / plus,
   metallic gold labels (cream -> gold -> amber fill, thin dark-brown outline, soft drop shadow; crisp, not fat), the
   profile card measured from design/lobby/lobby-concept-v1.png. Saved look: design/lobby/lobby-live-v3.png ---------- */
#menu { --glass2: linear-gradient(180deg, rgba(30,20,52,.52), rgba(12,8,26,.58));
  --goldtxt: linear-gradient(180deg, #fffbe8 0%, #ffe6a0 30%, #f1bf52 58%, #b97416 100%);
  --namefont: 'ArcName', Georgia, 'Times New Roman', serif; }
#menu .lb-shade { background: linear-gradient(180deg, rgba(10,6,26,.34) 0%, rgba(10,6,26,0) 20%),
  linear-gradient(0deg, rgba(8,5,20,.5) 0%, rgba(8,5,20,0) 24%),
  linear-gradient(90deg, rgba(8,5,20,.3) 0%, rgba(8,5,20,0) 14%, rgba(8,5,20,0) 72%, rgba(8,5,20,.24) 100%); }
/* gold text: the fill is the gradient, the outline a hair of dark brown, the shadow a filter (text-shadow would show
   through the see-through fill) */
#menu .lb-bar span, #menu .lb-modes button:not(.on), #menu .lb-bt b, #menu .lb-plate b {
  background: var(--goldtxt); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  -webkit-text-stroke: .35px rgba(70,34,4,.85); text-shadow: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.85)) drop-shadow(0 0 3px rgba(0,0,0,.45)); }
#menu .lb-bar span { font: 700 11.5px/1.1 var(--serif); letter-spacing: .06em; padding: 0 1px; }
#menu .lb-sl { font: 700 9.5px/1.05 var(--serif); padding: 2px 7px; color: #f8dc94; background: rgba(12,8,26,.5) padding-box, linear-gradient(180deg, rgba(255,226,150,.7), rgba(150,95,20,.55)) border-box;
  text-shadow: 0 0 1px #3c1d02, 0 0 1px #3c1d02, 0 1px 2px rgba(0,0,0,.9); }
#menu .lb-modes button { font: 700 12px/1 var(--serif); }
#menu .lb-modes button.on { -webkit-text-fill-color: #fff8e4; color: #fff8e4; text-shadow: 0 0 1px #3c1d02, 0 1px 2px rgba(0,0,0,.8); background: linear-gradient(180deg, rgba(170,110,30,.55), rgba(90,52,10,.7)) padding-box, var(--rim) border-box; }
#menu .lb-modes button.locked:not(.on) { opacity: .7; }
#menu .lb-bt b { font: 800 29px/1.05 var(--serif); letter-spacing: .05em; transform: skewX(-9deg); padding: 0 3px;
  background: linear-gradient(180deg, #fffdf2 0%, #fff0c4 40%, #ffd77a 70%, #f2a93a 100%); -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: .7px rgba(110,36,0,.9); filter: drop-shadow(0 2px 0 rgba(110,36,0,.9)) drop-shadow(0 0 8px rgba(255,220,150,.45)); }
#menu .lb-plate b { color: transparent; }
/* see-through glass */
#menu .lb-pi { background: linear-gradient(90deg, rgba(14,9,30,.64), rgba(26,17,48,.5)); }
#menu .lb-pl { background: linear-gradient(90deg, rgba(185,120,26,.55), rgba(243,210,126,.85) 45%, rgba(168,112,28,.7)); }
#menu .lb-bar { background: linear-gradient(180deg, rgba(36,24,60,.5), rgba(12,8,24,.58)) padding-box,
  linear-gradient(90deg, #7a4c10, #f6d98a 18%, #b47a22 40%, #ffe9a8 60%, #b47a22 82%, #7a4c10) border-box;
  box-shadow: inset 0 0 0 2px rgba(8,5,18,.45), inset 0 0 0 3px rgba(255,214,120,.2), 0 8px 22px rgba(0,0,0,.35); }
#menu .lb-plate { background: linear-gradient(90deg, rgba(14,9,30,.58), rgba(14,9,30,.38)); }
#menu .lb-wallet { box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 3px 10px rgba(0,0,0,.3); }
#menu .lb-cur { text-shadow: 0 1px 2px rgba(0,0,0,.9); }
/* painted currency icons (assets/ui/icons), a little bigger like the concept */
#menu .lb-coin, #menu .lb-ruby { width: 26px; height: 26px; border-radius: 0; clip-path: none; background: none; box-shadow: none; object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
#menu .lb-ruby { width: 25px; height: 25px; }
#menu .lb-plus { width: 24px; height: 24px; margin-left: 3px; background: none; box-shadow: none; border-radius: 0; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.55)); }
/* round buttons: the painted gold-rim frame as the face */
#menu .lb-round { background: url('assets/ui/icons/btn-frame.png') center / 100% 100% no-repeat; border: 0; box-shadow: 0 3px 8px rgba(0,0,0,.35); width: 42px; height: 42px; }
#menu .lb-round img { width: 26px; height: 26px; }
/* profile card: 64 px picture with a gold rim, the laurel round its lower half, "Lv. N" plate under it */
#menu .lb-top { height: 74px; }
#menu .lb-avw { width: 70px; height: 72px; margin-top: 0; }
#menu svg.lb-laurel { left: -11px; top: -2px; width: 92px; height: 90px; -webkit-clip-path: inset(34% 0 0 0); clip-path: inset(34% 0 0 0); }
#menu .lb-av { width: 64px; height: 64px; padding: 2.5px; margin-top: -4px; }
#menu .lb-av > i { background: radial-gradient(circle at 50% 35%, #5a4890, #1a1230); }
#menu .lb-av .lb-face { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; display: block; transform: scale(1.06); }
#menu .lb-lv { bottom: -1px; font: 700 10.5px/1 var(--serif); padding: 3px 8px 2px; color: #fff3d2;
  background: linear-gradient(180deg, rgba(34,22,58,.92), rgba(16,10,32,.92)) padding-box, var(--rim) border-box; }
#menu .lb-pl { margin-left: -14px; }
#menu .lb-pi { min-height: 56px; padding: 4px 24px 5px 24px; }
#menu .lb-name { font: italic 700 15.5px/1.15 var(--namefont); letter-spacing: .01em; color: #fffaf0; max-width: 170px;
  text-shadow: 0 1px 2px rgba(0,0,0,.85), 0 0 6px rgba(0,0,0,.35); }
#menu .lb-name i { font-style: italic; }
#menu svg.lb-edit { width: 14px; height: 14px; stroke: #fff; stroke-width: 2; opacity: .95; margin-left: 10px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.7)); }
#menu .lb-hr { margin: 3px 0 4px; background: linear-gradient(90deg, rgba(255,214,120,.85), rgba(255,214,120,.1)); }
#menu .lb-rank { gap: 7px; }
#menu .lb-rank .badge { margin: -5px 0 -5px -4px; }
#menu .lb-rn { font: 400 12.5px/1.1 var(--namefont); letter-spacing: .01em; color: #f3dfa6; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
#menu .lb-st { gap: 2px; font-size: 12px; }
#menu .lb-st i { color: #5d5a66; text-shadow: 0 0 1px rgba(0,0,0,.8); }
#menu .lb-st i.on { color: #ffcf3a; text-shadow: 0 0 3px rgba(255,190,60,.5), 0 1px 1px rgba(0,0,0,.6); }
#menu .lb-side { top: calc(var(--pt) + 84px); }
#menu.lb-short .lb-side { top: calc(var(--pt) + 80px); }
/* the same name type on the room seats, the VS screen and the result screen */
#lobby .seat .rm-plate b, #vs .vs-card .vs-name, #result .rs-row .rs-who b span { font-family: 'ArcName', Georgia, 'Times New Roman', serif; font-style: italic; font-weight: 700; letter-spacing: 0; }

/* ---------- pre-battle sheets (VS BOT / 2 PLAYERS, ROOM): slide up from the bottom ---------- */
#battleSheet, #roomSheet { z-index: 33; align-items: flex-end; padding: 0 max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left));
  background: rgba(6,3,16,.58); }
.lb-sheet { width: min(760px, 100%); border-radius: 18px 18px 0 0; border: 1.5px solid rgba(255,214,120,.7); border-bottom: 0;
  background: radial-gradient(70% 60% at 50% 0%, rgba(120,80,200,.28), transparent 70%), linear-gradient(180deg, #221846, #120c26);
  box-shadow: 0 -10px 40px rgba(0,0,0,.55); padding: 8px 16px max(12px, env(safe-area-inset-bottom)); animation: lbSheet .3s cubic-bezier(.2,.9,.3,1); }
@keyframes lbSheet { from { transform: translateY(100%); } }
.lb-sheet .ov-head { background: #221846; }
.lb-sheet h2 { font: 400 24px/1 'Luckiest Guy', system-ui, sans-serif; letter-spacing: .05em; color: #ffd36b; text-shadow: 0 2px 0 rgba(0,0,0,.6); padding-top: 4px; margin: 0; }
.lb-sheet .lb-sub { font-size: 12px; color: #c9bfe6; }
.lb-sheet .lbl { color: #c9bfe6; font-weight: 800; margin: 8px 0 5px; font-size: 11px; }
.lb-sgrid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.lb-sheet .seg button { min-height: 44px; border-color: rgba(255,214,120,.35); }
.lb-sheet .seg button.on { background: linear-gradient(#fff3c0, #ffd36b 45%, #f0a020); color: #2a1500; border-color: transparent; }
.lb-sheet #segMode { margin-top: 6px; }
.lb-sheet .group.two { margin: 2px 0 0; gap: 10px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.lb-sheet .lb-scol > .lbl:first-child { margin-top: 6px; }
.lb-maps button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 5px 4px 7px; font-size: 11px; }
.mp { display: block; width: 100%; height: 34px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
/* image maps (CLAUDE.md "Maps (2 layers)"): the thumbnail made by design/tools/make_map.py */
.mp.sunny { background: url(assets/maps/sunny/thumb.webp) center / cover no-repeat, linear-gradient(#5fb0f0, #38c0e0); }
.mp.windmill { background: url(assets/maps/windmill/thumb.webp) center / cover no-repeat, linear-gradient(#8fa0e8, #6fb050); }
.mp.frost { background: url(assets/maps/frost/thumb.webp) center / cover no-repeat, linear-gradient(#8fa8e0, #e8f0ff); }
.mp.glacier { background: url(assets/maps/glacier/thumb.webp) center / cover no-repeat, linear-gradient(#3a3f9a, #8fd0f0); }
.mp.temple { background: url(assets/maps/temple/thumb.webp) center / cover no-repeat, linear-gradient(#f0a060, #d8b070); }
.mp.dune { background: url(assets/maps/dune/thumb.webp) center / cover no-repeat, linear-gradient(#e88a50, #c8642a); }
.mp.candy { background: url(assets/maps/candy/thumb.webp) center / cover no-repeat, linear-gradient(#f8b8e0, #fde0f0); }
.mp.star { background: url(assets/maps/star/thumb.webp) center / cover no-repeat, linear-gradient(#1c1440, #6a3ca0); }
.mp.clockwork { background: url(assets/maps/clockwork/thumb.webp) center / cover no-repeat, linear-gradient(#3a2a3a, #c88a50); }
.mp.harbor { background: url(assets/maps/harbor/thumb.webp) center / cover no-repeat, linear-gradient(#5a4a90, #f0a070); }
.mp.beast { background: url(assets/maps/beast/thumb.webp) center / cover no-repeat, linear-gradient(#8ab0b0, #4a7060); }
/* 11 maps: one row that scrolls sideways (lobby.js keeps the picked one in view); 3.6 buttons show, so the next peeks in */
.lb-maps { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 18px) / 3.6); overflow-x: auto; overflow-y: hidden;
  position: relative; padding-bottom: 5px; overscroll-behavior-x: contain; }
.lb-maps button { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-go { width: 100%; height: 52px; margin-top: 10px; border-radius: 12px; font: 400 24px/1 'Luckiest Guy', system-ui, sans-serif; letter-spacing: .06em; padding-top: 4px;
  color: #fffaf0; background: linear-gradient(180deg, #ffd36b 0%, #ff8a1c 50%, #d4500c 100%); border: 2px solid #ffe9a8;
  text-shadow: 0 2px 0 rgba(110,36,0,.85); box-shadow: 0 4px 0 rgba(0,0,0,.4), 0 0 18px rgba(255,150,40,.45); }
.lb-go:active { transform: translateY(2px); }
.lb-go.sm { width: auto; height: 48px; margin: 0; padding: 4px 22px 0; font-size: 20px; }
.lb-room { width: min(560px, 100%); }
.lb-rgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }   /* 1v1 2v2 3v3 4v4 */
.lb-rbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; border-color: rgba(255,214,120,.45); }
.lb-rbtn b { font: 400 16px/1 'Luckiest Guy', system-ui, sans-serif; letter-spacing: .05em; color: #ffd36b; padding-top: 3px; }
.lb-rbtn small { font-size: 12px; font-weight: 800; color: #e6dcff; }
.lb-join { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.lb-join .inp { min-height: 48px; font-size: 20px; }
.lb-sheet .lb-msg { min-height: 18px; margin-top: 6px; color: #ffd36b; font-size: 13px; font-weight: 700; text-align: center; }
html.short .lb-sheet { padding-top: 4px; }
html.short .lb-sheet .lbl { margin: 5px 0 4px; }
html.short .lb-go { height: 48px; margin-top: 8px; }
html.short .lb-rgrid { margin-top: 6px; }
html.short .lb-rbtn { min-height: 54px; }
@media (max-width: 640px) { html:not(.rot) .lb-sgrid { grid-template-columns: 1fr; gap: 0; } }

@media (prefers-reduced-motion: reduce) {
  #menu .lb-float, #menu .lb-shadow, #menu .lb-ring, #menu .lb-aura, #menu .lb-battle, #menu .lb-bfill::after, #lobby .lb-bfill::after { animation: none; }
  #menu.lb-in .lb-top, #menu.lb-in .lb-bar, #menu.lb-in .lb-play, #menu.lb-in .lb-side, #menu.lb-in .lb-hero img { animation: none; }
}

/* ---------- ROOM (waiting room #lobby; boss 26 Nov 2026: "Bilik pvp...UI dia bg nampak menarik ikot concept kita") ----------
   Same look as the main lobby: its background dimmed (--lbbg, set by lobby.js), dark glass with gold trim, Cinzel.
   Drawn at 844x390 and scaled as one piece (--rz from lobby.js fitRoom). game.js renderLobby fills #seats. */
#lobby { --gold: #ffd36b; --rim: linear-gradient(180deg, #fff0b8, #e2aa45 45%, #9a6416); --serif: 'Cinzel', Georgia, 'Times New Roman', serif;
  --glass2: linear-gradient(180deg, rgba(30,20,52,.88), rgba(12,8,26,.92)); --rz: 1;
  display: block; padding: 0; overflow: hidden; color: #fff; background-color: #1a1036;
  background-image: radial-gradient(70% 60% at 50% 45%, rgba(10,6,26,.25), rgba(8,5,20,.72)), linear-gradient(rgba(8,5,20,.45), rgba(8,5,20,.55)),
    var(--lbbg, url('assets/ui/lobby-bg.webp'));
  background-size: cover; background-position: 70% 60%; }
#lobby[hidden] { display: none !important; }
#lobby .rm-ui { position: absolute; left: 0; top: 0; width: calc(100% / var(--rz)); height: calc(100% / var(--rz)); transform: scale(var(--rz)); transform-origin: 0 0;
  max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible;
  --pl: max(12px, env(safe-area-inset-left)); --pr: max(12px, env(safe-area-inset-right)); --pt: max(8px, env(safe-area-inset-top)); --pb: max(8px, env(safe-area-inset-bottom)); }
#lobby .lbl { font: 600 10px/1 var(--serif); letter-spacing: .08em; color: #e6d6b0; text-transform: none; margin: 0 0 5px; text-shadow: 0 1px 2px #000; }

/* top centre: room code plate + COPY / SHARE, then the room line */
#lobby .rm-top { position: absolute; left: 50%; top: var(--pt); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; }
#lobby .rm-code { position: relative; display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 14px; align-items: center;
  padding: 6px 10px 6px 22px; border-radius: 12px; border: 1.5px solid transparent;
  background: radial-gradient(80% 120% at 30% 0%, rgba(255,214,120,.14), transparent 60%), var(--glass2) padding-box,
    linear-gradient(90deg, #7a4c10, #f6d98a 22%, #b47a22 50%, #ffe9a8 78%, #7a4c10) border-box;
  box-shadow: inset 0 0 0 2px rgba(8,5,18,.8), inset 0 0 0 3px rgba(255,214,120,.2), 0 6px 18px rgba(0,0,0,.5); }
#lobby .rm-code::before, #lobby .rm-code::after { content: ''; position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; transform: rotate(45deg);
  background: linear-gradient(135deg, #fff3c4, #d49a2e 60%, #8a5a12); box-shadow: 0 0 0 1px rgba(40,22,4,.8); }
#lobby .rm-code::before { left: -6px; } #lobby .rm-code::after { right: -6px; }
#lobby .rm-code .lbl { grid-column: 1; grid-row: 1; margin: 0 0 2px; font-size: 9.5px; }
#lobby #roomCode { grid-column: 1; grid-row: 2; font: 800 28px/1 var(--serif); letter-spacing: .22em; padding-left: .22em; color: #ffe7a6;
  background: linear-gradient(180deg, #fff8d8, #ffd36b 50%, #d08a1c); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 1px rgba(0,0,0,.7)); }
#lobby .rm-cbtns { grid-column: 2; grid-row: 1 / 3; display: flex; flex-direction: column; gap: 4px; }
#lobby .rm-sbtn { position: relative; min-width: 64px; height: 22px; padding: 0 8px; border-radius: 6px; font: 700 10px/1 var(--serif); letter-spacing: .08em; color: #3a1d00;
  background: linear-gradient(180deg, #fff3c0, #ffd36b 45%, #d9901c); box-shadow: inset 0 -1px 0 rgba(0,0,0,.25), 0 1px 3px rgba(0,0,0,.5); }
#lobby .rm-sbtn + .rm-sbtn { color: #fbf1d8; background: rgba(255,255,255,.06); border: 1px solid rgba(255,214,120,.55); box-shadow: none; }
#lobby .rm-sbtn::after { content: ''; position: absolute; inset: -6px -4px; }   /* bigger tap area */
#lobby .rm-sbtn:active { transform: scale(.95); }
#lobby #roomInfo { font: 600 11px/1.2 var(--serif); letter-spacing: .04em; color: #f3e6c4; text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.7); }
#lobby #botWait { font: 600 10.5px/1.2 var(--serif); color: var(--gold); text-shadow: 0 1px 2px #000; text-align: center; }
#lobby #botWait:empty { display: none; }

/* seats: red team left, blue right, tall cards */
#lobby .seats { position: absolute; left: var(--pl); right: var(--pr); top: calc(var(--pt) + 82px); bottom: calc(var(--pb) + 66px);
  display: grid; gap: 10px; grid-template-rows: 100%; grid-template-columns: minmax(0, 190px) 240px minmax(0, 190px); justify-content: space-between;
  pointer-events: none; margin: 0; }
/* the middle column always keeps the 236 px middle (VS, your hero, maps) free; the cards shrink on a small phone
   (audit 26 Nov 2026: 2v2 at 667x375 put the middle over the seat cards) */
#lobby .seats[data-size="4"] { grid-template-columns: minmax(0, 128px) minmax(0, 128px) 240px minmax(0, 128px) minmax(0, 128px); }
/* 3v3 / 4v4 (FEATURES-BRIEF 37a): two columns x two rows a team around a narrower middle; renderLobby places each seat
   (inline grid-row / grid-column; the 3rd seat of a 3v3 team spans both columns). Fits 844x390 and 667x375. */
#lobby .seats[data-size="6"], #lobby .seats[data-size="8"] { grid-template-columns: 1fr 1fr 214px 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; }
#lobby.rm-big .rm-mid { width: 206px; gap: 6px; }
#lobby.rm-big .rm-vs { font-size: 26px; }
#lobby.rm-big .seat { border-radius: 11px; }
#lobby.rm-big .rm-art { bottom: 36px; }
#lobby.rm-big .rm-art img { object-position: 50% 12%; }
#lobby.rm-big .rm-hero { font-size: 10px; }
#lobby.rm-big .rm-plate { height: 36px; padding: 3px 6px; gap: 2px; }
#lobby.rm-big .rm-plate b { font-size: 10.5px; }
#lobby.rm-big .rm-plate b canvas.avatar { width: 14px !important; height: 14px !important; }
#lobby.rm-big .rm-plate small { font-size: 9px; gap: 3px; }
#lobby.rm-big .rm-plate .ttl { display: none; }
#lobby.rm-big .rm-plate .stars { font-size: 8px; }
#lobby.rm-big .rm-crown, #lobby.rm-big .rm-tick { top: 4px; width: 18px; height: 18px; font-size: 11px; }
#lobby.rm-big .rm-crown { left: 4px; } #lobby.rm-big .rm-tick { right: 4px; }
#lobby.rm-big .seat.empty b { font-size: 11px; }
#lobby.rm-big .seat.empty small { font-size: 9px; padding: 0 4px; }
#lobby .seat { grid-row: 1; pointer-events: auto; position: relative; min-height: 0; padding: 0; overflow: hidden; text-align: left; border-radius: 14px;
  border: 1.5px solid transparent; opacity: 1;
  background: linear-gradient(180deg, rgba(26,17,46,.8), rgba(10,7,22,.92)) padding-box, var(--rim) border-box;
  box-shadow: inset 0 0 0 2px rgba(8,5,18,.6), 0 8px 22px rgba(0,0,0,.5); --team: 226,64,64; }
#lobby .seat.blue { --team: 64,140,255; }
#lobby .seat.red, #lobby .seat.blue { border-left: 1.5px solid transparent; }
#lobby .seats[data-size="2"] .seat.red { grid-column: 1; }
#lobby .seats[data-size="2"] .seat.blue { grid-column: 3; }
#lobby .seats[data-size="4"] .seat:nth-child(1) { grid-column: 1; }
#lobby .seats[data-size="4"] .seat:nth-child(3) { grid-column: 2; }
#lobby .seats[data-size="4"] .seat:nth-child(2) { grid-column: 4; }
#lobby .seats[data-size="4"] .seat:nth-child(4) { grid-column: 5; }
#lobby .seat::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(90% 60% at 50% 30%, rgba(var(--team),.38), transparent 70%), linear-gradient(0deg, rgba(var(--team),.25), transparent 40%); }
#lobby .seat.you { box-shadow: inset 0 0 0 2px rgba(8,5,18,.6), 0 0 0 2px rgba(255,214,120,.55), 0 0 18px rgba(255,190,70,.45), 0 8px 22px rgba(0,0,0,.5); }
#lobby .seat.off { filter: grayscale(.8) brightness(.7); }
#lobby .rm-art { position: absolute; inset: 0 0 46px; z-index: 1; display: flex; align-items: flex-end; justify-content: center; }
#lobby .rm-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; -webkit-user-drag: none; user-select: none;
  filter: drop-shadow(0 0 10px rgba(var(--team),.5)); }
#lobby .seat.blue .rm-art img { transform: scaleX(-1); }
#lobby .rm-hero { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; font: 700 12px/1 var(--serif); letter-spacing: .08em; color: #fff8ea;
  text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.95), 0 0 12px var(--hc, transparent); }
#lobby .rm-plate { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 46px; padding: 5px 8px; display: flex; flex-direction: column; justify-content: center; gap: 3px;
  background: linear-gradient(180deg, rgba(14,9,28,.86), rgba(10,6,22,.96)); border-top: 1px solid rgba(255,214,120,.5); }
#lobby .rm-plate b { display: flex; align-items: center; gap: 5px; min-width: 0; font: 600 12px/1.1 var(--serif); letter-spacing: .02em; color: #fbf4e2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px #000; }
#lobby .rm-plate b canvas.avatar { width: 18px !important; height: 18px !important; border-radius: 50%; flex: none; }
#lobby .rm-plate small { display: flex; align-items: center; gap: 5px; min-width: 0; font: 600 10px/1 var(--serif); color: #e6dcc0; white-space: nowrap; overflow: hidden; }
#lobby .rm-plate small .badge { margin: -4px 0 -4px -2px; flex: none; }
#lobby .rm-plate .stars { font-size: 9.5px; letter-spacing: 0; }
#lobby .rm-plate .ttl { flex: none; font-size: 9px; padding: 2px 6px; }
#lobby .seats[data-size="4"] .rm-plate .ttl { display: none; }
#lobby .rm-crown, #lobby .rm-tick { position: absolute; z-index: 3; top: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-style: normal; font-size: 14px; line-height: 1; box-shadow: 0 2px 5px rgba(0,0,0,.55); }
#lobby .rm-crown { left: 6px; color: #5a3200; background: linear-gradient(180deg, #fff3c0, #ffd36b 45%, #d9901c); }
#lobby .rm-tick { right: 6px; color: #fff; font-weight: 900; background: radial-gradient(circle at 40% 35%, #7ef08a, #1f9e3a 70%); border: 1.5px solid #e9ffe9; }
#lobby .seat.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  background: rgba(10,7,22,.45); border: 1.5px dashed rgba(255,214,120,.65); box-shadow: none; }
#lobby .seat.empty::before { background: radial-gradient(70% 50% at 50% 50%, rgba(var(--team),.16), transparent 70%); }
#lobby .seat.empty b { position: relative; font: 600 14px/1 var(--serif); color: #f3e6c4; letter-spacing: .04em; animation: rmPulse 1.8s ease-in-out infinite; }
#lobby .seat.empty small { position: relative; font: 600 10px/1.2 var(--serif); color: var(--gold); letter-spacing: .08em; padding: 0 8px; }
@keyframes rmPulse { 50% { opacity: .55; } }

/* middle: VS, your hero, map */
#lobby .rm-mid { position: absolute; left: 50%; top: calc(var(--pt) + 90px); transform: translateX(-50%); width: 236px; margin: 0;
  display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
#lobby .rm-vs { text-align: center; font: 900 34px/1 var(--serif); letter-spacing: .04em; color: #ffe7a6;
  background: linear-gradient(180deg, #fff8d8, #ffd36b 50%, #d08a1c); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgba(90,40,0,.9)) drop-shadow(0 0 10px rgba(255,180,60,.6)); }
#lobby .rm-mid .herochip { min-height: 50px; background: var(--glass2) padding-box, linear-gradient(180deg, rgba(255,226,150,.75), rgba(160,100,24,.6)) border-box;
  border: 1px solid transparent; }
#lobby .rm-mid .herochip img { width: 40px; height: 40px; }
#lobby .rm-mid .herochip b { font: 700 14px/1.1 var(--serif); }
#lobby .rm-mid .herochip .hc-go { font: 700 9.5px/1 var(--serif); letter-spacing: .06em; color: #3a1d00; background: linear-gradient(180deg, #fff3c0, #ffd36b 45%, #d9901c); }
#lobby #lobbyMapG { margin: 0; }
#lobby #lobbyMapG[hidden] { display: none; }
#lobby .rm-host { display: none; color: #c9bfe6; }
#lobby #lobbyMapG.guest .rm-host { display: inline; }
#lobby .rm-maps { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 10px) / 3.3); gap: 5px; overflow-x: auto; overflow-y: hidden;
  position: relative; padding-bottom: 5px; overscroll-behavior-x: contain; }
#lobby .rm-maps button { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lobby .rm-maps button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 4px 5px; border-radius: 10px; min-height: 44px;
  font: 600 10px/1 var(--serif); letter-spacing: .04em; color: #f3e6c4; background: rgba(12,8,26,.82); border: 1px solid rgba(255,214,120,.35); }
#lobby .rm-maps .mp { height: 28px; border-radius: 6px; }
#lobby .rm-maps button.on { color: #fff6dc; background: linear-gradient(180deg, rgba(170,110,30,.55), rgba(90,52,10,.75)) padding-box, var(--rim) border-box;
  border: 1.5px solid transparent; box-shadow: 0 0 10px rgba(255,190,70,.4); }
#lobby .rm-maps button:disabled { opacity: .45; }
#lobby .rm-maps button.on:disabled { opacity: 1; }

/* bottom: LEAVE left, START / READY right (same hexagon as BATTLE) */
#lobby .rm-bottom { display: block; margin: 0; }
#lobby .rm-leave { position: absolute; left: var(--pl); bottom: var(--pb); width: 112px; height: 44px; padding: 0; margin: 0; border-radius: 22px;
  font: 700 13px/1 var(--serif); letter-spacing: .1em; color: #fbf1d8;
  background: var(--glass2) padding-box, var(--rim) border-box; border: 1.5px solid transparent; box-shadow: 0 4px 12px rgba(0,0,0,.45); }
#lobby .rm-leave:active { transform: scale(.96); }
#lobby .rm-go { position: absolute; right: var(--pr); bottom: var(--pb); width: 236px; height: 56px; margin: 0; padding: 0 16px; border-radius: 0; background: none;
  display: flex; align-items: center; justify-content: center; opacity: 1;
  filter: drop-shadow(0 0 3px rgba(255,210,110,.9)) drop-shadow(0 0 12px rgba(255,110,20,.8)) drop-shadow(0 4px 6px rgba(0,0,0,.5)); animation: lbGlow 2.2s ease-in-out infinite; }
#lobby .rm-go[hidden] { display: none; }
#lobby .rm-go b { position: relative; font: 800 23px/1 var(--serif); letter-spacing: .08em; color: #fff9ea;
  -webkit-text-stroke: .6px rgba(110,40,0,.55); text-shadow: 0 2px 0 rgba(110,36,0,.9), 0 0 10px rgba(255,220,150,.45); }
#lobby .rm-go:active { transform: scale(.97); }
#lobby .rm-go:disabled { animation: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); cursor: default; }
#lobby .rm-go:disabled .lb-bfill::before { background: linear-gradient(180deg, #5d4f7e, #3a2d5e 60%, #241a42); }
#lobby .rm-go:disabled b { font-size: 18px; color: #d9d0ee; text-shadow: 0 1px 2px rgba(0,0,0,.8); -webkit-text-stroke: 0; }
#lobby .rm-go.wait b { font-size: 13px; letter-spacing: .04em; white-space: nowrap; }   /* WAITING FOR READY (n/m) */
#lobby .rm-ready:not(.on) { animation: none; filter: drop-shadow(0 0 6px rgba(255,190,70,.6)) drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
#lobby .rm-ready.on .lb-bfill::before { background: radial-gradient(70% 80% at 50% 0%, rgba(220,255,200,.5), transparent 62%), linear-gradient(180deg, #5fd36d, #26a047 55%, #136b2c); }
#lobby .rm-ready.on { animation: none; filter: drop-shadow(0 0 3px rgba(200,255,190,.9)) drop-shadow(0 0 12px rgba(60,200,90,.7)) drop-shadow(0 4px 6px rgba(0,0,0,.5)); }

/* chat button in the room: beside LEAVE */
body.inroom #chatBtn { left: calc(max(12px, env(safe-area-inset-left)) + 122px * var(--lbz, 1)); bottom: max(8px, env(safe-area-inset-bottom));
  width: 44px; height: 44px; border-radius: 50%; font-size: 19px; transform: scale(var(--lbz, 1)); transform-origin: 0 100%;
  background: radial-gradient(circle at 50% 32%, #3a2864, #120b26 78%) padding-box, linear-gradient(180deg, #fff0b8, #e2aa45 45%, #9a6416) border-box;
  border: 1.5px solid transparent; }
@media (prefers-reduced-motion: reduce) { #lobby .rm-go, #lobby .seat.empty b { animation: none; } }

/* VS BOT sheet: bot skill EASY / NORMAL / HARD (audit 26 Nov 2026), a small row under the heroes */
#battleSheet .lb-botlvl { margin-top: 8px; }
#battleSheet .lb-botlvl button { min-height: 44px; font-size: 11px; letter-spacing: .08em; }

/* Boss 26 Nov 2026 ("Yg mne soon tu...hide kan dlu"): features not built yet are hidden, not shown as "coming soon".
   Ruby is still hidden. The left column is back since stop I with only what works (LOGIN REWARD, DAILY MISSIONS: daily.js);
   Events and Season Pass are not in the page until they are built. */
#lbRuby, #menu .lb-wdiv { display: none !important; }

/* ADMIN > SERVER TEST MODE (game.js sets html.testmode from the server's 'me'): a small ribbon on the lobby and the profile, so
 testers know rank, link and network rules are relaxed. Drawn in the scaled lobby layer, under the logo. */
html.testmode #menu .lb-ui::after, html.testmode #profile .panel::before { content: 'TEST MODE'; position: absolute; z-index: 5; pointer-events: none;
  padding: 2px 12px; border-radius: 4px; font: 800 10px/16px system-ui, sans-serif; letter-spacing: .18em; color: #1a1200;
  background: repeating-linear-gradient(135deg, #ffcf4a 0 8px, #f5a623 8px 16px); border: 1px solid #5a3d00; box-shadow: 0 2px 6px rgba(0,0,0,.45); }
html.testmode #menu .lb-ui::after { left: 50%; top: 58px; transform: translateX(-50%); }
html.testmode #profile .panel { position: relative; }
html.testmode #profile .panel::before { right: 14px; bottom: 10px; }

/* ITEMS chip next to "Your hero" in the room (FEATURES-BRIEF 44a): opens the loadout picker; dim + LOCKED once READY */
#lobby .rm-herorow { display: grid; grid-template-columns: minmax(0, 1fr) 58px; gap: 6px; align-items: end; }
#lobby .rm-items { position: relative; height: 50px; min-width: 0; padding: 3px 2px 4px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: var(--glass2) padding-box, linear-gradient(180deg, rgba(255,226,150,.75), rgba(160,100,24,.6)) border-box; border: 1px solid transparent; color: #f3e6c4; }
#lobby .rm-items img { width: 24px; height: 24px; object-fit: contain; }
#lobby .rm-items b { font: 700 8.5px/1 var(--serif); letter-spacing: .06em; color: #ffd36b; }
#lobby .rm-items em { font: 700 9px/1 var(--serif); font-style: normal; color: #f3e6c4; }
#lobby .rm-items::after { content: ''; position: absolute; inset: -3px; }   /* 44 px+ tap area */
#lobby .rm-items.locked { opacity: .55; }
#lobby .rm-items.locked b::after { content: ' \2713'; color: #7dffb5; }
#lobby.rm-big .rm-herorow { grid-template-columns: minmax(0, 1fr) 52px; }
#itemsBox.locked .itpick { opacity: .55; }
#itemsBox .itlock { margin: 2px 0 6px; padding: 6px 10px; border-radius: 10px; font-weight: 800; font-size: 12px; color: #ffd36b; background: rgba(255,214,110,.1); border: 1px solid rgba(255,214,110,.4); }
#itemsBox .itlock[hidden] { display: none; }
/* the narrow middle (3v3 / 4v4, small phones): the hero chip keeps its name readable next to ITEMS */
#lobby .rm-herorow .herochip { gap: 6px; padding: 5px 6px 5px 5px; }
#lobby .rm-herorow .herochip .hc-go { padding: 5px 5px; letter-spacing: .04em; font-size: 8.5px; }
#lobby .rm-herorow .herochip small { display: none; }
#lobby.rm-big .rm-herorow { grid-template-columns: minmax(0, 1fr) 46px; gap: 5px; }
#lobby.rm-big .rm-items img { width: 20px; height: 20px; }
#lobby.rm-big .rm-herorow .herochip img { width: 34px; height: 34px; }

/* ROOM sheet: NORMAL / DRAFT (FEATURES-BRIEF 44b) */
.lb-rmode { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.lb-rmode button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 44px; font: 400 15px/1 'Luckiest Guy', system-ui, sans-serif; letter-spacing: .05em; }
.lb-rmode button small { font: 800 10.5px/1 system-ui, sans-serif; letter-spacing: 0; opacity: .85; }
html.short .lb-rmode button { min-height: 44px; }

/* AVATAR PICKER (stop J): the card's picture opens the picker; a chosen border (not the default Gold Laurel) replaces
   the card's own laurel + rim and is drawn by shop.js avatarEl round the picture */
#menu .lb-avw { cursor: pointer; }
#menu .lb-avw.framed svg.lb-laurel { display: none; }
#menu .lb-avw.framed .lb-av { background: none; padding: 0; box-shadow: none; }
#menu .lb-avw.framed .lb-av > i { overflow: visible; background: none; }
#menu .lb-avw.framed .lb-av canvas.avatar { width: 80px !important; height: 80px !important; margin: -8px; }
/* map strips (VS BOT sheet + room): a thin gold scrollbar shows there is more */
.lb-maps, #lobby .rm-maps { scrollbar-color: auto; scrollbar-width: auto; }   /* the inherited standard colours would bring the arrow buttons back (Chromium) */
.lb-maps::-webkit-scrollbar, #lobby .rm-maps::-webkit-scrollbar { height: 4px; }
.lb-maps::-webkit-scrollbar-thumb, #lobby .rm-maps::-webkit-scrollbar-thumb { background: rgba(255,214,120,.45); border-radius: 2px; }
.lb-maps::-webkit-scrollbar-track, #lobby .rm-maps::-webkit-scrollbar-track { background: rgba(255,255,255,.06); border-radius: 2px; }
.lb-maps::-webkit-scrollbar-button, #lobby .rm-maps::-webkit-scrollbar-button { display: none; }
