/* Real World: the map canvas fills the stage; HUD, sheets and touch controls are DOM on top. Every class is rwo-. */
.rwo { --ink: #0f172a; --glass: rgba(15, 23, 42, .78); --line: rgba(255,255,255,.14); --acc: #7c5cff; --gold: #ffb703; --go: #16a34a; --bad: #ef4444; --mint: #2dd4bf;
  display: flex; flex-direction: column; color: #fff; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.rwo [hidden] { display: none !important; }
.rwo-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); min-height: 360px; overflow: hidden; border-radius: 12px;
  background: #c5e3a0; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; outline: none; touch-action: none; contain: layout paint; }
@media (max-width: 760px) and (orientation: portrait) { .rwo-stage { aspect-ratio: auto; height: min(82vh, 175vw); height: min(82dvh, 175vw); max-height: none; border-radius: 10px; } }
.stage.is-immersive .stage-body > .rwo { min-height: 0; flex: 1 1 auto; }
.stage.is-immersive .rwo-stage { flex: 1 1 auto; height: auto; aspect-ratio: auto; max-height: none; min-height: 0; border-radius: 0; }
.stage.is-immersive .rwo-help { display: none; }
.rwo-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.rwo-help { margin: 8px 2px 0; font: 13px/1.5 system-ui, sans-serif; color: #b9c6e4; text-align: center; }
.rwo-help kbd { display: inline-block; min-width: 1.4em; padding: 0 5px; margin: 0 1px; border-radius: 5px; background: #1c2440; border: 1px solid #33406a; color: #dfe9ff; font: inherit; font-size: 12px; text-align: center; }
.rwo .rwo-hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .rwo .rwo-hint-kb { display: none; } .rwo .rwo-hint-touch { display: inline; } }
.rwo-loading { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; background: linear-gradient(160deg, #38bdf8, #a7f3d0 60%, #fde68a); font: 700 19px system-ui, sans-serif; color: var(--ink); z-index: 40; }
.rwo-spin { width: 44px; height: 44px; border-radius: 50%; border: 6px solid rgba(124,92,255,.25); border-top-color: var(--acc); animation: rwo-rot .8s linear infinite; }
@keyframes rwo-rot { to { transform: rotate(360deg); } }
.rwo-credit { position: absolute; right: 6px; bottom: 4px; z-index: 6; font: 10px/1.3 system-ui, sans-serif; color: #1f2937; background: rgba(255,255,255,.7); padding: 1px 6px; border-radius: 6px; text-decoration: none; }

/* ---------- HUD ---------- */
.rwo-hud { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.rwo-hud > * { pointer-events: auto; }
.rwo-where { position: absolute; left: max(10px, env(safe-area-inset-left)); top: 10px; max-width: calc(100% - 200px); padding: 7px 12px; border-radius: 14px; background: var(--glass); backdrop-filter: blur(6px); box-shadow: 0 4px 14px rgba(0,0,0,.25); pointer-events: none; }
.rwo-where b { display: block; font-size: 15px; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rwo-where span { display: block; font-size: 11.5px; color: #c7d2fe; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rwo-speed { position: absolute; left: max(10px, env(safe-area-inset-left)); top: 64px; padding: 4px 10px; border-radius: 12px; background: var(--glass); pointer-events: none; }
.rwo-speed b { font: 800 22px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; } .rwo-speed small { margin-left: 4px; color: #c7d2fe; font-size: 11px; }
.rwo-side { position: absolute; right: max(10px, env(safe-area-inset-right)); top: 10px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.rwo-mini { width: 150px; height: 150px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 4px 16px rgba(0,0,0,.3); background: #c5e3a0; cursor: pointer; }
.rwo-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 220px; }
.rwo-b { position: relative; display: flex; align-items: center; gap: 5px; padding: 7px 10px; border: 0; border-radius: 12px; background: var(--glass); color: #fff; font: 700 12.5px system-ui, sans-serif; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.22); }
.rwo-b svg { width: 17px; height: 17px; } .rwo-b:hover { background: rgba(124,92,255,.9); }
.rwo-dot { position: absolute; right: 4px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: #f43f5e; }
.rwo-prompt { position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 16px; background: var(--glass); font: 700 14px system-ui, sans-serif; box-shadow: 0 4px 16px rgba(0,0,0,.3); white-space: nowrap; cursor: pointer; }
.rwo-prompt kbd { padding: 1px 7px; border-radius: 6px; background: #fff; color: var(--ink); font: 800 13px system-ui, sans-serif; }
.rwo-prompt .rwo-warn { color: #fecaca; } .rwo-prompt .rwo-ok { color: #bbf7d0; }
.rwo-job { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); min-width: 220px; max-width: calc(100% - 360px); padding: 8px 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(124,92,255,.92), rgba(45,212,191,.9)); text-align: center; font: 700 13px system-ui, sans-serif; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.rwo-job b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; } .rwo-job button { margin-top: 4px; }
.rwo-toasts { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; z-index: 8; }
.rwo-toast { padding: 9px 14px; border-radius: 14px; background: rgba(15,23,42,.9); font: 600 13.5px system-ui, sans-serif; box-shadow: 0 6px 18px rgba(0,0,0,.3); animation: rwo-in .25s ease-out; max-width: min(92vw, 460px); text-align: center; }
.rwo-toast.rwo-good { background: linear-gradient(135deg, #16a34a, #0d9488); } .rwo-toast.rwo-bad { background: linear-gradient(135deg, #dc2626, #b91c1c); } .rwo-toast.rwo-gold { background: linear-gradient(135deg, #f59e0b, #ef4444); }
@keyframes rwo-in { from { transform: translateY(-8px); opacity: 0; } }
/* chat */
.rwo-chat { position: absolute; left: max(10px, env(safe-area-inset-left)); bottom: 26px; width: min(360px, calc(100% - 20px)); display: flex; flex-direction: column; gap: 5px; pointer-events: none; }
.rwo-chat > * { pointer-events: auto; }
.rwo-log { display: flex; flex-direction: column; gap: 3px; max-height: 132px; overflow: hidden; pointer-events: none; }
.rwo-log p { margin: 0; padding: 3px 9px; border-radius: 10px; background: rgba(15,23,42,.62); font: 13px/1.35 system-ui, sans-serif; width: fit-content; max-width: 100%; overflow-wrap: anywhere; }
.rwo-log p b { color: #fde68a; } .rwo-log p.rwo-dm b { color: #c4b5fd; } .rwo-log p.rwo-sys { color: #a5f3fc; font-style: italic; }
.rwo-say { display: flex; gap: 6px; } .rwo-say input { flex: 1; min-width: 0; padding: 8px 11px; border-radius: 12px; border: 2px solid rgba(255,255,255,.25); background: rgba(15,23,42,.85); color: #fff; font: 14px system-ui, sans-serif; }
.rwo-say button { border: 0; border-radius: 12px; padding: 0 12px; background: var(--acc); color: #fff; font-size: 15px; cursor: pointer; }
.rwo-say:not(.rwo-open) { display: none; }
.rwo-quick { display: flex; flex-wrap: wrap; gap: 5px; padding: 7px; border-radius: 14px; background: rgba(15,23,42,.9); max-height: 150px; overflow: auto; }
.rwo-quick button { border: 0; border-radius: 10px; padding: 5px 9px; background: rgba(255,255,255,.12); color: #fff; font: 600 12.5px system-ui, sans-serif; cursor: pointer; }
.rwo-quick button:hover { background: var(--acc); } .rwo-quick p { width: 100%; margin: 2px 2px 4px; font-size: 11.5px; color: #c7d2fe; }
.rwo-chatbtn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--glass); font-size: 18px; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.25); }

/* ---------- sheets (property card, shop, map, people, my things) ---------- */
.rwo-sheet { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; background: rgba(8,12,28,.35); padding: 12px; }
.rwo-sheet-in { position: relative; width: min(560px, 100%); max-height: 100%; overflow: auto; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 20px 50px rgba(0,0,0,.4); padding: 18px 18px 16px; overscroll-behavior: contain; touch-action: pan-y; user-select: text; -webkit-user-select: text; }
.rwo-sheet.rwo-wide .rwo-sheet-in { width: min(860px, 100%); }
.rwo-sheet.rwo-full .rwo-sheet-in { width: 100%; height: 100%; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.rwo-x { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #eef2ff; color: var(--ink); font: 700 18px system-ui; cursor: pointer; z-index: 3; }
.rwo-h { margin: 0 40px 2px 0; font: 800 21px/1.2 system-ui, sans-serif; color: var(--ink); text-transform: none; letter-spacing: 0; }
.rwo-sheet-in p, .rwo-sheet-in li { color: inherit; } .rwo-sheet-in button { font-family: system-ui, sans-serif; } .rwo-sub { margin: 0 0 12px; color: #64748b; font-size: 13px; }
.rwo-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.rwo-tag { padding: 4px 9px; border-radius: 999px; background: #f1f5f9; font: 700 12px system-ui; color: #334155; } .rwo-tag.rwo-lake { background: #e0f2fe; color: #0369a1; } .rwo-tag.rwo-gar { background: #fef3c7; color: #92400e; } .rwo-tag.rwo-dock { background: #ede9fe; color: #5b21b6; }
.rwo-grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 10px 0; }
.rwo-fact { padding: 8px 10px; border-radius: 12px; background: #f8fafc; } .rwo-fact small { display: block; color: #64748b; font-size: 11px; } .rwo-fact b { font-size: 15px; }
.rwo-own { margin: 10px 0; padding: 12px; border-radius: 14px; background: linear-gradient(135deg, #eef2ff, #ecfeff); }
.rwo-own p { margin: 0 0 8px; font-size: 14px; }
.rwo-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.rwo-btn { border: 0; border-radius: 12px; padding: 10px 15px; background: var(--acc); color: #fff; font: 800 14px system-ui, sans-serif; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.rwo-btn:disabled { opacity: .5; cursor: default; } .rwo-btn.rwo-go { background: var(--go); } .rwo-btn.rwo-gold { background: linear-gradient(135deg, #f59e0b, #f97316); } .rwo-btn.rwo-ghost { background: #e2e8f0; color: var(--ink); } .rwo-btn.rwo-danger { background: var(--bad); } .rwo-btn.rwo-sm { padding: 6px 10px; font-size: 12.5px; border-radius: 10px; }
.rwo-num { width: 130px; padding: 9px 10px; border-radius: 12px; border: 2px solid #cbd5e1; font: 700 15px system-ui; color: var(--ink); }
.rwo-coin { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; } .rwo-coin svg { width: 16px; height: 16px; }
.rwo-msg { min-height: 1.2em; margin: 6px 0 0; font-size: 13px; color: #b91c1c; } .rwo-msg.rwo-okm { color: #15803d; }
.rwo-fine { margin: 12px 0 0; font-size: 11.5px; color: #64748b; line-height: 1.45; }
.rwo-list { list-style: none; margin: 6px 0; padding: 0; } .rwo-list li { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #e2e8f0; font-size: 13.5px; }
.rwo-list li:last-child { border-bottom: 0; } .rwo-list small { color: #64748b; }
.rwo-sec { margin: 14px 0 4px; font: 800 13px system-ui; text-transform: uppercase; letter-spacing: .06em; color: #475569; }
.rwo-tabs { display: flex; gap: 6px; margin: 0 40px 10px 0; flex-wrap: wrap; } .rwo-tabs button { border: 0; border-radius: 999px; padding: 7px 13px; background: #f1f5f9; font: 700 13px system-ui; cursor: pointer; color: var(--ink); } .rwo-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
/* the shop */
.rwo-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.rwo-car { border-radius: 16px; padding: 10px; background: linear-gradient(160deg, #f8fafc, #eef2ff); border: 2px solid transparent; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.rwo-car[aria-pressed="true"] { border-color: var(--acc); } .rwo-car canvas { width: 100%; height: 86px; display: block; border-radius: 10px; background: repeating-linear-gradient(90deg, #3f4655 0 30px, #464e5f 30px 60px); }
.rwo-car b { display: block; margin-top: 6px; font-size: 14px; } .rwo-car small { color: #64748b; font-size: 12px; } .rwo-car .rwo-coin { margin-top: 2px; font-size: 14px; }
.rwo-sw { display: flex; gap: 6px; margin: 8px 0; } .rwo-sw button { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #cbd5e1; cursor: pointer; } .rwo-sw button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--acc); }
.rwo-stat { display: grid; grid-template-columns: 70px 1fr; gap: 4px 8px; align-items: center; font-size: 12px; margin: 6px 0; } .rwo-stat i { display: block; height: 7px; border-radius: 4px; background: linear-gradient(90deg, #22d3ee, #7c5cff); }
/* the big map */
.rwo-map { position: relative; flex: 1; min-height: 0; background: #c5e3a0; }
.rwo-map canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.rwo-mapbar { display: flex; gap: 8px; align-items: center; padding: 10px 52px 10px 12px; background: #fff; flex-wrap: wrap; }
.rwo-mapbar input { flex: 1; min-width: 160px; padding: 10px 12px; border-radius: 12px; border: 2px solid #cbd5e1; font: 600 15px system-ui; color: var(--ink); }
.rwo-results { position: absolute; left: 10px; top: 10px; z-index: 2; width: min(340px, calc(100% - 20px)); max-height: 60%; overflow: auto; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.rwo-results button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #e2e8f0; background: #fff; padding: 9px 12px; font: 600 14px system-ui; color: var(--ink); cursor: pointer; } .rwo-results button:hover { background: #eef2ff; } .rwo-results small { display: block; color: #64748b; font-weight: 500; }
.rwo-legend { position: absolute; right: 10px; bottom: 10px; z-index: 2; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.92); color: var(--ink); font: 600 11.5px/1.6 system-ui; }
.rwo-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
/* touch controls */
.rwo-touch { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
.rwo-stick-area { position: absolute; left: 0; bottom: 0; width: 50%; height: 62%; pointer-events: auto; touch-action: none; }
.rwo-knob { position: fixed; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%; background: rgba(255,255,255,.18); border: 3px solid rgba(255,255,255,.55); pointer-events: none; z-index: 30; }
.rwo-knob i { position: absolute; left: 30px; top: 30px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.85); box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.rwo-pad { position: absolute; right: max(12px, env(safe-area-inset-right)); bottom: 26px; display: grid; grid-template-columns: repeat(2, 64px); gap: 10px; pointer-events: auto; }
.rwo-tb { width: 64px; height: 64px; border-radius: 50%; border: 3px solid rgba(255,255,255,.7); background: rgba(15,23,42,.55); color: #fff; font: 800 13px system-ui; touch-action: none; }
.rwo-tb.rwo-on { background: rgba(124,92,255,.85); } .rwo-tb-act { grid-column: span 2; justify-self: end; width: 74px; height: 74px; font-size: 22px; background: rgba(124,92,255,.75); }
.rwo-zoom { position: absolute; right: max(12px, env(safe-area-inset-right)); top: 245px; display: flex; flex-direction: column; gap: 8px; pointer-events: auto; } .rwo-zoom .rwo-tb { width: 42px; height: 42px; font-size: 20px; }
.rwo-touching .rwo-chat { bottom: auto; top: 110px; width: min(300px, 55%); } .rwo-touching .rwo-log { max-height: 90px; }
@media (max-width: 560px) { .rwo-mini { width: 108px; height: 108px; } .rwo-b span { display: none; } .rwo-b { padding: 8px; } .rwo-where { max-width: calc(100% - 150px); } .rwo-job { top: 64px; max-width: 70%; min-width: 0; } .rwo-zoom { top: 200px; } .rwo-toasts { top: 120px; } }
@media (max-height: 460px) { .rwo-mini { width: 96px; height: 96px; } .rwo-b span { display: none; } .rwo-pad { grid-template-columns: repeat(3, 56px); bottom: 12px; } .rwo-tb { width: 56px; height: 56px; } .rwo-tb-act { grid-column: auto; width: 56px; height: 56px; } .rwo-zoom { top: auto; bottom: 12px; right: auto; left: 50%; flex-direction: row; } .rwo-touching .rwo-chat { top: 60px; } }
/* the site styles form fields for its dark pages: the sheets are light */
.rwo-sheet-in input, .rwo-mapbar input { background: #fff; color: var(--ink); border: 2px solid #cbd5e1; box-shadow: none; }
.rwo-sheet-in input:focus, .rwo-mapbar input:focus { outline: 3px solid rgba(124,92,255,.35); border-color: var(--acc); }
.rwo-sheet-in input::placeholder, .rwo-mapbar input::placeholder { color: #94a3b8; }
.rwo-touching .rwo-credit { right: auto; left: 6px; }

/* v2 HUD: heat stars, stamina, damage, sound */
.rwo-heat { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); padding: 5px 14px 6px; border-radius: 14px; background: rgba(40,6,14,.78); color: #fff; text-align: center; pointer-events: none; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.rwo-heat [data-stars] { display: block; font: 800 20px/1 system-ui, sans-serif; letter-spacing: 2px; color: #ffcf33; text-shadow: 0 0 8px rgba(255,80,80,.6); }
.rwo-heat [data-stars] .rwo-off { color: rgba(255,255,255,.25); text-shadow: none; }
.rwo-heat small { display: block; margin-top: 2px; font: 600 11px/1.2 system-ui, sans-serif; color: #ffd6dc; }
.rwo-heat.rwo-flash { animation: rwo-flash .5s steps(2) infinite; }
@keyframes rwo-flash { 50% { background: rgba(14,32,110,.85); } }
.rwo-stam { position: absolute; left: 50%; bottom: 92px; width: 120px; height: 6px; margin-left: -60px; border-radius: 3px; background: rgba(0,0,0,.35); overflow: hidden; pointer-events: none; }
.rwo-stam i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ffb703, #fb8500); transform-origin: left; }
.rwo-speed .rwo-dmg { display: block; width: 64px; height: 4px; margin-top: 4px; border-radius: 2px; background: rgba(255,255,255,.18); overflow: hidden; }
.rwo-speed .rwo-dmg i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd166, #ef476f); }
.rwo-snd[aria-pressed="false"] [data-wave] { display: none; }
.rwo-gl { pointer-events: none; }
.rwo-set { border: 0; margin: 0; padding: 0; } .rwo-set legend { padding: 0; }
.rwo-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 6px 0; border: 2px solid #e2e8f0; border-radius: 12px; cursor: pointer; line-height: 1.35; }
.rwo-opt:has(input:checked) { border-color: #7c5cff; background: #f5f3ff; } .rwo-opt input { margin-top: 3px; accent-color: #7c5cff; } .rwo-opt small { color: #64748b; }
