/* The battleground's HUD over a match (js/moba.js #moba-hud, 2026-10-13): the score bar, the kill feed, the field map,
   the respawn count, the scoreboard and the result. Dark glass panels in the HUD's Obsidian Gold; team colours Dawn
   blue / Dusk rose. No soft glow round any text (the user's rule): solid panels, at most a crisp 1px dark ring. */
#moba-hud { position: absolute; inset: 0; pointer-events: none; z-index: 3; font-family: var(--thai); --mh-dawn: #5fb4ff; --mh-dusk: #ff5a7a; --mh-gold: #d9a443; }
#moba-hud button { pointer-events: auto; }

/* the score bar: Dawn's kills · the clock · Dusk's kills */
#moba-hud .mh-top { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); display: flex; align-items: stretch; gap: 0;
  background: rgba(11, 10, 14, 0.86); border: 2px solid var(--mh-gold); border-radius: 12px; overflow: hidden; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45); }
#moba-hud .mh-team { display: flex; align-items: center; gap: 10px; padding: 4px 14px; min-width: 150px; }
#moba-hud .mh-team.t0 { justify-content: flex-end; background: linear-gradient(90deg, rgba(31, 79, 138, 0.15), rgba(31, 79, 138, 0.85)); }
#moba-hud .mh-team.t1 { justify-content: flex-start; background: linear-gradient(270deg, rgba(106, 31, 58, 0.15), rgba(106, 31, 58, 0.85)); }
#moba-hud .mh-team b { font-size: 0.92rem; color: #f6eedb; font-weight: 700; }
#moba-hud .mh-team .mh-k { font-style: normal; font-family: var(--display); font-size: 1.7rem; line-height: 1; font-weight: 700; }
#moba-hud .mh-team.t0 .mh-k { color: #a9d8ff; }
#moba-hud .mh-team.t1 .mh-k { color: #ffb0c0; }
#moba-hud .mh-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3px 16px; background: #17141c; border-left: 1px solid #4a3a1c; border-right: 1px solid #4a3a1c; }
#moba-hud .mh-time { font-family: var(--display); font-size: 1.25rem; color: #ffe2a0; line-height: 1.1; }
#moba-hud .mh-tw { font-size: 0.72rem; color: #d9cfb8; white-space: nowrap; }

/* scoreboard / give up buttons under the bar */
#moba-hud .mh-btns { position: absolute; top: 118px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
#moba-hud .mh-b { font: inherit; font-size: 0.8rem; font-weight: 700; color: #f6eedb; background: rgba(23, 20, 28, 0.9); border: 1px solid var(--mh-gold);
  border-radius: 8px; padding: 3px 10px; cursor: pointer; }
#moba-hud .mh-b:hover { background: #2e2616; color: #ffe2a0; }
#moba-hud .mh-b[data-armed] { background: #6a1f3a; border-color: #ff8aa0; }

/* the kill feed: under the field map */
#moba-hud .mh-feed { position: absolute; top: 342px; left: 14px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; max-width: 320px; }
#moba-hud .mh-f { font-size: 0.82rem; font-weight: 700; color: #f6eedb; background: rgba(11, 10, 14, 0.84); border-radius: 7px; padding: 3px 10px; border-left: 4px solid #999; }
#moba-hud .mh-f.t0 { border-left-color: var(--mh-dawn); }
#moba-hud .mh-f.t1 { border-left-color: var(--mh-dusk); }
#moba-hud .mh-f.t2 { border-left-color: #ffb347; }

/* the field map: the whole battleground, every unit as a dot */
#moba-hud .mh-map { position: absolute; left: 14px; top: 150px; width: 180px; height: 180px; border: 2px solid var(--mh-gold); border-radius: 10px;
  background: #2a3a22; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45); image-rendering: auto; }

/* coming back */
#moba-hud .mh-dead { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); text-align: center; background: rgba(11, 10, 14, 0.86);
  border: 2px solid var(--mh-dusk); border-radius: 14px; padding: 10px 28px; }
#moba-hud .mh-dead b { display: block; font-size: 1rem; color: #ffd6de; }
#moba-hud .mh-dead i { font-style: normal; font-family: var(--display); font-size: 2.6rem; color: #fff; line-height: 1.1; }

/* the scoreboard */
#moba-hud .mh-score { position: absolute; left: 50%; top: 150px; transform: translateX(-50%); width: min(640px, 92vw); display: grid; gap: 8px;
  background: rgba(11, 10, 14, 0.92); border: 2px solid var(--mh-gold); border-radius: 12px; padding: 10px 12px; pointer-events: auto; }
#moba-hud .ms-team > b { display: block; font-size: 0.92rem; padding: 2px 6px; border-radius: 6px; margin-bottom: 4px; color: #fff; }
#moba-hud .ms-team.t0 > b { background: #1f4f8a; }
#moba-hud .ms-team.t1 > b { background: #6a1f3a; }
#moba-hud .ms-team table { width: 100%; border-collapse: collapse; font-size: 0.82rem; color: #ece3cf; }
#moba-hud .ms-team th { text-align: left; font-weight: 600; color: #bfb39a; padding: 2px 6px; border-bottom: 1px solid #3a3226; }
#moba-hud .ms-team td { padding: 2px 6px; border-bottom: 1px solid #241f1a; }
#moba-hud .ms-team tr.me td { color: #ffe2a0; font-weight: 700; }

/* the result */
#moba-hud .mh-result { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8, 6, 12, 0.62); pointer-events: auto; }
#moba-hud .mh-result[hidden] { display: none; }
#moba-hud .mr-box { width: min(460px, 92vw); text-align: center; background: linear-gradient(180deg, #221c14, #120f0c); border: 3px solid var(--mh-gold);
  border-radius: 18px; padding: 18px 22px 20px; color: #f6eedb; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6); }
#moba-hud .mr-box h2 { margin: 0; font-family: var(--display); font-size: 2.4rem; line-height: 1.1; }
#moba-hud .mr-box.win h2 { color: #ffd36a; -webkit-text-stroke: 1px #3a2408; paint-order: stroke fill; }
#moba-hud .mr-box.lose h2 { color: #ff9aac; -webkit-text-stroke: 1px #3a0812; paint-order: stroke fill; }
#moba-hud .mr-box.draw h2 { color: #e8e2d4; -webkit-text-stroke: 1px #2a2620; paint-order: stroke fill; }
#moba-hud .mr-why { margin: 4px 0 10px; font-size: 0.86rem; color: #d9cfb8; }
#moba-hud .mr-rank { display: flex; align-items: center; justify-content: center; gap: 12px; background: rgba(255, 255, 255, 0.05); border-radius: 12px; padding: 6px 10px; }
#moba-hud .mr-rank img { width: 64px; height: 64px; object-fit: contain; }
#moba-hud .mr-rank b { display: block; font-size: 1.05rem; color: #ffe2a0; text-align: left; }
#moba-hud .mr-rank small { display: block; font-size: 0.82rem; color: #d9cfb8; text-align: left; }
#moba-hud .mr-emb { font-size: 2.6rem; }
#moba-hud .mr-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 6px; font-size: 0.86rem; color: #d9cfb8; }
#moba-hud .mr-stats b { color: #fff; font-size: 1.05rem; }
#moba-hud .mr-mvp, #moba-hud .mr-coin, #moba-hud .mr-ach { margin: 4px 0; font-size: 0.9rem; }
#moba-hud .mr-mvp b { color: #ffd36a; }
#moba-hud .mr-coin b { color: #ffe2a0; }
#moba-hud .mr-ach { color: #b8f0a8; }
#moba-hud .mr-box .btn { margin-top: 12px; pointer-events: auto; }

/* the battleground's page in the activity book (content.js tab 'moba') */
#ui .mb-season { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; margin-bottom: 8px; }
#ui .mb-coins { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
#ui .mb-coins img, #ui .mb-ci { width: 20px; height: 20px; object-fit: contain; vertical-align: middle; }
#ui .mb-modes { display: grid; gap: 8px; }
#ui .mb-mode { display: grid; grid-template-columns: 128px 1fr auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.06); border: 1px solid rgba(120, 90, 40, 0.35); }
#ui .mb-ban { width: 128px; height: 80px; object-fit: contain; }
#ui .mb-ban0 { background: rgba(0, 0, 0, 0.1); border-radius: 8px; }
#ui .mb-mi b { display: block; font-size: 1.05rem; }
#ui .mb-mi small { display: block; font-size: 0.8rem; opacity: 0.85; }
#ui .mb-rk { display: inline-flex; align-items: center; gap: 4px; font-size: 0.82rem; font-weight: 700; margin-top: 2px; }
#ui .mb-rk img { width: 26px; height: 26px; object-fit: contain; }
#ui .mb-subs { margin-bottom: 6px; }
#ui .mb-h { margin: 10px 0 4px; font-size: 0.92rem; }
#ui .mb-titles { display: flex; flex-wrap: wrap; gap: 4px; }
#ui .mb-ladder .eco-row img, #ui .mb-shop .eco-row img:not(.mb-ci) { width: 30px; height: 30px; object-fit: contain; }
#ui .mb-ladder .eco-row.me { outline: 2px solid #d9a443; border-radius: 8px; }
#ui .mb-no { width: 22px; text-align: center; font-family: var(--display); }
#ui .mb-hist .eco-row.win .eco-rname { color: #2e7a2a; }
#ui .mb-hist .eco-row.lose .eco-rname { color: #9a2a3a; }

/* online (2026-10-13): the two start buttons of a mode, the queue line on the page, the queue chip while you wait
   elsewhere, the online line of the result; the jungle buffs' list on the page */
#ui .mb-go { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
#ui .mb-queue { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; padding: 6px 10px; border-radius: 10px;
  background: rgba(31, 79, 138, 0.16); border: 1px solid rgba(31, 79, 138, 0.55); font-weight: 700; font-size: 0.88rem; }
#moba-queue, #moba-room { position: absolute; top: 118px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 10px;
  padding: 5px 8px 5px 14px; border-radius: 10px; background: rgba(11, 10, 14, 0.88); border: 2px solid #d9a443; color: #f6eedb;
  font-family: var(--thai); font-size: 0.86rem; font-weight: 700; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45); pointer-events: auto; white-space: nowrap; }
#moba-queue button, #moba-room button { font: inherit; font-size: 0.8rem; color: #f6eedb; background: #6a1f3a; border: 1px solid #ff8aa0; border-radius: 7px; padding: 2px 10px; cursor: pointer; }
#moba-queue button:hover, #moba-room button:hover { background: #8a2a4a; }
#moba-hud .mr-net { margin: 4px 0; font-size: 0.86rem; color: #a9d8ff; }
#ui .mb-jbh { margin-top: 8px; }
#ui .mb-jb { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 3px; }
#ui .mb-jb li { display: grid; grid-template-columns: 22px 92px 1fr; align-items: center; gap: 6px; font-size: 0.8rem; }
#ui .mb-jb img { width: 22px; height: 22px; object-fit: contain; }
#ui .mb-jb b { font-weight: 700; }

/* (2026-10-14: the PvP minimap is drawn in the HUD's gold minimap frame, top right — js/moba.js Moba.drawMiniInto; the old small one is hidden) */
#moba-hud .mh-map { display: none; }

/* the jungle buffs you hold: a column under the profile, top to bottom; a tap opens the buff's card (2026-10-14, js/moba.js drawBuffs) */
#moba-hud .mh-buffs { position: absolute; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: auto; }
/* (2026-10-14, the user: "ไม่เอาปุ่มสีแดงๆ" — no coloured pill buttons: just the buff's icon, its name and time in outlined text) */
#moba-hud .mh-buff { display: flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; box-shadow: none; cursor: pointer;
  color: #fff6e2; font: 700 13px/1.15 var(--thai); text-shadow: 0 0 1px #140e18, 1px 1px 0 #140e18, -1px 1px 0 #140e18, 1px -1px 0 #140e18, -1px -1px 0 #140e18; }
#moba-hud .mh-buff img, #moba-hud .mh-buff .mh-bi { width: 40px; height: 40px; border-radius: 50%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55)); }
#moba-hud .mh-buff .mh-bi { background: radial-gradient(circle, color-mix(in srgb, var(--c) 70%, #fff) 0%, #1b1418 72%); }
#moba-hud .mh-buff b { display: block; text-align: left; font-weight: 700; }
#moba-hud .mh-buff i { display: block; font-style: normal; font-variant-numeric: tabular-nums; color: #ffe7a6; font-size: 12px; }
#moba-hud .mh-buff span.mh-bt { display: flex; flex-direction: column; align-items: flex-start; }
#moba-hud .mh-buff.low i { color: #ffb4a8; }
#moba-hud .mh-buff.on img { outline: 2px solid #ffe7a6; outline-offset: 1px; }
#moba-hud .mh-bpop { position: fixed; z-index: 5; width: 260px; padding: 10px 12px; border-radius: 12px; pointer-events: auto;
  background: rgba(18, 13, 22, 0.96); border: 2px solid var(--c); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); color: #f2ead6; font: 600 13px/1.5 var(--thai); }
#moba-hud .mh-bpop h4 { margin: 0 0 4px; font-size: 15px; color: var(--c); display: flex; justify-content: space-between; }
#moba-hud .mh-bpop h4 i { font-style: normal; color: #ffe7a6; font-variant-numeric: tabular-nums; }
#moba-hud .mh-bpop p { margin: 0 0 6px; color: #fff6e2; }
#moba-hud .mh-bpop small { display: block; color: #cfc4b0; font-size: 12px; }

/* how to win (2026-10-14, js/moba.js rulesHtml) */
#ui .mb-howto { margin-top: 4px; padding: 2px 10px; border-radius: 999px; border: 1px solid rgba(255, 220, 150, 0.55); background: rgba(255, 220, 150, 0.12); color: inherit; font: 700 0.78rem var(--thai); cursor: pointer; justify-self: start; }
#ui .mb-howto:hover { background: rgba(255, 220, 150, 0.25); }
#ui .mb-rules { display: grid; gap: 6px; }
#ui .mb-rules .mb-goal { margin: 0; padding: 8px 10px; border-radius: 10px; background: rgba(255, 210, 110, 0.16); border: 1px solid rgba(220, 170, 60, 0.5); font-size: 0.92rem; }
#ui .mb-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
#ui .mb-steps li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; }
#ui .mb-steps .mb-rn { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #b8862e; color: #fff8e6; font-size: 0.85rem; }
#ui .mb-steps small, #ui .mb-rl small { display: block; opacity: 1; color: inherit; font-size: 0.82rem; font-weight: 600; }
#ui .mb-rl { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 0.84rem; }
#ui .mb-keys { margin: 0; font-size: 0.84rem; line-height: 1.8; }
#ui .mb-keys kbd { display: inline-block; padding: 0 6px; border-radius: 5px; border: 1px solid rgba(120, 90, 40, 0.6); background: rgba(255, 245, 220, 0.6); font: 700 0.78rem var(--thai); }

/* rooms (2026-10-19, the user: "ตรงประลองให้สร้างห้องรอเพื่อนเข้าสู้ได้", js/moba.js roomHtml / roomListHtml / roomUi):
   a mode's two small buttons, the room on the left page (two teams of seats), the room list, the chip at the top */
#ui .mb-go2 { display: flex; gap: 4px; }
#ui .mb-go2 .btn { flex: 1; padding-left: 8px; padding-right: 8px; white-space: nowrap; }
#ui .mb-room { display: grid; gap: 8px; }
#ui .mb-rhead { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; background: rgba(0, 0, 0, 0.06); border: 1px solid rgba(120, 90, 40, 0.35); }
#ui .mb-rban { width: 96px; height: 60px; object-fit: contain; }
#ui .mb-rti { flex: 1; min-width: 0; }
#ui .mb-rti b { display: block; font-size: 1.08rem; }
#ui .mb-rti small { font-size: 0.84rem; font-weight: 600; }
#ui .mb-code { font: 700 1rem var(--display); letter-spacing: 2px; padding: 0 8px; margin-left: 2px; border-radius: 6px; border: 1px dashed rgba(217, 164, 67, 0.95);
  background: rgba(217, 164, 67, 0.16); color: inherit; cursor: pointer; }
#ui .mb-rplay { padding: 6px 10px; border-radius: 10px; background: rgba(160, 60, 90, 0.16); border: 1px solid rgba(160, 60, 90, 0.6); font-weight: 700; font-size: 0.88rem; }
#ui .mb-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#ui .mb-team { display: grid; gap: 4px; align-content: start; padding: 6px; border-radius: 12px; border: 1px solid rgba(120, 90, 40, 0.35); }
#ui .mb-team.t0 { background: rgba(95, 180, 255, 0.1); border-color: rgba(95, 180, 255, 0.55); }
#ui .mb-team.t1 { background: rgba(255, 90, 122, 0.09); border-color: rgba(255, 90, 122, 0.5); }
#ui .mb-team h5 { margin: 0 0 2px; display: flex; align-items: center; gap: 6px; font-size: 0.94rem; }
#ui .mb-team h5 small { margin-left: auto; font-size: 0.8rem; }
#ui .mb-tdot { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25); }
#ui .mb-seat { display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 4px 6px; border-radius: 9px; background: rgba(0, 0, 0, 0.08); border: 1px solid rgba(120, 90, 40, 0.3); }
#ui .mb-seat.free { border-style: dashed; background: none; }
#ui .mb-seat.me { outline: 2px solid #d9a443; }
#ui .mb-sname { flex: 1; min-width: 0; font-weight: 700; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ui .mb-sname small { display: block; font-weight: 600; font-size: 0.76rem; overflow: hidden; text-overflow: ellipsis; }
#ui .mb-seat.free .mb-sname { font-weight: 600; opacity: 0.75; }
#ui .mb-sst { font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
#ui .mb-seat.ok .mb-sst { color: #4fae4a; }
#ui .mb-crown { font-style: normal; margin-right: 3px; }
#ui .mb-sbtn { font: 700 0.76rem var(--thai); padding: 3px 9px; border-radius: 7px; border: 1px solid rgba(217, 164, 67, 0.9); background: rgba(217, 164, 67, 0.2);
  color: inherit; cursor: pointer; white-space: nowrap; }
#ui .mb-sbtn:hover { background: rgba(217, 164, 67, 0.36); }
#ui .mb-sbtn.kick { border-color: rgba(214, 80, 100, 0.9); background: rgba(214, 80, 100, 0.18); }
#ui .mb-sbtn.kick:hover { background: rgba(214, 80, 100, 0.34); }
#ui .mb-rinv, #ui .mb-rjoin { display: flex; gap: 6px; align-items: center; }
#ui .mb-rinv input, #ui .mb-rjoin input { flex: 1; min-width: 0; font: 600 0.92rem var(--thai); padding: 6px 10px; border-radius: 9px;
  border: 1px solid rgba(120, 90, 40, 0.6); background: #fffaf0; color: #2a1e10; }
#ui .mb-rinv input:focus, #ui .mb-rjoin input:focus { outline: 2px solid #d9a443; }
#ui .mb-pals { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
#ui .mb-pals small { font-weight: 700; }
#ui .mb-ract { display: flex; gap: 8px; }
#ui .mb-ract .btn.primary { flex: 1; }
#ui .mb-rwait { margin: 0; font-size: 0.84rem; font-weight: 700; color: #d9a443; }
#ui .mb-rlog { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; font-size: 0.78rem; opacity: 0.8; }
#ui .mb-rlog li::before { content: '· '; }
#ui .mb-rooms { display: grid; gap: 4px; margin-top: 6px; }
#ui .mb-rooms .eco-row.me { outline: 2px solid #d9a443; border-radius: 8px; }
#moba-room button[data-k="open"] { background: #5a4410; border-color: #d9a443; }
#moba-room button[data-k="open"]:hover { background: #75591a; }
