/* ROBLIX in-experience UI */
.rx-game { position: absolute; inset: 0; overflow: hidden; background: #0b0d12; user-select: none; -webkit-user-select: none; touch-action: none; }
.rx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
.rx-ui-layer { position: absolute; inset: 0; pointer-events: none; font-family: "Figtree", system-ui, sans-serif; color: #fff; }
.rx-ui-layer .hidden { display: none !important; }
.rx-guiroot, .rx-bbroot, .rx-core { position: absolute; inset: 0; pointer-events: none; }
.rx-g { position: absolute; box-sizing: border-box; }
.rx-gt { position: absolute; inset: 0; display: flex; overflow: hidden; line-height: 1.15; padding: 0 1px; }
.rx-gin { position: absolute; inset: 0; width: 100%; height: 100%; background: transparent; border: 0; outline: none; padding: 0 4px; box-sizing: border-box; font: inherit; resize: none; }
.rx-gin::placeholder { color: var(--ph, #aaa); }
.rx-gimg { position: absolute; inset: 0; pointer-events: none; }
.rx-gbtn { cursor: pointer; }
.rx-scroll { overflow: auto; }
.rx-gscroll { position: relative; }

/* topbar */
.rx-topbar { position: absolute; left: 0; top: 0; right: 0; height: 36px; display: flex; gap: 6px; align-items: center; padding: 4px 8px; box-sizing: border-box; pointer-events: none; z-index: 50; }
.rx-tbtn { pointer-events: auto; width: 32px; height: 32px; border-radius: 9px; border: 0; background: rgba(18, 20, 26, .62); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; backdrop-filter: blur(6px); }
.rx-tbtn svg { width: 19px; height: 19px; --rx-ink: rgba(18, 20, 26, .9); }
.rx-tbtn:hover { background: rgba(40, 44, 54, .8); }
.rx-tbtn:focus-visible, .rx-mb:focus-visible, .rx-slot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.rx-health { pointer-events: none; margin-left: auto; margin-right: 210px; width: 140px; height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .5); overflow: hidden; }
.rx-health-fill { height: 100%; width: 100%; background: #3fd16a; transition: width .2s; }

/* chat */
.rx-chat { position: absolute; left: 8px; top: 42px; width: min(360px, 60vw); pointer-events: auto; z-index: 40; display: flex; flex-direction: column; gap: 4px; transition: opacity .4s; }
.rx-chat.idle { opacity: .35; }
.rx-chat-log { max-height: 170px; overflow-y: auto; background: rgba(18, 20, 26, .45); border-radius: 8px; padding: 6px 8px; font-size: 14px; line-height: 1.35; text-shadow: 0 1px 1px rgba(0, 0, 0, .6); }
.rx-chat-log:empty { display: none; }
.rx-chat-line { word-wrap: break-word; }
.rx-chat-in input { width: 100%; box-sizing: border-box; border: 0; border-radius: 8px; padding: 8px 10px; font: 14px "Figtree", sans-serif; background: rgba(18, 20, 26, .55); color: #fff; outline: none; }
.rx-chat.active .rx-chat-in input { background: rgba(18, 20, 26, .85); box-shadow: 0 0 0 2px rgba(255, 255, 255, .4); }

/* player list */
.rx-plist { position: absolute; right: 8px; top: 42px; min-width: 190px; max-width: 44vw; background: rgba(18, 20, 26, .62); border-radius: 10px; padding: 4px 0; z-index: 40; font-size: 13.5px; backdrop-filter: blur(6px); }
.rx-pl-head, .rx-pl-row { display: flex; gap: 8px; padding: 4px 12px; align-items: center; }
.rx-pl-head { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #c9cdd6; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.rx-pl-name { flex: 1; min-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-pl-stat { width: 58px; text-align: right; font-variant-numeric: tabular-nums; }
.rx-pl-row.me .rx-pl-name { font-weight: 700; }
.rx-pl-team { padding: 3px 12px; font-weight: 700; font-size: 12px; background: color-mix(in srgb, var(--tc) 55%, transparent); }

/* hotbar */
.rx-hotbar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 6px; pointer-events: auto; z-index: 40; }
.rx-slot { position: relative; width: 58px; height: 58px; border-radius: 10px; border: 2px solid transparent; background: rgba(18, 20, 26, .62); color: #fff; cursor: pointer; padding: 4px; font: 600 11px "Figtree", sans-serif; display: grid; place-items: center; overflow: hidden; }
.rx-slot.on { border-color: #fff; background: rgba(60, 64, 76, .8); }
.rx-slot img { width: 40px; height: 40px; object-fit: contain; }
.rx-slot-n { position: absolute; left: 5px; top: 2px; font-size: 11px; opacity: .8; }
.rx-slot-t { line-height: 1.1; text-align: center; word-break: break-word; }

/* notifications */
.rx-notes { position: absolute; right: 12px; bottom: 90px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; z-index: 60; }
.rx-note { width: 260px; background: rgba(18, 20, 26, .85); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; animation: rxNoteIn .25s ease-out; transition: opacity .4s, transform .4s; }
.rx-note b { font-size: 14px; }
.rx-note.out { opacity: 0; transform: translateX(30px); }
/* the server manager restarted this server */
.rx-restart .rx-err-ic { background: #e0a040; }
.rx-restart-n b { font-size: 18px; }
/* event reward card (EventService): the item turning round on the left, "You got" / "You already have" */
.rx-rcard { position: absolute; top: 12px; left: 50%; transform: translate(-50%, -24px); opacity: 0; display: flex; align-items: center; gap: 14px; min-width: 340px; max-width: min(92vw, 470px); padding: 10px 20px 10px 10px; background: rgba(10, 6, 9, .92); border: 1px solid rgba(255, 170, 80, .55); border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 26px rgba(255, 140, 40, .2); color: #e2d8c4; z-index: 100000; pointer-events: none; transition: opacity .35s, transform .35s; }
.rx-rcard.in { opacity: 1; transform: translate(-50%, 0); }
.rx-rcard.have { border-color: rgba(150, 190, 255, .45); box-shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 26px rgba(120, 160, 255, .16); }
.rx-rcard-pic { width: 96px; height: 96px; flex: none; border-radius: 4px; background: radial-gradient(circle at 50% 50%, rgba(255, 150, 60, .32), rgba(0, 0, 0, 0) 70%); }
.rx-rcard.have .rx-rcard-pic { background: radial-gradient(circle at 50% 50%, rgba(140, 170, 255, .26), rgba(0, 0, 0, 0) 70%); }
.rx-rcard-pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rx-rcard-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rx-rcard-txt em { font-style: normal; font-family: 'Grenze Gotisch', Georgia, serif; font-size: 20px; color: #ffb74d; }
.rx-rcard.have .rx-rcard-txt em { color: #a9c8ff; }
.rx-rcard-txt b { font-family: 'Grenze Gotisch', Georgia, serif; font-size: 28px; line-height: 1.05; color: #fff3e0; overflow-wrap: anywhere; }
.rx-rcard-txt span { font-family: 'EB Garamond', Georgia, serif; font-size: 15px; opacity: .85; }
@media (max-width: 480px) { .rx-rcard { min-width: 0; gap: 10px; } .rx-rcard-pic { width: 72px; height: 72px; } .rx-rcard-txt b { font-size: 22px; } }
@keyframes rxNoteIn { from { opacity: 0; transform: translateX(30px); } }

/* name tags, bubbles */
.rx-tags { position: absolute; inset: 0; pointer-events: none; z-index: 8; }
.rx-tag { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 700; font-size: 14px; text-shadow: 0 1px 2px rgba(0, 0, 0, .9), 0 0 3px rgba(0, 0, 0, .6); white-space: nowrap; }
.rx-tag i { width: 70px; height: 6px; background: rgba(0, 0, 0, .55); border-radius: 3px; overflow: hidden; }
.rx-tag i b { display: block; height: 100%; background: #3fd16a; }
.rx-bubbles { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rx-bubble { max-width: 220px; background: #fff; color: #1b1d22; border-radius: 12px; padding: 6px 10px; font-size: 13.5px; font-weight: 600; text-align: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); animation: rxPop .18s ease-out; word-wrap: break-word; }
@keyframes rxPop { from { transform: scale(.6); opacity: 0; } }

/* proximity prompts */
.rx-prompts { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.rx-prompt { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px; background: rgba(18, 20, 26, .72); border-radius: 12px; padding: 6px 12px 6px 6px; pointer-events: auto; cursor: pointer; white-space: nowrap; transition: transform .05s; }
.rx-prompt.fire { background: rgba(255, 255, 255, .25); }
.rx-pkey { position: relative; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .95); color: #1b1d22; display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.rx-pkey svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.rx-pring { fill: none; stroke: #3d8bff; stroke-width: 3; stroke-dasharray: 100.5; stroke-dashoffset: 100.5; }
.rx-ptxt { display: flex; flex-direction: column; line-height: 1.15; }
.rx-ptxt small { font-size: 11px; opacity: .8; }
.rx-ptxt small:empty { display: none; }
.rx-ptxt b { font-size: 15px; }

/* touch */
.rx-touch { position: absolute; inset: 0; pointer-events: none; z-index: 35; }
.rx-joy { position: absolute; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .12); border: 2px solid rgba(255, 255, 255, .25); display: none; }
.rx-joy.on { display: block; }
.rx-joy-knob { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.rx-jumpbtn { position: absolute; right: 26px; bottom: 34px; width: 78px; height: 78px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); background: rgba(18, 20, 26, .45); color: #fff; pointer-events: auto; display: grid; place-items: center; }
.rx-jumpbtn svg { width: 36px; height: 36px; }
.rx-jumpbtn.on { background: rgba(255, 255, 255, .35); }
.rx-slock { position: absolute; right: 12px; bottom: 14px; width: 30px; height: 30px; color: #fff; opacity: .35; display: none; }
.rx-slock.on { display: block; opacity: .9; }
.rx-slock svg { width: 100%; height: 100%; }

/* menu */
.rx-menu { position: absolute; inset: 0; background: rgba(8, 9, 12, .55); display: grid; place-items: center; pointer-events: auto; z-index: 100; backdrop-filter: blur(3px); }
.rx-menu-box { width: min(560px, 92vw); max-height: 86vh; background: #191b21; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); display: flex; flex-direction: column; overflow: hidden; }
.rx-menu-tabs { display: flex; border-bottom: 1px solid #2b2e37; }
.rx-menu-tabs button { flex: 1; background: none; border: 0; color: #b9bdc7; padding: 14px; font: 700 15px "Figtree", sans-serif; cursor: pointer; border-bottom: 3px solid transparent; }
.rx-menu-tabs button.on { color: #fff; border-color: #fff; }
.rx-menu-body { padding: 14px 18px; overflow-y: auto; min-height: 180px; display: flex; flex-direction: column; gap: 8px; }
.rx-mp { display: flex; gap: 12px; align-items: center; padding: 6px; border-radius: 10px; background: #22252d; }
.rx-mp img { width: 44px; height: 44px; border-radius: 50%; background: #2e323c; }
.rx-mp div { display: flex; flex-direction: column; }
.rx-mp span { color: #9aa0ad; font-size: 13px; }
.rx-set { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 4px; font-size: 15px; }
.rx-set input[type=range] { width: 50%; }
.rx-set-h { margin: 6px 4px 0; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8f96a3; }
.rx-set select { width: 50%; border: 0; border-radius: 8px; padding: 7px 8px; background: #2e323c; color: #fff; font: 600 14px "Figtree", sans-serif; }
.rx-set input[type=range] { accent-color: #fff; }
.rx-help { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 14px; }
.rx-help-chat { grid-column: 1 / -1; color: #9aa0ad; margin-top: 6px; }
kbd { display: inline-block; min-width: 18px; padding: 1px 6px; border-radius: 5px; background: #2e323c; border-bottom: 2px solid #15171c; font: 700 12px "Figtree", sans-serif; color: #fff; text-align: center; margin-right: 4px; }
.rx-menu-actions { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid #2b2e37; flex-wrap: wrap; }
.rx-mb { flex: 1; min-width: 120px; border: 0; border-radius: 10px; padding: 12px; background: #2e323c; color: #fff; font: 700 14px "Figtree", sans-serif; cursor: pointer; }
.rx-mb:hover { background: #3a3f4b; }
.rx-mb.rx-primary { background: #fff; color: #15171c; }
.rx-mb.rx-primary kbd { background: #e3e5ea; color: #15171c; border-color: #c4c7cf; }
.rx-kick { position: absolute; inset: 0; background: rgba(0, 0, 0, .7); display: grid; place-items: center; pointer-events: auto; z-index: 200; }
.rx-kick-box { background: #191b21; border-radius: 14px; padding: 22px; width: min(380px, 90vw); text-align: center; }

/* dev console */
.rx-dev { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(780px, 94vw); height: min(440px, 80vh); background: rgba(14, 15, 19, .96); border-radius: 12px; display: flex; flex-direction: column; pointer-events: auto; z-index: 120; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.rx-dev-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid #262931; }
.rx-dev-tabs { display: flex; gap: 4px; margin-left: 12px; }
.rx-dev-tabs button, .rx-dev-x { background: #23262e; color: #cfd3dc; border: 0; border-radius: 6px; padding: 4px 10px; cursor: pointer; font: 600 12px "Figtree", sans-serif; }
.rx-dev-tabs button.on { background: #fff; color: #111; }
.rx-dev-x { margin-left: auto; }
.rx-dev-log { flex: 1; overflow-y: auto; padding: 8px 12px; font: 12.5px/1.45 "JetBrains Mono", ui-monospace, monospace; white-space: pre-wrap; user-select: text; }
.rx-dev-line { border-bottom: 1px solid rgba(255, 255, 255, .03); }
.rx-k-warn { color: #ffb74d; }
.rx-k-error { color: #ff6b6b; }
.rx-k-info { color: #64b5f6; }
.rx-dev-cmd { margin: 8px; border: 0; border-radius: 8px; padding: 8px 10px; background: #1f2229; color: #fff; font: 13px "JetBrains Mono", monospace; outline: none; }

/* loading screen */
.rx-loading { position: absolute; inset: 0; z-index: 300; background: #101216; display: grid; place-items: center; transition: opacity .6s; pointer-events: auto; }
.rx-loading.out { opacity: 0; pointer-events: none; }
.rx-load-x { position: absolute; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .08); color: #c9cdd6; font-size: 16px; cursor: pointer; z-index: 1; }
.rx-load-x:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.rx-load-box { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 20px; }
.rx-load-thumb { width: min(420px, 80vw); aspect-ratio: 16/9; border-radius: 14px; background: #1d2027 center/cover; box-shadow: 0 10px 40px rgba(0, 0, 0, .4); }
.rx-load-box h2 { margin: 6px 0 0; font: 800 26px "Figtree", sans-serif; }
.rx-load-box p { margin: 0; color: #9aa0ad; }
.rx-spin { width: 34px; height: 34px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .15); border-top-color: #fff; animation: rxSpin .8s linear infinite; }
@keyframes rxSpin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .rx-plist { font-size: 12px; min-width: 140px; }
  .rx-pl-stat { width: 44px; }
  .rx-chat-log { max-height: 110px; font-size: 13px; }
  .rx-slot { width: 48px; height: 48px; }
  .rx-health { margin-right: 160px; width: 90px; }
}
@media (prefers-reduced-motion: reduce) { .rx-note, .rx-bubble { animation: none; } .rx-spin { animation-duration: 3s; } }

.rx-emotes { position: absolute; left: 82px; top: 42px; display: flex; flex-direction: column; gap: 4px; background: rgba(18, 20, 26, .8); border-radius: 12px; padding: 6px; pointer-events: auto; z-index: 55; }
.rx-emotes button { border: 0; background: rgba(255, 255, 255, .08); color: #fff; font: 700 14px "Figtree", sans-serif; padding: 8px 18px; border-radius: 8px; cursor: pointer; text-align: left; }
.rx-emotes button:hover { background: rgba(255, 255, 255, .2); }

.rx-badgenote { display: flex; flex-direction: row; align-items: center; gap: 10px; }
.rx-badgenote > div { display: flex; flex-direction: column; min-width: 0; }
.rx-bdg { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 20px; box-shadow: inset 0 0 0 3px rgba(255,255,255,.35), 0 2px 6px rgba(0,0,0,.3); }

.rx-buy { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); display: grid; place-items: center; pointer-events: auto; z-index: 1000; font-family: "Figtree", system-ui, sans-serif; }
.rx-buy-box { width: min(360px, 92vw); background: #1d2027; border-radius: 16px; padding: 18px 18px 14px; box-shadow: 0 20px 60px rgba(0,0,0,.55); color: #fff; display: flex; flex-direction: column; gap: 10px; animation: rxNoteIn .2s ease-out; }
.rx-buy-box h3 { margin: 0; font-size: 18px; text-align: center; }
.rx-buy-item { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.05); border-radius: 12px; padding: 10px; }
.rx-buy-item .rx-bdg { width: 54px; height: 54px; font-size: 26px; border-radius: 12px; }
.rx-buy-item > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rx-buy-item span { font-size: 12.5px; opacity: .75; }
.rx-buy-price { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 26px; font-weight: 800; }
.rx-buxi { width: 26px; height: 26px; }
.rx-buy-bal { text-align: center; font-size: 12.5px; opacity: .7; }
.rx-buy-err { text-align: center; font-size: 13px; color: #ff8a80; min-height: 0; }
.rx-buy-err:empty { display: none; }
.rx-buy-act { display: flex; gap: 8px; }
.rx-buy-act button { flex: 1; border: 0; border-radius: 10px; padding: 10px; font: 700 14px inherit; cursor: pointer; color: #fff; background: #3a3f4a; }
.rx-buy-act .rx-buy-ok { background: #00b06f; }
.rx-buy-act button:disabled { opacity: .6; cursor: default; }

/* staff in games: red OWNER name tags, chat tags, player list */
.rx-tag.rx-tag-owner > span { color: #ff3b3b; text-shadow: 0 0 8px rgba(255, 30, 30, .7), 0 1px 2px rgba(0, 0, 0, .9); }
.rx-tag.rx-tag-owner > span::after { content: "OWNER"; display: block; text-align: center; font-size: 9px; letter-spacing: .12em; color: #ffd166; }
.rx-tag.rx-tag-admin > span { color: #ffb020; } .rx-tag.rx-tag-mod > span { color: #4fb3ff; }
.rx-ctag { font-style: normal; font-size: 10px; font-weight: 900; padding: 0 5px; border-radius: 4px; color: #fff; margin-right: 2px; vertical-align: 1px; }
.rx-ctag-owner { background: #d3121f; } .rx-ctag-admin { background: #d97a00; } .rx-ctag-mod { background: #1f6fd1; }
.rx-pl-name.role-owner { color: #ff4b4b; font-weight: 800; } .rx-pl-name.role-admin { color: #ffb020; font-weight: 800; } .rx-pl-name.role-mod { color: #4fb3ff; font-weight: 800; }
.rx-tag.rx-tag-owner.rx-tag-plain > span::after { content: none; }

/* GamblingService wager pop-ups (js/engine/gamble.js) */
.rx-wager .rx-buy-box h3 { display: flex; align-items: center; justify-content: center; gap: 6px; }
.rx-wg-test { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; background: #ffb020; color: #1d2027; border-radius: 6px; padding: 2px 6px; }
.rx-wg-info { font-size: 13px; line-height: 1.4; text-align: center; opacity: .9; }
.rx-wg-wait { flex: 1; text-align: center; font-weight: 700; color: #7CFC9A; padding: 10px 0; }
.rx-wg-timer { height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.rx-wg-timer i { display: block; height: 100%; background: #7c4dff; transform-origin: left; animation: rxWgTimer linear forwards; }
@keyframes rxWgTimer { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---------- multiplayer status ---------- */
.rx-netpill { position: absolute; left: 50%; top: calc(8px + env(safe-area-inset-top)); transform: translate(-50%, -140%); z-index: 210; background: rgba(18, 20, 26, .9); color: #fff; border-radius: 999px; padding: 7px 16px 7px 34px; font: 700 13px "Figtree", sans-serif; box-shadow: 0 6px 24px rgba(0, 0, 0, .4); opacity: 0; transition: transform .25s, opacity .25s; pointer-events: none; white-space: nowrap; }
.rx-netpill::before { content: ""; position: absolute; left: 13px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); border-top-color: #ffd166; animation: rxSpin .8s linear infinite; box-sizing: border-box; }
.rx-netpill.on { opacity: 1; transform: translate(-50%, 0); }
.rx-srvinfo { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: #9aa0ad; padding: 0 4px 2px; }

/* ---------- any screen: phones, landscape phones, tablets, big monitors ---------- */
/* notches / rounded corners (the page uses viewport-fit=cover) */
.rx-topbar { padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); padding-top: max(4px, env(safe-area-inset-top)); height: calc(36px + env(safe-area-inset-top)); }
.rx-chat { left: max(8px, env(safe-area-inset-left)); top: calc(42px + env(safe-area-inset-top)); }
.rx-plist { right: max(8px, env(safe-area-inset-right)); top: calc(42px + env(safe-area-inset-top)); max-height: calc(100% - 170px); overflow-y: auto; }
.rx-hotbar { bottom: calc(14px + env(safe-area-inset-bottom)); max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; }
.rx-hotbar::-webkit-scrollbar { display: none; }
.rx-slot { flex: none; }
.rx-notes { right: max(12px, env(safe-area-inset-right)); bottom: calc(90px + env(safe-area-inset-bottom)); max-width: calc(100% - 24px); }
.rx-note { width: min(260px, calc(100vw - 24px)); box-sizing: border-box; }
.rx-jumpbtn { right: max(26px, calc(env(safe-area-inset-right) + 12px)); bottom: calc(34px + env(safe-area-inset-bottom)); }
/* folded player list: just its header (tap it to open again) */
.rx-plist { pointer-events: auto; }
.rx-pl-head { cursor: pointer; }
.rx-plist.min { min-width: 0; }
.rx-plist.min > :not(.rx-pl-head) { display: none; }
.rx-plist.min .rx-pl-head { border-bottom: 0; }
.rx-plist.min .rx-pl-head .rx-pl-stat { display: none; }
.rx-pl-head .rx-pl-name::after { content: " ▾"; opacity: .6; }
.rx-plist.min .rx-pl-head .rx-pl-name::after { content: " ▸"; }
/* menus and pop-ups never taller than the game (flex centring so max-height:100% is the game's height) */
.rx-menu, .rx-buy, .rx-kick { display: flex; align-items: center; justify-content: center; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); box-sizing: border-box; }
.rx-menu-box { max-height: 100%; }
.rx-menu-body { min-height: 0; flex: 1 1 auto; }
.rx-buy-box { max-height: 100%; overflow-y: auto; box-sizing: border-box; }
.rx-kick-box { max-height: 100%; overflow-y: auto; box-sizing: border-box; }
.rx-dev-head { flex-wrap: wrap; row-gap: 6px; }
.rx-dev-tabs { flex-wrap: wrap; }
.rx-dev { height: min(440px, calc(100% - 24px)); }
.rx-health { margin-right: 8px; }
@media (min-width: 641px) { .rx-health { margin-right: 210px; } }

/* touch devices (class set from the input system) */
.rx-touchmode .rx-tbtn { width: 42px; height: 42px; border-radius: 11px; }
.rx-touchmode .rx-tbtn svg { width: 22px; height: 22px; }
.rx-touchmode .rx-topbar { height: calc(50px + env(safe-area-inset-top)); }
.rx-touchmode .rx-chat, .rx-touchmode .rx-plist { top: calc(56px + env(safe-area-inset-top)); }
.rx-touchmode .rx-emotes { top: calc(56px + env(safe-area-inset-top)); left: max(104px, calc(env(safe-area-inset-left) + 96px)); }
.rx-touchmode .rx-emotes button { padding: 11px 20px; font-size: 15px; }
/* the hotbar stays between the joystick side and the jump button */
.rx-touchmode .rx-hotbar { max-width: calc(100% - 250px); }
.rx-touchmode .rx-notes { bottom: calc(132px + env(safe-area-inset-bottom)); }
.rx-touchmode .rx-mb kbd, .rx-touchmode .rx-menu-actions kbd { display: none; }
.rx-touchmode .rx-mb { padding: 13px 10px; }
.rx-touchmode .rx-set { padding: 12px 4px; }
.rx-touchmode .rx-set input[type=checkbox] { width: 22px; height: 22px; }
.rx-touchmode .rx-pl-head { padding: 8px 12px; }

/* portrait phones */
@media (max-width: 520px) {
  .rx-chat { width: calc(100% - 24px); max-width: 360px; }
  .rx-plist { max-width: 52vw; min-width: 0; }
  .rx-pl-stat { width: 40px; }
  .rx-pl-name { min-width: 50px; }
  .rx-menu-box { width: 100%; border-radius: 14px; }
  .rx-menu-body { padding: 12px; }
  .rx-menu-actions { padding: 10px 12px; gap: 6px; }
  .rx-mb { min-width: 0; padding: 11px 8px; font-size: 13.5px; }
  .rx-help { grid-template-columns: 1fr; }
  .rx-set input[type=range] { width: 46%; }
  .rx-touchmode .rx-hotbar { bottom: calc(126px + env(safe-area-inset-bottom)); max-width: calc(100% - 24px); }
  .rx-touchmode .rx-notes { bottom: calc(196px + env(safe-area-inset-bottom)); }
  .rx-touchmode .rx-plist { max-height: 34%; }
}
/* landscape phones and other short screens */
@media (max-height: 500px) {
  .rx-chat { width: min(300px, 40vw); }
  .rx-chat-log { max-height: 72px; font-size: 13px; }
  .rx-chat-in input { padding: 6px 9px; }
  .rx-plist { max-height: calc(100% - 140px); font-size: 12px; }
  .rx-slot { width: 48px; height: 48px; }
  .rx-slot img { width: 32px; height: 32px; }
  .rx-menu-tabs button { padding: 9px; font-size: 14px; }
  .rx-menu-body { padding: 10px 14px; }
  .rx-menu-actions { padding: 8px 12px; flex-wrap: nowrap; }
  .rx-mb { min-width: 0; padding: 9px 6px; }
  .rx-jumpbtn { width: 68px; height: 68px; bottom: calc(22px + env(safe-area-inset-bottom)); }
  .rx-touchmode .rx-notes { bottom: calc(100px + env(safe-area-inset-bottom)); }
  .rx-load-thumb { width: min(300px, 50vw); }
  .rx-load-box { gap: 8px; }
  .rx-load-box h2 { font-size: 20px; }
}
/* big monitors: a touch larger so nothing looks tiny */
@media (min-width: 1800px) and (min-height: 1000px) {
  .rx-tbtn { width: 38px; height: 38px; }
  .rx-topbar { height: 44px; }
  .rx-chat, .rx-plist { top: 50px; }
  .rx-chat { width: 420px; }
  .rx-chat-log { max-height: 230px; font-size: 15.5px; }
  .rx-plist { font-size: 15px; }
  .rx-slot { width: 66px; height: 66px; }
  .rx-slot img { width: 46px; height: 46px; }
  .rx-menu-box { width: 640px; }
}

/* ---------- Building Tools (the owner's in-game builder, js/engine/btools.js) ---------- */
.rx-bt { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 212px; max-height: calc(100% - 140px); overflow-y: auto; overflow-x: hidden; background: rgba(25, 27, 33, .94); color: #eceff4; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .07) inset; padding: 10px; font: 500 12.5px var(--f-ui, system-ui); z-index: 6; pointer-events: auto; display: flex; flex-direction: column; gap: 8px; }
.rx-bt .bt-head { display: flex; align-items: center; justify-content: space-between; }
.rx-bt .bt-head b { font-size: 13.5px; }
.rx-bt .bt-undo { border: 0; background: #2a2f38; color: #fff; width: 30px; height: 26px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.rx-bt .bt-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.rx-bt .bt-modes button { min-width: 0; display: flex; align-items: center; gap: 6px; border: 0; background: #2e323c; color: #d6dbe4; padding: 7px 8px; border-radius: 9px; cursor: pointer; font: inherit; text-align: left; }
.rx-bt .bt-modes button i { font-style: normal; width: 16px; text-align: center; }
.rx-bt .bt-modes button kbd { margin-left: auto; font: 600 10px var(--f-mono, monospace); color: #8f97a6; background: #15181d; padding: 1px 5px; border-radius: 5px; }
.rx-bt .bt-modes button:hover { background: #3a3f4b; }
.rx-bt .bt-modes button.on { background: #fff; color: #15171c; }
.rx-bt .bt-modes button.on kbd { background: #e3e5ea; color: #15171c; }
.rx-bt .bt-opts:empty, .rx-bt .bt-sel:empty { display: none; }
.rx-bt .bt-opts, .rx-bt .bt-sel { display: flex; flex-direction: column; gap: 6px; background: #1a1d23; border-radius: 10px; padding: 8px; }
.rx-bt .bt-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.rx-bt select, .rx-bt input[type=number] { background: #0e1014; color: #eceff4; border: 1px solid #2a2f38; border-radius: 7px; padding: 4px 6px; font: inherit; min-width: 0; }
.rx-bt select { max-width: 120px; }
.rx-bt .bt-size input { width: 44px; }
.rx-bt .bt-sw { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.rx-bt .bt-sw button, .rx-bt .bt-pick { height: 22px; border: 0; border-radius: 6px; cursor: pointer; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset; }
.rx-bt .bt-sw button.on { box-shadow: 0 0 0 2px #fff inset, 0 0 0 1px #000; }
.rx-bt .bt-pick { position: relative; overflow: hidden; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); }
.rx-bt .bt-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rx-bt .bt-sel label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.rx-bt .bt-selname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-bt .bt-selbtns { display: flex; gap: 4px; }
.rx-bt .bt-selbtns button { flex: 1; border: 0; background: #2a2f38; color: #fff; border-radius: 8px; padding: 6px; cursor: pointer; font: inherit; }
.rx-bt .bt-selbtns button.danger { background: #5a1118; color: #ffb3b3; }
.rx-bt .bt-hint { color: #8f97a6; font-size: 11.5px; line-height: 1.35; }
@media (max-width: 700px), (max-height: 500px) { .rx-bt { width: 180px; right: 6px; padding: 8px; gap: 6px; } .rx-bt .bt-modes button { justify-content: center; padding: 7px 4px; min-width: 0; } .rx-bt .bt-modes button span, .rx-bt .bt-modes button kbd { display: none; } .rx-bt .bt-modes { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Esc menu: Invite friends (js/platform/invite.js) ---------- */
.rx-inv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; color: #c3c9d4; font-size: 13px; }
.rx-inv-empty { padding: 18px 8px; text-align: center; color: #9aa3b2; }
.rx-mp.rx-inv span.on { color: #3ddc84; }
.rx-mp.rx-inv span.on::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; margin-right: 6px; vertical-align: 1px; }
.rx-mb.rx-sent, .rx-mb.rx-linkbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.rx-mb.rx-sent svg, .rx-mb.rx-linkbtn svg { width: 16px; height: 16px; flex: none; }
.rx-mb.rx-linkbtn { flex: none; min-width: 0; padding: 8px 12px; font-size: 13px; }
.rx-mp.rx-inv > div { flex: 1; min-width: 0; }
.rx-mp.rx-inv .rx-mb { margin-left: auto; white-space: nowrap; flex: none; width: auto; min-width: 96px; }
.rx-mp.rx-inv .rx-mb[disabled] { opacity: .6; cursor: default; }

.rx-set span small { display: block; color: #9aa3b2; font-size: 11.5px; font-weight: 500; }

/* pause menu: one fixed size on every tab (a full server fits: players in two columns), invite button on top */
.rx-menu-box { height: min(600px, 100%); }
.rx-menu-body { flex: 1 1 0; min-height: 0; }
.rx-plgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.rx-plgrid .rx-mp { padding: 5px 6px; min-width: 0; }
.rx-plgrid .rx-mp img { width: 38px; height: 38px; }
.rx-plgrid .rx-mp > div { min-width: 0; flex: 1; }
.rx-plgrid .rx-mp b, .rx-plgrid .rx-mp span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-invite-open { flex: none; display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px 8px 8px; border: 0; border-radius: 10px; background: #2e323c; color: #fff; font: 700 15px "Figtree", sans-serif; text-align: left; cursor: pointer; transition: background .15s; }
.rx-invite-open:hover { background: #3a3f4b; }
.rx-invite-open:active { background: #444a57; }
.rx-io-ic { width: 40px; height: 40px; flex: none; border-radius: 50%; background: #fff; color: #15171c; display: grid; place-items: center; }
.rx-io-ic svg { width: 22px; height: 22px; }
.rx-io-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rx-io-tx small { font: 500 12.5px "Figtree", sans-serif; color: #9aa0ad; }
.rx-io-ch { margin-left: auto; color: #9aa0ad; display: grid; }
.rx-io-ch svg { width: 20px; height: 20px; }
.rx-invpop { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 5, 8, .55); }
.rx-invpop-box { width: min(460px, 100%); height: min(520px, 100%); display: flex; flex-direction: column; background: #1d2027; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .07) inset; overflow: hidden; }
.rx-invpop-box header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 12px 18px; border-bottom: 1px solid #2b2e37; font: 700 17px "Figtree", sans-serif; }
.rx-invpop-x { border: 0; background: #2e323c; color: #fff; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; padding: 0; }
.rx-invpop-x:hover { background: #3a3f4b; }
.rx-invpop-x svg { width: 16px; height: 16px; }
.rx-invpop-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }

/* Building Tools: SVG icons (no emoji) */
.rx-bt .bt-modes button i { display: grid; place-items: center; }
.rx-bt .bt-modes button i svg, .rx-bt .bt-head svg, .rx-bt .bt-selbtns svg { width: 16px; height: 16px; flex: none; }
.rx-bt .bt-head b { display: flex; align-items: center; gap: 6px; }
.rx-bt .bt-head b i { display: grid; color: #fff; }
.rx-bt .bt-undo { display: grid; place-items: center; }
.rx-bt .bt-selbtns button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.rx-bt .bt-selname { display: flex; align-items: baseline; gap: 6px; }
.rx-bt .bt-selname small { color: #8f97a6; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }

.rx-mb.rx-report { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.rx-mb.rx-report svg { width: 14px; height: 14px; flex: none; }

/* capture: free camera (Shift+P), screenshots (F2), recording (F8) — js/engine/capture.js */
.rx-game.rx-freecam .rx-ui-layer { visibility: hidden; }
.rx-cap { position: absolute; inset: 0; pointer-events: none; z-index: 70; font-family: "Figtree", system-ui, sans-serif; color: #fff; }
.rx-fcbar { position: absolute; left: 50%; top: max(10px, env(safe-area-inset-top)); transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: calc(100% - 24px); padding: 6px 6px 6px 12px; border-radius: 12px; background: rgba(18, 20, 26, .72); backdrop-filter: blur(8px); font-size: 13px; font-weight: 600; pointer-events: auto; transition: opacity .6s; }
.rx-fcbar.dim { opacity: .35; }
.rx-fcbar.dim:hover { opacity: 1; }
.rx-fcbar > svg { width: 18px; height: 18px; flex: none; }
.rx-fcbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-fcbar kbd { margin: 0 1px; }
.rx-fcbar button { flex: none; border: 0; border-radius: 9px; padding: 7px 12px; background: #fff; color: #15171c; font: 700 13px "Figtree", sans-serif; cursor: pointer; display: grid; place-items: center; touch-action: none; }
.rx-fcbar button svg { width: 20px; height: 20px; }
.rx-fcbar button[data-fc=up], .rx-fcbar button[data-fc=down] { background: #2e323c; color: #fff; padding: 9px 12px; }
.rx-recpill { position: absolute; right: max(12px, env(safe-area-inset-right)); top: max(48px, calc(env(safe-area-inset-top) + 44px)); display: flex; align-items: center; gap: 7px; padding: 5px 5px 5px 11px; border-radius: 99px; background: rgba(18, 20, 26, .78); backdrop-filter: blur(8px); font-size: 13px; pointer-events: auto; }
.rx-recpill i { width: 10px; height: 10px; border-radius: 50%; background: #ff3b30; animation: rx-recblink 1.2s infinite; }
.rx-recpill b { font-weight: 800; letter-spacing: .05em; }
.rx-recpill span { font-variant-numeric: tabular-nums; min-width: 34px; }
.rx-recpill button { border: 0; width: 28px; height: 28px; border-radius: 50%; background: #ff3b30; color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.rx-recpill button svg { width: 12px; height: 12px; }
@keyframes rx-recblink { 50% { opacity: .25; } }
.rx-capflash { position: absolute; inset: 0; background: #fff; animation: rx-capflash .45s ease-out forwards; }
@keyframes rx-capflash { from { opacity: .7; } to { opacity: 0; } }
.rx-capcards { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); z-index: 2147483000; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; font-family: "Figtree", system-ui, sans-serif; }
.rx-capcard { position: relative; width: min(320px, calc(100vw - 28px)); display: flex; gap: 10px; padding: 10px; border-radius: 14px; background: #1b1e25; color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); animation: rx-capin .25s ease-out; }
@keyframes rx-capin { from { transform: translateY(12px); opacity: 0; } }
.rx-capmedia { width: 112px; flex: none; border-radius: 9px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; align-self: center; }
.rx-capmedia img, .rx-capmedia video { width: 100%; height: 100%; object-fit: cover; display: block; }
.rx-capinfo { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-right: 18px; }
.rx-capinfo b { font-size: 14px; }
.rx-capinfo span { font-size: 11.5px; color: #8f96a3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-capact { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; }
.rx-capbtn { border: 0; border-radius: 8px; padding: 6px 11px; background: #2e323c; color: #fff; font: 700 12.5px "Figtree", sans-serif; cursor: pointer; text-decoration: none; }
.rx-capbtn.primary { background: #fff; color: #15171c; }
.rx-capx { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; border-radius: 7px; background: transparent; color: #8f96a3; display: grid; place-items: center; cursor: pointer; padding: 0; }
.rx-capx:hover { background: #2e323c; color: #fff; }
.rx-capx svg { width: 14px; height: 14px; }
.rx-capbtns { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.rx-capbtns .rx-mb { display: flex; align-items: center; gap: 8px; text-align: left; }
.rx-capbtns .rx-mb svg { width: 18px; height: 18px; flex: none; }
.rx-capbtns .rx-mb span { flex: 1; }
.rx-capbtns .rx-mb kbd { margin: 0; }

/* server location + ping chip, top right (multiplayer) */
.rx-srv { position: absolute; right: max(8px, env(safe-area-inset-right)); top: calc(6px + env(safe-area-inset-top)); height: 24px; max-width: 200px; box-sizing: border-box; display: flex; align-items: center; gap: 6px; padding: 0 10px 0 8px; border-radius: 8px; background: rgba(18, 20, 26, .62); backdrop-filter: blur(6px); color: #fff; font: 600 12.5px "Figtree", sans-serif; white-space: nowrap; pointer-events: auto; cursor: default; }
.rx-srv > span { overflow: hidden; text-overflow: ellipsis; }
.rx-srv > i { width: 3px; height: 3px; border-radius: 50%; background: rgba(255, 255, 255, .5); flex: none; }
.rx-srv svg { width: 14px; height: 14px; flex: none; fill: currentColor; color: rgba(255, 255, 255, .55); }
.rx-srv svg rect { opacity: .3; }
.rx-srv.q3 svg rect, .rx-srv.q2 svg rect:nth-child(-n+2), .rx-srv.q1 svg rect:first-child { opacity: 1; }
.rx-srv.q3 svg { color: #3fd16a; }
.rx-srv.q2 svg { color: #ffd166; }
.rx-srv.q1 svg { color: #ff5a4e; }
.rx-touchmode .rx-srv { top: calc(13px + env(safe-area-inset-top)); }
@media (max-width: 640px) { .rx-topbar.has-srv .rx-health { margin-right: 92px; } .rx-srv .rx-srv-loc, .rx-srv > i { display: none; } }

/* kicked by HELIX / out of date client */
.rx-kick-btns { display: flex; gap: 8px; justify-content: center; margin-top: 4px; }
.rx-kick-btns .rx-mb { flex: 1; }
.rx-err-ic { width: 46px; height: 46px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; background: #ff5a4e; color: #fff; font: 900 26px "Figtree", sans-serif; }
.rx-outdated h3 { letter-spacing: .03em; }

/* fight mode (js/engine/fight.js): a move that is cooling down is dimmed in the hotbar */
.rx-slot.rx-cd::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--cd, 0) * 100%); background: rgba(0, 0, 0, .58); pointer-events: none; }
/* voice chat (js/engine/voice.js) */
.rx-vbtn { color: rgba(255, 255, 255, .75); }
.rx-vbtn.v-on, .rx-vbtn.v-talk { color: #3fd16c; }
.rx-vbtn.v-talk { box-shadow: 0 0 0 2px #3fd16c, 0 0 14px rgba(63, 209, 108, .7); }
.rx-vbtn.v-muted { color: #ff5a5a; }
.rx-tag[data-v] > span::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-right: 4px; vertical-align: -1px; background: currentColor; opacity: .7; -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='8' y='2' width='8' height='13' rx='4'/><path d='M5 11a7 7 0 0014 0' fill='none' stroke='black' stroke-width='2.4'/><rect x='11' y='17' width='2' height='5'/></svg>") center / contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='8' y='2' width='8' height='13' rx='4'/><path d='M5 11a7 7 0 0014 0' fill='none' stroke='black' stroke-width='2.4'/><rect x='11' y='17' width='2' height='5'/></svg>") center / contain no-repeat; }
.rx-tag[data-v=talk] > span::before { background: #3fd16c; opacity: 1; filter: drop-shadow(0 0 4px #3fd16c); }
.rx-tag[data-v=muted] > span::before { background: #ff5a5a; opacity: 1; -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='8' y='2' width='8' height='13' rx='4'/><path d='M5 11a7 7 0 0014 0' fill='none' stroke='black' stroke-width='2.4'/><rect x='11' y='17' width='2' height='5'/><path d='M3 3l18 18' stroke='black' stroke-width='3'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='8' y='2' width='8' height='13' rx='4'/><path d='M5 11a7 7 0 0014 0' fill='none' stroke='black' stroke-width='2.4'/><rect x='11' y='17' width='2' height='5'/><path d='M3 3l18 18' stroke='black' stroke-width='3'/></svg>"); }
.rx-vmute { gap: 5px; } .rx-vmute svg { width: 15px; height: 15px; } .rx-vmute.on { color: #ff8a8a; }
.rx-vask { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(0, 0, 0, .5); pointer-events: auto; padding: 16px; }
.rx-vbox { width: min(430px, 100%); max-height: calc(100% - 16px); overflow: auto; background: #1b1e26; color: #fff; border-radius: 16px; padding: 20px; box-shadow: 0 18px 60px rgba(0, 0, 0, .5); font: 500 14px "Figtree", sans-serif; }
.rx-vt { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; } .rx-vt svg { width: 24px; height: 24px; color: #3fd16c; }
.rx-vbox p { margin: 8px 0 12px; color: rgba(255, 255, 255, .78); }
.rx-vopts { display: grid; gap: 8px; } .rx-vopts label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); cursor: pointer; }
.rx-vopts input { margin-top: 3px; accent-color: #3fd16c; } .rx-vopts b { display: block; } .rx-vopts small { color: rgba(255, 255, 255, .6); }
.rx-vrules { margin: 12px 0; padding-left: 18px; color: rgba(255, 255, 255, .7); font-size: 13px; display: grid; gap: 4px; }
.rx-vbtns { display: flex; justify-content: flex-end; gap: 8px; }
.rx-vbox p b { color: #fff; }
.rx-vmic { display: grid; gap: 10px; margin: 2px 0 14px; }
.rx-vmic .rx-vdev { width: 100%; border: 0; border-radius: 10px; padding: 9px 10px; background: #2e323c; color: #fff; font: 600 14px "Figtree", sans-serif; }
.rx-vmeter { position: relative; flex: 0 0 50%; height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.rx-vmeter i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; background: linear-gradient(90deg, #3fd16c, #b6f36a); }

/* Building Tools → Toolbox (furniture & decor) */
.rx-bt.bt-wide { width: 300px; top: auto; bottom: 96px; transform: none; max-height: calc(100% - 210px); }   /* (below the player list) */
.rx-bt .bt-tbq { width: 100%; box-sizing: border-box; border: 0; border-radius: 8px; background: #15181d; color: #fff; padding: 7px 9px; font: inherit; margin-bottom: 6px; }
.rx-bt .bt-cats { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.rx-bt .bt-cats button { border: 0; background: #2e323c; color: #d6dbe4; padding: 3px 8px; border-radius: 99px; cursor: pointer; font: 600 11px inherit; }
.rx-bt .bt-cats button.on { background: #fff; color: #15171c; }
.rx-bt .bt-tbgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; max-height: 300px; overflow-y: auto; }
.rx-bt .bt-tbitem { border: 2px solid transparent; background: #2a2e37; border-radius: 9px; padding: 3px; cursor: pointer; color: #d6dbe4; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.rx-bt .bt-tbitem img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.rx-bt .bt-tbitem span { font-size: 10px; line-height: 1.15; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rx-bt .bt-tbitem:hover { background: #363b47; } .rx-bt .bt-tbitem.on { border-color: #52e08a; background: #2f3d35; }

/* Calls (js/engine/voice.js → RX.Call): the call window floats over the site, games and Studio */
.rx-call { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 10050; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 18px; background: rgba(22, 25, 33, .96); color: #fff; box-shadow: 0 14px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08); font: 600 14px "Figtree", system-ui, sans-serif; max-width: calc(100vw - 24px); animation: rxcallin .25s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes rxcallin { from { transform: translate(-50%, -16px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.rx-call[data-s=in] { padding: 12px; gap: 12px; }
.rx-cface { position: relative; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; background: #2e323c; display: grid; place-items: center; overflow: visible; }
.rx-cface img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.rx-cface i { font: 800 20px "Figtree", sans-serif; font-style: normal; }
.rx-cface::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid transparent; transition: border-color .12s, box-shadow .12s; }
.rx-cface.talk::after { border-color: #3fd16c; box-shadow: 0 0 14px rgba(63, 209, 108, .7); }
.rx-cface.ring::after { border-color: #3fd16c; animation: rxring 1.2s ease-out infinite; }
@keyframes rxring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.45); opacity: 0; } }
.rx-ctext { display: flex; flex-direction: column; min-width: 0; margin-right: 4px; }
.rx-ctext b { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.rx-ctext small { color: rgba(255, 255, 255, .65); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rx-cb { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; min-width: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: #2e323c; color: #fff; font: 800 13px "Figtree", sans-serif; cursor: pointer; }
.rx-cb svg { width: 18px; height: 18px; flex: 0 0 18px; }
.rx-cb:hover { filter: brightness(1.15); }
.rx-cb.dim { opacity: .45; } .rx-cb.dim:hover { opacity: .7; }
.rx-cb.green { background: #2fbf5b; } .rx-cb.red { background: #e5484d; } .rx-cb.red svg { transform: rotate(135deg); } .rx-cb.off { color: #ff8a8a; }
.rx-call[data-s=live] .rx-cb span { display: none; }
.rx-call[data-s=live] .rx-cb { padding: 0; width: 40px; }
.rx-callhelp { position: fixed; inset: 0; z-index: 10060; pointer-events: none; }
.rx-callbtn svg { width: 15px; height: 15px; } .rx-callbtn.on { color: #ff8a8a; }
@media (max-width: 480px) { .rx-call { top: 8px; } .rx-ctext b { max-width: 110px; } .rx-call[data-s=in] .rx-cb span { display: none; } .rx-call[data-s=in] .rx-cb { width: 46px; padding: 0; } }

/* ---------- touch controls 2 (js/engine/coregui.js · input.js · btools.js) ---------- */
/* the thumbstick rests where the thumb usually goes (faint), and moves to wherever the thumb lands */
.rx-touchmode .rx-joy { display: block; left: max(28px, calc(env(safe-area-inset-left) + 16px)); bottom: calc(52px + env(safe-area-inset-bottom)); opacity: .32; transition: opacity .15s; }
.rx-touchmode .rx-joy.on { bottom: auto; opacity: 1; transition: none; }
/* the keys a phone doesn't have: a column above the jump button */
.rx-tacts { position: absolute; right: max(32px, calc(env(safe-area-inset-right) + 18px)); bottom: calc(126px + env(safe-area-inset-bottom)); display: flex; flex-direction: column-reverse; align-items: center; gap: 12px; pointer-events: none; }
.rx-tact { pointer-events: auto; width: 58px; height: 58px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); background: rgba(18, 20, 26, .45); color: #fff; display: grid; place-items: center; padding: 0; touch-action: none; -webkit-user-select: none; user-select: none; position: relative; }
.rx-tact svg { width: 26px; height: 26px; }
.rx-tact.on { background: rgba(255, 255, 255, .35); }
.rx-tact.lit { background: rgba(63, 209, 108, .45); border-color: #3fd16c; }
.rx-tact.hidden { display: none; }
.rx-tact.t-use { width: 66px; height: 66px; background: rgba(255, 207, 58, .28); border-color: rgba(255, 207, 58, .8); }
.rx-tact.t-use span { position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%); font: 800 10.5px "Figtree", sans-serif; white-space: nowrap; text-shadow: 0 1px 2px #000; }
/* a game's own mobile buttons (ContextActionService): to the left of the jump button, stacking upward */
.rx-casbtns { position: absolute; right: max(118px, calc(env(safe-area-inset-right) + 104px)); bottom: calc(30px + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap-reverse; flex-direction: row-reverse; gap: 10px; max-width: 220px; pointer-events: none; }
.rx-cas { pointer-events: auto; width: 62px; height: 62px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); background: rgba(18, 20, 26, .5) center / 70% no-repeat; color: #fff; font: 800 11px "Figtree", sans-serif; padding: 4px; display: grid; place-items: center; text-align: center; line-height: 1.1; overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; }
.rx-cas.on { background-color: rgba(255, 255, 255, .35); }
.rx-cas.img span { display: none; }
.rx-cas.placed { position: absolute; }
.rx-touch:not(.hidden) .rx-casbtns:empty { display: none; }
/* shift lock / first person on a touch screen: tools aim at the middle */
.rx-cross { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; pointer-events: none; display: none; z-index: 30; }
.rx-cross.on { display: block; }
.rx-cross::before, .rx-cross::after { content: ""; position: absolute; background: #fff; box-shadow: 0 0 2px #000; }
.rx-cross::before { left: 10px; top: 0; width: 2px; height: 22px; } .rx-cross::after { top: 10px; left: 0; height: 2px; width: 22px; }
/* staff panels button + its little menu */
.rx-staffbtn { color: #ffcf3a; }
.rx-staffbtn.hidden { display: none; }
.rx-staffpop { position: absolute; left: max(12px, env(safe-area-inset-left)); top: calc(56px + env(safe-area-inset-top)); z-index: 70; display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 12px; background: rgba(22, 25, 33, .96); box-shadow: 0 12px 30px rgba(0, 0, 0, .45); pointer-events: auto; }
.rx-staffpop button { border: 0; border-radius: 9px; background: #2e323c; color: #fff; font: 700 14px "Figtree", sans-serif; padding: 11px 16px; text-align: left; cursor: pointer; white-space: nowrap; }
.rx-staffpop button:hover { background: #3a3f4b; }
/* chat: a Send button on touch screens */
.rx-chat-in { display: flex; gap: 6px; }
.rx-chat-send { display: none; flex: 0 0 40px; border: 0; border-radius: 8px; background: rgba(18, 20, 26, .7); color: #fff; padding: 0; }
.rx-chat-send svg { width: 20px; height: 20px; }
.rx-touchmode .rx-chat.active .rx-chat-send { display: grid; place-items: center; }
.rx-devopen { margin-top: 12px; width: 100%; }
/* iPhones zoom the page into any text box with letters under 16px */
.rx-touchmode input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), .rx-touchmode select, .rx-touchmode textarea { font-size: 16px !important; }
/* portrait phones: the chat leaves room for the folded player list */
@media (max-width: 520px) { .rx-touchmode .rx-chat { width: calc(100% - 172px); min-width: 150px; } .rx-touchmode .rx-tacts { bottom: calc(112px + env(safe-area-inset-bottom)); } }
@media (max-height: 500px) { .rx-tact { width: 50px; height: 50px; } .rx-tact.t-use { width: 56px; height: 56px; } .rx-tacts { bottom: calc(100px + env(safe-area-inset-bottom)); gap: 10px; right: max(30px, calc(env(safe-area-inset-right) + 16px)); } .rx-cas { width: 54px; height: 54px; } .rx-casbtns { right: max(100px, calc(env(safe-area-inset-right) + 90px)); bottom: calc(18px + env(safe-area-inset-bottom)); } }
/* Building Tools on touch: bigger targets, the R / T / Alt / Shift keys as buttons, a panel that leaves the thumbs free */
.rx-bt .bt-acts { display: flex; flex-wrap: wrap; gap: 4px; }
.rx-bt .bt-acts button { flex: 1 1 auto; border: 0; background: #2e323c; color: #fff; border-radius: 8px; padding: 7px 8px; font: 700 12px "Figtree", sans-serif; cursor: pointer; }
.rx-bt .bt-acts button.on { background: #fff; color: #15171c; }
.rx-bt.bt-touch .bt-modes button { min-height: 40px; }
.rx-bt.bt-touch .bt-modes button kbd { display: none; }
.rx-bt.bt-touch .bt-undo { width: 44px; height: 36px; }
.rx-bt.bt-touch .bt-sw button, .rx-bt.bt-touch .bt-pick { height: 32px; }
.rx-bt.bt-touch select, .rx-bt.bt-touch input[type=number] { min-height: 36px; }
.rx-bt.bt-touch .bt-acts button, .rx-bt.bt-touch .bt-selbtns button { min-height: 38px; }
.rx-bt.bt-touch .bt-cats button { min-height: 32px; }
@media (max-width: 520px) {
  /* portrait phone: a sheet under the top bar, the 3D view stays free in the middle */
  .rx-bt.bt-touch, .rx-bt.bt-touch.bt-wide { left: 8px; right: 8px; width: auto; top: calc(104px + env(safe-area-inset-top)); bottom: auto; transform: none; max-height: 40%; }
  .rx-bt.bt-touch .bt-modes { grid-template-columns: repeat(4, 1fr); }
  .rx-bt.bt-touch .bt-modes button { flex-direction: column; gap: 2px; font-size: 11px; padding: 5px 2px; }
}
@media (max-height: 500px) {
  /* landscape phone: on the right, above the jump button's corner */
  .rx-bt.bt-touch, .rx-bt.bt-touch.bt-wide { right: max(8px, env(safe-area-inset-right)); top: calc(56px + env(safe-area-inset-top)); bottom: calc(104px + env(safe-area-inset-bottom)); transform: none; max-height: none; width: 230px; }
}
.rx-tacts.bt .t-lock { display: none; }
.rx-bt .bt-head { gap: 6px; } .rx-bt .bt-head b { margin-right: auto; }
.rx-bt .bt-fold { display: none; border: 0; background: #2a2f38; color: #fff; width: 36px; height: 30px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.rx-bt.bt-touch .bt-fold { display: block; height: 36px; }
.rx-bt.bt-min > :not(.bt-head):not(.bt-modes) { display: none !important; }
@media (max-width: 520px) {
  .rx-bt.bt-touch, .rx-bt.bt-touch.bt-wide { max-height: 34%; padding: 8px; gap: 6px; }
  .rx-bt.bt-touch .bt-hint { display: none; }
  .rx-bt.bt-touch .bt-modes button { min-height: 44px; }
}
/* Building Tools on touch: above the folded player list; mode names under the icons on phones */
.rx-bt.bt-touch { z-index: 45; }
@media (max-width: 520px) { .rx-bt.bt-touch .bt-modes button span { display: block !important; font-size: 10.5px; line-height: 1; } }
/* group calls: a row of faces (talking = green ring, ringing = pulsing + dim), the Add-people picker, the ringtone row */
.rx-cfaces { display: flex; align-items: center; }
.rx-cfaces .rx-cface + .rx-cface { margin-left: -10px; }
.rx-call.group .rx-cfaces .rx-cface { width: 38px; height: 38px; flex-basis: 38px; box-shadow: 0 0 0 3px rgba(22, 25, 33, .96); }
.rx-cface.dim img, .rx-cface.dim i { opacity: .45; }
.rx-call[data-s=missed] { padding: 8px 8px 8px 10px; }
.rx-call[data-s=missed] .rx-ctext small { color: #ff8a8a; }
.rx-call[data-s=missed] .rx-cb span { display: inline; }
.rx-cpick { position: fixed; left: 50%; top: 76px; transform: translateX(-50%); z-index: 10055; width: min(320px, calc(100vw - 24px)); max-height: min(60vh, 420px); overflow-y: auto; padding: 10px; border-radius: 16px; background: rgba(22, 25, 33, .98); color: #fff; box-shadow: 0 14px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .08); font: 600 14px "Figtree", system-ui, sans-serif; display: flex; flex-direction: column; gap: 4px; }
.rx-cpick > b { padding: 4px 6px 8px; font-weight: 800; }
.rx-cpick p { margin: 4px 6px 8px; color: rgba(255, 255, 255, .6); font-weight: 600; }
.rx-cpick button { display: flex; align-items: center; gap: 10px; border: 0; border-radius: 12px; background: transparent; color: #fff; padding: 8px; font: inherit; text-align: left; cursor: pointer; min-height: 48px; }
.rx-cpick button:hover { background: #2e323c; }
.rx-cpick button img, .rx-cpick button i { width: 34px; height: 34px; border-radius: 50%; background: #2e323c; display: grid; place-items: center; font-style: normal; font-weight: 800; flex: 0 0 34px; }
.rx-cpick button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-cpick button em { font-style: normal; font-size: 12px; color: #3fd16c; }
.rx-ringpick { display: inline-flex; gap: 6px; align-items: center; width: 50%; justify-content: flex-end; }
.rx-ringpick select { width: auto !important; flex: 1; min-width: 0; }
.rx-ringplay { border: 0; border-radius: 8px; background: #2e323c; color: #fff; width: 34px; height: 34px; cursor: pointer; flex: 0 0 34px; }

/* calls: Show my game, the picture of a friend's game, Join their game */
.rx-cb.lit { background: #3d8bff; }
.rx-cjoin { display: none; }
.rx-cjoin:not(:empty) { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; order: 10; padding-top: 4px; }
.rx-call[data-s=live] { flex-wrap: wrap; justify-content: flex-start; }
.rx-cjoin button { border: 0; border-radius: 10px; background: #2fbf5b; color: #fff; font-weight: 800; font-size: 12.5px; font-family: "Figtree", sans-serif; padding: 8px 12px; cursor: pointer; }
.rx-cshare { position: fixed; right: 12px; bottom: 12px; z-index: 10052; width: min(420px, calc(100vw - 24px)); border-radius: 14px; overflow: hidden; background: #0b0d12; box-shadow: 0 16px 44px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .1); color: #fff; font-weight: 600; font-size: 13px; font-family: "Figtree", system-ui, sans-serif; }
.rx-csh-top { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; background: rgba(22, 25, 33, .96); }
.rx-csh-top b { white-space: nowrap; }
.rx-csh-top span { flex: 1; min-width: 0; color: rgba(255, 255, 255, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-csh-top button { border: 0; background: #2e323c; color: #fff; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; }
.rx-csh-view { position: relative; aspect-ratio: 16 / 9; background: #000; display: grid; place-items: center; }
.rx-csh-view video, .rx-csh-view img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rx-csh-view i { position: absolute; font-style: normal; color: rgba(255, 255, 255, .6); }
.rx-csh-join { width: 100%; border: 0; background: #2fbf5b; color: #fff; font-weight: 800; font-size: 14px; font-family: "Figtree", sans-serif; padding: 10px; cursor: pointer; }
@media (max-width: 520px) { .rx-cshare { width: calc(100vw - 16px); right: 8px; bottom: calc(76px + env(safe-area-inset-bottom)); } }

/* Menu → People cards: name, icon buttons that always fit, a voice volume slider (0–300 %) */
.rx-mp.rx-mp2 { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; }
.rx-mp2 .rx-mpn { display: flex; flex-direction: column; min-width: 0; }
.rx-mp2 .rx-mpn b, .rx-mp2 .rx-mpn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-mp2 .rx-mpn small { color: #9aa0ad; font-weight: 600; }
.rx-mpa { display: flex; gap: 4px; }
.rx-ib { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border: 0; border-radius: 9px; background: #2e323c; color: #fff; cursor: pointer; padding: 0; }
.rx-ib:hover { background: #3a3f4b; }
.rx-ib svg { width: 17px; height: 17px; }
.rx-ib.rx-vmute.on { background: #5a1118; color: #ff9a9a; }
.rx-ib.rx-callbtn { background: #1f6b3a; color: #b8f5cb; }
.rx-ib.rx-callbtn.add { background: #1d4f8f; color: #cfe2ff; }
.rx-ib.rx-callbtn.on { background: #e5484d; color: #fff; }
.rx-ib.rx-callbtn.on svg { transform: rotate(135deg); }
.rx-ib.rx-report { color: #ff9a9a; }
.rx-mpv { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 2px 4px 2px 2px; color: #9aa0ad; cursor: pointer; }
.rx-mpv svg { width: 16px; height: 16px; flex: 0 0 16px; }
.rx-mpv input { flex: 1; min-width: 0; accent-color: #3fd16c; height: 22px; }
.rx-mpv em { font-style: normal; font-weight: 800; font-size: 12px; color: #fff; min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.rx-vvset { display: inline-flex; align-items: center; gap: 8px; width: 50%; justify-content: flex-end; }
.rx-vvset input { flex: 1; min-width: 0; accent-color: #3fd16c; }
.rx-vvset em { font-style: normal; font-weight: 800; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.rx-touchmode .rx-ib { width: 42px; height: 42px; flex-basis: 42px; }
/* the call window: tap someone's face for their volume */
.rx-call .rx-cface[data-talk] { cursor: pointer; }
.rx-cvol { position: fixed; z-index: 10056; left: 50%; top: 78px; transform: translateX(-50%); width: min(300px, calc(100vw - 24px)); padding: 12px; border-radius: 14px; background: rgba(22, 25, 33, .98); color: #fff; box-shadow: 0 14px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .08); font-weight: 700; font-size: 14px; font-family: "Figtree", system-ui, sans-serif; display: flex; flex-direction: column; gap: 10px; }
.rx-cvol-top { display: flex; align-items: center; gap: 10px; }
.rx-cvol-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-cvol-top button { border: 0; border-radius: 9px; background: #2e323c; color: #fff; padding: 7px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.rx-cvol-top button.on { background: #5a1118; color: #ff9a9a; }
.rx-cvol label { display: flex; align-items: center; gap: 8px; }
.rx-cvol input { flex: 1; accent-color: #3fd16c; }
.rx-cvol em { font-style: normal; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.rx-csh-view canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.rx-csh-q { font-style: normal; font-size: 11px; color: rgba(255, 255, 255, .55); white-space: nowrap; }

/* ---------- this game's tags: Creator / Developer / Tester (js/engine/coregui.js gameTag) ---------- */
.rx-gtag { font-style: normal; font-size: 10.5px; font-weight: 900; letter-spacing: .02em; padding: 1px 7px; border-radius: 99px; color: #fff; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.rx-gt-creator { background: linear-gradient(135deg, #ffb703, #fb8500); color: #2a1600; }
.rx-gt-developer { background: linear-gradient(135deg, #4cc9f0, #4361ee); }
.rx-gt-tester { background: linear-gradient(135deg, #57cc99, #2d9d6a); }
.rx-ctag.rx-gt-creator { color: #2a1600; } .rx-ctag.rx-gt-developer, .rx-ctag.rx-gt-tester { color: #fff; }
.rx-gt-dot { font-style: normal; font-size: 11px; margin-right: 4px; }
/* over the head: a small pill above the name */
.rx-tag[data-gtl]::before { content: attr(data-gtl); font-size: 10px; font-weight: 900; letter-spacing: .03em; padding: 1px 7px; border-radius: 99px; text-shadow: none; color: #fff; margin-bottom: 1px; }
.rx-tag[data-gt=creator]::before { background: linear-gradient(135deg, #ffb703, #fb8500); color: #2a1600; }
.rx-tag[data-gt=developer]::before { background: linear-gradient(135deg, #4cc9f0, #4361ee); }
.rx-tag[data-gt=tester]::before { background: linear-gradient(135deg, #57cc99, #2d9d6a); }
/* Esc → People: tags under the name, the friend row */
.rx-mpt { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.rx-mpt .rx-ctag { margin: 0; }
.rx-mp .rx-mpt, .rx-mp .rx-mpf { flex-direction: row; }   /* (beats .rx-mp div { column }) */
.rx-mpt .rx-ctag, .rx-mpt .rx-gtag { flex: 0 0 auto; padding: 1px 7px; border-radius: 99px; font-size: 10.5px; line-height: 1.5; }
.rx-frchip { font-style: normal; font-size: 11px; font-weight: 800; color: #3fd16c; margin-left: 4px; }
.rx-mpf { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.rx-frwant { flex: 1; min-width: 0; color: #c9cdd6; font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-frbtn { border: 0; border-radius: 9px; padding: 8px 12px; font: 800 13px "Figtree", sans-serif; cursor: pointer; color: #fff; background: #2e323c; white-space: nowrap; }
.rx-frbtn.add { flex: 1; background: linear-gradient(135deg, #3d8bff, #2a62d6); box-shadow: 0 2px 10px rgba(61, 139, 255, .35); }
.rx-frbtn.add:hover { filter: brightness(1.1); }
.rx-frbtn.ok { background: linear-gradient(135deg, #2fbf5b, #1f9a47); box-shadow: 0 2px 10px rgba(47, 191, 91, .35); }
.rx-frbtn.undo { background: transparent; color: #9aa0ad; padding: 6px 8px; }
.rx-frbtn[disabled] { opacity: .6; cursor: default; }
.rx-touchmode .rx-frbtn { padding: 11px 14px; }
/* the friend pop-up: top right, over the site or a game */
.rx-frpop { position: fixed; right: 14px; top: 14px; z-index: 10045; width: min(360px, calc(100vw - 28px)); box-sizing: border-box; display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center; padding: 14px 14px 12px; border-radius: 18px; color: #fff;
  background: linear-gradient(160deg, rgba(36, 40, 52, .98), rgba(22, 25, 33, .98)); box-shadow: 0 18px 50px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .08); font-family: "Figtree", system-ui, sans-serif;
  transform: translateY(-14px) scale(.96); opacity: 0; transition: transform .28s cubic-bezier(.34, 1.56, .64, 1), opacity .2s; }
.rx-frpop.in { transform: none; opacity: 1; }
.rx-frpop.out { transform: translateY(-8px) scale(.97); opacity: 0; transition-duration: .2s; }
.rx-frpop::before { content: ""; position: absolute; inset: 0; border-radius: 18px; padding: 1.5px; background: linear-gradient(135deg, #3d8bff, #a66bff, #ff6b9a); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.rx-frpop.accepted::before, .rx-frpop.friends::before { background: linear-gradient(135deg, #2fbf5b, #ffd166); }
.rx-frp-face { position: relative; width: 54px; height: 54px; border-radius: 50%; background: #2e323c; display: grid; place-items: center; }
.rx-frp-face img { width: 100%; height: 100%; border-radius: 50%; }
.rx-frp-face i { font-style: normal; font-weight: 900; font-size: 22px; }
.rx-frp-face span { position: absolute; right: -6px; bottom: -4px; font-size: 20px; animation: rxwave 1.2s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes rxwave { 0%, 60%, 100% { transform: rotate(0); } 15% { transform: rotate(18deg); } 30% { transform: rotate(-10deg); } 45% { transform: rotate(14deg); } }
.rx-frp-txt { display: flex; flex-direction: column; min-width: 0; padding-right: 20px; }
.rx-frp-txt b { font-size: 16px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-frp-txt small { font-size: 13.5px; font-weight: 700; color: #c9cdd6; }
.rx-frp-txt em { font-style: normal; font-size: 12px; color: #8f97a6; margin-top: 2px; }
.rx-frp-btns { grid-column: 1 / -1; display: flex; gap: 8px; }
.rx-frp-btns button { flex: 1; border: 0; border-radius: 11px; padding: 10px; font: 800 14px "Figtree", sans-serif; cursor: pointer; background: #2e323c; color: #fff; }
.rx-frp-btns button:hover { filter: brightness(1.12); }
.rx-frp-btns .rx-frp-ok { background: linear-gradient(135deg, #2fbf5b, #1f9a47); box-shadow: 0 4px 14px rgba(47, 191, 91, .35); }
.rx-frp-x { position: absolute; right: 8px; top: 8px; border: 0; background: transparent; color: #8f97a6; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.rx-frp-x:hover { background: rgba(255, 255, 255, .08); color: #fff; }
@media (max-width: 520px) { .rx-frpop { left: 10px; right: 10px; width: auto; top: calc(10px + env(safe-area-inset-top)); } }

/* FIRST ROBLIXIAN in a game: chat, Esc → People, the pill over the head */
.rx-ctag.rx-ttl-first { background: linear-gradient(120deg, #ffd166, #f72585 45%, #7209b7); color: #fff; box-shadow: 0 0 8px rgba(247, 37, 133, .5); letter-spacing: .04em; }
.rx-tag[data-gt=title-first]::before { background: linear-gradient(120deg, #ffd166, #f72585 45%, #7209b7); color: #fff; box-shadow: 0 0 10px rgba(247, 37, 133, .6); }

/* your Bux in the Esc menu (js/engine/coregui.js menuBuxHtml) */
.rx-menu-tabs { align-items: center; }
.rx-menu-bux { margin-left: auto; margin-right: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px; border-radius: 99px; background: rgba(0, 176, 111, .14); box-shadow: inset 0 0 0 1px rgba(0, 176, 111, .45); font: 800 14px "Figtree", sans-serif; color: #eafff5; white-space: nowrap; cursor: default; }
.rx-menu-bux svg { width: 18px; height: 18px; flex: none; }
.rx-menu-bux.bump { animation: rxBuxBump .5s ease-out; }
@keyframes rxBuxBump { 30% { transform: scale(1.12); box-shadow: inset 0 0 0 1px #00b06f, 0 0 14px rgba(0, 176, 111, .6); } }
@media (max-width: 520px) { .rx-menu-bux { margin-right: 8px; padding: 4px 9px 4px 6px; font-size: 12.5px; } .rx-menu-bux svg { width: 15px; height: 15px; } }

/* ---------- the top bar as Roblox's experience controls (2024–): a 58 px band, the round ROBLIX button, one pill with
   chat + mic and a 9-dot button that opens more; chat and the people list start under the band ---------- */
.rx-topbar { height: calc(58px + env(safe-area-inset-top)); gap: 8px; padding: max(7px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 7px max(12px, env(safe-area-inset-left)); align-items: flex-start; }
.rx-tbtn, .rx-touchmode .rx-tbtn { width: 44px; height: 44px; border-radius: 50%; background: rgba(18, 18, 21, .72); backdrop-filter: blur(10px); transition: background .12s; }
.rx-tbtn svg, .rx-touchmode .rx-tbtn svg { width: 22px; height: 22px; }
.rx-tbtn:hover { background: rgba(48, 50, 58, .86); }
.rx-tb-logo svg { width: 24px; height: 24px; }
.rx-unibar { pointer-events: auto; display: flex; align-items: center; height: 44px; padding: 0 4px; border-radius: 22px; background: rgba(18, 18, 21, .72); backdrop-filter: blur(10px); }
.rx-unibar .rx-tbtn { width: 36px; height: 36px; background: transparent; backdrop-filter: none; position: relative; }
.rx-unibar .rx-tbtn svg { width: 21px; height: 21px; }
.rx-unibar .rx-tbtn:hover { background: rgba(255, 255, 255, .12); }
.rx-unibar .rx-tbtn.lit { background: rgba(255, 255, 255, .16); }
.rx-uni-slot { display: contents; }
.rx-uni-more { display: flex; align-items: center; gap: 2px; max-width: 0; overflow: hidden; transition: max-width .22s ease, margin .22s ease; }
.rx-unibar.open .rx-uni-more { max-width: 160px; margin: 0 4px; padding: 0 4px; border-left: 1px solid rgba(255, 255, 255, .16); border-right: 1px solid rgba(255, 255, 255, .16); }
.rx-uni-more .rx-tbtn { flex: none; }
.rx-uni-more .rx-staffbtn.hidden { display: none; }
.rx-uni-dots svg { width: 18px; height: 18px; }
.rx-uni-badge { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; box-sizing: border-box; padding: 0 4px; border-radius: 8px; background: #e2231a; color: #fff; font: 800 10px/16px "Figtree", sans-serif; font-style: normal; text-align: center; pointer-events: none; }
.rx-uni-badge.hidden { display: none; }
.rx-unibar .rx-vbtn.v-talk { box-shadow: 0 0 0 2px #3fd16c inset; }
.rx-health { margin-top: 18px; }
.rx-chat, .rx-touchmode .rx-chat { top: calc(64px + env(safe-area-inset-top)); }
.rx-plist, .rx-touchmode .rx-plist { top: calc(64px + env(safe-area-inset-top)); border-radius: 12px; background: rgba(18, 18, 21, .72); backdrop-filter: blur(10px); }
.rx-plist.hidden { display: none; }
.rx-emotes, .rx-touchmode .rx-emotes { top: calc(64px + env(safe-area-inset-top)); border-radius: 14px; background: rgba(18, 18, 21, .86); backdrop-filter: blur(10px); }
.rx-staffpop { top: calc(64px + env(safe-area-inset-top)); }
.rx-chat-log { border-radius: 12px; background: rgba(18, 18, 21, .5); }
.rx-chat-in input { border-radius: 12px; background: rgba(18, 18, 21, .6); }
.rx-srv { top: calc(18px + env(safe-area-inset-top)); }
.rx-touchmode .rx-srv { top: calc(18px + env(safe-area-inset-top)); }
@media (min-width: 1800px) and (min-height: 1000px) { .rx-tbtn { width: 48px; height: 48px; } .rx-unibar { height: 48px; border-radius: 24px; } .rx-unibar .rx-tbtn { width: 40px; height: 40px; } .rx-topbar { height: 62px; } .rx-chat, .rx-plist { top: 68px; } }
@media (max-width: 760px) { .rx-bt.bt-touch, .rx-bt.bt-touch.bt-wide { top: calc(112px + env(safe-area-inset-top)); } }

/* ---------- the Esc menu as Roblox's 2024 in-experience menu: a wide dark panel, icon tabs, and Leave · Respawn ·
   Resume with their keys ---------- */
.rx-menu { background: rgba(0, 0, 0, .5); backdrop-filter: blur(6px); }
.rx-menu-box { width: min(860px, 94vw); height: min(620px, 88vh); max-height: none; background: rgba(25, 26, 31, .97); border-radius: 18px; box-shadow: 0 24px 80px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .06); }
.rx-menu-tabs { gap: 4px; padding: 10px 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.rx-menu-tabs button { flex: 0 1 180px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 14px 13px; border-radius: 10px 10px 0 0; color: #bdbec6; font: 700 15px "Figtree", sans-serif; border-bottom: 3px solid transparent; transition: color .12s, background .12s; }
.rx-menu-tabs button svg { width: 20px; height: 20px; flex: none; }
.rx-menu-tabs button:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.rx-menu-tabs button.on { color: #fff; border-color: #fff; }
.rx-menu-body { flex: 1 1 auto; min-height: 0; padding: 16px 20px; }
.rx-menu-actions { gap: 10px; padding: 14px 20px 18px; border-top: 1px solid rgba(255, 255, 255, .08); flex-wrap: nowrap; }
.rx-menu-actions .rx-mb { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 0; height: 48px; padding: 0 14px; border-radius: 10px; background: rgba(255, 255, 255, .1); font: 700 15.5px "Figtree", sans-serif; }
.rx-menu-actions .rx-mb:hover { background: rgba(255, 255, 255, .17); }
.rx-menu-actions .rx-mb svg { width: 20px; height: 20px; flex: none; }
.rx-menu-actions .rx-mb kbd { order: 3; margin-left: 2px; min-width: 22px; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .12); border: 0; color: #d6d8de; font: 700 12px "Figtree", sans-serif; }
.rx-menu-actions .rx-mb.rx-primary { background: #fff; color: #121215; }
.rx-menu-actions .rx-mb.rx-primary:hover { background: #e9eaee; }
.rx-menu-actions .rx-mb.rx-primary kbd { background: rgba(0, 0, 0, .08); color: #3a3c44; }
.rx-touchmode .rx-menu-actions .rx-mb kbd { display: none; }
@media (max-width: 700px), (max-height: 500px) {
  .rx-menu-box { width: 100%; height: 100%; border-radius: 14px; }
  .rx-menu-tabs { padding: 6px 8px 0; }
  .rx-menu-tabs button { flex: 1 1 0; padding: 9px 6px 10px; font-size: 14px; gap: 6px; }
  .rx-menu-tabs button svg { width: 18px; height: 18px; }
  .rx-menu-actions { gap: 6px; padding: 8px 10px 10px; }
  .rx-menu-actions .rx-mb { height: 42px; padding: 0 8px; font-size: 14px; gap: 6px; }
  .rx-menu-actions .rx-mb kbd { display: none; }
}
@media (max-width: 420px) { .rx-menu-tabs button span { font-size: 13px; } .rx-menu-tabs button svg { display: none; } .rx-menu-bux { margin-right: 4px; } }
@media (min-width: 1800px) and (min-height: 1000px) { .rx-menu-box { width: 1000px; height: 700px; } }

/* chat as Roblox's TextChatService window (2023–): dark glass, white Builder-Sans-like text with a dark stroke; when
   idle only the box fades, the messages stay readable */
.rx-chat.idle { opacity: 1; }
.rx-chat-log { background: rgba(25, 27, 29, .62); font-weight: 600; text-shadow: 0 0 2px rgba(0, 0, 0, .85), 0 1px 2px rgba(0, 0, 0, .6); transition: background .4s; }
.rx-chat-in { transition: opacity .4s; }
.rx-chat.idle .rx-chat-log { background: rgba(25, 27, 29, 0); }
.rx-chat.idle .rx-chat-in { opacity: .45; }
.rx-chat-in input { background: rgba(25, 27, 29, .72); font-weight: 600; }
.rx-chat-in input::placeholder { color: rgba(255, 255, 255, .62); }
