/* The Herald's world (world.html): full-screen 3D canvas, neon comic HUD with a
   translucent bar along the bottom. */
:root {
  --paper: #f4efff;
  --glass: rgba(12, 9, 26, 0.62);
  --glass2: rgba(24, 18, 48, 0.82);
  --neon: #2ee6ff;
  --pink: #ff3ec8;
  --gold: #ffd23f;
  --common: #b9b9b9;
  --uncommon: #5fd35f;
  --rare: #4aa8ff;
  --mythic: #ff7a1a;
  --pet: #ffd23f;
  --questc: #c77dff;
  --bar: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0a0816; color: var(--paper); font-family: Inter, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
[hidden] { display: none !important; }
#w-root { position: fixed; inset: 0; overflow: hidden; user-select: none; -webkit-user-select: none; }
#w-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: pointer; image-rendering: pixelated; image-rendering: crisp-edges; }
#w-labels, #w-sfx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#w-flash { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle, transparent 40%, rgba(255, 40, 80, .45)); opacity: 0; transition: opacity .25s; }
#w-flash.on { opacity: 1; transition: none; }
.glass { background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* name tags, bubbles, hitsplats */
.w-place { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; white-space: nowrap; pointer-events: none; will-change: transform, opacity; transition: opacity .25s; padding: 4px 10px 5px; border-radius: 9px; background: rgba(10, 6, 24, .45); border: 1px solid rgba(46, 230, 255, .35); box-shadow: 0 0 14px rgba(46, 230, 255, .18), inset 0 0 10px rgba(255, 62, 200, .08); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.w-place b { font: 400 17px/1 Bangers, Impact, sans-serif; letter-spacing: 1.2px; color: #eafcff; text-shadow: 0 0 8px rgba(46, 230, 255, .9), 1px 1px 0 #000; text-transform: uppercase; }
.w-place i { font-style: normal; margin-right: 5px; }
.w-place small { font: 600 10px/1.1 Inter, system-ui, sans-serif; color: #ffd6f4; opacity: .85; letter-spacing: .3px; }
.w-place.district { background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.w-place.district b { font-size: 30px; letter-spacing: 3px; color: rgba(255, 255, 255, .9); text-shadow: 0 0 18px rgba(255, 62, 200, .8), 0 0 4px #000, 2px 2px 0 rgba(0, 0, 0, .6); }
@media (max-width: 760px) { .w-place b { font-size: 14px; } .w-place small { display: none; } .w-place.district b { font-size: 22px; } }
.w-tag { position: absolute; left: 0; top: 0; white-space: nowrap; font: 400 17px/1 VT323, monospace; letter-spacing: .5px; color: #fff; text-shadow: 0 0 4px #000, 1px 1px 0 #000, -1px -1px 0 #000; will-change: transform; }
.w-tag.npc { color: var(--gold); }
.w-tag.boss { color: #ff7a8a; }
.w-tag.me { color: var(--neon); }
.w-tag .g { color: #aaa; font-size: 14px; }
.w-bubble { position: absolute; left: 0; top: 0; max-width: 210px; white-space: normal; text-align: center; background: rgba(255, 255, 255, .95); color: #111; border: 2px solid #000; border-radius: 12px; padding: 4px 8px; font: 600 12px/1.25 Inter, sans-serif; box-shadow: 2px 2px 0 #000; }
.w-bubble.npc { background: #fff6c9; }
.w-floaty { position: absolute; transform: translate(-50%, -100%); font: 800 11px/1 Inter, sans-serif; color: #fff; text-shadow: 0 0 4px #000, 1px 1px 0 #000; animation: floaty 1.5s ease-out forwards; white-space: nowrap; }
.w-floaty.ok { color: #9dff8a; }
.w-floaty.no { color: #ffb0b0; }
.w-floaty.big { font: 400 22px/1 Bangers, Impact, sans-serif; letter-spacing: 1px; color: var(--gold); -webkit-text-stroke: 1px #000; }
@keyframes splat { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 20% { opacity: 1; transform: translate(-50%, -70%) scale(1.15); } 70% { opacity: 1; transform: translate(-50%, -80%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -110%) scale(.9); } }
@keyframes floaty { 0% { opacity: 0; margin-top: 0; } 15% { opacity: 1; } 100% { opacity: 0; margin-top: -30px; } }

/* comic SFX bursts */
.w-burst { position: absolute; transform: translate(-50%, -50%); font-family: Bangers, Impact, sans-serif; font-size: 30px; letter-spacing: 1px; color: #fff200; -webkit-text-stroke: 1.5px #000; text-shadow: 3px 3px 0 #000; padding: 26px 30px; animation: burst 1.3s cubic-bezier(.2, 1.6, .4, 1) forwards; white-space: nowrap; }
.w-burst::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--pink); border: 3px solid #000; box-shadow: 0 0 24px var(--pink); clip-path: polygon(50% 0, 61% 30%, 95% 12%, 74% 42%, 100% 55%, 70% 64%, 84% 96%, 54% 74%, 40% 100%, 34% 70%, 4% 86%, 24% 58%, 0 40%, 30% 36%, 18% 6%, 42% 28%); }
.w-burst.crit::before, .w-burst.level::before { background: #2f6bd3; }
.w-burst.mythic::before { background: #ff7a1a; }
.w-burst.rare::before { background: #4aa8ff; }
.w-burst.fumble::before { background: #6a6a7a; }
.w-burst.death::before { background: #111; }
.w-burst.small { font-size: 20px; padding: 16px 18px; }
@keyframes burst { 0% { transform: translate(-50%, -50%) scale(.2) rotate(-12deg); opacity: 0; } 18% { transform: translate(-50%, -60%) scale(1.15) rotate(4deg); opacity: 1; } 75% { opacity: 1; } 100% { transform: translate(-50%, -90%) scale(1) rotate(0); opacity: 0; } }
#w-combo { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%); pointer-events: none; font: 400 44px/1 Bangers, Impact, sans-serif; letter-spacing: 2px; color: var(--neon); -webkit-text-stroke: 2px #000; text-shadow: 0 0 18px var(--neon), 4px 4px 0 #000; opacity: 0; z-index: 5; }
#w-combo.go { animation: combo .9s cubic-bezier(.2, 1.8, .4, 1) forwards; }
@keyframes combo { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2.2) rotate(-8deg); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-3deg); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%) scale(.9); } }

/* top bar */
#w-topbar { position: absolute; top: 8px; left: 8px; display: flex; gap: 8px; align-items: center; z-index: 3; max-width: calc(100vw - 190px); flex-wrap: wrap; }
.w-home, #w-quality { background: var(--glass); backdrop-filter: blur(6px); color: var(--paper); text-decoration: none; padding: 5px 10px; border: 1px solid rgba(46, 230, 255, .5); border-radius: 8px; font-weight: 800; font-size: 13px; cursor: pointer; }
#w-quality, #w-crt { font-size: 11px; padding: 4px 8px; }
#w-crt { background: var(--glass); color: #8a84a8; border: 1px solid rgba(46, 230, 255, .3); border-radius: 8px; font-weight: 800; cursor: pointer; }
#w-crt.on { color: var(--neon); border-color: var(--neon); }
#w-rain, #w-mapbtn { font-size: 11px; padding: 4px 8px; background: var(--glass); color: #8a84a8; border: 1px solid rgba(46, 230, 255, .3); border-radius: 8px; font-weight: 800; cursor: pointer; }
#w-rain.on { color: var(--neon); border-color: var(--neon); }
#w-mapbtn { color: #ffd23f; border-color: #ffd23f; }
#w-banner { position: absolute; left: 50%; top: 24%; transform: translate(-50%, -50%); pointer-events: none; z-index: 5; font: 400 46px/1 Bangers, Impact, sans-serif; letter-spacing: 3px; color: #fff; -webkit-text-stroke: 2px #000; text-shadow: 0 0 20px var(--dc, #22e8ff), 4px 4px 0 #000; white-space: nowrap; opacity: 0; text-transform: uppercase; }
#w-banner.go { animation: banner 2.8s ease-out forwards; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -50%) scaleX(1.8); letter-spacing: 18px; } 12% { opacity: 1; transform: translate(-50%, -50%) scaleX(1); letter-spacing: 3px; } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%); } }
#w-fullmap { position: absolute; inset: 0; z-index: 8; background: rgba(5, 3, 12, .72); display: flex; align-items: center; justify-content: center; padding: 12px; }
#w-fullmap[hidden] { display: none; }
.w-fullmap-box { background: #0e0a1e; border: 2px solid var(--neon); box-shadow: 0 0 24px rgba(46, 230, 255, .35), 6px 6px 0 #000; border-radius: 8px; padding: 10px; max-width: 100%; display: flex; flex-direction: column; align-items: center; }
.w-fullmap-head { display: flex; gap: 10px; align-items: center; width: 100%; color: #fff; font: 600 13px/1.3 Inter, sans-serif; }
.w-fullmap-head b { font: 400 22px/1 Bangers, Impact, sans-serif; letter-spacing: 1px; color: var(--neon); }
.w-fullmap-head span { flex: 1; color: #ffd23f; }
#w-fullmap-x { background: none; border: 1px solid #555; color: #fff; border-radius: 6px; cursor: pointer; padding: 2px 8px; }
#w-fullmap-c { margin-top: 8px; image-rendering: pixelated; border: 1px solid #333; cursor: crosshair; flex: none; }
.w-fullmap-tip { color: #8a84a8; font: 12px Inter, sans-serif; margin: 6px 0 0; }
@media (max-width: 760px) { #w-banner { font-size: 28px; white-space: normal; width: 92vw; text-align: center; } }
.w-start-rated { margin: 8px 0 0; padding: 6px 8px; border: 1px solid #ff3b5c; border-radius: 8px; background: rgba(255, 59, 92, .12); font-size: 12.5px; color: #ffd0d8; }
.w-start-rated b { background: #ff3b5c; color: #fff; padding: 1px 5px; border-radius: 4px; margin-right: 4px; }
#w-zone { font-family: Bangers, Impact, sans-serif; font-size: 21px; letter-spacing: 1px; color: var(--neon); -webkit-text-stroke: .5px #000; text-shadow: 0 0 10px var(--neon), 2px 2px 0 #000; }
#w-online { font-size: 12px; color: #cfc6e8; text-shadow: 1px 1px 0 #000; }
#w-narr { position: absolute; top: 48px; left: 50%; transform: translateX(-50%); max-width: min(560px, calc(100vw - 200px)); background: rgba(255, 246, 201, .96); color: #1a1200; border: 2px solid #000; box-shadow: 3px 3px 0 #000, 0 0 18px rgba(255, 210, 63, .35); padding: 7px 12px; font: 600 14px/1.35 Inter, sans-serif; z-index: 4; pointer-events: none; animation: narr .3s ease-out; border-radius: 4px; }
#w-narr b { font-family: Bangers, Impact, sans-serif; letter-spacing: 1px; font-weight: 400; color: #7b4dff; margin-right: 6px; font-size: 16px; }
#w-narr.ear { background: rgba(14, 10, 32, .88); color: #dff9ff; border-color: var(--neon); box-shadow: 0 0 14px rgba(46, 230, 255, .4); font-size: 13px; }
#w-narr.ear b { color: var(--neon); font-size: 14px; }
@keyframes narr { from { transform: translate(-50%, -10px); opacity: 0; } }
#w-hover { position: absolute; z-index: 6; pointer-events: none; font: 800 13px/1 Inter, sans-serif; color: #fff; text-shadow: 0 0 4px #000, 1px 1px 0 #000; white-space: nowrap; }
#w-hover em { font-style: normal; color: var(--gold); }

/* minimap */
#w-mapbox { position: absolute; top: 8px; right: 8px; width: 150px; height: 150px; z-index: 3; }
#w-mini { width: 150px; height: 150px; border-radius: 50%; border: 2px solid var(--neon); box-shadow: 0 0 14px rgba(46, 230, 255, .45), 0 0 0 3px #000; background: #000; cursor: crosshair; touch-action: none; display: block; }
#w-compass { position: absolute; left: -6px; top: -4px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #000; background: var(--paper); color: #e0203f; font-weight: 900; font-size: 12px; padding: 0; cursor: pointer; }
#w-xpdrops { position: absolute; top: 166px; right: 14px; width: 150px; height: 120px; pointer-events: none; z-index: 3; }
.w-xp { position: absolute; right: 0; bottom: 0; font: 800 14px/1 Inter, sans-serif; color: #fff; text-shadow: 0 0 4px #000, 1px 1px 0 #000; animation: xpdrop 1.8s linear forwards; white-space: nowrap; }
.w-xp small { color: var(--gold); font-size: 11px; }
@keyframes xpdrop { 0% { bottom: 0; opacity: 1; } 80% { opacity: 1; } 100% { bottom: 110px; opacity: 0; } }

/* bottom bar */
#w-bar { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--bar) + env(safe-area-inset-bottom)); padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; z-index: 6; background: linear-gradient(180deg, rgba(10, 8, 22, .35), rgba(10, 8, 22, .78)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid rgba(46, 230, 255, .35); box-shadow: 0 -1px 12px rgba(255, 62, 200, .18); }
.w-tabs button { position: relative; width: 50px; height: 50px; border-radius: 10px; border: 1px solid rgba(46, 230, 255, .4); background: rgba(255, 255, 255, .06); color: var(--paper); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; transition: transform .08s, background .15s; }
.w-tabs button:active { transform: scale(.92); }
.w-tabs button span { font-size: 19px; line-height: 1; }
.w-tabs button small { font-size: 9px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; }
.w-tabs { display: flex; gap: 4px; }
.w-tabs button { width: 46px; height: 46px; border-color: rgba(255, 62, 200, .35); }
.w-tabs button.on { background: rgba(255, 62, 200, .3); box-shadow: 0 0 12px rgba(255, 62, 200, .6); }
.w-tabs button.ping::after { content: ""; position: absolute; top: 3px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 6px var(--gold); }

/* chat / narration strip */
#w-strip { position: absolute; left: 10px; bottom: calc(var(--bar) + 8px + env(safe-area-inset-bottom)); width: min(470px, calc(100vw - 20px)); z-index: 5; display: flex; flex-direction: column; border-radius: 10px; background: linear-gradient(180deg, transparent, rgba(10, 8, 22, .55) 30%); }
#w-strip .w-chat-tabs { display: none; gap: 2px; padding: 4px 4px 0; }
#w-strip.big { background: var(--glass2); backdrop-filter: blur(8px); border: 1px solid rgba(46, 230, 255, .3); }
#w-strip.big .w-chat-tabs { display: flex; }
.w-chat-tabs button { flex: 1; background: transparent; color: #cfc6e8; border: 0; border-radius: 6px; padding: 4px 0; font-size: 12px; font-weight: 700; cursor: pointer; }
.w-chat-tabs button.on { background: rgba(255, 255, 255, .1); color: #fff; }
#w-log { height: 66px; overflow-y: auto; padding: 4px 8px 0; font-size: 13px; line-height: 1.35; user-select: text; -webkit-user-select: text; overscroll-behavior: contain; text-shadow: 0 0 3px #000, 1px 1px 0 #000; mask-image: linear-gradient(180deg, transparent, #000 35%); -webkit-mask-image: linear-gradient(180deg, transparent, #000 35%); }
#w-strip.big #w-log { height: 200px; mask-image: none; -webkit-mask-image: none; }
#w-log p { margin: 0 0 2px; color: #e9e2ff; word-wrap: break-word; }
#w-log p.herald { color: var(--gold); }
#w-log p.ear { color: #9ff3ff; }
#w-log p.ear b, #w-log p.herald b { color: #ffb86b; }
#w-log p.chat b { color: var(--neon); }
#w-log p.npc { color: #fff6c9; }
#w-log p.npc b { color: var(--gold); }
#w-log p.quest { color: #d6a6ff; }
#w-log p.roll { color: #a99fc7; font-size: 12px; }
#w-log p.hidden { display: none; }
#w-chat-form { display: flex; gap: 4px; padding: 4px; }
#w-chat-input { flex: 1; min-width: 0; background: rgba(0, 0, 0, .45); color: #fff; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; padding: 5px 8px; font-size: 13px; }
#w-strip-toggle { width: 32px; background: rgba(0, 0, 0, .45); color: var(--neon); border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; cursor: pointer; font-size: 11px; }

/* popup panels above the bar */
#w-pop { position: absolute; right: 10px; bottom: calc(var(--bar) + 8px + env(safe-area-inset-bottom)); width: 290px; max-height: min(400px, calc(100vh - var(--bar) - 190px)); overflow-y: auto; z-index: 7; padding: 10px; border-radius: 12px; background: var(--glass2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 62, 200, .45); box-shadow: 0 0 20px rgba(255, 62, 200, .25); overscroll-behavior: contain; animation: pop .18s ease-out; }
@keyframes pop { from { transform: translateY(12px); opacity: 0; } }
.w-pane-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 13px; }
.w-pane-head b { font-family: Bangers, Impact, sans-serif; font-weight: 400; font-size: 20px; letter-spacing: 1px; color: var(--pink); text-shadow: 0 0 8px rgba(255, 62, 200, .6); }
.w-pane-head span { color: #cfc6e8; font-size: 12px; }
.w-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.w-slot { aspect-ratio: 1; background: rgba(0, 0, 0, .4); border: 2px solid #3d2e5c; border-radius: 8px; display: grid; place-items: center; font-size: 25px; position: relative; cursor: pointer; padding: 0; color: inherit; }
.w-slot.r-common { border-color: var(--common); }
.w-slot.r-uncommon { border-color: var(--uncommon); box-shadow: inset 0 0 6px var(--uncommon); }
.w-slot.r-rare { border-color: var(--rare); box-shadow: inset 0 0 8px var(--rare), 0 0 6px var(--rare); }
.w-slot.r-mythic { border-color: var(--mythic); box-shadow: inset 0 0 10px var(--mythic); animation: shimmer 2s infinite; }
.w-slot.r-pet { border-color: var(--pet); }
.w-slot.r-quest { border-color: var(--questc); box-shadow: inset 0 0 8px var(--questc); }
@keyframes shimmer { 50% { box-shadow: inset 0 0 16px var(--mythic), 0 0 10px var(--mythic); } }
.w-slot.empty { cursor: default; }
.w-slot.unfound { filter: grayscale(1) brightness(.4); border-style: dashed; }
.w-slot .n { position: absolute; left: 3px; top: 1px; font-size: 10px; font-weight: 800; color: var(--gold); text-shadow: 1px 1px 0 #000; }
.w-slot.new { animation: newitem .8s ease-out; }
@keyframes newitem { 0% { transform: scale(1.4); box-shadow: 0 0 18px var(--neon); } }
#w-equip { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.w-eq { display: flex; gap: 6px; align-items: center; background: rgba(0, 0, 0, .3); border-radius: 8px; padding: 4px; cursor: pointer; border: 0; color: inherit; text-align: left; }
.w-eq .w-slot { width: 42px; flex: 0 0 42px; font-size: 21px; }
.w-eq small { display: block; color: #cfc6e8; font-size: 10px; text-transform: uppercase; }
.w-eq span { font-size: 11px; line-height: 1.2; }
#w-mods { margin-top: 10px; font-size: 12px; line-height: 1.6; display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
#w-mods b { color: var(--gold); }
.w-skill { margin-bottom: 9px; }
.w-skill-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; }
.w-skill-top span { color: var(--gold); }
.w-bar { height: 8px; background: rgba(0, 0, 0, .5); border-radius: 6px; overflow: hidden; margin-top: 2px; }
.w-bar i { display: block; height: 100%; background: linear-gradient(90deg, #3dff8a, #b5ff6b); box-shadow: 0 0 6px #3dff8a; }
.w-skill small { color: #a99fc7; font-size: 10px; }
.w-skill.renown .w-bar i { background: linear-gradient(90deg, #ffb703, #ffd23f); }
.w-q { background: rgba(0, 0, 0, .3); border-radius: 8px; padding: 6px 8px; margin-bottom: 6px; font-size: 12px; line-height: 1.35; }
.w-q b { display: block; font-size: 13px; }
.w-q.main { border: 1px solid rgba(255, 62, 200, .5); }
.w-q.main b { color: var(--pink); }
.w-q.done b { color: var(--uncommon); }
.w-q.active b { color: var(--gold); }
.w-q.new b { color: #cfc6e8; }
/* skill tree */

/* dialog */
#w-dlg { position: absolute; left: 10px; bottom: calc(var(--bar) + 8px + env(safe-area-inset-bottom)); width: min(540px, calc(100vw - 20px)); background: linear-gradient(180deg, #1e0e38, #0e071e); color: #ece6ff; border: 2px solid #ff2ec4; border-radius: 12px; box-shadow: 4px 4px 0 #000, 0 0 20px rgba(255, 62, 200, .35); display: flex; gap: 10px; padding: 10px; z-index: 8; }
#w-dlg-img { width: 92px; height: 92px; object-fit: cover; border: 2px solid #000; border-radius: 8px; flex: 0 0 92px; background: #ece0c0; }
.w-dlg-main { flex: 1; min-width: 0; }
.w-dlg-name { font-family: Bangers, Impact, sans-serif; font-size: 20px; letter-spacing: 1px; color: #ff6bd6; text-shadow: 0 0 8px rgba(255, 46, 196, .5); }
#w-dlg-text { margin: 2px 0 8px; font-size: 14px; line-height: 1.4; max-height: 120px; overflow-y: auto; }
#w-dlg-text.typing::after { content: " ..."; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }
#w-dlg-opts { display: flex; flex-wrap: wrap; gap: 6px; }
#w-dlg-opts button, #w-dlg-form button, .w-btn { background: #7b4dff; color: #fff; border: 2px solid #000; border-radius: 8px; padding: 6px 10px; font-weight: 800; font-size: 13px; cursor: pointer; box-shadow: 2px 2px 0 #000; }
#w-dlg-opts button.quest { background: #ffb703; color: #1a1200; }
#w-dlg-opts button.fight { background: var(--pink); }
.w-btn:disabled { opacity: .45; cursor: default; }
#w-dlg-form { display: flex; gap: 6px; margin-top: 6px; }
#w-dlg-input { flex: 1; min-width: 0; border: 2px solid #000; border-radius: 8px; padding: 6px 8px; font-size: 14px; }
.w-x { position: absolute; top: 4px; right: 6px; background: transparent; border: 0; font-size: 24px; line-height: 1; cursor: pointer; color: inherit; padding: 2px 6px; }

/* turn-based battle */

/* windows: shop, bank, billboards */
#w-win { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 20px)); max-height: calc(100vh - 40px); background: var(--glass2); backdrop-filter: blur(10px); border: 1px solid rgba(46, 230, 255, .5); border-radius: 12px; box-shadow: 0 0 30px rgba(46, 230, 255, .3); z-index: 10; display: flex; flex-direction: column; }
.w-win-head { padding: 8px 40px 6px 12px; position: relative; }
.w-win-head b { font-family: Bangers, Impact, sans-serif; font-weight: 400; font-size: 22px; letter-spacing: 1px; color: var(--neon); text-shadow: 0 0 10px var(--neon); }
#w-win-body { padding: 0 12px 12px; overflow-y: auto; }
.w-shop-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.w-shop-row .w-slot { width: 40px; flex: 0 0 40px; font-size: 20px; }
.w-shop-row div { flex: 1; font-size: 13px; }
.w-shop-row small { display: block; color: #a99fc7; font-size: 11px; }
.w-note { font-size: 12px; color: #cfc6e8; margin: 6px 0; }
.w-bill img { width: 100%; border: 2px solid var(--neon); border-radius: 8px; background: #ece0c0; display: block; box-shadow: 0 0 16px rgba(46, 230, 255, .4); }
.w-bill p { font-size: 14px; line-height: 1.4; font-style: italic; }
.w-bill a { color: var(--gold); font-weight: 800; }

/* menu, tooltip, toast */
#w-menu { position: absolute; z-index: 12; background: #1a1430; border: 1px solid var(--neon); border-radius: 8px; box-shadow: 0 0 14px rgba(46, 230, 255, .4); min-width: 150px; overflow: hidden; }
#w-menu .t { padding: 5px 10px; font-size: 12px; color: var(--gold); background: #000; font-weight: 800; }
#w-menu button { display: block; width: 100%; text-align: left; background: transparent; color: #fff; border: 0; padding: 9px 10px; font-size: 13px; cursor: pointer; }
#w-menu button:hover, #w-menu button:focus { background: rgba(255, 62, 200, .3); }
#w-tip { position: absolute; z-index: 13; max-width: 230px; background: #0e0a1e; border: 1px solid rgba(46, 230, 255, .5); border-radius: 8px; padding: 6px 8px; font-size: 12px; line-height: 1.35; pointer-events: none; }
#w-tip b { display: block; font-size: 13px; }
#w-tip i { color: #a99fc7; }
#w-toast { position: absolute; top: 96px; left: 50%; transform: translateX(-50%); z-index: 11; background: var(--gold); color: #1a1200; border: 2px solid #000; border-radius: 10px; box-shadow: 3px 3px 0 #000, 0 0 16px rgba(255, 210, 63, .5); padding: 6px 12px; font-weight: 800; font-size: 14px; pointer-events: none; text-align: center; max-width: calc(100vw - 20px); }

/* start screen */
#w-start { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, rgba(255, 62, 200, .35), rgba(10, 8, 22, .94) 70%); padding: 16px; overflow-y: auto; }
.w-start-card { width: min(470px, 100%); background: rgba(14, 10, 32, .92); color: var(--paper); border: 2px solid var(--neon); border-radius: 14px; box-shadow: 0 0 40px rgba(46, 230, 255, .35), 6px 6px 0 #000; padding: 20px; }
.w-start-card h1 { margin: 0; font-family: Bangers, Impact, sans-serif; font-weight: 400; letter-spacing: 2px; font-size: 42px; color: var(--pink); -webkit-text-stroke: 1px #000; text-shadow: 0 0 18px var(--pink), 3px 3px 0 #000; }
.w-start-sub { margin: 6px 0 12px; font-size: 14px; line-height: 1.45; color: #ddd6f5; }
#w-start-who { font-size: 13px; margin-bottom: 8px; color: #cfc6e8; }
#w-start-who a { color: var(--neon); font-weight: 800; }
#w-acct { display: grid; gap: 6px; margin-top: 8px; }
#w-acct input { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.35); color: #fff; }
#w-acct-msg { min-height: 1em; font-size: 12px; color: #ffd23f; }
#w-start-name-row { display: block; font-weight: 800; font-size: 13px; margin-bottom: 10px; }
#w-start-name { display: block; width: 100%; margin-top: 4px; border: 2px solid var(--neon); background: #000; color: #fff; border-radius: 8px; padding: 8px 10px; font-size: 16px; }
#w-enter { width: 100%; background: var(--pink); color: #fff; border: 2px solid #000; border-radius: 10px; box-shadow: 0 0 20px rgba(255, 62, 200, .6), 4px 4px 0 #000; padding: 12px; font-family: Bangers, Impact, sans-serif; font-size: 26px; letter-spacing: 1.5px; cursor: pointer; -webkit-text-stroke: .5px #000; }
#w-enter:disabled { opacity: .6; cursor: wait; }
.w-help { margin: 14px 0 6px; padding-left: 18px; font-size: 13px; line-height: 1.5; color: #ddd6f5; }
.w-start-note { font-size: 12px; color: #a99fc7; margin: 6px 0 0; }

/* phones */
@media (max-width: 760px) {
  :root { --bar: 106px; }
  #w-bar { flex-wrap: wrap; gap: 6px 6px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); align-content: flex-start; }
  .w-tabs:not(.w-more-pop) { width: auto; flex: 1 1 calc(100% - 84px); min-width: 0; justify-content: space-between; }
  .w-tabs:not(.w-more-pop) button { flex: 1; height: 44px; }
  .w-morebtn { flex: 0 0 72px; height: 44px; }
  #w-mapbox, #w-mini { width: 100px; height: 100px; }
  #w-mapbox { top: 6px; right: 6px; }
  #w-compass { width: 24px; height: 24px; font-size: 10px; }
  #w-xpdrops { top: 112px; right: 8px; }
  #w-topbar { top: 6px; left: 6px; max-width: calc(100vw - 120px); gap: 4px 6px; }
  #w-zone { font-size: 16px; }
  #w-narr { top: auto; bottom: calc(var(--bar) + 96px); max-width: calc(100vw - 16px); width: calc(100vw - 16px); font-size: 13px; z-index: 4; }
  #w-strip { left: 6px; right: 6px; width: auto; }
  #w-log { height: 50px; font-size: 12px; }
  #w-strip.big #w-log { height: 150px; }
  #w-chat-input { font-size: 16px; padding: 3px 8px; }
  #w-pop { left: 6px; right: 6px; width: auto; max-height: calc(100vh - var(--bar) - 130px); }
  #w-dlg { left: 6px; right: 6px; width: auto; max-height: calc(100vh - var(--bar) - 70px); overflow-y: auto; }
  #w-dlg-img { width: 60px; height: 60px; flex-basis: 60px; }
  #w-dlg-input { font-size: 16px; }
  .w-slot { font-size: 24px; }
  .w-burst { font-size: 22px; padding: 18px 20px; }
  #w-combo { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .w-burst, .w-xp, .w-floaty, #w-narr, #w-combo.go { animation-duration: .01s !important; }
}

/* clarity pass: tracker, edge arrow, tips, settings, joystick, more menu */
#w-mapbtn, #w-snd, #w-gearbtn { font-size: 13px; padding: 5px 10px; background: var(--glass); color: #fff; border: 1px solid rgba(46, 230, 255, .5); border-radius: 8px; font-weight: 800; cursor: pointer; }
#w-mapbtn { color: #ffd23f; border-color: #ffd23f; }
#w-settings { position: absolute; top: 46px; left: 8px; z-index: 9; background: #120c24; border: 2px solid var(--neon); border-radius: 10px; padding: 10px 12px; color: #fff; font: 600 13px/1.4 Inter, sans-serif; box-shadow: 4px 4px 0 #000; width: 250px; }
#w-settings b { font: 400 20px/1 Bangers, Impact, sans-serif; color: var(--neon); letter-spacing: 1px; display: block; margin-bottom: 8px; }
.w-set-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.w-set-row button { font-size: 12px !important; padding: 6px 10px !important; }
#w-joybtn { background: var(--glass); color: #8a84a8; border: 1px solid rgba(46, 230, 255, .3); border-radius: 8px; font-weight: 800; cursor: pointer; }
#w-joybtn.on { color: var(--neon); border-color: var(--neon); }
#w-settings #w-crt[hidden] { display: none; }
.w-set-vol { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.w-set-vol input { flex: 1; accent-color: #22e8ff; }
#w-tips-again { background: none; border: 1px solid #555; color: #ddd; border-radius: 6px; padding: 5px 8px; cursor: pointer; font-weight: 700; }
#w-settings p { color: #8a84a8; font-size: 11px; margin: 8px 0 0; }
#w-track { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 8px; max-width: min(520px, calc(100vw - 420px)); background: rgba(14, 10, 32, .88); border: 2px solid #ffd23f; border-radius: 999px; padding: 5px 14px 5px 8px; color: #fff; font: 700 14px/1.2 Inter, sans-serif; box-shadow: 3px 3px 0 #000, 0 0 16px rgba(255, 210, 63, .35); pointer-events: none; }
#w-track.side { border-color: #22e8ff; box-shadow: 3px 3px 0 #000, 0 0 16px rgba(34, 232, 255, .35); }
#w-track-arrow { font-style: normal; color: #ffd23f; font-size: 18px; display: inline-block; width: 20px; text-align: center; }
#w-track.side #w-track-arrow { color: #22e8ff; }
#w-track-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#w-track-dist { color: #ffd23f; font: 400 18px/1 Bangers, Impact, sans-serif; letter-spacing: 1px; white-space: nowrap; }
#w-edge { position: absolute; left: 0; top: 0; z-index: 5; color: #ffd23f; font-size: 34px; line-height: 1; text-shadow: 0 0 10px #ffd23f, 2px 2px 0 #000; pointer-events: none; animation: edgepulse .8s ease-in-out infinite alternate; }
@keyframes edgepulse { from { opacity: .6; } to { opacity: 1; } }
#w-narr { top: 54px; }
#w-nogo { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 6; pointer-events: none; opacity: 0; background: #ff3b5c; color: #fff; border: 2px solid #000; box-shadow: 3px 3px 0 #000; padding: 6px 12px; font: 400 22px/1 Bangers, Impact, sans-serif; letter-spacing: 1px; border-radius: 6px; }
#w-nogo.go { animation: nogo .9s ease-out; }
@keyframes nogo { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 70% { opacity: 1; } 100% { opacity: 0; } }
#w-tips { position: absolute; left: 50%; bottom: calc(var(--bar) + 18px); transform: translateX(-50%); z-index: 9; width: min(420px, calc(100vw - 24px)); background: #fff6e1; color: #1a1200; border: 3px solid #000; box-shadow: 5px 5px 0 #000; border-radius: 8px; padding: 12px 14px; font: 600 15px/1.4 Inter, sans-serif; }
#w-tips small { color: #7b4dff; font-weight: 800; }
#w-tips b { display: block; font: 400 26px/1.1 Bangers, Impact, sans-serif; letter-spacing: 1px; color: #ff2ec4; margin: 2px 0 4px; }
#w-tips p { margin: 0 0 10px; }
#w-tips div { display: flex; justify-content: space-between; }
#w-tips button { font: 800 14px Inter, sans-serif; border: 2px solid #000; border-radius: 6px; padding: 6px 14px; cursor: pointer; }
#w-tips .next { background: #22e8ff; box-shadow: 2px 2px 0 #000; }
#w-tips .skip { background: none; border-color: transparent; color: #666; }
#w-joy { position: absolute; left: 18px; bottom: calc(var(--bar) + 18px); width: 110px; height: 110px; border-radius: 50%; border: 2px solid rgba(46, 230, 255, .6); background: rgba(14, 10, 32, .35); z-index: 5; touch-action: none; display: flex; align-items: center; justify-content: center; }
#w-joy[hidden] { display: none; }
#w-joy-knob { width: 46px; height: 46px; border-radius: 50%; background: rgba(46, 230, 255, .55); border: 2px solid #fff; box-shadow: 0 0 12px rgba(46, 230, 255, .6); pointer-events: none; }
.w-morebtn { position: relative; width: 50px; height: 50px; border-radius: 10px; border: 1px solid rgba(46, 230, 255, .4); background: rgba(255, 255, 255, .06); color: var(--paper); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; }
.w-morebtn span { font-size: 19px; line-height: 1; }
.w-morebtn small { font-size: 9px; font-weight: 800; text-transform: uppercase; }
.w-morebtn.ping::after { content: ""; position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: #ff2ec4; box-shadow: 0 0 8px #ff2ec4; }
.w-more-pop { position: absolute; right: 8px; bottom: calc(var(--bar) + 6px); display: grid !important; grid-template-columns: repeat(2, 56px); gap: 6px; padding: 8px; background: #120c24; border: 2px solid var(--neon); border-radius: 10px; box-shadow: 4px 4px 0 #000; z-index: 8; }
.w-more-pop[hidden] { display: none !important; }
.w-q-head { color: #8a84a8; font: 700 12px/1.3 Inter, sans-serif; margin: 2px 0 6px; }
.w-q.side { position: relative; border-left: 3px solid #22e8ff; cursor: pointer; padding-right: 54px; }
.w-q.side.tracked { background: rgba(34, 232, 255, .12); }
.w-q.side small { display: block; color: #8a84a8; margin-top: 2px; }
.w-q.side em { color: #ffd23f; font-style: normal; }
.w-q-drop { position: absolute; right: 6px; top: 6px; background: none; border: 1px solid #555; color: #ccc; border-radius: 6px; font: 700 11px Inter, sans-serif; padding: 3px 7px; cursor: pointer; }
.w-tag.thing { color: #ffd23f; }
#w-hover b { color: #ffd23f; }
#w-hover small { color: #aaa; }
#w-hover { font-size: 14px !important; }
@media (max-width: 760px) {
  #w-track { top: 66px; max-width: calc(100vw - 24px); font-size: 13px; }
  #w-narr { top: 104px; max-width: calc(100vw - 24px); }
  #w-settings { top: 64px; }
  #w-joy { width: 96px; height: 96px; left: 12px; }
}

/* ---------- Octane: hustle HUD, phone, suppliers, garage ---------- */
#w-biz { position: absolute; top: 46px; left: 8px; z-index: 4; display: flex; align-items: center; gap: 8px; padding: 4px 10px; background: rgba(14, 10, 32, .84); border: 1px solid rgba(61, 255, 138, .5); border-radius: 10px; box-shadow: 2px 2px 0 #000; color: #fff; font: 800 13px/1 Inter, sans-serif; cursor: pointer; max-width: calc(100vw - 180px); }
#w-biz .b-cash { color: #3dff8a; font: 400 19px/1 Bangers, Impact, sans-serif; letter-spacing: 1px; text-shadow: 0 0 8px rgba(61, 255, 138, .6); }
#w-biz .b-it { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
#w-biz .b-it b { font-weight: 800; }
#w-biz.online .b-tf b { color: #22e8ff; text-shadow: 0 0 6px #22e8ff; }
#w-biz .b-heat { position: relative; width: 86px; height: 16px; border-radius: 8px; background: rgba(0, 0, 0, .6); border: 1px solid rgba(255, 255, 255, .2); overflow: hidden; flex: none; }
#w-biz .b-heat i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #ffb020, #ff3b3b); transition: width .4s; }
#w-biz .b-heat em { position: relative; display: block; text-align: center; font: 800 10px/14px Inter, sans-serif; font-style: normal; text-shadow: 1px 1px 0 #000; }
#w-biz.warm { border-color: #ffb020; }
#w-biz.hot { border-color: #ff3b3b; animation: hotpulse 1s infinite; }
@keyframes hotpulse { 50% { box-shadow: 0 0 0 2px #ff3b3b, 0 0 18px #ff3b3b; } }
#w-biz .b-clock { font-size: 11px; color: #cfc6e8; white-space: nowrap; }
#w-biz .b-clock.night { color: #b9a6ff; }
.w-tag .want { color: #3dff8a; background: rgba(0, 0, 0, .6); border: 1px solid #3dff8a; border-radius: 6px; padding: 0 4px; font-size: 15px; }
.w-tag .want.have { background: #3dff8a; color: #07050c; text-shadow: none; box-shadow: 0 0 8px #3dff8a; }
.w-tag .sup { color: #ff2ec4; font-size: 12px; border: 1px solid #ff2ec4; border-radius: 5px; padding: 0 3px; background: rgba(0, 0, 0, .6); }
#w-narr.ai { background: rgba(40, 6, 40, .92); color: #ffd6f6; border-color: #ff2ec4; box-shadow: 0 0 16px rgba(255, 46, 196, .5); }
#w-narr.ai b { color: #ff2ec4; }
#w-log p.ai { color: #ffc6f0; }
#w-log p.ai b { color: #ff2ec4; }
.w-btn.sm { padding: 3px 8px; font-size: 12px; flex: none; }
.w-btn.warn { background: #c0203f; }
.w-btn.ghost { background: transparent; color: #cfc6e8; border-color: #555; box-shadow: none; }
.w-price { color: #3dff8a; font-weight: 800; }
#w-settings select { flex: 1; background: #000; color: #fff; border: 1px solid var(--neon); border-radius: 6px; padding: 4px; font-weight: 700; }
/* phone */
.w-ph-tabs { display: flex; gap: 3px; margin-bottom: 8px; }
.w-ph-tabs button { flex: 1; background: rgba(255, 255, 255, .06); color: #cfc6e8; border: 1px solid rgba(255, 255, 255, .15); border-radius: 7px; padding: 5px 0; font-size: 12px; font-weight: 800; cursor: pointer; }
.w-ph-tabs button.on { background: rgba(61, 255, 138, .2); color: #fff; border-color: #3dff8a; }
.w-ph-tut { background: rgba(255, 210, 63, .12); border: 1px solid #ffd23f; border-radius: 8px; padding: 6px 8px; margin-bottom: 8px; font-size: 12px; }
.w-ph-tut small { color: #ffd23f; font-weight: 800; display: block; }
.w-ph-tut b { display: block; font-size: 13.5px; margin: 2px 0 5px; }
.w-ph-steps { display: flex; gap: 3px; }
.w-ph-steps i { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .15); }
.w-ph-steps i.done { background: #3dff8a; }
.w-ph-steps i.now { background: #ffd23f; animation: pulse 1.2s infinite; }
.w-ph-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.w-ph-row .ic { font-size: 22px; width: 30px; text-align: center; }
.w-ph-row div { flex: 1; font-size: 13px; min-width: 0; }
.w-ph-row small { display: block; color: #a99fc7; font-size: 11px; }
.w-ph-fill { font-size: 11.5px; color: #cfc6e8; margin: 6px 0; }
.w-ph-parts { display: flex; flex-wrap: wrap; gap: 4px; }
.w-chip { display: inline-block; font-size: 11.5px; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--common); background: rgba(0, 0, 0, .35); line-height: 1.25; }
.w-chip small { display: block; font-size: 9.5px; color: #a99fc7; }
.w-chip.r-uncommon { border-color: var(--uncommon); }
.w-chip.r-rare { border-color: var(--rare); box-shadow: 0 0 6px var(--rare); }
.w-chip.r-mythic { border-color: var(--mythic); box-shadow: 0 0 8px var(--mythic); }
.w-ph-ai { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.w-ph-ai p { flex-basis: 100%; margin: 0; }
.w-ph-ai input { flex: 1; min-width: 0; background: #000; color: #fff; border: 1px solid #ff2ec4; border-radius: 8px; padding: 6px 8px; font-size: 14px; }
.w-ph-aihead { display: flex; gap: 8px; align-items: center; }
.w-ph-aihead .bot { font-size: 30px; filter: drop-shadow(0 0 6px #ff2ec4); }
.w-ph-aihead b { color: #ff2ec4; font: 400 20px/1 Bangers, Impact, sans-serif; letter-spacing: 1px; }
.w-ph-aihead small { display: block; color: #a99fc7; font-size: 11px; }
.w-ph-ailog { max-height: 150px; overflow-y: auto; margin-top: 6px; font-size: 12.5px; line-height: 1.35; user-select: text; -webkit-user-select: text; }
.w-ph-ailog p { margin: 0 0 4px; color: #ffd6f6; }
.w-ph-ailog p.me { color: #9ff3ff; }
.w-ph-rename { margin-top: 6px; font-size: 12px; color: #a99fc7; }
.w-ph-news { font-size: 12.5px; padding: 5px 6px; margin-bottom: 4px; background: rgba(0, 0, 0, .3); border-radius: 6px; }
.w-ph-emp { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; font-size: 11.5px; color: #cfc6e8; }
.w-ph-emp b { color: #fff; display: block; font-size: 13px; }
.w-ph-road { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.w-ph-road span { font-size: 11px; padding: 3px 6px; border-radius: 6px; border: 1px solid #3dff8a; }
.w-ph-road span.lock { border-color: #444; color: #777; }
.w-ph-road span.here { background: rgba(61, 255, 138, .2); }
/* garage */
#w-garage { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; background: radial-gradient(circle at 50% 40%, rgba(40, 20, 60, .96), rgba(6, 4, 12, .98)); padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); gap: 6px; }
#w-garage[hidden] { display: none; }
.w-g-head { display: flex; align-items: center; gap: 10px; }
.w-g-head b { font: 400 28px/1 Bangers, Impact, sans-serif; letter-spacing: 1.5px; color: #ff2ec4; text-shadow: 0 0 14px rgba(255, 46, 196, .7), 2px 2px 0 #000; }
.w-g-head span { flex: 1; color: #3dff8a; font-weight: 800; font-size: 14px; }
.w-g-tog, .w-g-x { background: rgba(255, 255, 255, .06); color: #fff; border: 1px solid rgba(46, 230, 255, .5); border-radius: 8px; padding: 6px 10px; font-weight: 800; font-size: 12px; cursor: pointer; }
.w-g-tog.on { background: rgba(255, 59, 59, .35); border-color: #ff3b3b; }
.w-g-x { border-color: #ff2ec4; }
.w-g-stats { display: flex; flex-wrap: wrap; gap: 5px; }
@media (min-width: 700px) { .w-g-stats.multi { min-height: 58px; align-content: flex-start; } }
.w-g-stats span { background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .15); border-radius: 7px; padding: 3px 8px; font-size: 12.5px; font-weight: 800; }
.w-g-stats .good { border-color: #22e8ff; color: #9ff3ff; }
.w-g-stats .warn { border-color: #ffb020; color: #ffd890; }
.w-g-stats .bad { border-color: #ff3b3b; color: #ffb0b0; }
.w-g-bott { font-size: 13px; font-weight: 800; padding: 5px 9px; border-radius: 8px; }
.w-g-bott.bad { background: rgba(255, 59, 59, .18); border: 1px solid #ff3b3b; color: #ffd0d0; }
.w-g-bott.good { background: rgba(61, 255, 138, .12); border: 1px solid #3dff8a; color: #c6ffd8; }
.w-g-stage { position: relative; flex: 1; min-height: 140px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#w-g-c { image-rendering: pixelated; image-rendering: crisp-edges; border: 2px solid #000; box-shadow: 0 0 30px rgba(255, 46, 196, .25), 4px 4px 0 #000; touch-action: manipulation; cursor: crosshair; }
#w-g-labels { position: absolute; inset: 0; pointer-events: none; }
.w-g-call { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; font: 800 11px/1 Inter, sans-serif; padding: 2px 5px; border-radius: 5px; border: 1px solid #000; box-shadow: 1px 1px 0 #000; }
.w-g-call.good { background: #0d3a26; color: #3dff8a; }
.w-g-call.warn { background: #4a3200; color: #ffd890; }
.w-g-call.bad { background: #5a0d1a; color: #fff; animation: pulse 1s infinite; }
/* a fixed height: picking a tool with a long description must not shrink the floor under your finger */
.w-g-info { height: 92px; overflow-y: auto; font-size: 12.5px; color: #ddd6f5; }
@media (max-width: 760px) { .w-g-info { height: 78px; } }
.w-g-desc b { color: #fff; font-size: 14px; }
.w-g-desc small { display: block; color: #a99fc7; font-size: 11.5px; margin-top: 2px; }
.w-g-desc small.hint { color: #22e8ff; }
.w-g-desc .good { color: #3dff8a; } .w-g-desc .bad { color: #ff7a8a; }
.w-g-acts { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.w-g-err { background: #c0203f; color: #fff; border: 2px solid #000; border-radius: 6px; padding: 3px 8px; font-weight: 800; margin-bottom: 4px; display: inline-block; }
.w-g-pal { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; }
.w-g-pi { flex: 0 0 auto; width: 70px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px; border-radius: 9px; border: 1px solid rgba(46, 230, 255, .4); background: rgba(255, 255, 255, .05); color: #fff; cursor: pointer; }
.w-g-pi span { font-size: 21px; line-height: 1; }
.w-g-pi small { font-size: 10px; font-weight: 800; text-align: center; line-height: 1.1; }
.w-g-pi em { font-style: normal; font-size: 10.5px; color: #3dff8a; font-weight: 800; }
.w-g-pi.on { background: rgba(255, 46, 196, .3); border-color: #ff2ec4; box-shadow: 0 0 12px rgba(255, 46, 196, .6); }
.w-g-pi.no { opacity: .45; }
@media (max-width: 760px) {
  #w-biz { top: 40px; left: 6px; max-width: calc(100vw - 118px); gap: 6px; padding: 3px 7px; font-size: 12px; flex-wrap: wrap; row-gap: 3px; }
  #w-biz .b-cash { font-size: 16px; }
  #w-biz .b-heat { width: 64px; }
  #w-biz .b-clock { display: none; }
  #w-online { display: none; }
  #w-track { top: 92px; }
  #w-narr { top: 130px; bottom: auto; }
  .w-g-head b { font-size: 22px; }
  .w-g-pal { display: grid; grid-template-columns: repeat(5, 1fr); overflow: visible; }
  .w-g-pi { width: auto; }
  .w-g-stats span { font-size: 11.5px; padding: 2px 6px; }
}

/* round 1: the Lab, real hardware readouts, quieter HUD */
#w-biz .b-ai[hidden] { display: none; }
#w-biz .b-ai { color: #ffd23f; text-shadow: 0 0 6px rgba(255, 210, 63, .6); }
#w-biz .b-ai.bad { color: #ff6b6b; }
.w-fact { display: block; margin-top: 2px; color: #9fe8ff; font-style: italic; }
.w-lab-brain { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 46, 196, .18); border: 1px solid rgba(255, 46, 196, .5); font-size: 11px; font-weight: 800; color: #ffc2ec; }
.w-ph-aihead small { display: block; font-size: 11px; color: #c9c1e6; line-height: 1.35; }
.w-ph-aihead small b { color: #22e8ff; }
.w-lab-run { margin: 8px 0; padding: 8px; border-radius: 10px; border: 1px solid #ffd23f; background: rgba(255, 210, 63, .08); display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; }
.w-lab-run b, .w-lab-run small { grid-column: 1; }
.w-lab-run small { font-size: 11px; color: #d6cff0; }
.w-lab-run .w-btn { grid-column: 2; grid-row: 1 / span 3; }
.w-lab-bar { position: relative; height: 16px; border-radius: 8px; background: rgba(0, 0, 0, .6); border: 1px solid rgba(255, 255, 255, .2); overflow: hidden; }
.w-lab-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #ff2ec4, #ffd23f); transition: width .6s; }
.w-lab-bar span { position: relative; display: block; text-align: center; font: 800 10px/14px Inter, sans-serif; text-shadow: 1px 1px 0 #000; }
.w-lab-m { position: relative; margin: 6px 0; padding: 7px 8px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(0, 0, 0, .3); }
.w-lab-m b { display: block; font-size: 13px; }
.w-lab-m b em { font-style: normal; font-weight: 600; font-size: 11px; color: #a99fc7; }
.w-lab-m small { display: block; font-size: 11px; color: #c9c1e6; line-height: 1.35; margin-top: 2px; }
.w-lab-m small b { display: inline; color: #fff; font-size: 11px; }
.w-lab-m.done { border-color: rgba(61, 255, 138, .45); background: rgba(61, 255, 138, .06); padding: 5px 8px; }
.w-lab-m.done b { color: #3dff8a; }
.w-lab-m.next { border-color: #22e8ff; box-shadow: 0 0 10px rgba(34, 232, 255, .25); }
.w-lab-m.later { opacity: .6; }
.w-lab-m.cur { border-color: #ffd23f; }
.w-lab-m .w-btn { margin-top: 6px; }
.w-lab-fact { color: #9fe8ff !important; font-style: italic; }
.w-lab-m .bad, .w-lab-run .bad { color: #ff6b6b; }
.w-lab-how { margin: 8px 0; font-size: 12px; color: #d6cff0; }
.w-lab-how summary { cursor: pointer; font-weight: 800; color: #22e8ff; }
.w-lab-how ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.45; }
.w-ph-aihead small b { font: 800 11px/1.35 Inter, sans-serif; letter-spacing: 0; text-shadow: none; -webkit-text-stroke: 0; }
@media (min-width: 761px) { #w-bar .w-tabs:not(.w-more-pop) { margin-left: auto; } }
/* round 2: tap the tracker; contracts and datasets in the Lab */
#w-track.tap { pointer-events: auto; cursor: pointer; }
#w-track.tap:hover { filter: brightness(1.15); }
#w-track.tap::after { content: "▸"; color: #ffd23f; font-size: 12px; margin-left: -2px; }
.w-job .w-btn { margin-top: 6px; }
.w-job.next { border-color: #3dff8a; box-shadow: 0 0 10px rgba(61, 255, 138, .22); }
.w-job-run { border-color: #3dff8a; background: rgba(61, 255, 138, .08); }
.w-lab-data { margin-top: 5px; padding: 5px 6px; border-radius: 8px; background: rgba(255, 79, 216, .08); border: 1px dashed rgba(255, 79, 216, .5); }
.w-lab-data.ok { background: rgba(61, 255, 138, .06); border-color: rgba(61, 255, 138, .4); }
.w-lab-dbtns { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.w-lab-dbtns .w-btn { margin-top: 0; }
.w-lab-how p { margin: 6px 0 0; line-height: 1.45; }
.w-ai-tabs { display: flex; gap: 4px; margin: 8px 0 6px; position: sticky; top: 0; z-index: 2; background: rgba(14, 8, 30, .96); padding: 3px 0; }
.w-ai-tabs button { flex: 1; min-height: 40px; background: rgba(255, 255, 255, .05); color: #cfc6e8; border: 1px solid rgba(255, 255, 255, .16); border-radius: 9px; font: 800 12px/1.15 Inter, sans-serif; cursor: pointer; padding: 4px 2px; }
.w-ai-tabs button small { display: block; font-weight: 600; font-size: 10px; color: #a99fc7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-ai-tabs button i { font-style: normal; display: inline-block; min-width: 16px; padding: 0 4px; margin-left: 2px; border-radius: 8px; background: #3dff8a; color: #0b0618; font-size: 10px; }
.w-ai-tabs button.on { background: rgba(255, 46, 196, .2); border-color: #ff2ec4; color: #fff; box-shadow: 0 0 8px rgba(255, 46, 196, .35); }
.w-job-bar { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; margin: 4px 0; }
.w-job-rep .stars { color: #ffd23f; font-size: 15px; letter-spacing: 1px; text-shadow: 0 0 6px rgba(255, 210, 63, .5); }
.w-job-rep small { display: block; font-size: 10px; color: #a99fc7; }
.w-prec { display: flex; align-items: center; gap: 3px; }
.w-prec small { font-size: 10px; color: #a99fc7; margin-right: 3px; }
.w-prec-b { min-width: 46px; min-height: 32px; background: rgba(0, 0, 0, .35); color: #cfc6e8; border: 1px solid rgba(34, 232, 255, .35); border-radius: 7px; font: 800 11px Inter, sans-serif; cursor: pointer; }
.w-prec-b.on { background: rgba(34, 232, 255, .22); color: #fff; border-color: #22e8ff; box-shadow: 0 0 8px rgba(34, 232, 255, .35); }
.w-prec-tip { margin: 2px 0 6px; font-size: 11px; color: #9fe8ff; line-height: 1.35; }
.w-job-nums { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }
.w-job-nums span { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); color: #e6e0f8; }
.w-job-nums span b { display: inline; font-size: 12px; color: #3dff8a; }
.w-job-nums .good, .w-lab-m .good, .w-lab-run .good { color: #3dff8a; }
.w-job-nums .meh, .w-lab-run .meh { color: #ffd23f; }
.w-job-nums .bad { color: #ff6b6b; }
.w-q-tag { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 5px; font: 800 10px Inter, sans-serif; color: #ffd23f; border: 1px solid rgba(255, 210, 63, .6); }
.w-lab-src { color: #7f77a0; font-size: 10px; }
.w-lab-dbtns .w-btn small { display: block; font-size: 9px; font-weight: 600; opacity: .8; }
/* round 4: training loss curve, learning-rate picker, loss-spike rollback */
.w-lab-run .w-loss { grid-column: 1; width: 100%; height: 56px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(94, 242, 196, .25); border-radius: 6px; image-rendering: pixelated; }
.w-lab-run.spiked { border-color: #ff4d6d; background: rgba(255, 77, 109, .1); animation: w-spike 1.2s ease-in-out infinite alternate; }
@keyframes w-spike { from { box-shadow: 0 0 0 rgba(255, 77, 109, 0); } to { box-shadow: 0 0 14px rgba(255, 77, 109, .45); } }
.w-lab-run.spiked > .w-btn:not(.warn), .w-lab-run > .w-prec-tip { grid-column: 1 / -1; grid-row: auto; }
.w-lr { flex-wrap: wrap; margin: 6px 0 2px; }
.w-lr .w-prec-b { flex: 1 1 0; min-width: 0; padding: 3px 4px; line-height: 1.15; }
.w-lr .w-prec-b small { display: block; font: 600 9px Inter, sans-serif; opacity: .8; }
.w-lr > small { flex-basis: 100%; }
.w-lr-tip { min-height: 4.1em; } /* the longest LR tip is 3 lines: picking one doesn't move the Train button */
@media (prefers-reduced-motion: reduce) { .w-lab-run.spiked { animation: none; } }
#w-dlg-img.sprite { background: #0b0618; border-color: #22e8ff; box-shadow: 0 0 10px rgba(34, 232, 255, .35); image-rendering: pixelated; object-fit: contain; }
@keyframes pulse { 50% { box-shadow: 0 0 0 2px #ff3b5c, 0 0 16px #ff3b5c; } }
/* top 5: two sites, contract modes, the timeline, the crew, Compliance stops and the finale */
.w-g-sites { display: flex; gap: 6px; padding: 0 10px 6px; overflow-x: auto; }
.w-g-sites[hidden] { display: none; }
.w-g-sites button { flex: 0 0 auto; min-height: 36px; padding: 4px 12px; border-radius: 9px; border: 1px solid rgba(46, 230, 255, .35); background: rgba(255, 255, 255, .05); color: #cfc6e8; font: 800 12px/1 Inter, sans-serif; cursor: pointer; }
.w-g-sites button.on { background: rgba(46, 230, 255, .2); color: #fff; border-color: #22e8ff; box-shadow: 0 0 10px rgba(34, 232, 255, .35); }
.w-g-sites button:disabled { opacity: .45; cursor: default; }
.w-job-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 6px; }
.w-job-modes .w-btn { margin: 0; min-height: 44px; padding: 4px 5px; font-size: 12px; line-height: 1.15; }
.w-job-modes .w-btn small { display: block; font-size: 10px; font-weight: 600; opacity: .9; }
.w-deliver { border-color: #ffd23f; background: rgba(255, 210, 63, .1); }
.w-tag.client { border-color: #ffd23f; color: #ffd23f; }
.w-tl { position: relative; margin: 6px 0 4px 6px; border-left: 2px solid rgba(46, 230, 255, .35); }
.w-tl-row { position: relative; display: grid; grid-template-columns: 62px 1fr; gap: 6px; padding: 5px 0 5px 10px; font-size: 12px; line-height: 1.35; }
.w-tl-row::before { content: ""; position: absolute; left: -6px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: #120c24; border: 2px solid #6a5f8a; }
.w-tl-row.hist::before { border-color: #a99fc7; width: 6px; height: 6px; left: -5px; top: 12px; }
.w-tl-row.model::before { border-color: #22e8ff; }
.w-tl-row.got::before { background: #3dff8a; border-color: #3dff8a; box-shadow: 0 0 8px #3dff8a; }
.w-tl-row.hist { color: #a99fc7; font-style: italic; }
.w-tl-date { font: 800 11px/1.3 Inter, sans-serif; color: #ffd23f; }
.w-tl-row small { display: block; font-size: 11px; color: #c9c1e6; }
.w-tl-row a { color: #9fe8ff; }
.w-tl-row.got b { color: #3dff8a; }
.w-crew-row, .w-crew-hire { margin: 6px 0; padding: 7px 8px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(0, 0, 0, .3); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.w-crew-row > div:first-child { flex: 1 1 100%; }
.w-crew-row small { display: block; font-size: 11px; color: #c9c1e6; }
.w-crew-hire b { flex: 1 1 100%; }
.w-crew-sel { min-height: 36px; max-width: 100%; background: #1a1430; color: #fff; border: 1px solid rgba(46, 230, 255, .4); border-radius: 8px; padding: 4px 6px; font: 600 12px Inter, sans-serif; }
.w-crew-ms { margin: 4px 0; padding: 5px 8px; border-radius: 8px; border: 1px dashed rgba(255, 255, 255, .18); font-size: 12px; opacity: .7; }
.w-crew-ms.on { opacity: 1; border-style: solid; border-color: rgba(61, 255, 138, .5); background: rgba(61, 255, 138, .07); }
.w-crew-ms small { color: #c9c1e6; font-size: 11px; }
#w-enc { position: absolute; inset: 0; z-index: 12; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, .14), rgba(6, 3, 12, .72) 60%); }
#w-enc[hidden], #w-fin[hidden] { display: none; }
.w-enc-card { width: min(440px, 100%); max-height: calc(100% - 20px); overflow-y: auto; background: rgba(14, 8, 30, .95); border: 2px solid #ff3b5c; border-radius: 14px; padding: 12px; box-shadow: 0 0 30px rgba(255, 59, 92, .45); }
.w-enc-head { display: flex; justify-content: space-between; align-items: baseline; }
.w-enc-head b { font: 400 26px/1 Bangers, Impact, sans-serif; letter-spacing: 1.5px; color: #ff7a8a; -webkit-text-stroke: 1px #000; text-shadow: 0 0 12px #ff3b5c; }
#w-enc-left { font: 800 14px Inter, sans-serif; color: #ffd23f; }
.w-enc-timer { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); margin: 8px 0; overflow: hidden; }
.w-enc-timer i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff3b5c, #ffd23f); transition: width .2s linear; }
.w-enc-text { font-size: 13.5px; line-height: 1.4; margin: 0 0 10px; }
.w-enc-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.w-enc-b { min-height: 52px; text-align: left; padding: 7px 9px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .07); color: #fff; font: 800 13.5px/1.2 Inter, sans-serif; cursor: pointer; }
.w-enc-b small { display: block; font-weight: 600; font-size: 10.5px; color: #c9c1e6; margin-top: 2px; }
.w-enc-b:hover:not(:disabled) { background: rgba(46, 230, 255, .18); }
.w-enc-b:disabled { opacity: .4; cursor: default; }
.w-enc-b.spoof:not(:disabled) { border-color: #22e8ff; box-shadow: 0 0 10px rgba(34, 232, 255, .35); }
.w-enc-b.run { border-color: #ffd23f; }
.w-chase { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.w-chase-b { min-height: 64px; font-size: 28px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .05); color: #6a5f8a; cursor: pointer; }
.w-chase-b.lit { color: #07050c; background: #ffd23f; border-color: #fff; box-shadow: 0 0 18px #ffd23f; }
#w-fin { position: absolute; inset: 0; z-index: 13; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at 50% 20%, rgba(34, 232, 255, .25), rgba(6, 3, 12, .92) 65%); }
.w-fin-card { width: min(520px, 100%); max-height: calc(100% - 16px); overflow-y: auto; background: rgba(14, 8, 30, .94); border: 2px solid #22e8ff; border-radius: 16px; padding: 14px 16px; box-shadow: 0 0 40px rgba(34, 232, 255, .4); }
.w-fin-h { margin: 0 0 8px; font: 400 34px/1 Bangers, Impact, sans-serif; letter-spacing: 2px; color: #22e8ff; -webkit-text-stroke: 1px #000; text-shadow: 0 0 18px #22e8ff, 3px 3px 0 #000; }
.w-fin-ep p { margin: 0 0 8px; font-size: 14px; line-height: 1.45; animation: finin .8s ease-out both; }
@keyframes finin { from { opacity: 0; transform: translateY(6px); } }
.w-fin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 10px 0; font-size: 11px; color: #c9c1e6; }
.w-fin-stats span { padding: 5px; border-radius: 8px; background: rgba(255, 255, 255, .05); }
.w-fin-stats b { display: block; color: #fff; font-size: 14px; }
.w-fin-stats .wide { grid-column: 1 / -1; }
.w-fin-lb { margin: 4px 0 10px; padding-left: 22px; font-size: 12.5px; }
.w-fin-lb li.me { color: #3dff8a; font-weight: 800; }
.w-fin-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.w-fin-acts .w-btn { flex: 1; min-height: 44px; }
.w-fin-go { width: 100%; min-height: 44px; margin-top: 6px; }
@media (max-width: 420px) { .w-enc-opts { grid-template-columns: 1fr; } .w-job-modes { grid-template-columns: 1fr; } .w-fin-stats { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .w-fin-ep p { animation: none; } }

/* ---------- polish pass: everything lives in the bottom HUD; the top of the screen is the view ---------- */
:root { --bar: 66px; }
#w-root #w-bar { gap: 8px; padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); }
#w-bar > * { flex: none; }
.w-hud-where { display: flex; flex-direction: column; justify-content: center; min-width: 0; max-width: 190px; padding: 0 6px; }
.w-hud-where #w-zone { font-size: 18px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-hud-where #w-online { font-size: 11px; color: #a99fc7; white-space: nowrap; }
#w-root #w-biz { position: static; display: flex; align-items: stretch; gap: 2px; padding: 4px 6px; height: 52px; max-width: none; background: rgba(0, 0, 0, .35); border: 1px solid rgba(61, 255, 138, .35); border-radius: 12px; box-shadow: none; }
#w-biz .hc { display: grid; grid-template-columns: auto auto; grid-template-rows: 1fr auto; column-gap: 4px; align-items: center; padding: 2px 7px; border-radius: 8px; white-space: nowrap; }
#w-biz .hc + .hc { border-left: 1px solid rgba(255, 255, 255, .08); }
#w-biz .hc > i { grid-row: 1 / span 2; font-style: normal; font-size: 18px; line-height: 1; }
#w-biz .hc > b { font: 800 15px/1 Inter, sans-serif; color: #fff; }
#w-biz .hc > small { grid-column: 2; font: 800 9px/1.1 Inter, sans-serif; letter-spacing: .5px; text-transform: uppercase; color: #a99fc7; }
#w-biz .hc-cash > b { color: #3dff8a; font: 400 21px/1 Bangers, Impact, sans-serif; letter-spacing: 1px; text-shadow: 0 0 8px rgba(61, 255, 138, .5); }
#w-biz .hc-heat, #w-biz .hc-time { grid-template-columns: auto; }
#w-biz .hc-heat > small, #w-biz .hc-time > small { grid-column: 1; }
#w-biz .hc-heat .b-heat { width: 78px; height: 18px; }
#w-biz .hc-heat .b-heat em { font: 800 11px/16px Inter, sans-serif; }
#w-biz .hc-time .b-clock { font: 800 14px/1 Inter, sans-serif; color: #e9e2ff; }
#w-biz .b-ai { display: flex; align-items: center; font-weight: 800; }
#w-biz .b-ai[hidden] { display: none; }
#w-biz:hover { border-color: rgba(61, 255, 138, .7); }
#w-root #w-biz.warm { border-color: #ffb020; }
#w-root #w-biz.hot { border-color: #ff3b3b; }
.w-hud-sys { display: flex; gap: 4px; padding-left: 8px; border-left: 1px solid rgba(255, 255, 255, .12); }
#w-root .w-hud-sys button { width: 46px; height: 46px; padding: 0; border-radius: 10px; border: 1px solid rgba(46, 230, 255, .4); background: rgba(255, 255, 255, .06); color: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; font-size: 13px; }
.w-hud-sys button span { font-size: 18px; line-height: 1; }
.w-hud-sys button small { font-size: 8.5px; font-weight: 800; letter-spacing: .2px; text-transform: uppercase; }
#w-root #w-mapbtn { color: #ffd23f; border-color: rgba(255, 210, 63, .6); }
#w-bar .w-tabs:not(.w-more-pop) { margin-left: auto; }
#w-settings .w-home { display: inline-block; margin-bottom: 8px; }
/* the open sky: minimap, tracker, Herald box and the chat move down beside the bar */
#w-root #w-mapbox { top: auto; bottom: calc(var(--bar) + 10px + env(safe-area-inset-bottom)); right: 10px; width: 132px; height: 132px; }
#w-root #w-mini { width: 132px; height: 132px; }
#w-root #w-xpdrops { top: auto; bottom: calc(var(--bar) + 150px); right: 14px; }
#w-root #w-strip { width: min(440px, calc(100vw - 180px)); }
#w-root #w-track { top: auto; bottom: calc(var(--bar) + 118px + env(safe-area-inset-bottom)); left: 10px; transform: none; max-width: min(440px, calc(100vw - 180px)); }
#w-root #w-narr { top: auto; bottom: calc(var(--bar) + 160px + env(safe-area-inset-bottom)); left: 10px; transform: none; width: auto; max-width: min(440px, calc(100vw - 180px)); animation-name: narr2; }
@keyframes narr2 { from { transform: translateY(10px); opacity: 0; } }
#w-root #w-settings { top: auto; left: auto; right: 10px; bottom: calc(var(--bar) + 8px + env(safe-area-inset-bottom)); }
@media (max-width: 1180px) and (min-width: 761px) {
  .w-hud-where #w-online { display: none; }
  .w-hud-where { max-width: 120px; }
  .w-hud-where #w-zone { font-size: 15px; white-space: normal; }
  #w-biz .hc { padding: 2px 4px; }
  #w-biz .hc > i { font-size: 15px; }
  #w-biz .hc-heat .b-heat { width: 60px; }
  #w-root .w-tabs button, #w-root .w-morebtn, #w-root .w-hud-sys button { width: 42px; }
}
@media (max-width: 960px) and (min-width: 761px) { .w-hud-where { display: none; } }
@media (max-width: 760px) {
  :root { --bar: 112px; }
  #w-root #w-bar { flex-wrap: wrap; gap: 5px; padding: 5px 6px calc(5px + env(safe-area-inset-bottom)); align-content: flex-start; }
  .w-hud-where { display: none; }
  #w-root #w-biz { order: -1; flex: 1 1 100%; height: 46px; justify-content: space-between; padding: 3px 4px; gap: 0; }
  #w-biz .hc { padding: 1px 3px; column-gap: 2px; }
  #w-biz .hc > i { font-size: 14px; }
  #w-biz .hc > b { font-size: 13px; }
  #w-biz .hc-cash > b { font-size: 17px; }
  #w-biz .hc > small { font-size: 8px; letter-spacing: .2px; }
  #w-biz .hc-heat .b-heat { width: 48px; height: 16px; }
  #w-biz .hc-heat .b-heat em { font-size: 10px; line-height: 14px; }
  #w-biz .hc-time .b-clock { font-size: 12px; }
  #w-root #w-biz .b-clock { display: block; }
  #w-root .w-tabs:not(.w-more-pop) { flex: 1 1 auto; }
  #w-root .w-tabs:not(.w-more-pop) button { height: 46px; }
  #w-root .w-morebtn { flex: 0 0 44px; width: 44px; height: 46px; }
  .w-hud-sys { padding-left: 4px; gap: 3px; }
  #w-root .w-hud-sys button { width: 40px; height: 46px; }
  #w-root #w-mapbox, #w-root #w-mini { width: 86px; height: 86px; }
  #w-root #w-mapbox { right: 6px; bottom: calc(var(--bar) + 8px + env(safe-area-inset-bottom)); }
  #w-root #w-xpdrops { bottom: calc(var(--bar) + 100px); }
  #w-root #w-strip { left: 6px; right: 98px; width: auto; }
  #w-root #w-track { left: 6px; right: 6px; max-width: none; bottom: calc(var(--bar) + 100px + env(safe-area-inset-bottom)); font-size: 13px; }
  #w-root #w-narr { left: 6px; right: 6px; max-width: none; bottom: calc(var(--bar) + 142px + env(safe-area-inset-bottom)); }
  #w-root #w-settings { right: 6px; }
}

/* character builder */
#w-look { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: 12px; background: radial-gradient(ellipse at 50% 30%, rgba(60, 20, 90, .85), rgba(6, 3, 12, .94)); overflow-y: auto; }
.w-look-card { width: min(720px, 100%); background: linear-gradient(180deg, #1e0e38, #0e071e); border: 2px solid #ff2ec4; border-radius: 14px; box-shadow: 0 0 28px rgba(255, 46, 196, .4), 5px 5px 0 #000; padding: 14px 16px; color: #ece6ff; }
.w-look-card h2 { margin: 0 0 10px; font: 400 30px/1 Bangers, Impact, sans-serif; letter-spacing: 1.5px; color: #ff2ec4; text-shadow: 0 0 12px rgba(255, 46, 196, .6), 2px 2px 0 #000; }
.w-look-main { display: flex; gap: 14px; align-items: flex-start; }
.w-look-prev { flex: 0 0 220px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
#w-look-c { width: 220px; height: 220px; border-radius: 12px; border: 1px solid rgba(46, 230, 255, .5); background: radial-gradient(circle at 50% 80%, rgba(46, 230, 255, .25), rgba(10, 6, 20, .9) 60%); image-rendering: pixelated; }
.w-look-anim { display: flex; gap: 4px; }
.w-look-anim button { background: rgba(255, 255, 255, .06); color: #cfc6e8; border: 1px solid rgba(255, 255, 255, .2); border-radius: 6px; padding: 3px 8px; font: 700 12px Inter, sans-serif; cursor: pointer; }
.w-look-anim button.on { color: #fff; border-color: #22e8ff; background: rgba(34, 232, 255, .2); }
.w-look-rows { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.w-look-row { display: flex; flex-direction: column; gap: 3px; }
.w-look-row > small { font: 800 10px/1 Inter, sans-serif; letter-spacing: .5px; text-transform: uppercase; color: #a99fc7; }
.w-look-pick { display: flex; align-items: center; gap: 4px; }
.w-look-pick button.arr { flex: none; width: 28px; height: 28px; border-radius: 7px; border: 1px solid rgba(46, 230, 255, .5); background: rgba(0, 0, 0, .35); color: #22e8ff; font-weight: 900; cursor: pointer; }
.w-look-pick span { flex: 1; text-align: center; font: 700 13px/1 Inter, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-look-sw { display: flex; flex-wrap: wrap; gap: 3px; }
.w-look-sw button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .6); cursor: pointer; padding: 0; }
.w-look-sw button.on { border-color: #fff; box-shadow: 0 0 0 2px #ff2ec4; }
.w-look-quip { min-height: 2.6em; margin: 10px 0 8px; padding: 6px 10px; border-radius: 8px; background: rgba(14, 10, 32, .9); border: 1px solid var(--neon); color: #dff9ff; font: 600 13px/1.35 Inter, sans-serif; }
.w-look-quip b { font: 400 14px Bangers, Impact, sans-serif; letter-spacing: 1px; color: var(--neon); margin-right: 6px; }
.w-look-acts { display: flex; gap: 8px; justify-content: flex-end; }
.w-look-acts button { border: 2px solid #000; border-radius: 10px; padding: 9px 16px; cursor: pointer; font: 400 20px/1 Bangers, Impact, sans-serif; letter-spacing: 1px; }
#w-look-rand { background: #22e8ff; color: #07050c; box-shadow: 3px 3px 0 #000; }
#w-look-done { background: #ff2ec4; color: #fff; box-shadow: 0 0 16px rgba(255, 46, 196, .5), 3px 3px 0 #000; }
@media (max-width: 760px) {
  .w-look-card { padding: 10px; }
  .w-look-card h2 { font-size: 24px; margin-bottom: 6px; }
  .w-look-main { flex-direction: column; align-items: stretch; gap: 8px; }
  .w-look-prev { flex: none; flex-direction: row; justify-content: center; }
  #w-look-c { width: 130px; height: 130px; }
  .w-look-anim { flex-direction: column; }
  .w-look-rows { grid-template-columns: 1fr 1fr; gap: 5px 8px; }
  .w-look-sw button { width: 20px; height: 20px; }
  .w-look-acts button { flex: 1; font-size: 18px; padding: 9px 8px; }
}
/* speech bubbles pop in and fade out */
.w-bubble { animation: bubin .18s ease-out; transition: opacity .5s; }
.w-bubble.out { opacity: 0; }
@keyframes bubin { from { opacity: 0; } }
.w-sfxtag { font-style: italic; font-weight: 800; color: #ffd23f; white-space: nowrap; }

/* ---- easter eggs: fragment pop, tip receipts, the ??? tab, the secret ending ---- */
#w-egg-pop { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 12; background: rgba(6, 4, 14, .94); color: #e8fff6; border: 1px solid #5ef2c4; box-shadow: 0 0 22px rgba(94, 242, 196, .35); padding: 10px 16px 9px; font: 600 12px/1.35 Inter, sans-serif; text-align: center; max-width: min(440px, calc(100vw - 24px)); border-radius: 3px; cursor: pointer; animation: eggIn .5s steps(6) both; }
#w-egg-pop .k { display: block; font: 700 10px/1 monospace; letter-spacing: 3px; color: #5ef2c4; opacity: .85; }
#w-egg-pop .w { display: block; font: 400 26px/1.1 Bangers, Impact, sans-serif; letter-spacing: 2px; margin: 6px 0 4px; color: #fff; text-shadow: 2px 0 #ff2ec4, -2px 0 #22e8ff; }
#w-egg-pop small { display: block; opacity: .7; font-size: 11px; }
#w-egg-pop .new { display: block; margin-top: 5px; color: #ffd23f; font-size: 11px; }
@keyframes eggIn { 0% { opacity: 0; clip-path: inset(0 0 100% 0); } 100% { opacity: 1; clip-path: inset(0 0 0 0); } }
#w-egg-tip { position: absolute; left: 14px; top: 14px; z-index: 11; width: min(270px, calc(100vw - 28px)); background: #fbf8ee; color: #1b1b1b; font: 500 12px/1.4 "Courier New", monospace; padding: 10px 12px 14px; box-shadow: 3px 3px 0 #000; border: 1px solid #000; cursor: pointer; transform-origin: top; animation: eggPrint .6s steps(8) both; -webkit-mask: linear-gradient(#000 0 0) top/100% calc(100% - 6px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/12px 6px repeat-x; mask: linear-gradient(#000 0 0) top/100% calc(100% - 6px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/12px 6px repeat-x; }
#w-egg-tip .h { display: block; text-align: center; font-weight: 800; letter-spacing: 2px; border-bottom: 1px dashed #555; padding-bottom: 4px; margin-bottom: 6px; font-size: 11px; }
#w-egg-tip .f { display: block; text-align: center; margin-top: 6px; font-size: 10px; opacity: .65; }
@keyframes eggPrint { 0% { transform: scaleY(0); } 100% { transform: scaleY(1); } }
#w-narr.sincere { background: rgba(250, 250, 250, .97); color: #111; border-color: #111; box-shadow: 0 0 0 1px #fff, 0 0 30px rgba(255, 255, 255, .35); font-weight: 500; font-style: italic; }
#w-narr.sincere b { color: #111; }
.w-bubble.sincere { background: #fff; color: #111; border-color: #5ef2c4; box-shadow: 0 0 12px rgba(94, 242, 196, .6); font-style: italic; }
.w-tag .eg { color: #5ef2c4; margin-left: 3px; }
.w-ph-tabs .w-ph-egg { font-family: monospace; letter-spacing: 2px; color: #5ef2c4; }
.w-egg-box { font-size: 12px; }
.w-egg-msg { display: flex; flex-wrap: wrap; gap: 4px 6px; background: #07050f; border: 1px solid #2c2450; padding: 10px; margin: 6px 0 10px; font: 700 12px/1.3 monospace; letter-spacing: 1px; }
.w-egg-msg span { color: #e8fff6; }
.w-egg-msg span.no { color: #3a3360; }
.w-egg-list { list-style: none; margin: 0 0 10px; padding: 0; }
.w-egg-list li { padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); display: flex; gap: 8px; }
.w-egg-list li i { font-style: normal; font: 700 10px/1.6 monospace; color: #5ef2c4; min-width: 22px; }
.w-egg-list li.no { opacity: .6; }
.w-egg-list li.no i { color: #6d6890; }
.w-egg-tips { margin: 0; padding-left: 18px; }
.w-egg-tips li { margin: 0 0 6px; }
.w-egg-badge { display: inline-block; border: 1px solid #5ef2c4; color: #5ef2c4; padding: 2px 8px; font: 700 11px monospace; letter-spacing: 2px; margin: 4px 0 8px; }
.w-sn { font-family: monospace; letter-spacing: 1px; cursor: pointer; text-decoration: underline dotted; }
.w-tl-row.egg { opacity: .35; cursor: pointer; }
.w-tl-row.egg:hover, .w-tl-row.egg.on { opacity: 1; }
.w-loss { cursor: zoom-in; }
#w-egg-end { position: fixed; inset: 0; z-index: 40; background: #000; color: #e8fff6; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; text-align: center; overflow: auto; }
#w-egg-end::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 3px); }
#w-egg-end .t { font: 700 11px monospace; letter-spacing: 4px; color: #5ef2c4; margin-bottom: 18px; }
#w-egg-end .m { max-width: 640px; font: 400 clamp(22px, 5vw, 38px)/1.25 Bangers, Impact, sans-serif; letter-spacing: 2px; }
#w-egg-end .m span { opacity: 0; transition: opacity 1.2s; }
#w-egg-end .m span.on { opacity: 1; }
#w-egg-end .h { max-width: 520px; margin-top: 26px; font: italic 500 15px/1.5 Inter, sans-serif; opacity: 0; transition: opacity 1.5s; }
#w-egg-end .h.on { opacity: 1; }
#w-egg-end .h.snap { font-style: normal; color: #ffd23f; font-size: 13px; margin-top: 12px; }
#w-egg-end .b { margin-top: 22px; opacity: 0; transition: opacity 1s; }
#w-egg-end .b.on { opacity: 1; }
#w-egg-end .b span { display: inline-block; border: 1px solid #5ef2c4; padding: 6px 12px; font: 700 12px monospace; letter-spacing: 3px; color: #5ef2c4; box-shadow: 0 0 18px rgba(94, 242, 196, .35); }
#w-egg-end button { margin-top: 18px; }
@media (max-width: 760px) {
  #w-egg-tip { left: 8px; top: 132px; }
  #w-egg-pop { top: 8px; }
  #w-egg-pop .w { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { #w-egg-pop, #w-egg-tip { animation-duration: .01s; } #w-egg-end .m span, #w-egg-end .h, #w-egg-end .b { transition-duration: .01s; } }
/* ---- sound: settings readout and the car radio ---- */
.w-set-np { color: #8affd8; font-size: 11px; min-height: 14px; margin-bottom: 4px; }
#w-radio { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 8; display: flex; align-items: center; gap: 8px; background: rgba(12,6,28,.88); border: 2px solid #ff3ec8; border-radius: 12px; padding: 6px 8px; box-shadow: 0 0 18px rgba(255,62,200,.35), 3px 3px 0 #000; color: #fff; max-width: min(420px, calc(100vw - 32px)); }
#w-radio > div { display: flex; flex-direction: column; min-width: 0; text-align: center; }
#w-radio b { font: 400 18px/1 Bangers, Impact, sans-serif; letter-spacing: 1px; color: #ff3ec8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#w-radio small { font: 600 11px/1.3 Inter, sans-serif; color: #c8bfff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
#w-radio button { background: #000; color: #22e8ff; border: 1px solid #22e8ff; border-radius: 8px; width: 34px; height: 34px; font-size: 14px; cursor: pointer; flex: none; }
#w-radio.tune { animation: w-radio-tune .45s steps(4); }
@keyframes w-radio-tune { 0%, 100% { filter: none; } 25% { filter: hue-rotate(90deg) blur(1px); } 50% { filter: hue-rotate(-60deg); } }
@media (max-width: 480px) { #w-radio { top: 8px; padding: 4px 6px; } #w-radio small { max-width: 220px; } }
#w-root #w-settings { max-height: calc(100vh - var(--bar) - 24px); overflow-y: auto; }

/* cop chase (3c): wanted stars, status, hide/jam buttons, a red-blue edge flash while they can see you */
#w-chase { position: absolute; top: 166px; right: 8px; z-index: 6; width: 172px; background: rgba(10, 4, 18, .92); border: 2px solid #ff3b3b; border-radius: 10px; padding: 6px 8px 8px; color: #fff; text-align: center; box-shadow: 3px 3px 0 #000, 0 0 16px rgba(255, 59, 59, .4); }
#w-chase.seen { animation: w-ch-flash .5s steps(2) infinite; }
#w-chase.hid { border-color: #3dffb4; box-shadow: 3px 3px 0 #000, 0 0 16px rgba(61, 255, 180, .35); }
@keyframes w-ch-flash { 0% { border-color: #ff3b3b; } 50% { border-color: #3a7bff; } }
#w-ch-stars { font: 400 26px/1 Bangers, Impact, sans-serif; letter-spacing: 3px; color: #ffd23f; text-shadow: 2px 2px 0 #000, 0 0 8px rgba(255, 210, 63, .6); }
#w-ch-st { font: 800 11px/1.3 Inter, sans-serif; color: #ffd0d6; margin: 3px 0 6px; letter-spacing: .3px; }
#w-chase.hid #w-ch-st { color: #b8ffe6; }
.w-ch-btns { display: flex; flex-direction: column; gap: 5px; }
.w-ch-btns button { background: #000; color: #22e8ff; border: 1px solid #22e8ff; border-radius: 8px; font: 800 12px/1.2 Inter, sans-serif; padding: 6px 6px; min-height: 34px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-ch-btns button small { font-weight: 600; font-size: 10px; color: #a99fc7; }
.w-ch-btns button:disabled { opacity: .6; cursor: default; border-color: #555; }
#w-ch-hide { color: #3dffb4; border-color: #3dffb4; }
#w-ch-hide.watched { color: #ffb0b0; border-color: #ff6b6b; }
#w-chase-vig { position: absolute; inset: 0; pointer-events: none; z-index: 2; animation: w-vig .6s steps(2) infinite; }
@keyframes w-vig { 0% { box-shadow: inset 0 0 90px rgba(255, 40, 60, .42); } 50% { box-shadow: inset 0 0 90px rgba(40, 100, 255, .42); } }
.w-tag .wanted { color: #ffd23f; margin-right: 4px; text-shadow: 0 0 6px #ff3b3b, 1px 1px 0 #000; letter-spacing: 1px; }
.w-tag.hidp { display: none !important; }
@media (max-width: 760px) { #w-chase { top: 112px; right: 6px; width: 148px; padding: 4px 6px 6px; } #w-ch-stars { font-size: 21px; } }
@media (prefers-reduced-motion: reduce) { #w-chase.seen, #w-chase-vig { animation: none; } #w-chase-vig { box-shadow: inset 0 0 70px rgba(255, 40, 60, .35); } }

/* pawn shop (Lefty) */
.w-pawn-row.hot { background: linear-gradient(90deg, rgba(255, 90, 40, .12), transparent); }
.w-shop-row .w-pawn-btns { display: flex; flex-direction: column; gap: 3px; flex: 0 0 auto; }
.w-pawn-btns .w-btn { min-width: 58px; }
.w-pc { font-style: normal; font-size: 10px; padding: 0 4px; border-radius: 4px; background: rgba(255, 255, 255, .1); color: #d8d0f0; white-space: nowrap; }
.w-pc.hot { background: rgba(255, 80, 40, .3); color: #ffb090; }
.w-pc.cM { background: rgba(61, 255, 138, .2); color: #9fffc8; }
.w-pc.cB { background: rgba(255, 59, 92, .2); color: #ffb0c0; }
.w-pc.up { background: rgba(61, 255, 138, .25); color: #b0ffd0; }
.w-pc.dn { background: rgba(255, 59, 92, .25); color: #ffc0cc; }
.w-worth { color: #7a7090; font-size: 11px; }
.w-shop-row small.w-lefty { font-style: italic; color: #e8c890; }
.w-rot { float: right; font-weight: 400; color: #a99fc7; }
.w-tag .sup.pawn { color: #ffb020; border-color: #ffb020; }
.w-tag .sup.cas { color: #ffd23f; border-color: #ff2ec4; }
/* the Overfit Casino */
.w-cas-top { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: #c8c0e8; padding: 4px 0 8px; }
.w-cas-top .up { color: #3dff8a; } .w-cas-top .dn { color: #ff6b8a; }
.w-cas-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 8px; }
.w-cas-tabs .w-btn { padding: 6px 2px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-cas-bet { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; margin-bottom: 8px; }
.w-cas-in { width: 64px; padding: 4px 6px; background: #120a1e; color: #fff; border: 1px solid rgba(255, 210, 63, .5); border-radius: 6px; font: inherit; }
.w-btn.w-chip { border-radius: 999px; min-width: 38px; }
.w-btn.w-chip.max { border-color: #ffd23f; color: #ffd23f; }
.w-cas-pane { background: radial-gradient(ellipse at 50% 0%, rgba(255, 46, 196, .12), rgba(10, 40, 30, .35)); border: 1px solid rgba(255, 210, 63, .25); border-radius: 10px; padding: 10px; }
.w-btn.w-cas-go { display: block; width: 100%; margin: 8px 0 2px; font-weight: 800; letter-spacing: .08em; background: linear-gradient(90deg, #ff2ec4, #ffd23f); color: #1a0010; }
.w-reels { display: flex; gap: 8px; justify-content: center; }
.w-reel { width: 72px; height: 78px; display: grid; place-items: center; font-size: 40px; background: linear-gradient(#0a0612, #1e1030 50%, #0a0612); border: 2px solid #ffd23f; border-radius: 8px; box-shadow: inset 0 0 14px rgba(0, 0, 0, .8), 0 0 10px rgba(255, 210, 63, .3); }
.w-reel.stop { animation: wReelStop .18s ease-out; }
.w-reel.tense { border-color: #ff2ec4; box-shadow: 0 0 18px #ff2ec4; animation: wTense .2s infinite alternate; }
@keyframes wReelStop { 0% { transform: translateY(-6px); } 100% { transform: none; } }
@keyframes wTense { to { transform: scale(1.04); } }
.w-paytable { font-size: 11px; color: #c8c0e8; margin-top: 6px; }
.w-paytable span { display: inline-block; margin: 2px 8px 0 0; }
.w-cas-res { min-height: 22px; margin: 8px 0 2px; text-align: center; font-weight: 800; font-size: 15px; }
.w-cas-res.win { color: #3dff8a; text-shadow: 0 0 10px #3dff8a; }
.w-cas-res.lose { color: #ff8aa0; }
.w-cas-res.push { color: #ffd23f; }
.w-cas-res small { display: block; font-weight: 400; font-size: 11px; color: #c8c0e8; text-shadow: none; }
.w-cas-edge { font-size: 10.5px; margin-top: 8px; }
#w-win.cas-flash { animation: wCasFlash .9s ease-out; }
@keyframes wCasFlash { 0%, 40% { box-shadow: 0 0 50px #ffd23f, 0 0 120px #ff2ec4; border-color: #ffd23f; } 20%, 60% { box-shadow: 0 0 20px #22e8ff; } 100% { box-shadow: 0 0 30px rgba(46, 230, 255, .3); } }
.w-bj-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.w-bj-lab { flex: 0 0 104px; font-size: 12px; color: #c8c0e8; }
.w-cards { display: flex; gap: 4px; flex-wrap: wrap; }
.w-card { width: 34px; height: 48px; display: grid; place-items: center; background: #f4f0e8; color: #14101c; border-radius: 5px; font-weight: 800; font-size: 14px; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); animation: wReelStop .2s ease-out; }
.w-card.red { color: #d01838; }
.w-card.back { background: repeating-linear-gradient(45deg, #ff2ec4 0 4px, #2a0f3a 4px 8px); border: 2px solid #ffd23f; }
.w-bj-btns { display: flex; gap: 6px; margin-top: 8px; }
.w-wheel { width: 84px; height: 84px; margin: 0 auto 8px; display: grid; place-items: center; border-radius: 50%; font-size: 30px; font-weight: 900; color: #fff; background: #1a1020; border: 4px solid #ffd23f; box-shadow: 0 0 16px rgba(255, 210, 63, .4); }
.w-wheel.red { background: #c01030; } .w-wheel.black { background: #14101c; } .w-wheel.green { background: #0a8040; }
.w-wheel.spin { animation: wTense .08s infinite alternate; }
.w-rl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.w-rl-grid .w-cas-in { width: 100%; box-sizing: border-box; }
.w-btn.rl-red:not(.ghost) { background: #c01030; color: #fff; } .w-btn.rl-blk:not(.ghost) { background: #14101c; color: #fff; }
.w-race-row { display: flex; align-items: center; gap: 6px; margin: 4px 0; font-size: 12px; }
.w-race-name { flex: 0 0 132px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-race-name small { display: block; font-size: 10px; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-race-row.mine .w-race-name { color: #22e8ff; font-weight: 700; }
.w-race-row.mine { background: rgba(34,232,255,.08); border-radius: 6px; }
.w-race-bar { flex: 1; height: 12px; background: #120a1e; border: 1px solid rgba(255, 255, 255, .15); border-radius: 6px; overflow: hidden; }
.w-race-bar i { display: block; height: 100%; background: linear-gradient(90deg, #22e8ff, #b44dff); }
.w-race-bar i.won { background: linear-gradient(90deg, #ffd23f, #3dff8a); box-shadow: 0 0 10px #3dff8a; }
.w-race-odds { flex: 0 0 40px; text-align: right; color: #ffd23f; }
@media (max-width: 420px) { .w-reel { width: 60px; height: 66px; font-size: 32px; } .w-bj-lab { flex-basis: 78px; } .w-race-name { flex-basis: 118px; white-space: normal; } .w-race-name small { white-space: normal; line-height: 1.2; } .w-cas-tabs .w-btn { font-size: 11px; } }

.w-pawn-use { display: block; color: #9fe8ff; font-size: 11px; margin-top: 2px; }
/* round 6: Chinchilla recipe picker and mid-run decisions */
.w-recipe { margin: 6px 0 2px; }
.w-recipe-h { display: block; font-size: 10px; color: #a99fc7; margin-bottom: 4px; }
.w-recipe-row { display: flex; flex-direction: column; gap: 4px; }
.w-recipe-b { min-width: 0; padding: 5px 5px; text-align: left; background: rgba(0, 0, 0, .35); color: #cfc6e8; border: 1px solid rgba(34, 232, 255, .35); border-radius: 8px; font: 600 10px/1.3 Inter, sans-serif; cursor: pointer; }
.w-recipe-b b { display: block; font: 800 11px/1.2 Inter, sans-serif; color: #fff; margin-bottom: 2px; }
.w-recipe-b span { display: inline; }
.w-recipe-b span + span::before { content: " · "; color: #7f77a0; }
.w-recipe-b span b { display: inline; font-size: 10px; color: #3dff8a; }
.w-recipe-b .bad { color: #ff6b6b; }
.w-recipe-b .meh { color: #ffd23f; }
.w-recipe-b.on { background: rgba(34, 232, 255, .2); border-color: #22e8ff; box-shadow: 0 0 8px rgba(34, 232, 255, .35); }
.w-recipe-b.nofit { opacity: .6; }
.w-call { grid-column: 1 / -1; margin: 6px 0 2px; padding: 7px 8px; border-radius: 9px; border: 1px solid #ffd23f; background: rgba(255, 210, 63, .09); box-shadow: 0 0 12px rgba(255, 210, 63, .25); }
.w-call > b { display: block; color: #ffd23f; font: 800 13px Inter, sans-serif; }
.w-call > small { display: block; margin-top: 2px; line-height: 1.35; }
.w-call-row { display: flex; gap: 5px; margin-top: 6px; }
.w-call-row .w-btn { flex: 1 1 0; margin-top: 0; }
.w-call-row .w-btn small { display: block; font-size: 9px; font-weight: 600; opacity: .85; }
.w-rl { border-color: #22e8ff; background: rgba(34, 232, 255, .07); box-shadow: 0 0 12px rgba(34, 232, 255, .2); }
.w-rl > b { color: #22e8ff; }
.w-rl > b em { font-style: normal; opacity: .7; font-weight: 600; }
.w-rl-q { font-weight: 700; color: #fff; margin-top: 5px !important; }
.w-rl-row .w-btn { text-align: left; white-space: normal; line-height: 1.3; font-weight: 600; padding: 6px 7px; }
.w-rl-row .w-btn small { font-size: 10px; font-weight: 800; color: #22e8ff; opacity: 1; }
@media (max-width: 420px) { .w-rl-row { flex-direction: column; } }
.w-cas-tok { display: block; margin-top: 3px; font: 600 11px/1.35 "JetBrains Mono", ui-monospace, monospace; color: #9fe8ff; }
p.w-cas-tok { text-align: center; margin: 4px 0; font-size: 13px; }
@media (max-width: 480px) { .w-cas-tabs { grid-template-columns: repeat(2, 1fr); } }
/* 390px phones: with the training chip showing, 7 HUD cells don't fit and the clock wrapped under itself; drop Parts (it's in the bag) */
@media (max-width: 420px) { #w-biz:has(#w-b-ai:not([hidden])) .hc:has(#w-b-parts) { display: none; } }

/* ---------- the trailer: letterbox, captions and game-styled cards over the live world ---------- */
.w-look-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.w-look-top h2 { margin: 0 !important; }
.w-trl-open { border: 2px solid #000; border-radius: 10px; background: #ffd23f; color: #07050c; box-shadow: 0 0 14px rgba(255, 210, 63, .5), 3px 3px 0 #000; padding: 7px 12px; font: 400 18px/1 Bangers, Impact, sans-serif; letter-spacing: 1px; cursor: pointer; animation: trlPulse 1.6s ease-in-out infinite; }
.w-trl-open:disabled { opacity: .5; cursor: wait; animation: none; }
#w-start-trl { width: 100%; margin-top: 8px; font-size: 20px; padding: 9px; }
@keyframes trlPulse { 50% { box-shadow: 0 0 26px rgba(255, 210, 63, .9), 3px 3px 0 #000; } }
body.trl #w-bar, body.trl #w-strip, body.trl #w-track, body.trl #w-edge, body.trl #w-mapbox, body.trl #w-narr, body.trl #w-tips, body.trl #w-chase, body.trl #w-chase-vig, body.trl #w-radio, body.trl #w-hover, body.trl #w-xpdrops, body.trl #w-banner, body.trl #w-toast, body.trl #w-joy, body.trl #w-settings { display: none !important; }
#w-trl { position: absolute; inset: 0; z-index: 40; overflow: hidden; color: #fff; user-select: none; -webkit-user-select: none; }
.w-trl-lb { position: absolute; left: 0; right: 0; height: 7vh; background: #000; z-index: 1; }
.w-trl-lb.top { top: 0; } .w-trl-lb.bot { bottom: 0; }
#w-trl-vig { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s; }
#w-trl.chase #w-trl-vig { opacity: 1; animation: trlVig .5s steps(1) infinite; }
@keyframes trlVig { 0% { box-shadow: inset 0 0 90px rgba(255, 32, 64, .55); } 50% { box-shadow: inset 0 0 90px rgba(32, 96, 255, .55); } }
#w-trl-heat { position: absolute; top: calc(7vh + 10px); right: 12px; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; font: 400 28px/1 Bangers, Impact, sans-serif; letter-spacing: 1px; color: #ffd23f; -webkit-text-stroke: 1px #000; text-shadow: 0 0 12px rgba(255, 40, 60, .8), 2px 2px 0 #000; }
#w-trl-heat span { font-size: 18px; color: #ff4a5a; }
#w-trl-cap { position: absolute; left: 50%; top: calc(7vh + 14px); transform: translateX(-50%); z-index: 3; width: min(92vw, 900px); text-align: center; font: 400 clamp(30px, 6.2vw, 66px)/1.02 Bangers, Impact, sans-serif; letter-spacing: 1.5px; color: #fff200; -webkit-text-stroke: 2px #000; text-shadow: 0 0 22px rgba(255, 46, 196, .7), 4px 4px 0 #000; pointer-events: none; }
#w-trl-cap.bad { color: #ff4a5a; text-shadow: 0 0 22px rgba(255, 40, 60, .8), 4px 4px 0 #000; }
#w-trl-cap.title { top: 22vh; font-size: clamp(64px, 16vw, 150px); color: #ff3ec8; letter-spacing: 6px; text-shadow: 0 0 30px #ff3ec8, 6px 6px 0 #000; }
#w-trl-cap.slam { animation: trlSlam .32s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes trlSlam { 0% { opacity: 0; transform: translateX(-50%) scale(1.8) rotate(-4deg); } 100% { opacity: 1; transform: translateX(-50%) scale(1) rotate(0); } }
.w-trl-card { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); z-index: 2; width: min(88vw, 420px); background: rgba(14, 10, 32, .93); border: 2px solid var(--neon); border-radius: 12px; box-shadow: 0 0 26px rgba(46, 230, 255, .4), 5px 5px 0 #000; padding: 12px 14px; font: 600 14px/1.35 Inter, sans-serif; animation: trlCard .25s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes trlCard { 0% { opacity: 0; transform: translate(-50%, -40%) scale(.9); } }
.w-trl-card small { display: block; font: 800 11px/1.2 Inter, sans-serif; letter-spacing: 1px; color: var(--neon); margin-bottom: 4px; }
.w-trl-card p { margin: 4px 0 8px; }
.w-trl-card.tag { top: auto; bottom: calc(7vh + 64px); transform: translateX(-50%); width: auto; background: none; border: 0; box-shadow: none; animation: none; }
.w-trl-card.tag small { font: 400 clamp(18px, 3.4vw, 28px)/1 Bangers, Impact, sans-serif; color: #fff; letter-spacing: 1.5px; text-shadow: 2px 2px 0 #000; text-align: center; }
.w-trl-card.garage { width: min(92vw, 470px); top: 56%; border-color: #ff2ec4; box-shadow: 0 0 26px rgba(255, 46, 196, .45), 5px 5px 0 #000; }
.w-trl-gh { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.w-trl-gh b { font: 400 22px/1 Bangers, Impact, sans-serif; letter-spacing: 1px; color: #ff2ec4; }
.w-trl-gh span { font: 800 13px/1 Inter, sans-serif; color: #9dff8a; }
#w-trl-gc { display: block; width: 100%; height: auto; image-rendering: pixelated; border-radius: 6px; }
.w-trl-lab b { display: block; font: 400 26px/1.1 Bangers, Impact, sans-serif; letter-spacing: 1px; color: #fff; }
.w-trl-lab b i { font-style: normal; color: #a99fc7; font-size: 18px; }
.w-trl-bar { height: 14px; margin: 8px 0 6px; border-radius: 7px; background: rgba(255, 255, 255, .1); overflow: hidden; border: 1px solid rgba(46, 230, 255, .5); }
.w-trl-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #22e8ff, #a6ff2e); }
#w-trl-acc { font: 800 15px/1 Inter, sans-serif; color: #ffd23f; }
.w-trl-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.w-trl-opts button { position: relative; border: 2px solid rgba(46, 230, 255, .5); border-radius: 9px; background: rgba(0, 0, 0, .35); color: #fff; padding: 9px 8px; font: 800 14px/1.25 Inter, sans-serif; pointer-events: none; }
.w-trl-opts button i { font-style: normal; font-weight: 600; font-size: 12px; color: #a99fc7; }
.w-trl-opts button.on { border-color: #9dff8a; background: rgba(61, 255, 138, .16); box-shadow: 0 0 16px rgba(61, 255, 138, .45); transform: scale(1.04); transition: transform .12s; }
.w-trl-opts button em { display: block; margin-top: 4px; font: 800 11px/1.2 Inter, sans-serif; font-style: normal; color: #9dff8a; }
.w-trl-pay { display: block; font: 400 34px/1 Bangers, Impact, sans-serif; color: #9dff8a; letter-spacing: 1px; text-shadow: 2px 2px 0 #000; }
.w-trl-card.casino { width: auto; text-align: center; border-color: #ffd23f; }
.w-trl-reels { display: flex; gap: 8px; justify-content: center; }
.w-trl-reels i { display: grid; place-items: center; width: 64px; height: 72px; border-radius: 8px; background: #fff6d8; color: #ff2ec4; font: 400 44px/1 Bangers, Impact, sans-serif; font-style: normal; border: 3px solid #000; }
.w-trl-lose { display: block; margin-top: 6px; font: 400 28px/1 Bangers, Impact, sans-serif; color: #ff4a5a; letter-spacing: 1px; }
.w-trl-card.radio { width: auto; border-color: #ff2ec4; }
.w-trl-radio { display: flex; align-items: center; gap: 8px; font-size: 26px; }
.w-trl-radio b { font: 400 26px/1 Bangers, Impact, sans-serif; letter-spacing: 1px; color: #ff2ec4; }
.w-trl-radio small { margin: 0; color: #cfc6e8; }
.w-trl-card.fin { text-align: center; border-color: #ffd23f; box-shadow: 0 0 40px rgba(255, 210, 63, .55), 5px 5px 0 #000; }
.w-trl-card.fin h2 { margin: 0 0 6px; font: 400 40px/1 Bangers, Impact, sans-serif; letter-spacing: 1.5px; color: #ffd23f; text-shadow: 0 0 16px rgba(255, 210, 63, .7), 3px 3px 0 #000; }
.w-trl-card.how ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 15px; }
.w-trl-card.how b { color: #ffd23f; }
.w-trl-card.end { text-align: center; width: min(90vw, 460px); border-color: #ff3ec8; box-shadow: 0 0 40px rgba(255, 62, 200, .55), 6px 6px 0 #000; }
.w-trl-card.end h1 { margin: 0; font: 400 clamp(56px, 14vw, 92px)/1 Bangers, Impact, sans-serif; letter-spacing: 5px; color: #ff3ec8; -webkit-text-stroke: 1.5px #000; text-shadow: 0 0 24px #ff3ec8, 5px 5px 0 #000; }
.w-trl-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.w-trl-acts button { border: 2px solid #000; border-radius: 10px; padding: 10px 16px; font: 400 22px/1 Bangers, Impact, sans-serif; letter-spacing: 1px; cursor: pointer; background: #22e8ff; color: #07050c; box-shadow: 3px 3px 0 #000; }
.w-trl-acts button.go { background: #ff3ec8; color: #fff; box-shadow: 0 0 18px rgba(255, 62, 200, .6), 3px 3px 0 #000; }
#w-trl-sub { position: absolute; left: 50%; bottom: calc(7vh + 54px); transform: translateX(-50%); z-index: 3; width: max-content; max-width: min(92vw, 640px); padding: 6px 12px; border-radius: 8px; background: rgba(14, 10, 32, .88); border: 1px solid var(--neon); color: #dff9ff; font: 600 15px/1.35 Inter, sans-serif; text-align: center; pointer-events: none; }
#w-trl-sub b { font: 400 16px Bangers, Impact, sans-serif; letter-spacing: 1px; color: var(--neon); margin-right: 6px; }
.w-trl-ui { position: absolute; right: 10px; bottom: calc(7vh + 10px); z-index: 4; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.w-trl-ui button { border: 2px solid #000; border-radius: 9px; padding: 8px 12px; font: 400 18px/1 Bangers, Impact, sans-serif; letter-spacing: 1px; cursor: pointer; background: rgba(14, 10, 32, .9); color: #fff; box-shadow: 2px 2px 0 #000; }
#w-trl-play { background: #ff3ec8; }
#w-trl-snd { background: #ffd23f; color: #07050c; animation: trlPulse 1.2s ease-in-out infinite; }
#w-trl-prog { position: absolute; left: 0; right: 0; bottom: 7vh; height: 3px; z-index: 4; background: rgba(255, 255, 255, .12); }
#w-trl-prog i { display: block; height: 100%; width: 0; background: #ff3ec8; }
@media (max-width: 760px) {
  .w-trl-lb { height: 5vh; }
  #w-trl-cap { top: calc(5vh + 12px); }
  #w-trl-cap.title { top: 18vh; }
  #w-trl-heat { top: auto; bottom: calc(5vh + 150px); }
  .w-trl-card { top: 50%; padding: 10px 12px; font-size: 13px; }
  .w-trl-card.garage { top: 52%; }
  #w-trl-sub { bottom: calc(5vh + 58px); font-size: 14px; }
  .w-trl-ui { left: 10px; right: 10px; bottom: calc(5vh + 10px); justify-content: center; }
  .w-trl-ui button { flex: 1; font-size: 17px; padding: 9px 6px; }
  #w-trl-prog { bottom: 5vh; }
  .w-trl-reels i { width: 54px; height: 62px; font-size: 38px; }
  .w-trl-card.tag { bottom: calc(5vh + 116px); }
}
@media (prefers-reduced-motion: reduce) { #w-trl-cap.slam, .w-trl-card, #w-trl.chase #w-trl-vig, .w-trl-open, #w-trl-snd { animation: none; } }
.w-trl-card.how { top: 74%; }
.w-trl-card.radio { top: 76%; }
.w-trl-card.casino { top: 72%; }

/* ---------- mobile UI pass: one obvious way out of every panel, sizes in the visible screen (not 100vh),
   44px targets on phones, clear pressed and disabled states, and the HUD steps aside while a panel is open ---------- */
#w-scrim { position: absolute; inset: 0; z-index: 6; background: transparent; touch-action: none; }
#w-scrim.dim { background: rgba(5, 3, 12, .5); }
#w-root button { touch-action: manipulation; }
/* the close button: big, round, always the same place (top right), never scrolls away */
#w-root .w-x, #w-root .w-panel-x, #w-root #w-fullmap-x { width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); border: 2px solid #ff3ec8; color: #fff; font: 800 20px/1 Inter, sans-serif; cursor: pointer; box-shadow: 0 0 10px rgba(255, 62, 200, .45); }
#w-root .w-x:hover, #w-root .w-panel-x:hover, #w-root #w-fullmap-x:hover { background: rgba(255, 62, 200, .25); }
#w-root .w-x:active, #w-root .w-panel-x:active, #w-root #w-fullmap-x:active { transform: scale(.9); background: rgba(255, 62, 200, .45); }
#w-root .w-x { position: absolute; top: 6px; right: 6px; z-index: 2; }
/* windows (supplier, pawn, casino, bills): fit the visible screen; the header with the close stays put while the list scrolls */
#w-root #w-win { max-height: calc(100% - 40px); }
#w-win-body { overscroll-behavior: contain; min-height: 0; }
.w-win-head { flex: none; min-height: 56px; padding: 12px 60px 6px 12px; }
/* dialog: the text and options scroll, the close button doesn't */
#w-root #w-dlg { max-height: calc(100% - var(--bar) - 24px - env(safe-area-inset-top)); overflow: hidden; }
.w-dlg-main { overflow-y: auto; min-height: 0; overscroll-behavior: contain; padding-right: 44px; }
/* bag / phone / skills / jobs: a sticky header with its own close */
#w-root #w-pop { max-height: min(400px, calc(100% - var(--bar) - 190px)); }
#w-pop .w-pane-head { position: sticky; top: -10px; z-index: 3; margin: -10px -10px 6px; padding: 8px 8px 6px 12px; align-items: center; gap: 8px; background: #1c1538; border-radius: 12px 12px 0 0; }
#w-pop .w-pane-head span { margin-left: auto; }
/* settings: same header, same close */
.w-set-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: -10px; z-index: 2; margin: -10px -12px 8px; padding: 8px 8px 4px 12px; background: #120c24; }
#w-settings .w-set-head b { margin: 0; }
/* map */
.w-fullmap-head { min-height: 44px; }
/* pressed and disabled states that read on a phone */
.w-btn, #w-dlg-opts button, #w-dlg-form button { transition: transform .06s, box-shadow .06s, filter .1s; }
.w-btn:not(:disabled):active, #w-dlg-opts button:active, #w-dlg-form button:active { transform: translate(2px, 2px); box-shadow: 0 0 0 #000; filter: brightness(1.25); }
.w-btn:disabled, #w-root .w-btn:disabled { opacity: .38; filter: grayscale(.85); box-shadow: none; cursor: not-allowed; }
.w-tabs button:active, .w-morebtn:active, .w-hud-sys button:active, .w-ph-tabs button:active, .w-g-tog:active, .w-g-x:active { transform: scale(.92); filter: brightness(1.3); }
@media (max-width: 760px) {
  /* everything fits between the notch and the HUD */
  #w-root #w-win { top: calc(8px + env(safe-area-inset-top)); transform: translateX(-50%); width: calc(100% - 12px); max-height: calc(100% - var(--bar) - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  #w-root #w-pop { max-height: calc(100% - var(--bar) - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  #w-root #w-settings { max-height: calc(100% - var(--bar) - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); width: min(300px, calc(100% - 12px)); }
  #w-root #w-dlg { max-height: calc(100% - var(--bar) - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  #w-fullmap { padding: calc(8px + env(safe-area-inset-top)) 6px calc(8px + env(safe-area-inset-bottom)); }
  #w-garage { padding-top: calc(8px + env(safe-area-inset-top)); }
  /* 44px targets */
  #w-root .w-btn, #w-root #w-dlg-opts button, #w-root #w-dlg-form button { min-height: 44px; padding: 8px 12px; font-size: 14px; }
  #w-root .w-btn.sm { min-height: 44px; min-width: 52px; padding: 6px 10px; font-size: 13px; }
  #w-dlg-opts { gap: 8px; }
  #w-root .w-ph-tabs button { min-height: 40px; font-size: 13px; }
  #w-root .w-chat-tabs button { min-height: 36px; font-size: 13px; }
  #w-root #w-strip-toggle { width: 44px; font-size: 14px; }
  #w-root .w-set-row button { min-height: 44px; font-size: 13px !important; }
  #w-settings select { min-height: 40px; font-size: 14px; }
  #w-root .w-g-tog, #w-root .w-g-x { min-height: 44px; min-width: 44px; font-size: 13px; padding: 6px 10px; white-space: nowrap; flex: none; }
  .w-g-head { gap: 6px; }
  .w-g-head b { white-space: nowrap; }
  .w-g-head span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
  .w-q-drop { min-height: 36px; min-width: 44px; }
  @media (max-width: 420px) { .w-g-lbl { display: none; } }
  /* readable text */
  .w-note, .w-q, .w-q-head { font-size: 13px; }
  .w-shop-row div { font-size: 14px; }
  .w-shop-row small { font-size: 12.5px; line-height: 1.35; color: #c4bce0; }
  .w-pc { font-size: 11.5px; }
  #w-root #w-log { font-size: 13px; }
  #w-dlg-text { font-size: 15px; }
  #w-root .w-tabs button small, #w-root .w-morebtn small { font-size: 11px; letter-spacing: 0; }
  #w-root .w-hud-sys button { width: 42px; }
  #w-root .w-hud-sys button small { font-size: 8.5px; letter-spacing: -.4px; }
  .w-set-vol input { min-height: 32px; }
  #w-root #w-biz .hc > small { font-size: 11px; line-height: 1.05; letter-spacing: 0; color: #ddd7f3; }
  #w-root #w-biz .hc { padding: 1px 2px; }
  @media (max-width: 420px) { #w-root #w-biz .hc > i { display: none; } #w-root #w-biz .hc { justify-items: center; } #w-root #w-biz .hc > small { grid-column: 1; } }
  /* the joystick sits above the tracker on the left, and the Herald box moves to the top, so nothing covers the chat */
  body.w-joy-on #w-root #w-joy { left: 10px; bottom: calc(var(--bar) + 142px + env(safe-area-inset-bottom)); width: 96px; height: 96px; }
  body.w-joy-on #w-root #w-narr { top: calc(8px + env(safe-area-inset-top)); bottom: auto; }
  /* pawn: the buttons sit in a row under the item instead of a tall stack */
  .w-shop-row.w-pawn-row { flex-wrap: wrap; }
  .w-shop-row .w-pawn-btns { flex: 1 1 100%; flex-direction: row; gap: 6px; padding-left: 48px; }
  .w-pawn-btns .w-btn { flex: 1; }
  /* while a panel is open the chat, tracker, Herald box, tips and minimap step aside */
  body.w-modal #w-strip, body.w-modal #w-track, body.w-modal #w-narr, body.w-modal #w-tips, body.w-modal #w-mapbox, body.w-modal #w-joy, body.w-modal #w-edge, body.w-modal #w-xpdrops, body.w-modal #w-hover { display: none !important; }
}
