/* 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: rgba(255,255,255,.5); }
.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); }
.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(--accent, #c8ff3d); }
.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; }
.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; border-bottom: 1px solid rgba(255,255,255,.1); }
.we-tabs button { flex: 1; 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: #c8ff3d; }
.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: #c8ff3d; color: #0b0b0b; border-color: #c8ff3d; }
.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: #c8ff3d; }
.we-sel { border: 1px solid rgba(200,255,61,.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: #c8ff3d; }
.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: #c8ff3d; 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: #c8ff3d; 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: #c8ff3d; color: #c8ff3d; }
.wv-mic.talking { background: #c8ff3d; color: #0c0e11; border-color: #c8ff3d; }
.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: #c8ff3d; color: #0c0e11; border-color: #c8ff3d; }
.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: #c8ff3d; }
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)); }
}
