/* 2.5 worlds, the walk-in store, the world builder. Flat: no glow, no shadows. */
html, body.wv { margin: 0; height: 100%; overflow: hidden; background: #0c0e11; touch-action: none; overscroll-behavior: none; }
.wv-view { position: fixed; inset: 0; }
.wv-canvas { display: block; width: 100%; height: 100%; outline: none; }
.wv-ui { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.wv-ui > * { pointer-events: auto; }
.wv-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; pointer-events: none; }
.wv-top > * { pointer-events: auto; }
.wv-top .sp { flex: 1; pointer-events: none; }
.wv-b { appearance: none; border: 1px solid rgba(255,255,255,.22); background: rgba(10,12,15,.42); color: #fff; border-radius: 12px; padding: 9px 13px; font: 600 13px var(--font); cursor: pointer; text-decoration: none; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.wv-b:hover { border-color: var(--hi); } /* 3.9.13 */
.wv-t { display: flex; flex-direction: column; color: #fff; background: rgba(10,12,15,.42); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 6px 12px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); min-width: 0; }
.wv-t b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.wv-t span { font-size: 11px; color: rgba(255,255,255,.7); }
.wv-hint { position: absolute; left: 50%; top: calc(66px + env(safe-area-inset-top)); transform: translateX(-50%); color: #fff; background: rgba(10,12,15,.42); border: 1px solid rgba(255,255,255,.14); border-radius: 20px; padding: 6px 14px; font-size: 12px; white-space: nowrap; transition: opacity 1.2s; pointer-events: none; }
.wv-hint.fade { opacity: 0; }
.wv-hint:empty { display: none; }
/* the semi-translucent controls */
.wv-stick { position: absolute; left: calc(24px + env(safe-area-inset-left)); bottom: calc(28px + env(safe-area-inset-bottom)); width: 128px; height: 128px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.35); background: rgba(255,255,255,.07); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); touch-action: none; }
.wv-stick i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(255,255,255,.42); border: 1px solid rgba(255,255,255,.6); }
.wv-updown { position: absolute; right: calc(20px + env(safe-area-inset-right)); bottom: calc(40px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.wv-updown[hidden] { display: none; }
.wv-updown button { width: 54px; height: 54px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #fff; font-size: 16px; touch-action: none; }
.wv-near { position: absolute; left: 50%; bottom: calc(34px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; color: #fff; background: rgba(10,12,15,.55); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 8px 10px 8px 14px; font-size: 13px; max-width: 80vw; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.wv-near b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.wv-panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, 92vw); }
/* 2.6.1: an open item card sits above the touch controls and fits the screen; the joystick and up/down
   buttons step aside while it is open, so they never cover its Buy button */
.wv-panel { z-index: 6; max-height: calc(100% - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow: auto; }
.wv-panel .wv-img { max-height: 40vh; }
body:has(#panel:not([hidden])) .wv-stick, body:has(#panel:not([hidden])) .wv-updown { visibility: hidden; }
.wv-card { background: rgba(14,16,20,.92); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; overflow: hidden; color: #f4f4f2; }
.wv-img { aspect-ratio: 1; background: #0b0b0c center/contain no-repeat; }
.wv-b2, .wv-card .wv-b { padding: 14px 16px; }
.wv-card > .wv-b { background: none; border: 0; border-radius: 0; backdrop-filter: none; cursor: default; padding: 14px 16px; font-weight: 400; }
.wv-k { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #9a9da2; }
.wv-card h3 { margin: 4px 0 6px; font-size: 18px; }
.wv-price { font-size: 15px; font-weight: 600; }
.wv-xrgo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.55); }
.wv-err { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); max-width: 86vw; }
.wv-fx { position: fixed; inset: 0; z-index: 20; pointer-events: none; opacity: 0; transition: opacity .6s ease; }
.wv-fx.on { opacity: 1; }
/* avatar picker */
.wv-avprev { display: flex; justify-content: center; background: #0b0c0f; border-radius: 12px; margin: 8px 0; }
.wv-avprev canvas { width: 320px; height: 240px; max-width: 100%; }
.wv-lab { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; }
.wv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wv-chip { border: 1px solid var(--line2); background: var(--surface2); color: var(--text); border-radius: 10px; padding: 7px 11px; font: 600 12px var(--font); cursor: pointer; }
.wv-chip.on { border-color: var(--hi,#4fd1ff); }
.wv-faces { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.wv-face { padding: 0; border: 2px solid transparent; border-radius: 10px; background: #000; cursor: pointer; overflow: hidden; }
.wv-face canvas { width: 100%; display: block; image-rendering: pixelated; }
.wv-face.on { border-color: #fff; }
/* 2.8.0 people in the avatar picker */
.wv-tabs { display: flex; gap: 6px; margin: 4px 0 2px; }
.wv-tabs button { flex: 1; border: 1px solid var(--line2); background: var(--surface2); color: var(--text); border-radius: 10px; padding: 8px; font: 600 12px var(--font); cursor: pointer; }
.wv-tabs button.on { border-color: var(--hi,#4fd1ff); color: var(--hi,#4fd1ff); }
.wv-avgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; }
.wv-avtile { padding: 0; min-width: 0; height: auto; align-items: stretch; border: 2px solid transparent; border-radius: 10px; background: #15171b; cursor: pointer; overflow: hidden; color: var(--text); display: flex; flex-direction: column; }
.wv-avtile img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; display: block; flex: none; }
.wv-avtile span { font: 600 10px var(--font); padding: 4px 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wv-avtile.on { border-color: var(--hi,#4fd1ff); }
@media (max-width: 420px) { .wv-avgrid { grid-template-columns: repeat(4, 1fr); } }
.wv-col { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.wv-col.on { border-color: #fff; outline: 2px solid #000; }
/* the builder panel */
.we-panel { position: absolute; right: calc(10px + env(safe-area-inset-right)); top: calc(62px + env(safe-area-inset-top)); bottom: 12px; width: 340px; display: flex; flex-direction: column; background: rgba(14,16,20,.9); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; color: #eceae6; font-size: 13px; overflow: hidden; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.we-panel.min { bottom: auto; }
.we-panel.min .we-body { display: none; }
.we-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid rgba(255,255,255,.1); }
.we-tabs button { flex: 1 0 22%; appearance: none; background: none; border: 0; color: #a9acb1; padding: 10px 4px; font: 600 12px var(--font); cursor: pointer; border-bottom: 2px solid transparent; }
.we-tabs button.on { color: #fff; border-bottom-color: var(--hi,#4fd1ff); }
.we-tabs [data-close] { flex: 0 0 34px; }
.we-body { overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.we-row { display: flex; flex-wrap: wrap; gap: 6px; }
.we-tool { appearance: none; border: 1px solid rgba(255,255,255,.2); background: transparent; color: #fff; border-radius: 9px; padding: 7px 10px; font: 600 12px var(--font); cursor: pointer; }
.we-tool.on { background: var(--hi,#4fd1ff); color: #0b0b0b; border-color: var(--hi,#4fd1ff); }
.we-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #a9acb1; }
.we-f b { color: #fff; font-weight: 600; }
.we-f input:not([type=range]):not([type=color]), .we-f select, .we-f textarea, .we-search { background: #0b0c0f; border: 1px solid rgba(255,255,255,.16); color: #fff; border-radius: 8px; padding: 7px 9px; font: 13px var(--font); }
.we-f input[type=range] { width: 100%; }
.we-c { flex-direction: row; align-items: center; justify-content: space-between; }
.we-c input { width: 40px; height: 28px; border: 0; background: none; padding: 0; }
.we-check { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: #d7d8da; }
.we-note { margin: 0; font-size: 12px; color: #a9acb1; }
.we-d { border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 8px 10px; }
.we-d summary { cursor: pointer; font-weight: 600; }
.we-d[open] { display: flex; flex-direction: column; gap: 8px; }
.we-lib { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.we-asset { appearance: none; border: 1px solid rgba(255,255,255,.12); background: #0b0c0f; border-radius: 9px; padding: 0; cursor: pointer; overflow: hidden; color: #d7d8da; text-align: left; }
.we-asset span { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; background: #17191d center/cover no-repeat; font-size: 10px; color: #777; }
.we-asset i { display: block; font-style: normal; font-size: 10px; padding: 4px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.we-asset.on { border-color: var(--hi,#4fd1ff); }
.we-sel { border: 1px solid rgba(242,244,247,.45); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.we-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.we-plist { display: flex; flex-direction: column; gap: 4px; }
.we-pi { appearance: none; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.12); background: none; color: #fff; border-radius: 9px; padding: 7px 9px; cursor: pointer; font: 13px var(--font); text-align: left; }
.we-pi.on { border-color: var(--hi,#4fd1ff); }
.we-pi i { width: 34px; height: 10px; border-radius: 5px; flex: none; }
.we-pi small { color: #8f9297; margin-left: auto; }
.we-stats { font-family: var(--mono); font-size: 11px; color: #f2f4f7; border-top: 1px solid rgba(255,255,255,.1); padding-top: 8px; }
@media (max-width: 720px) {
  .we-panel { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 46vh; }
  body.editing .wv-stick { bottom: calc(46vh + 22px); }
  body.editing.panel-min .wv-stick { bottom: calc(28px + env(safe-area-inset-bottom)); }
}
/* the worlds list */
.wl-worlds { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.wl-world { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.wl-world .im { aspect-ratio: 16/9; background: #15171b center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: #6d7075; font-size: 12px; }
.wl-world .b { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.wl-world h3 { margin: 0; font-size: 16px; }
.wl-world .row { margin-top: auto; }
.wl-world.store .im { background: #0d0f12; color: #f2f4f7; font-weight: 700; letter-spacing: .2em; }
/* 2.5.1: a piece that is a video (or an image shown as-is) in the panel */
.wv-card video.wv-img, .wv-card img.wv-img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: #0b0b0c; }
/* 2.5.3 voice chat: the mic button, People, and the voice panel */
.wv-mic { position: absolute; right: calc(20px + env(safe-area-inset-right)); bottom: calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 76px; height: 76px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.35); background: rgba(10,12,15,.5); color: #fff; font: 600 10px var(--font); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.wv-mic.on { border-color: var(--hi,#4fd1ff); color: var(--hi,#4fd1ff); }
.wv-mic.talking { background: var(--hi,#4fd1ff); color: #0c0e11; border-color: var(--hi,#4fd1ff); }
.wv-people { position: absolute; right: calc(20px + env(safe-area-inset-right)); bottom: calc(114px + env(safe-area-inset-bottom)); }
.wv-hear { position: absolute; left: 50%; top: calc(70px + env(safe-area-inset-top)); transform: translateX(-50%); }
.wv-vpanel { position: absolute; right: calc(20px + env(safe-area-inset-right)); bottom: calc(160px + env(safe-area-inset-bottom)); width: min(320px, calc(100vw - 40px)); max-height: 56vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px; color: #f4f4f2; background: rgba(14,16,20,.92); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; font-size: 13px; }
.vp-modes { display: flex; gap: 6px; }
.vp-modes .btn.on { background: var(--hi,#4fd1ff); color: #0c0e11; border-color: var(--hi,#4fd1ff); }
.vp-list { display: flex; flex-direction: column; gap: 6px; }
.vp-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
.vp-row i { width: 10px; height: 10px; border-radius: 50%; }
.vp-row b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-row small { color: #a7abb1; }
.vp-row.talk small { color: #f2f4f7; }
body.editing .wv-mic { right: calc(366px + env(safe-area-inset-right)); }
body.editing .wv-people { right: calc(366px + env(safe-area-inset-right)); }
body.editing .wv-vpanel { right: calc(366px + env(safe-area-inset-right)); }
@media (max-width: 720px) {
  body.editing .wv-mic, body.editing .wv-people, body.editing .wv-vpanel { right: calc(14px + env(safe-area-inset-right)); }
  body.editing .wv-mic { bottom: calc(46vh + 22px); }
  body.editing .wv-people { bottom: calc(46vh + 108px); }
  body.editing .wv-vpanel { bottom: calc(46vh + 150px); }
  body.editing.panel-min .wv-mic { bottom: calc(28px + env(safe-area-inset-bottom)); }
  body.editing.panel-min .wv-people { bottom: calc(114px + env(safe-area-inset-bottom)); }
}

/* 2.7.0: ground layers, the world weight meter */
.we-gl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.we-gs { appearance: none; border: 1px solid rgba(255,255,255,.14); background: #0b0c0f; border-radius: 8px; padding: 0; cursor: pointer; overflow: hidden; color: #d7d8da; }
.we-gs span { display: block; aspect-ratio: 1; background: #17191d center/cover no-repeat; }
.we-gs i { display: block; font-style: normal; font-size: 9.5px; padding: 3px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.we-gs.on { border-color: var(--hi,#4fd1ff); box-shadow: 0 0 0 1px var(--hi,#4fd1ff); }
.we-weight { margin-top: 10px; padding: 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.we-weight .row { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.we-wbar { height: 6px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.we-wbar i { display: block; height: 100%; }
.we-cats { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; }
.we-cats button { appearance: none; border: 1px solid rgba(255,255,255,.16); background: transparent; color: #cfd1d4; border-radius: 14px; padding: 4px 9px; font: 600 11px var(--font); cursor: pointer; }
.we-cats button.on { background: var(--hi,#4fd1ff); color: #0b0b0b; border-color: var(--hi,#4fd1ff); }

/* 3.0.0 combat HUD */
.cb { position: absolute; inset: 0; pointer-events: none; }
.cb-cross { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; }
.cb-cross i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.cb-cross i::after { content: ''; position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px; background: #fff; border-radius: 50%; }
.cb-mark { position: absolute; left: 50%; top: calc(50% - 34px); transform: translateX(-50%); color: #ffd23d; font: 800 15px var(--font); text-shadow: 0 1px 2px #000; opacity: 0; }
.cb-mark.on { animation: cbmark .6s ease-out; }
@keyframes cbmark { 0% { opacity: 1; transform: translate(-50%, 0) scale(1.3); } 100% { opacity: 0; transform: translate(-50%, -18px) scale(1); } }
.cb-vig { position: absolute; inset: 0; opacity: 0; transition: opacity .25s; }
.cb-vig.on { opacity: 1; transition: none; }
.cb-vig.hurt { box-shadow: inset 0 0 140px 30px rgba(220, 20, 40, .55); }
.cb-vig.heal { box-shadow: inset 0 0 140px 30px rgba(60, 220, 120, .4); }
.cb-vig.freeze { box-shadow: inset 0 0 160px 40px rgba(120, 200, 255, .55); }
.cb-vig.burn { box-shadow: inset 0 0 160px 40px rgba(255, 120, 20, .5); }
.cb-feed { position: absolute; right: calc(14px + env(safe-area-inset-right)); top: calc(70px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.cb-feed div { background: rgba(10,12,15,.55); color: #fff; font: 600 12px var(--font); padding: 4px 9px; border-radius: 8px; }
.cb-safe { position: absolute; left: 50%; top: calc(104px + env(safe-area-inset-top)); transform: translateX(-50%); background: rgba(60,220,120,.22); border: 1px solid rgba(60,220,120,.6); color: #d1fae5; font: 700 12px var(--font); padding: 4px 12px; border-radius: 14px; }
.cb-bottom { position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cb-hp { display: flex; align-items: center; gap: 10px; color: #fff; font: 700 12px var(--font); text-shadow: 0 1px 2px #000; }
.cb-hp[hidden] { display: none; }
.cb-hpbar { width: 200px; height: 10px; border-radius: 6px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.25); overflow: hidden; }
.cb-hpbar i { display: block; height: 100%; width: var(--hp, 100%); background: linear-gradient(90deg, #ef4444, #facc15 35%, #4ade80 70%); transition: width .15s; }
.cb-hp span { color: #ffd23d; min-width: 70px; }
.cb-bar { display: flex; gap: 6px; pointer-events: auto; }
.cb-bar[hidden] { display: none; }
/* 3.10.55 the bar folds: the handle opens it, it folds again by itself; gone at a game */
.cb-tog { pointer-events: auto; background: rgba(10,12,15,.62); color: #e5e7eb; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; font: 700 11px var(--font); padding: 4px 12px; cursor: pointer; letter-spacing: .04em; }
.cb-tog:hover { background: rgba(30,34,40,.8); }
body.cb-min .cb-bottom .cb-hp, body.cb-min .cb-bottom .cb-bar { display: none !important; }
body.in-sport .cb-bottom, body.in-sport .cb-touch, body.in-sport .cb-lockhint { display: none !important; }
.cb-slot { position: relative; width: 52px; height: 52px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,.25); background: rgba(10,12,15,.55); padding: 0; cursor: pointer; overflow: hidden; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cb-slot img { width: 100%; height: 100%; object-fit: contain; }
.cb-slot em { color: #fff; font: 700 14px var(--font); font-style: normal; }
.cb-slot.on { border-color: var(--hi,#4fd1ff); box-shadow: 0 0 0 2px rgba(79,209,255,.35); }
.cb-slot .k { position: absolute; left: 4px; top: 2px; color: rgba(255,255,255,.75); font: 700 10px var(--font); }
.cb-slot .n { position: absolute; right: 3px; bottom: 2px; color: #fff; background: rgba(0,0,0,.6); border-radius: 6px; padding: 0 4px; font: 700 10px var(--font); }
.cb-slot.boost { border-style: dashed; }
.cb-ko { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(40, 0, 6, .45); color: #fff; }
.cb-ko[hidden] { display: none; }
.cb-ko b { font: 800 30px var(--font); letter-spacing: .04em; }
.cb-ko span { font: 600 14px var(--font); }
.cb-touch { position: absolute; right: calc(16px + env(safe-area-inset-right)); bottom: calc(150px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; pointer-events: auto; }
.cb-touch[hidden] { display: none; }
.cb-touch button { width: 64px; height: 64px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.4); background: rgba(255,255,255,.1); color: #fff; font: 700 12px var(--font); touch-action: none; }
.cb-touch [data-tfire] { width: 78px; height: 78px; background: rgba(239,68,68,.35); border-color: rgba(255,120,120,.8); }
.cb-lockhint { position: absolute; left: 50%; top: calc(66px + env(safe-area-inset-top)); transform: translateX(-50%); color: #fff; background: rgba(10,12,15,.5); border-radius: 14px; padding: 5px 12px; font: 600 12px var(--font); white-space: nowrap; }
.cb-lockhint[hidden], .cb-cross[hidden], .cb-safe[hidden] { display: none; }
body.combat-on .wv-near { bottom: calc(110px + env(safe-area-inset-bottom)); }
/* 3.1.0 sports: the score bug, the ticker, the controls, the meters, the strike zone and the Sports panel */
.sp-hud { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.sp-hud button, .sp-hud select, .sp-hud canvas { pointer-events: auto; }
.sp-top { position: absolute; left: 50%; top: calc(60px + env(safe-area-inset-top)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sp-bug { display: flex; align-items: stretch; gap: 0; background: rgba(8,9,11,.82); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; overflow: hidden; color: #fff; font: 600 13px var(--font); }
.sp-team { display: flex; align-items: center; gap: 8px; padding: 6px 12px; position: relative; }
.sp-team i { width: 6px; align-self: stretch; background: var(--c); border-radius: 3px; }
.sp-team b { font-weight: 800; letter-spacing: .04em; }
.sp-team span { font: 800 20px var(--font); min-width: 26px; text-align: center; color: #ffd23d; }
.sp-team em { width: 7px; height: 7px; border-radius: 50%; background: #f2f4f7; }
.sp-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px 14px; background: rgba(255,255,255,.06); min-width: 110px; }
.sp-mid b { font: 800 14px var(--font); }
.sp-mid span { font: 600 11px var(--font); color: #c9d1d9; }
.sp-rows { display: flex; flex-direction: column; padding: 4px 8px; gap: 2px; }
.sp-row { display: flex; align-items: center; gap: 6px; font: 600 12px var(--font); min-width: 120px; }
.sp-row b { flex: 1; }
.sp-row i { width: 6px; height: 14px; background: var(--c); border-radius: 2px; flex: none; }
.sp-row em { font-style: normal; color: #c9d1d9; min-width: 12px; }
.sp-row span { color: #ffd23d; font-weight: 800; }
.sp-row small { color: #c9d1d9; }
.sp-tick { background: rgba(8,9,11,.6); color: #fff; font: 600 13px var(--font); padding: 5px 12px; border-radius: 10px; max-width: 86vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-tick:empty { display: none; }
.sp-side { position: absolute; right: calc(12px + env(safe-area-inset-right)); top: calc(60px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 6px; }
.sp-ctl { position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; max-width: 94vw; }
.sp-ctl .btn { pointer-events: auto; }
.sp-hint { background: rgba(8,9,11,.6); color: #fff; font: 600 12px var(--font); padding: 6px 10px; border-radius: 10px; }
.sp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; width: min(760px, 94vw); max-height: 38vh; overflow: auto; pointer-events: auto; }
.sp-card { appearance: none; text-align: left; border: 1px solid rgba(255,255,255,.2); background: rgba(10,12,15,.78); color: #fff; border-radius: 10px; padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.sp-card b { font: 700 13px var(--font); }
.sp-card small { font: 600 11px var(--font); color: #9aa4ae; text-transform: capitalize; }
.sp-card.on { border-color: var(--hi,#4fd1ff); background: rgba(79,209,255,.16); }
.sp-targets { display: flex; gap: 6px; }
.sp-club { pointer-events: auto; background: rgba(10,12,15,.8); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; padding: 7px 8px; font: 600 13px var(--font); }
.sp-meter { position: absolute; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sp-meter[hidden] { display: none; }
.sp-mbar { position: relative; width: min(360px, 80vw); height: 16px; border-radius: 8px; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.3); overflow: hidden; }
.sp-mbar i { position: absolute; left: 0; top: 0; bottom: 0; background: #f2f4f7; }
.sp-mbar span { position: absolute; left: 0; top: 0; bottom: 0; border-right: 3px solid #ffd23d; }
.sp-mbar b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #ffffff; }
.sp-meter em { font: 600 12px var(--font); font-style: normal; color: #fff; background: rgba(8,9,11,.6); padding: 2px 8px; border-radius: 8px; }
.sp-zone { position: absolute; right: calc(16px + env(safe-area-inset-right)); bottom: calc(150px + env(safe-area-inset-bottom)); }
.sp-zone[hidden] { display: none; }
.sp-zone canvas { width: 180px; height: 220px; border-radius: 12px; touch-action: none; cursor: crosshair; }
.sp-pedals { display: grid; grid-template-columns: 64px 64px 1fr 84px 84px; gap: 8px; width: 94vw; pointer-events: auto; }
.sp-pedals button { appearance: none; height: 64px; border-radius: 14px; border: 1px solid rgba(255,255,255,.3); background: rgba(10,12,15,.6); color: #fff; font: 700 15px var(--font); touch-action: none; }
.sp-pedals button:nth-child(3) { grid-column: 4; }
.sp-pedals .go { background: rgba(79,209,255,.25); border-color: var(--hi,#4fd1ff); }
.sp-panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, 94vw); max-height: 80vh; overflow: auto; z-index: 7; padding: 14px; }
.sp-ph { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.sp-ph b { font: 800 16px var(--font); }
.sp-venue { border-top: 1px solid rgba(255,255,255,.1); padding: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.sp-venue > div:first-child { display: flex; justify-content: space-between; gap: 8px; }
.sp-venue span { color: #9aa4ae; font: 600 12px var(--font); }
.sp-live { font: 600 13px var(--font); }
.sp-live b { color: #ff5a3d; margin-right: 6px; }
.sp-live em { font-style: normal; color: #f2f4f7; font-size: 12px; }
.sp-form { display: flex; flex-direction: column; gap: 10px; }
.sp-form label { display: flex; flex-direction: column; gap: 4px; font: 600 12px var(--font); color: #c9d1d9; }
.sp-form select, .sp-form input[type=number] { background: rgba(255,255,255,.06); color: #fff; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 8px; font: 600 13px var(--font); }
.sp-modes { display: flex; flex-direction: column; gap: 4px; }
.sp-radio { flex-direction: row !important; align-items: center; gap: 8px !important; color: #fff !important; }
.sp-foot { margin-top: 10px; font: 600 12px var(--font); }
.sp-foot a { color: #f2f4f7; }
/* 3.1.0 the menu drawer: one Menu button; "Keep buttons on screen" brings them back to the top bar */
#menuBtn { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; }
#menuBtn.on { border-color: var(--hi,#4fd1ff); }
.wv-drawer { position: absolute; top: calc(8px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); bottom: auto; width: min(300px, 86vw); max-height: calc(100% - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow: auto; z-index: 8; display: flex; flex-direction: column; gap: 10px; padding: 12px; background: rgba(10,12,15,.9); border: 1px solid rgba(255,255,255,.16); border-radius: 16px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; }
.wv-drawer[hidden] { display: none; }
.wv-dh { display: flex; align-items: center; justify-content: space-between; }
.wv-dh b { font: 800 15px var(--font); }
.wv-dstat { font: 600 12px var(--font); color: rgba(255,255,255,.75); }
.wv-dstat:empty { display: none; }
.wv-dlist { display: flex; flex-direction: column; gap: 6px; }
.wv-dlist .wv-b { position: static; width: 100%; text-align: left; padding: 11px 13px; }
.wv-dlist .wv-b[hidden] { display: none; }
.wv-dpin { display: flex; align-items: center; gap: 8px; font: 600 13px var(--font); border-top: 1px solid rgba(255,255,255,.1); padding-top: 10px; }
.wv-dnote { font: 500 11px var(--font); color: rgba(255,255,255,.55); }
body:not(.wv-pinned) .wv-t { max-width: calc(100vw - 120px); }

.sp-hud.sp-passive .sp-side { display: none; }
@media (max-width: 640px) {
  .sp-top { top: calc(58px + env(safe-area-inset-top)); }
  .sp-bug { font-size: 12px; } .sp-team { padding: 5px 8px; } .sp-team span { font-size: 17px; } .sp-mid { min-width: 84px; padding: 3px 8px; }
  .sp-side { top: auto; bottom: calc(176px + env(safe-area-inset-bottom)); right: calc(10px + env(safe-area-inset-right)); }
  .sp-zone { bottom: calc(230px + env(safe-area-inset-bottom)); }
  .sp-zone canvas { width: 140px; height: 171px; }
}

/* 3.5.0 rides */
.wv-rides { display: grid; gap: 8px; margin-top: 10px; }
.wv-ride { border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; background: var(--surface2); }
.wv-ride.off { opacity: 0.55; }
.wv-ride-h { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.wv-ride-h .muted { font-size: 12px; }
.wv-ride [data-go] { justify-self: start; }
/* 3.5.1 rides to buy */
.wv-chip.wv-buy { border-style: dashed; }
.wv-chip.wv-buy::before { content: ''; display: inline-block; width: 8px; height: 10px; margin-right: 6px; border: 2px solid currentColor; border-radius: 2px 2px 1px 1px; vertical-align: -1px; opacity: 0.7; }

/* 3.6.0 WONDERLAND LAND: the park bar, the action button, the ride readout, the carnival games */
.pk-bar { position: absolute; left: 12px; top: calc(70px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 14px; background: rgba(10,12,15,.55); border: 1px solid rgba(255,255,255,.18); color: #fff; font: 600 13px var(--font); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 5; }
.pk-bar .pill { background: #f2c230; color: #1a1300; border: 0; }
.pk-act { position: absolute; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom)); transform: translateX(-50%); appearance: none; border: 1px solid rgba(255,255,255,.3); background: rgba(10,12,15,.62); color: #fff; border-radius: 14px; padding: 12px 18px; font: 700 15px var(--font); cursor: pointer; z-index: 6; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); white-space: nowrap; }
.pk-act.ready { background: #ff4dd2; border-color: #ff4dd2; color: #fff; }
.pk-riding { position: absolute; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translateX(-50%); display: flex; gap: 12px; align-items: baseline; padding: 8px 14px; border-radius: 12px; background: rgba(10,12,15,.55); color: #fff; font: 600 13px var(--font); z-index: 6; }
.pk-riding b { font-size: 22px; font-variant-numeric: tabular-nums; }
.pk-list { display: grid; gap: 8px; }
.pk-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px; background: var(--surface2); }
.pk-prizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pk-prize { display: grid; gap: 6px; justify-items: center; text-align: center; border: 1px solid var(--line2); border-radius: 12px; padding: 10px; background: var(--surface2); }
.pk-prize img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
.pk-game { position: absolute; left: 0; right: 0; top: 0; padding: calc(70px + env(safe-area-inset-top)) 12px 0; display: grid; gap: 8px; justify-items: center; pointer-events: none; z-index: 8; }
.pk-game > * { pointer-events: auto; }
.pk-game-top { display: flex; gap: 14px; align-items: center; padding: 8px 12px; border-radius: 12px; background: rgba(10,12,15,.6); color: #fff; font: 600 14px var(--font); }
.pk-game-top [data-score] { color: #f2c230; font-weight: 800; font-variant-numeric: tabular-nums; }
.pk-game-how { padding: 6px 10px; border-radius: 10px; background: rgba(10,12,15,.45); color: #e8e8e8; font: 500 12px var(--font); max-width: min(560px, 92vw); text-align: center; }
.pk-meter { width: min(320px, 80vw); height: 14px; border-radius: 7px; background: linear-gradient(90deg, #ff3a3a 0 45%, #ffd23d 45% 64%, #3dd66b 64% 80%, #ffd23d 80% 90%, #ff3a3a 90%); position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.4); }
.pk-meter i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-right: 3px solid #fff; background: rgba(0,0,0,.25); }
/* 3.6.0 hunting, fishing, marinas */
.hunt-fish, .marina-helm { position: absolute; right: 12px; bottom: calc(190px + env(safe-area-inset-bottom)); z-index: 5; }
.marina-helm { bottom: calc(236px + env(safe-area-inset-bottom)); background: rgba(15,42,68,.75); }
.hunt-chip { position: absolute; left: 12px; bottom: calc(18px + env(safe-area-inset-bottom)); display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 12px; background: rgba(10,12,15,.5); color: #fff; font: 600 12px var(--font); z-index: 5; }
.hunt-hud { position: absolute; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; padding: 10px 12px; border-radius: 14px; background: rgba(10,12,15,.65); color: #fff; font: 600 13px var(--font); z-index: 7; max-width: min(520px, 94vw); }
.hunt-bar { width: 100%; height: 10px; border-radius: 5px; background: rgba(255,255,255,.15); overflow: hidden; }
.hunt-bar i { display: block; height: 100%; width: 0; background: #f2f4f7; }
.hunt-bar.prog i { background: #22d3ee; }
/* 3.6.0 premium avatars in the picker */
.wv-avtile { position: relative; }
.wv-avtile .wv-pro { position: absolute; top: 6px; right: 6px; font: 800 10px var(--font); letter-spacing: .08em; font-style: normal; padding: 2px 6px; border-radius: 6px; background: #f2c230; color: #1a1300; }
.wv-avtile[disabled] { opacity: .45; cursor: not-allowed; }

/* 3.6.2 premium avatars listed for sale: locked until bought */
.wv-avtile.locked img { filter: grayscale(0.6) brightness(0.75); }
.wv-avtile.locked .wv-pro { background: #ffb020; color: #111; }

/* 3.6.4 emotes */
.wv-emq { position: fixed; left: 12px; bottom: 96px; display: flex; flex-direction: column; gap: 6px; z-index: 40; }
.wv-emq[hidden] { display: none; }
.wv-emlist { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; }
.wv-emrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line, #2a313b); padding-top: 6px; }
/* 3.6.5: pressed and hovered buttons show it */
.wv-b { transition: background-color .12s ease, border-color .12s ease, transform .06s ease; }
.wv-b:hover { background: rgba(255,255,255,.14); }
.wv-b:active { transform: translateY(1px) scale(.97); background: rgba(255,255,255,.22); }
/* 3.7.7 the zoom sight (hunting bow) */
.cb-scope { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, transparent 0, transparent 31vmin, rgba(6,8,10,.9) 31.2vmin); }
.cb-scope[hidden] { display: none; }
.cb-scope-ring { position: absolute; left: 50%; top: 50%; width: 62vmin; height: 62vmin; margin: -31vmin 0 0 -31vmin; border-radius: 50%; border: 2px solid rgba(0,0,0,.75); }
.cb-scope i { position: absolute; background: rgba(10,10,10,.85); }
.cb-scope i.h { left: calc(50% - 31vmin); width: 62vmin; top: 50%; height: 1px; }
.cb-scope i.v { top: calc(50% - 31vmin); height: 62vmin; left: 50%; width: 1px; }
.cb-scope b { position: absolute; left: 50%; top: calc(50% + 6vmin); transform: translateX(-50%); font: 600 13px/1 system-ui, sans-serif; color: #f2f2f2; background: rgba(0,0,0,.55); padding: 3px 7px; border-radius: 6px; }
.cb.scoped .cb-cross { display: none; }
/* 3.7.7 hunt lands */
.hl-hud { position: absolute; left: calc(12px + env(safe-area-inset-left)); top: calc(64px + env(safe-area-inset-top)); max-width: min(320px, calc(100vw - 24px)); background: rgba(16,18,22,.84); color: #fff; border-radius: 12px; padding: 10px 12px; font: 13px/1.4 system-ui, sans-serif; z-index: 6; }
.hl-hud.min { padding: 7px 11px; } /* 3.9.7: folded to one line: the land and the time left (tap to open) */
.hl-hud .hl-head { display: flex; align-items: center; gap: 8px; width: 100%; appearance: none; background: none; border: 0; color: inherit; font: inherit; padding: 0; margin: 0; cursor: pointer; text-align: left; }
.hl-hud .hl-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-hud .hl-head i { font-style: normal; opacity: .7; font-size: 11px; transition: transform .15s; }
.hl-hud.min .hl-head i { transform: rotate(-90deg); }
.hl-hud .hl-body[hidden] { display: none; }
.hl-hud .hl-head .hl-left { flex: none; font-size: 11px; opacity: .75; }
.hl-hud[hidden] { display: none; }
.hl-hud b { font-size: 14px; }
.hl-hud .hl-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
.hl-hud .hl-small { font-size: 12px; opacity: .8; }
.hl-hud button { margin-top: 8px; }
.hl-pick { position: absolute; left: 50%; bottom: calc(120px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 7; }
.hl-pick[hidden] { display: none; }
.hl-banner { position: fixed; left: 50%; top: 22%; transform: translateX(-50%); background: rgba(16,18,22,.92); color: #fff; border-radius: 14px; padding: 16px 22px; text-align: center; font: 600 16px/1.4 system-ui, sans-serif; z-index: 41; max-width: calc(100vw - 32px); }
.hl-banner small { display: block; font-weight: 400; font-size: 13px; opacity: .85; margin-top: 4px; }
.hl-banner[hidden] { display: none; }
.hl-fade { position: fixed; inset: 0; background: #10151a; opacity: 0; pointer-events: none; transition: opacity .22s; z-index: 40; }
.hl-fade.on { opacity: 1; }
/* 3.7.8 the console's test mode in a hunt land: where everything is, and a quick way to it */
.hl-test { position: absolute; right: calc(12px + env(safe-area-inset-right)); top: calc(64px + env(safe-area-inset-top)); width: 252px; background: rgba(16,18,22,.9); color: #fff; border-radius: 12px; padding: 10px; z-index: 6; font: 13px/1.35 system-ui, sans-serif; border: 1px solid rgba(255,196,64,.55); }
.hl-test[hidden] { display: none; }
.hl-test .hl-tag { display: inline-block; background: #ffc440; color: #1b1405; font-weight: 700; font-size: 11px; letter-spacing: .06em; border-radius: 6px; padding: 2px 7px; }
.hl-test .hl-note { font-size: 11px; opacity: .78; margin: 6px 0; }
.hl-test svg { display: block; width: 100%; height: auto; aspect-ratio: 464 / 300; border-radius: 8px; background: #0d1210; cursor: crosshair; margin: 4px 0 6px; }
.hl-test .hl-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hl-test .hl-btns .btn { margin: 0; font-size: 12px; padding: 6px 8px; }
.hl-test .hl-key { display: flex; gap: 10px; font-size: 11px; opacity: .8; margin-bottom: 4px; flex-wrap: wrap; }
.hl-test .hl-key i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }
.hl-test-min { position: absolute; right: calc(12px + env(safe-area-inset-right)); top: calc(64px + env(safe-area-inset-top)); z-index: 6; }
.hl-test-min[hidden] { display: none; }
.hl-hud .hl-testtag { background: #ffc440; color: #1b1405; font-weight: 700; font-size: 10px; border-radius: 5px; padding: 1px 6px; margin-left: 6px; letter-spacing: .05em; }

/* 3.8.9 the hunter's map: the land, your trail, the beast last seen, your mark */
.hl-map { position: absolute; right: calc(12px + env(safe-area-inset-right)); top: calc(64px + env(safe-area-inset-top)); width: 236px; background: rgba(16,18,22,.9); color: #fff; border-radius: 12px; padding: 8px; z-index: 6; font: 12px/1.35 system-ui, sans-serif; border: 1px solid rgba(255,255,255,.12); }
.hl-map.big { width: min(520px, calc(100vw - 24px)); }
.hl-map.below { top: calc(470px + env(safe-area-inset-top)); }
.hl-map[hidden] { display: none; }
.hl-map-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 4px; }
.hl-map-top .btn { margin: 0 0 0 4px; padding: 2px 8px; font-size: 11px; }
.hl-map svg { display: block; width: 100%; height: auto; aspect-ratio: 480 / 320; border-radius: 8px; background: #0d1210; cursor: crosshair; }
.hl-map-key { display: flex; gap: 9px; flex-wrap: wrap; font-size: 10.5px; opacity: .8; margin: 5px 0 2px; }
.hl-map-key i { display: inline-block; width: 9px; height: 9px; margin-right: 4px; vertical-align: -1px; border-radius: 50%; }
.hl-map-key .k-you { background: var(--map,#4ade80); border-radius: 2px; }
.hl-map-key .k-trail { background: none; border-top: 2px dotted #9dffb0; border-radius: 0; height: 0; width: 12px; vertical-align: 2px; }
.hl-map-key .k-seen { background: rgba(255,90,61,.3); border: 1px dashed #ff5a3d; }
.hl-map-key .k-mark { background: #ffd34d; }
.hl-map-note { font-size: 11px; opacity: .85; margin-top: 3px; }
.hl-map-note a { color: #f2f4f7; }
.hl-map-btn { position: absolute; right: calc(12px + env(safe-area-inset-right)); top: calc(64px + env(safe-area-inset-top)); z-index: 6; }
.hl-map-btn small { opacity: .6; font-size: 10px; margin-left: 4px; }
.hl-map-btn[hidden] { display: none; }
.hl-map-btn.below { top: calc(470px + env(safe-area-inset-top)); }
@media (max-width: 640px) { .hl-map { width: 190px; } .hl-map.below { top: calc(64px + env(safe-area-inset-top)); left: calc(12px + env(safe-area-inset-left)); right: auto; } }
/* 3.9.7: on a phone the map (and its button) opens under the hunt panel's line, not over it; the panel, when open, is drawn over the map */
@media (max-width: 640px) { body:has(.hl-hud:not([hidden])) .hl-map:not(.big), body:has(.hl-hud:not([hidden])) .hl-map-btn { top: calc(108px + env(safe-area-inset-top)); } .hl-hud:not(.min) { z-index: 7; background: rgba(16,18,22,.97); } }

/* 3.8.9 proximity text chat: the Chat button, its window, and the small card when someone asks */
.wv-chat { position: absolute; right: calc(112px + env(safe-area-inset-right)); bottom: calc(114px + env(safe-area-inset-bottom)); }
.wv-chat.on { background: rgba(79,209,255,.18); border-color: rgba(79,209,255,.6); }
.wv-chat b { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: #ff5a3d; color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.wv-chat b[hidden] { display: none; }
.tc-win { position: absolute; right: calc(20px + env(safe-area-inset-right)); bottom: calc(160px + env(safe-area-inset-bottom)); width: min(320px, calc(100vw - 40px)); height: min(380px, 52vh); display: flex; flex-direction: column; background: rgba(14,16,20,.94); color: #fff; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; z-index: 12; font: 13px/1.4 var(--font, system-ui, sans-serif); }
.tc-win[hidden] { display: none; }
.tc-top { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px 7px 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.tc-top .btn { margin: 0 0 0 4px; padding: 3px 8px; font-size: 11px; }
.tc-body { flex: 1; overflow: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.tc-h { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .55; margin: 4px 0 0; }
.tc-row { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); color: inherit; border-radius: 10px; padding: 7px 9px; cursor: pointer; font: inherit; }
.tc-row:disabled { opacity: .5; cursor: default; }
.tc-row i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.tc-row span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tc-row small { opacity: .65; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-row em { font-style: normal; background: #ff5a3d; border-radius: 9px; padding: 0 6px; font-size: 11px; }
.tc-empty, .tc-note { opacity: .65; font-size: 12px; }
.tc-msg { max-width: 82%; align-self: flex-start; background: rgba(255,255,255,.08); border-radius: 12px 12px 12px 4px; padding: 6px 9px; word-wrap: break-word; }
.tc-msg.me { align-self: flex-end; background: rgba(242,244,247,.16); border-radius: 12px 12px 4px 12px; }
.tc-msg small { display: block; opacity: .5; font-size: 10px; margin-top: 2px; text-align: right; }
.tc-end { align-self: center; margin-top: 4px; }
.tc-send { display: flex; gap: 6px; padding: 8px; border-top: 1px solid rgba(255,255,255,.08); }
.tc-send[hidden] { display: none; }
.tc-send input { flex: 1; min-width: 0; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #fff; border-radius: 9px; padding: 7px 9px; font: inherit; }
.tc-send .btn { margin: 0; }
.tc-cards { position: fixed; left: 50%; top: calc(66px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 45; display: flex; flex-direction: column; gap: 8px; width: min(300px, calc(100vw - 32px)); pointer-events: none; }
.tc-card { pointer-events: auto; background: rgba(20,23,28,.97); color: #fff; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 10px 12px; font: 13px/1.4 var(--font, system-ui, sans-serif); opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s; }
.tc-card.in { opacity: 1; transform: none; }
.tc-card-top { display: flex; align-items: center; gap: 7px; }
.tc-card-top i { width: 10px; height: 10px; border-radius: 50%; }
.tc-card-top small { opacity: .6; }
.tc-card-text { margin: 5px 0 8px; opacity: .9; word-wrap: break-word; }
.tc-card-btns { display: flex; gap: 8px; justify-content: flex-end; }
.tc-card-btns .btn { margin: 0; }
body.editing .wv-chat { right: calc(458px + env(safe-area-inset-right)); }
body.editing .tc-win { right: calc(366px + env(safe-area-inset-right)); }
/* 3.9.7: phones - the health bar (and its numbers and ammo) runs up the left side above the joystick, and the
   hotbar sits beside the joystick, so nothing is drawn over the stick */
@media (max-width: 820px), (pointer: coarse) {
  .cb-bottom { display: contents; }
  .cb-hp { position: absolute; left: calc(14px + env(safe-area-inset-left)); bottom: calc(176px + env(safe-area-inset-bottom)); flex-direction: column-reverse; align-items: flex-start; gap: 5px; font-size: 11px; }
  .cb-hpbar { width: 10px; height: min(150px, 26vh); position: relative; }
  .cb-hpbar i { position: absolute; left: 0; right: 0; bottom: 0; width: auto; height: var(--hp, 100%); background: linear-gradient(0deg, #ef4444, #facc15 35%, #4ade80 70%); transition: height .15s; }
  .cb-hp span { min-width: 0; }
  .cb-hp span:empty { display: none; }
  .cb-bar { position: absolute; left: calc(166px + env(safe-area-inset-left)); bottom: calc(28px + env(safe-area-inset-bottom)); max-width: calc(100vw - 252px); overflow-x: auto; scrollbar-width: none; }
  .cb-bar::-webkit-scrollbar { display: none; }
  .cb-slot { flex: none; }
  .cb-slot { width: 46px; height: 46px; }
  .hl-hud { max-width: min(320px, calc(100vw - 24px)); }
}
/* 3.9.9 THE MAP (world-map.js) */
.wm { position: fixed; inset: 0; z-index: 45; background: rgba(6,9,12,.94); display: flex; flex-direction: column; color: #fff; font: 13px var(--font, system-ui); }
.wm[hidden] { display: none; }
.wm-top { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 8px; }
.wm-top b { font-size: 15px; }
.wm-sp { flex: 1; }
.wm-tabs { display: flex; gap: 4px; margin-left: 8px; }
.wm-tabs button, .wm-b { appearance: none; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: #fff; border-radius: 9px; padding: 6px 11px; font: 600 12px var(--font, system-ui); cursor: pointer; }
.wm-tabs button.on { background: rgba(79,209,255,.18); border-color: rgba(79,209,255,.6); }
.wm-c { flex: 1; width: 100%; min-height: 0; touch-action: none; cursor: grab; }
.wm-card { position: absolute; left: 50%; bottom: calc(52px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: rgba(16,18,22,.95); border: 1px solid rgba(255,255,255,.15); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 220px; max-width: calc(100vw - 32px); }
.wm-card[hidden] { display: none; }
.wm-card small { opacity: .75; }
.wm-card .btn { align-self: flex-start; margin: 0; }
.wm-key { display: flex; gap: 14px; justify-content: center; padding: 6px 0 calc(10px + env(safe-area-inset-bottom)); font-size: 11px; opacity: .8; }
.wm-key i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.wm-key .me { background: var(--map,#4ade80); } .wm-key .pp { background: #3fe6d4; } .wm-key .hw { background: #5b5f66; border-radius: 2px; } .wm-key .dk { background: #ff7ad9; border-radius: 2px; }
/* 3.9.12 chart a course (world-map.js) */
.wm-course { display: flex; gap: 6px; flex-wrap: wrap; }
.wm-course[hidden], .wm-course [hidden] { display: none; }
.wm-b.on { background: rgba(255,211,77,.2); border-color: #ffd34d; }
.wm-b.wm-go { background: rgba(242,244,247,.2); border-color: rgba(242,244,247,.7); }
/* 3.9.13: the PC headset list beside the Headset button */
select.wv-b.wv-pick { max-width: 210px; padding: 8px 10px; color-scheme: dark; }
select.wv-b.wv-pick option { background: #14181d; color: #e9ecf0; }
select.wv-b.wv-pick:hover, select.wv-b.wv-pick:focus { border-color: var(--hi); outline: none; }
#dList select.wv-b.wv-pick { width: 100%; max-width: none; text-align: left; }

/* 3.9.17 a building's levels on the Map */
.wm-lv { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.wm-lv b { min-width: 34px; }
.wm-lv small { flex: 1; }
.wm-lv select { flex: 1; background: #14181d; color: #e9ecf0; border: 1px solid #38414d; border-radius: 8px; padding: 6px; color-scheme: dark; }

/* 3.9.49 the loading screen: the TWR logo and a bar over the world, then it fades in */
.wv-load { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, #242a35 0%, #12151b 62%, #0b0d11 100%); color: #e9edf3; transition: opacity .8s ease; }
.wv-load.out { opacity: 0; pointer-events: none; }
.wv-load-in { display: grid; justify-items: center; gap: 14px; width: min(340px, calc(100vw - 32px)); }
.wv-load img { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 18px 60px rgba(0,0,0,.55); animation: wvLoadPulse 2.4s ease-in-out infinite; }
.wv-load-t { font: 600 15px/1.3 system-ui, sans-serif; letter-spacing: .04em; text-align: center; opacity: .9; min-height: 20px; }
.wv-load-bar { width: 100%; height: 6px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.wv-load-bar i { display: block; height: 100%; background: #4fd1ff; transform-origin: 0 50%; transform: scaleX(.04); }
.wv-load-pct { font: 500 12px/1 system-ui, sans-serif; opacity: .6; font-variant-numeric: tabular-nums; }
@keyframes wvLoadPulse { 50% { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .wv-load img { animation: none; } .wv-load { transition: none; } }
/* 3.9.60 the GPS (world-gps.js): the where-to sheet, the turn card, the minimap; the map's four tabs fit a phone */
.wm-tabs { flex-wrap: wrap; }
@media (max-width: 640px) { .wm-top { flex-wrap: wrap; } .wm-tabs { order: 5; width: 100%; margin: 4px 0 0; } .wm-tabs button { flex: 1; padding: 6px 4px; } }
.gps-sheet { position: fixed; z-index: 46; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: rgba(10,13,17,.97); color: #fff; display: flex; flex-direction: column; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px calc(10px + env(safe-area-inset-bottom)); border-left: 1px solid rgba(255,255,255,.12); font: 13px var(--font, system-ui); }
.gps-sheet[hidden] { display: none; }
/* 3.9.62 the sales lot's salesmen (world-dealers.js): the Talk chip and the little chat */
.dl-chip { position: fixed; z-index: 28; left: 50%; transform: translateX(-50%); bottom: calc(150px + env(safe-area-inset-bottom)); background: rgba(14,96,58,.92); border-color: rgba(255,255,255,.4); }
.dl-chip[hidden] { display: none; }
.dl-talk { position: fixed; z-index: 46; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: min(380px, calc(100vw - 24px)); max-height: 60vh; display: flex; flex-direction: column; background: rgba(10,13,17,.96); color: #fff; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; font: 13px var(--font, system-ui); }
.dl-talk[hidden] { display: none; }
.dl-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.1); }
.dl-log { flex: 1; overflow: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.dl-m { line-height: 1.35; } .dl-m b { opacity: .7; margin-right: 4px; } .dl-m.me { color: #c9e7ff; }
.dl-f { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid rgba(255,255,255,.1); }
.dl-f input { flex: 1; min-width: 0; appearance: none; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.07); color: #fff; border-radius: 9px; padding: 8px 10px; font: 14px var(--font, system-ui); outline: none; }
.gps-sh { display: flex; align-items: center; gap: 8px; } .gps-sh b { font-size: 16px; letter-spacing: .04em; } .gps-sp { flex: 1; }
.gps-q { appearance: none; width: 100%; box-sizing: border-box; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.07); color: #fff; border-radius: 11px; padding: 11px 12px; font: 15px var(--font, system-ui); outline: none; }
.gps-q:focus { border-color: #3d8bff; }
.gps-f { display: flex; gap: 6px; flex-wrap: wrap; }
.gps-f button { appearance: none; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.05); color: #fff; border-radius: 999px; padding: 6px 11px; font: 600 12px var(--font, system-ui); cursor: pointer; }
.gps-f button.on { background: rgba(61,139,255,.25); border-color: #3d8bff; }
.gps-list { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 4px; -webkit-overflow-scrolling: touch; }
.gps-row { appearance: none; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; border-radius: 10px; background: rgba(255,255,255,.04); color: #fff; padding: 9px 10px; cursor: pointer; font: inherit; }
.gps-row:hover, .gps-row:focus { background: rgba(61,139,255,.16); outline: none; }
.gps-n { flex: 1; min-width: 0; display: flex; flex-direction: column; } .gps-n b, .gps-n small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .gps-n small, .gps-t small { opacity: .65; font-size: 11px; }
.gps-t { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.gps-k { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #9aa4ad; }
.gps-k.k-city { background: #ff7ac0; } .gps-k.k-start { background: #4ade80; } .gps-k.k-landmark { background: #ffd34d; } .gps-k.k-district { background: #b18cff; } .gps-k.k-park { background: #5fcf7a; } .gps-k.k-station { background: #e8b923; border-radius: 2px; }
.gps-k.k-world { background: #4ade80; border-radius: 3px; } .gps-k.k-builder { background: #9fb7ff; border-radius: 3px; } .gps-k.k-airport, .gps-k.k-flight { background: #4fd1ff; } .gps-k.k-home { background: #ff7ad9; } .gps-k.k-shop { background: #c8ff3d; border-radius: 3px; } .gps-k.k-exit { background: #e3b341; }
.gps-empty { opacity: .7; padding: 18px 6px; text-align: center; }
.gps-adm { border-top: 1px solid rgba(255,255,255,.12); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; } .gps-adm[hidden] { display: none; }
.gps-nav { position: fixed; z-index: 30; top: calc(58px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(460px, calc(100vw - 24px)); background: rgba(14,96,58,.94); color: #fff; border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.35); overflow: hidden; font: 13px var(--font, system-ui); }
.gps-nav[hidden] { display: none; }
.gps-turn { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.gps-ins { flex: 1; min-width: 0; display: flex; flex-direction: column; } .gps-ins b { font-size: 16px; line-height: 1.2; } .gps-ins small { opacity: .85; margin-top: 2px; }
.gps-end { appearance: none; border: 1px solid rgba(255,255,255,.4); background: rgba(0,0,0,.18); color: #fff; border-radius: 9px; padding: 7px 11px; font: 600 12px var(--font, system-ui); cursor: pointer; }
.gps-modes { display: flex; background: rgba(0,0,0,.25); }
.gps-modes button { appearance: none; flex: 1; border: 0; background: none; color: #fff; padding: 6px 2px 7px; display: flex; flex-direction: column; align-items: center; cursor: pointer; font: inherit; border-top: 2px solid transparent; }
.gps-modes button b { font-size: 13px; } .gps-modes button small { font-size: 10px; opacity: .75; text-transform: uppercase; letter-spacing: .06em; }
.gps-modes button.on { border-top-color: #fff; background: rgba(255,255,255,.1); } .gps-modes button:disabled { opacity: .4; cursor: default; }
.gps-mini { position: fixed; z-index: 29; left: 12px; top: calc(62px + env(safe-area-inset-top)); width: 140px; height: 140px; border-radius: 50%; box-shadow: 0 6px 18px rgba(0,0,0,.45); cursor: pointer; }
.gps-mini[hidden] { display: none; }
@media (max-width: 720px) { .gps-nav { top: calc(52px + env(safe-area-inset-top)); } .gps-mini { top: auto; bottom: calc(190px + env(safe-area-inset-bottom)); left: auto; right: 12px; } .gps-ins b { font-size: 14px; } }
/* 3.9.66 on touch screens: the piece you are by (its Open) and the salesman's Talk sit above the stick, the Chat and Mic buttons, not on them */
@media (pointer: coarse) {
  .wv-near, body.combat-on .wv-near { bottom: calc(206px + env(safe-area-inset-bottom)); }
  .dl-chip { bottom: calc(262px + env(safe-area-inset-bottom)); }
}
