/* Legacy 3D — the world fills the screen; the game's own screens open in a side panel or inside the phone. */
body.w3d { overflow: hidden; background: #0b0f18; user-select: none; -webkit-user-select: none; }
body.w3d input, body.w3d textarea { user-select: text; -webkit-user-select: text; }
#w3cv { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; outline: none; touch-action: none; transition: filter 2.6s ease; }
body.w3-dying #w3cv { filter: grayscale(.92) brightness(.72) contrast(1.05); }
body.w3d > #app, .w3-hold, body.w3d #fx { display: none !important; }
.w3-hold #app { display: flex; }
body.w3-shake #w3cv { animation: w3shake .35s; }
@keyframes w3shake { 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-3px, 2px); } 80% { transform: translate(2px, -1px); } }

/* ---------- glass cards ---------- */
.w3-hud > *, .w3-panel, .w3-build, .w3-ward, .w3-inspect, .w3-stats .w3-scard, .w3-mapcard, .w3-shift, .w3-banner { font-family: var(--f-body); }
.w3-glass, .w3-me, .w3-money, .w3-clock, .w3-prompt, .w3-dock, .w3-hint, .w3-speed, .w3-shift { background: rgb(14 18 30 / .62); color: #f2f4fa; -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3); border: 1px solid rgb(255 255 255 / .12); box-shadow: 0 10px 30px -12px rgb(0 0 0 / .6); }

/* ---------- HUD ---------- */
.w3-hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; transition: opacity .4s; }
.w3-hud.hide, .w3-hud.dead { opacity: 0; }
.w3-hud > * { pointer-events: auto; }
.w3-me { position: absolute; left: 16px; top: 16px; display: flex; gap: 12px; align-items: center; padding: 10px 14px 10px 10px; border-radius: 22px; cursor: pointer; max-width: min(360px, calc(100vw - 32px)); }
.w3-av { width: 58px; height: 58px; border-radius: 50%; overflow: hidden; flex: none; background: rgb(255 255 255 / .12); display: grid; place-items: center; }
.w3-av > * { width: 100% !important; height: 100% !important; }
.w3-who { min-width: 0; display: grid; gap: 2px; }
.w3-name { font: 700 17px/1.1 var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w3-sub { font-size: 12px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w3-bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 4px; }
.w3-bar { display: flex; align-items: center; gap: 3px; }
.w3-bar i { font-style: normal; font-size: 12px; }
.w3-bar span { flex: 1; height: 6px; border-radius: 3px; background: rgb(255 255 255 / .18); overflow: hidden; min-width: 22px; }
.w3-bar b { display: block; height: 100%; background: #6ef0b0; border-radius: 3px; transition: width .6s; }
.w3-bar.warn b { background: #ffd56a; } .w3-bar.bad b { background: #ff7a86; }
.w3-money { position: absolute; left: 16px; top: 104px; padding: 8px 14px; border-radius: 16px; display: grid; gap: 1px; }
.w3-money small { font-size: 11px; opacity: .75; }
.w3-cash { font: 700 22px/1.1 var(--f-display); color: #8ff5c4; }
.w3-clock { position: absolute; right: 16px; top: 16px; padding: 7px 14px; border-radius: 14px; font-size: 13px; font-weight: 800; }
.w3-mini { position: absolute; right: 16px; top: 56px; width: 176px; height: 176px; border-radius: 50%; cursor: pointer; box-shadow: 0 10px 30px -10px rgb(0 0 0 / .6); background: rgb(14 18 30 / .5); }
.w3-mini.off { display: none; }
.w3-prompt { position: absolute; left: 50%; bottom: 128px; transform: translate(-50%, 12px); opacity: 0; transition: opacity .18s, transform .18s; padding: 10px 18px 10px 10px; border-radius: 18px; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; cursor: pointer; overflow: hidden; pointer-events: none; max-width: calc(100vw - 32px); }
.w3-prompt.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.w3-prompt kbd { font: 800 14px var(--f-display); background: #fff; color: #10131c; border-radius: 9px; width: 30px; height: 30px; display: grid; place-items: center; box-shadow: 0 3px 0 rgb(0 0 0 / .35); }
.w3-prompt i { font-style: normal; font-size: 20px; }
.w3-prompt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w3-prompt em { position: absolute; left: 0; bottom: 0; height: 4px; width: calc(var(--k, 0) * 100%); background: #ffd23f; }
.w3-hint { position: absolute; left: 50%; top: 18px; transform: translate(-50%, -10px); opacity: 0; transition: .3s; padding: 9px 16px; border-radius: 14px; font-size: 13px; font-weight: 700; max-width: min(560px, calc(100vw - 420px)); text-align: center; pointer-events: none; }
.w3-hint.on { opacity: 1; transform: translate(-50%, 0); }
.w3-dock { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px; border-radius: 26px; }
.w3-dock button { border: 0; background: none; color: #fff; font-size: 22px; display: grid; justify-items: center; gap: 2px; padding: 6px 8px; border-radius: 16px; cursor: pointer; min-width: 58px; transition: background .15s, transform .15s; }
.w3-dock button small { font: 800 10px var(--f-body); opacity: .85; }
.w3-dock button:hover { background: rgb(255 255 255 / .12); transform: translateY(-2px); }
.w3-dock button.dim { opacity: .45; }
.w3-dock .w3-age { width: 84px; height: 84px; margin: -30px 6px 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #4ff0b8, #0ea47a 60%, #087556); box-shadow: 0 0 0 4px rgb(255 255 255 / .9), 0 12px 30px -6px rgb(16 185 129 / .7); align-content: center; }
.w3-dock .w3-age b { font-size: 28px; line-height: 1; }
.w3-dock .w3-age span { font: 800 12px var(--f-display); }
.w3-dock .w3-age:hover { transform: translateY(-3px) scale(1.04); background: radial-gradient(circle at 35% 30%, #6ff8c8, #10b981 60%, #087556); }
.w3-dock .w3-age.spin b { animation: w3spin 1s linear infinite; display: inline-block; }
@keyframes w3spin { to { transform: rotate(360deg); } }
.w3-keys { position: absolute; left: 16px; bottom: 16px; font-size: 11px; font-weight: 700; color: rgb(255 255 255 / .8); text-shadow: 0 1px 3px rgb(0 0 0 / .8); max-width: 230px; pointer-events: none; }
.w3-speed { position: absolute; right: 16px; bottom: 16px; padding: 10px 16px; border-radius: 18px; display: none; text-align: right; }
.w3-speed.on { display: grid; }
.w3-speed b { font: 700 38px/1 var(--f-display); }
.w3-speed small { font-size: 11px; opacity: .7; } .w3-speed span { font-size: 11px; opacity: .7; margin-top: 4px; }
.w3-joy, .w3-tap-e, .w3-tap-j { display: none; }
.w3-hud.touch .w3-tap-e, .w3-hud.touch .w3-tap-j { display: grid; position: absolute; right: 18px; bottom: 120px; width: 66px; height: 66px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .6); background: rgb(14 18 30 / .55); color: #fff; font: 800 22px var(--f-display); place-items: center; }
.w3-hud.touch .w3-tap-j { bottom: 196px; right: 30px; width: 54px; height: 54px; }
.w3-joy.on { display: block; position: absolute; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .5); background: rgb(255 255 255 / .08); pointer-events: none; }
.w3-joy i { position: absolute; left: 31px; top: 31px; width: 48px; height: 48px; border-radius: 50%; background: rgb(255 255 255 / .7); }
.w3-hud.driving .w3-keys { display: none; }

/* ---------- floating names ---------- */
.w3-labels { position: fixed; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.w3-label { position: absolute; left: 0; top: 0; transform-origin: 50% 100%; display: flex; flex-direction: column; align-items: center; font: 800 13px var(--f-body); color: #fff; text-shadow: 0 1px 3px rgb(0 0 0 / .9); white-space: nowrap; will-change: transform; }
.w3-label > i { font-style: normal; font-size: 22px; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .5)); }
.w3-label.place span { background: rgb(14 18 30 / .66); padding: 4px 10px; border-radius: 10px; text-shadow: none; }
.w3-label.home span { background: #f59f00; color: #1b1300; }
.w3-label.npc { font-size: 12px; opacity: .9; }
.w3-label.price span { font-size: 12px; }
.w3-label small { background: #ff3b5c; color: #fff; border-radius: 8px; padding: 1px 7px; margin-top: 2px; font-size: 12px; text-shadow: none; }

/* ---------- banners, fades, loading ---------- */
.w3-banner { position: fixed; left: 50%; top: 22%; transform: translate(-50%, 10px); z-index: 30; text-align: center; color: #fff; opacity: 0; pointer-events: none; text-shadow: 0 2px 12px rgb(0 0 0 / .7); }
.w3-banner.on { animation: w3banner 2.6s ease forwards; }
.w3-banner b { display: block; font: 700 clamp(26px, 4vw, 44px)/1.1 var(--f-display); letter-spacing: -.01em; }
.w3-banner small { display: block; font-size: 15px; font-weight: 800; opacity: .85; margin-top: 6px; }
@keyframes w3banner { 0% { opacity: 0; transform: translate(-50%, 14px); } 15%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -8px); } }
.w3-fade { position: fixed; inset: 0; z-index: 45; background: #000; opacity: 0; pointer-events: none; transition: opacity .38s; }
.w3-fade.on { opacity: 1; pointer-events: auto; }
.w3-loading { position: fixed; inset: 0; z-index: 49; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #183a5a, #070a12 70%); color: #fff; transition: opacity .7s; }
.w3-loading.done { opacity: 0; pointer-events: none; }
.w3-loading div { display: grid; gap: 10px; justify-items: center; }
.w3-loading b { font: 900 54px Cinzel, Georgia, serif; letter-spacing: .08em; }
.w3-loading span { font: 800 15px var(--f-body); opacity: .8; }
.w3-loading i { width: 160px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, transparent, #4ff0b8, transparent); background-size: 200% 100%; animation: w3load 1.1s linear infinite; }
@keyframes w3load { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- the side panel: a building's counter, with the game's own screens ---------- */
.w3-panel { position: fixed; right: 16px; top: 16px; bottom: 16px; width: min(480px, calc(100vw - 32px)); z-index: 20; display: flex; flex-direction: column; border-radius: 26px; overflow: hidden; background: var(--bg); box-shadow: 0 30px 80px -20px rgb(0 0 0 / .7); transform: translateX(calc(100% + 40px)); transition: transform .38s cubic-bezier(.2, .9, .25, 1); }
.w3-panel.on { transform: none; }
.w3-panel > header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #10141f; color: #fff; }
.w3-panel > header i { font-style: normal; font-size: 22px; }
.w3-panel > header b { flex: 1; font: 700 17px var(--f-display); }
.w3-p-x, .w3p-x { border: 0; width: 34px; height: 34px; border-radius: 50%; background: rgb(255 255 255 / .14); color: #fff; font-size: 16px; cursor: pointer; }
.w3p-slot { flex: 1; min-height: 0; transform: translateZ(0); }
.w3p-slot #app, .ph-slot #app { max-width: none; width: 100%; height: 100%; box-shadow: none; }

/* ---------- the phone ---------- */
.w3-phone { position: fixed; right: 24px; bottom: 16px; z-index: 22; transform: translateY(calc(100% + 40px)) rotate(4deg); transition: transform .42s cubic-bezier(.2, .9, .25, 1.05); pointer-events: none; }
.w3-phone.on { transform: none; pointer-events: auto; }
.w3-phone .ph { width: min(400px, calc(100vw - 32px)); height: min(820px, calc(100vh - 32px)); border-radius: 46px; background: #0a0b10; padding: 12px 12px 24px; box-shadow: 0 0 0 2px #2a2d36, 0 40px 90px -20px rgb(0 0 0 / .8), inset 0 0 0 2px #3a3e4a; display: flex; flex-direction: column; position: relative; }
.ph-bar { display: flex; justify-content: space-between; align-items: center; color: #fff; font-size: 12px; font-weight: 800; padding: 6px 22px 8px; }
.ph-bar::after { content: ''; position: absolute; left: 50%; top: 16px; width: 110px; height: 28px; margin-left: -55px; border-radius: 16px; background: #000; }
.ph-screen { flex: 1; min-height: 0; border-radius: 34px; overflow: hidden; position: relative; background: linear-gradient(160deg, #2a5ad8, #7a3ac8 45%, #e85d9a); }
.ph-home { position: absolute; inset: 0; padding: 22px 18px; display: flex; flex-direction: column; gap: 18px; transition: transform .3s, opacity .3s; }
.w3-phone.in-app .ph-home { transform: scale(.92); opacity: 0; pointer-events: none; }
.ph-hello { display: flex; gap: 12px; align-items: center; color: #fff; background: rgb(255 255 255 / .16); border-radius: 22px; padding: 10px 12px; }
.ph-hello > :first-child { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex: none; }
.ph-hello b { font: 700 17px var(--f-display); display: block; } .ph-hello small { font-weight: 800; opacity: .85; }
.ph-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 10px; }
.ph-grid button { border: 0; background: none; color: #fff; display: grid; justify-items: center; gap: 6px; cursor: pointer; }
.ph-grid i { font-style: normal; width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; font-size: 30px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); box-shadow: 0 8px 18px -8px rgb(0 0 0 / .5); transition: transform .15s; }
.ph-grid button:hover i { transform: scale(1.08); }
.ph-grid small { font: 800 11px var(--f-body); text-shadow: 0 1px 2px rgb(0 0 0 / .4); }
.ph-age { margin-top: auto; border: 0; border-radius: 20px; padding: 14px; font: 700 18px var(--f-display); background: rgb(255 255 255 / .92); color: #0b5a46; cursor: pointer; }
.ph-app { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); transform: translateY(30px); opacity: 0; pointer-events: none; transition: .3s; }
.w3-phone.in-app .ph-app { transform: none; opacity: 1; pointer-events: auto; }
.ph-app > header { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; background: var(--surface); }
.ph-app > header b { font: 700 15px var(--f-display); color: var(--ink); }
.ph-back { border: 0; background: none; color: var(--accent); font: 800 15px var(--f-body); cursor: pointer; padding: 4px 6px; }
.ph-slot { flex: 1; min-height: 0; transform: translateZ(0); }
.ph-home-btn { position: absolute; left: 50%; bottom: 9px; width: 130px; height: 5px; margin-left: -65px; border: 0; border-radius: 3px; background: rgb(255 255 255 / .75); cursor: pointer; padding: 0; z-index: 2; }
.ph-home-btn::before { content: ''; position: absolute; inset: -12px -10px; }

/* ---------- furnishing, wardrobe, car inspection: drawers ---------- */
.w3-build, .w3-ward, .w3-inspect { position: fixed; z-index: 24; background: rgb(250 251 254 / .96); color: #171b2e; border-radius: 24px; box-shadow: 0 30px 80px -20px rgb(0 0 0 / .6); transition: transform .35s cubic-bezier(.2, .9, .25, 1), opacity .3s; opacity: 0; pointer-events: none; }
.w3-build.on, .w3-ward.on, .w3-inspect.on { opacity: 1; pointer-events: auto; transform: none !important; }
.w3-build { left: 50%; bottom: 16px; width: min(980px, calc(100vw - 32px)); transform: translate(-50%, 40px) !important; padding: 12px 14px; }
.w3-build.on { transform: translate(-50%, 0) !important; }
.w3-build header, .w3-ward header, .w3-inspect header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.w3-build header b, .w3-ward header b, .w3-inspect header b { font: 700 18px var(--f-display); }
.w3-build header span { font-size: 13px; color: #687089; flex: 1; }
.w3-build .x { border: 0; width: 32px; height: 32px; border-radius: 50%; background: #e8ecf5; cursor: pointer; }
.w3-build nav, .w3-ward nav { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 8px; scrollbar-width: none; }
.w3-build nav button, .w3-ward nav button { border: 0; border-radius: 12px; padding: 7px 12px; background: #e8ecf5; font: 800 13px var(--f-body); white-space: nowrap; cursor: pointer; color: #171b2e; }
.w3-build nav button.on, .w3-ward nav button.on { background: #10b981; color: #fff; }
.w3-cat { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 210px; overflow-y: auto; padding: 2px; }
.w3-item { border: 2px solid transparent; background: #fff; border-radius: 14px; padding: 8px 10px; text-align: left; display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; cursor: pointer; box-shadow: 0 2px 8px -4px rgb(0 0 0 / .25); font-family: var(--f-body); color: #171b2e; }
.w3-item i { font-style: normal; font-size: 26px; grid-row: span 2; }
.w3-item b { font-size: 13px; }
.w3-item small { font-size: 11px; color: #687089; font-weight: 700; }
.w3-item.on { border-color: #10b981; background: #ecfdf5; }
.w3-item.lock, .w3-item[data-poor] { opacity: .55; }
.w3-ward .w3-item { grid-template-columns: 1fr; }
.w3-build footer { font-size: 12px; color: #687089; margin-top: 8px; }
.w3-ward { left: 16px; top: 16px; bottom: 16px; width: min(400px, calc(100vw - 32px)); transform: translateX(-40px) !important; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.w3-ward header small { width: 100%; color: #687089; font-weight: 700; }
.w3-ward .w3-cat { max-height: none; flex: 1; align-content: start; grid-template-columns: repeat(2, 1fr); }
.w3-sw { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0; }
.w3-sw button { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #fff; background: var(--c); box-shadow: 0 0 0 1px #c8cee0; cursor: pointer; }
.w3-sw button.on { box-shadow: 0 0 0 3px #10b981; }
.w3-mini-b, .w3-mini { font: inherit; }
.w3-ward .w3-minib { position: static; width: auto; height: auto; border-radius: 10px; border: 0; padding: 5px 10px; background: #e8ecf5; font: 800 12px var(--f-body); box-shadow: none; }
.w3-turn { display: flex; gap: 8px; justify-content: center; }
.w3-turn button { border: 0; width: 44px; height: 36px; border-radius: 12px; background: #e8ecf5; font-size: 18px; cursor: pointer; }
.w3-ward footer, .w3-inspect footer { display: flex; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid #dde2ee; }
.w3-ward footer span { flex: 1; font-size: 14px; }
.w3-note { font-size: 12px; color: #687089; margin: 4px 0; }
.w3-inspect { right: 16px; top: 50%; width: min(360px, calc(100vw - 32px)); transform: translate(40px, -50%) !important; padding: 18px; display: grid; gap: 8px; }
.w3-inspect.on { transform: translate(0, -50%) !important; }
.w3-inspect header small { width: 100%; color: #687089; font-weight: 700; }
.w3-price { font: 700 30px var(--f-display); color: #0ea47a; }
.w3-spec { display: grid; grid-template-columns: 110px 1fr 46px; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; }
.w3-spec i { height: 7px; border-radius: 4px; background: #e8ecf5; overflow: hidden; }
.w3-spec i b { display: block; height: 100%; background: linear-gradient(90deg, #10b981, #4c8dff); }
.w3-spec em { font-style: normal; text-align: right; color: #687089; }
.w3-inspect footer .btn, .w3-ward footer .btn { flex: 1; }

/* ---------- a shift at work ---------- */
.w3-shift { position: fixed; left: 50%; top: 16px; transform: translate(-50%, -80px); z-index: 12; padding: 10px 18px 14px; border-radius: 18px; display: flex; gap: 12px; align-items: center; transition: transform .3s; overflow: hidden; font-size: 14px; }
.w3-shift.on { transform: translate(-50%, 0); }
.w3-shift b { font: 700 20px var(--f-display); color: #ffd23f; }
.w3-shift em { font-style: normal; color: #ffd23f; font-weight: 800; }
.w3-shift i { position: absolute; left: 0; bottom: 0; height: 4px; background: #ffd23f; transition: width .2s linear; }

/* ---------- stats (Tab) ---------- */
.w3-stats { position: fixed; inset: 0; z-index: 26; pointer-events: none; display: flex; align-items: center; padding: 16px; }
.w3-stats.on { pointer-events: auto; }
.w3-scard { width: min(420px, 100%); background: rgb(14 18 30 / .78); color: #fff; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid rgb(255 255 255 / .14); border-radius: 26px; padding: 18px; display: grid; gap: 9px; transform: translateX(-30px); opacity: 0; transition: .35s cubic-bezier(.2, .9, .25, 1); }
.w3-stats.on .w3-scard { transform: none; opacity: 1; }
.w3-shead { display: flex; gap: 14px; align-items: center; }
.w3-shead > :first-child { width: 86px; height: 86px; border-radius: 50%; overflow: hidden; flex: none; background: rgb(255 255 255 / .1); }
.w3-shead h2 { margin: 0; font: 700 22px var(--f-display); }
.w3-shead p { margin: 2px 0 0; font-size: 13px; opacity: .85; }
.w3-sbar { display: grid; grid-template-columns: 24px 90px 1fr 34px; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; }
.w3-sbar i { font-style: normal; font-size: 18px; }
.w3-sbar b { height: 10px; border-radius: 5px; background: rgb(255 255 255 / .16); overflow: hidden; }
.w3-sbar em { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #10b981, #6ef0b0); animation: w3grow .8s cubic-bezier(.2, .9, .25, 1); }
@keyframes w3grow { from { width: 0 !important; } }
.w3-sbar strong { text-align: right; }
.w3-sgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 4px; }
.w3-sgrid div { background: rgb(255 255 255 / .08); border-radius: 12px; padding: 7px 8px; display: grid; }
.w3-sgrid small { font-size: 10px; opacity: .7; font-weight: 800; } .w3-sgrid b { font: 700 14px var(--f-display); } .w3-sgrid .up { color: #6ef0b0; } .w3-sgrid .down { color: #ff8a96; }
.w3-ribs { display: flex; flex-wrap: wrap; gap: 6px; } .w3-ribs span { background: rgb(255 210 63 / .18); color: #ffe7a0; border-radius: 10px; padding: 3px 9px; font-size: 12px; font-weight: 800; }
.w3-shint { margin: 0; font-size: 11px; opacity: .6; text-align: center; }

/* ---------- the map ---------- */
.w3-map { position: fixed; inset: 0; z-index: 28; display: grid; place-items: center; background: rgb(5 8 16 / .55); opacity: 0; pointer-events: none; transition: opacity .25s; padding: 16px; }
.w3-map.on { opacity: 1; pointer-events: auto; }
.w3-mapcard { background: #10141f; color: #fff; border-radius: 26px; padding: 14px; width: min(760px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 10px; }
.w3-mapcard header { display: flex; align-items: center; gap: 10px; }
.w3-mapcard header b { font: 700 19px var(--f-display); }
.w3-mapcard header small { flex: 1; opacity: .7; font-weight: 700; }
.w3-how { flex: 1; display: flex; gap: 8px; }
.w3-how button { border: 0; border-radius: 12px; padding: 6px 12px; background: rgb(255 255 255 / .1); color: #fff; font: 800 13px var(--f-body); cursor: pointer; display: grid; text-align: left; }
.w3-how button small { opacity: .7; font-size: 11px; }
.w3-how button.on { background: #10b981; }
.w3-mapcard header button { border: 0; width: 34px; height: 34px; border-radius: 50%; background: rgb(255 255 255 / .14); color: #fff; cursor: pointer; }
.w3-mapimg { position: relative; width: min(100%, calc(100vh - 130px)); aspect-ratio: 1; margin: 0 auto; border-radius: 18px; overflow: hidden; }
.w3-mapimg img { width: 100%; height: 100%; display: block; }
.w3-pin { position: absolute; transform: translate(-50%, -50%); border: 0; background: #fff; border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 10px rgb(0 0 0 / .4); padding: 0; }
.w3-pin i { font-style: normal; font-size: 16px; }
.w3-pin span { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 800 11px var(--f-body); color: #fff; background: rgb(0 0 0 / .65); padding: 2px 7px; border-radius: 8px; margin-top: 3px; opacity: 0; transition: opacity .15s; pointer-events: none; }
.w3-pin:hover { transform: translate(-50%, -50%) scale(1.15); z-index: 2; }
.w3-pin:hover span { opacity: 1; }
.w3-pin.home { background: #f59f00; } .w3-pin.work { background: #4c8dff; }
.w3-you { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #ff3b5c; box-shadow: 0 0 0 3px #fff, 0 0 0 9px rgb(255 59 92 / .35); animation: w3pulse 1.4s infinite; }
@keyframes w3pulse { 50% { box-shadow: 0 0 0 3px #fff, 0 0 0 15px rgb(255 59 92 / .05); } }
.w3-help p { margin: 0 0 8px; line-height: 1.5; }

/* ---------- death ---------- */
.w3-death { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity 1.2s; color: #fff; text-align: center; padding: 16px; }
.w3-death.on { opacity: 1; }
.w3-death.s2 { pointer-events: auto; align-items: end; padding-bottom: 28px; background: linear-gradient(transparent 55%, rgb(0 0 0 / .55)); }
.w3-d1 h1 { font: 900 clamp(34px, 6vw, 72px)/1.05 Cinzel, Georgia, serif; margin: 0; letter-spacing: .04em; text-shadow: 0 4px 30px rgb(0 0 0 / .8); animation: w3rise 2.4s ease both; }
.w3-d1 p { font: 600 22px Cinzel, Georgia, serif; margin: 10px 0 4px; opacity: .9; animation: w3rise 2.4s .5s ease both; }
.w3-d1 small { font-size: 15px; opacity: .8; animation: w3rise 2.4s 1s ease both; display: block; }
@keyframes w3rise { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.w3-d2 { width: min(620px, 100%) !important; padding: 18px 26px !important; gap: 6px !important; background: rgb(10 12 18 / .72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgb(255 255 255 / .14); border-radius: 28px; padding: 26px 30px; width: min(460px, 100%); display: grid; gap: 8px; justify-items: center; animation: w3rise 1.4s ease both; }
.w3-d2 > small { text-transform: uppercase; letter-spacing: .3em; font-weight: 800; opacity: .7; }
.w3-d2 h1 { margin: 0; font: 900 34px/1.1 Cinzel, Georgia, serif; }
.w3-d2 .yrs { margin: 0; font: 600 18px Cinzel, Georgia, serif; opacity: .85; }
.w3-d2 .epi { margin: 0; font-style: italic; opacity: .9; }
.w3-d2 .cause { margin: 0; font-size: 13px; opacity: .75; }
.w3-dgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; margin: 6px 0; }
.w3-dgrid div { background: rgb(255 255 255 / .08); border-radius: 12px; padding: 8px 4px; display: grid; } .w3-dgrid small { font-size: 10px; opacity: .7; font-weight: 800; } .w3-dgrid b { font: 700 15px var(--f-display); }
.w3-d2 .btn { margin-top: 6px; min-width: 200px; }

/* ---------- narrow screens ---------- */
@media (max-width: 720px) {
  .w3-money { top: 96px; padding: 6px 12px; } .w3-cash { font-size: 18px; }
  .w3-mini { width: 120px; height: 120px; top: 52px; }
  .w3-clock { font-size: 11px; }
  .w3-dock { gap: 0; padding: 6px; bottom: 10px; } .w3-dock button { min-width: 46px; font-size: 19px; padding: 4px; } .w3-dock .w3-age { width: 70px; height: 70px; }
  .w3-keys, .w3-hint { display: none; }
  .w3-me { padding: 8px 10px 8px 8px; } .w3-av { width: 46px; height: 46px; } .w3-bars { gap: 3px; }
  .w3-phone { right: 8px; left: 8px; bottom: 8px; } .w3-phone .ph { width: 100%; }
  .w3-prompt { bottom: 112px; }
  .w3-build .w3-cat { max-height: 150px; }
}

/* ---------- mini games (js/w3d/play.js) ---------- */
.w3-play { position: fixed; left: 50%; bottom: 14px; z-index: 9000; width: min(640px, calc(100vw - 24px)); transform: translate(-50%, 130%); transition: transform .32s cubic-bezier(.2, .9, .3, 1.15); pointer-events: none; font-family: var(--f-body); color: #fff; }
.w3-play.on { transform: translate(-50%, 0); pointer-events: auto; }
.w3-play .pg { position: relative; background: linear-gradient(180deg, rgb(24 28 44 / .93), rgb(12 14 24 / .95)); border: 1px solid rgb(255 255 255 / .12); border-radius: 22px; padding: 12px 16px 14px; box-shadow: 0 20px 50px -12px rgb(0 0 0 / .7); backdrop-filter: blur(10px); overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; }
.w3-play .pg.shake { animation: pgshake .3s; }
@keyframes pgshake { 20% { transform: translateX(-7px); } 45% { transform: translateX(6px); } 70% { transform: translateX(-3px); } }
.w3-play header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.w3-play header > i { font-style: normal; font-size: 26px; width: 42px; height: 42px; display: grid; place-items: center; background: rgb(255 255 255 / .08); border-radius: 12px; }
.w3-play header div { flex: 1; min-width: 0; }
.w3-play header b { display: block; font: 700 18px/1.15 var(--f-display); }
.w3-play header small { display: block; font-size: 12.5px; font-weight: 700; opacity: .7; margin-top: 2px; }
.w3-play .pg-r { font: 800 13px var(--f-display); opacity: .75; }
.w3-play .pg-x { width: 30px; height: 30px; border-radius: 10px; border: 0; background: rgb(255 255 255 / .08); color: #fff; cursor: pointer; font-size: 13px; }
.w3-play .pg-x:hover { background: rgb(255 80 80 / .35); }
.w3-play .pg-b { position: relative; min-height: 150px; }
.w3-play .pg-tm { height: 6px; border-radius: 6px; background: rgb(255 255 255 / .1); margin-top: 10px; overflow: hidden; }
.w3-play .pg-tm i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #3fd08a, #8ff5c4); border-radius: 6px; }
.w3-play .pg-tm.low i { background: linear-gradient(90deg, #ff5a5a, #ffa25a); }
.w3-play .pg-cd { position: absolute; inset: 0; display: grid; place-items: center; font: 800 64px var(--f-display); color: #fff; text-shadow: 0 4px 24px rgb(0 0 0 / .6); background: rgb(10 12 20 / .55); opacity: 0; pointer-events: none; transition: opacity .2s; border-radius: 22px; }
.w3-play .pg-cd.on { opacity: 1; pointer-events: auto; }
.w3-play .pg-cd.go { color: #8ff5c4; }
.w3-play kbd { font: 800 11px var(--f-display); background: rgb(255 255 255 / .9); color: #10131c; border-radius: 6px; padding: 2px 6px; box-shadow: 0 2px 0 rgb(0 0 0 / .35); }
.w3-play button { font-family: var(--f-body); }
.w3-play .pg-step { font-weight: 800; font-size: 14px; text-align: center; min-height: 20px; margin-bottom: 8px; color: #ffe08a; }
.w3-play .pg-legend { color: #fff; opacity: .8; margin-left: 6px; letter-spacing: 2px; }
.w3-play .pg-go { display: block; margin: 12px auto 0; border: 0; border-radius: 14px; padding: 10px 22px; background: linear-gradient(180deg, #ffb341, #ff8a1f); color: #241400; font-weight: 900; font-size: 15px; cursor: pointer; box-shadow: 0 4px 0 #b85a00; }
.w3-play .pg-go:active { transform: translateY(3px); box-shadow: 0 1px 0 #b85a00; }
.w3-play .pg-go.big { padding: 16px 30px; font-size: 18px; }
/* timing */
.w3-play .pg-tbar { position: relative; height: 34px; border-radius: 12px; background: rgb(255 255 255 / .1); margin: 8px 6px 0; }
.w3-play .pg-tbar .z { position: absolute; top: 0; bottom: 0; background: rgb(63 208 138 / .55); border-radius: 8px; }
.w3-play .pg-tbar .p { position: absolute; top: 0; bottom: 0; background: #ffd23f; border-radius: 6px; }
.w3-play .pg-tbar b { position: absolute; top: -10px; transform: translateX(-50%); font-size: 26px; filter: drop-shadow(0 2px 4px rgb(0 0 0 / .6)); }
/* keys */
.w3-play .pg-seq { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.w3-play .pg-seq kbd { font-size: 22px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border-radius: 12px; background: rgb(255 255 255 / .14); color: #fff; box-shadow: none; transition: transform .12s; }
.w3-play .pg-seq kbd.cur { background: #fff; color: #10131c; transform: scale(1.12); box-shadow: 0 0 0 3px #ffd23f; }
.w3-play .pg-seq kbd.ok { background: #3fd08a; color: #072414; }
.w3-play .pg-pad { display: flex; justify-content: center; gap: 8px; }
.w3-play .pg-pad button, .w3-play .pg-letters button { width: 46px; height: 42px; border-radius: 12px; border: 0; background: rgb(255 255 255 / .12); color: #fff; font: 800 18px var(--f-display); cursor: pointer; }
.w3-play .pg-pad button:active, .w3-play .pg-letters button:active { background: #ffd23f; color: #10131c; }
/* type */
.w3-play .pg-word { display: flex; justify-content: center; gap: 4px; margin: 4px 0 12px; font: 800 34px var(--f-display); letter-spacing: 2px; }
.w3-play .pg-word span { opacity: .45; }
.w3-play .pg-word span.ok { opacity: 1; color: #8ff5c4; }
.w3-play .pg-word span.cur { opacity: 1; color: #fff; text-decoration: underline 3px #ffd23f; text-underline-offset: 6px; }
.w3-play .pg-letters { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
/* memory */
.w3-play .pg-mem { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.w3-play .pg-mem button { position: relative; height: 92px; border-radius: 18px; border: 0; background: rgb(255 255 255 / .1); cursor: pointer; font-size: 40px; transition: transform .1s, background .1s, box-shadow .1s; }
.w3-play .pg-mem button kbd { position: absolute; left: 8px; top: 8px; }
.w3-play .pg-mem button.lit { background: #ffd23f; transform: scale(1.06); box-shadow: 0 0 28px #ffd23f; }
.w3-play .pg-b.watch .pg-mem button { cursor: default; }
/* rhythm */
.w3-play .pg-rh { position: relative; display: flex; gap: 8px; height: 170px; }
.w3-play .pg-rh .ln { position: relative; flex: 1; border-radius: 14px; background: linear-gradient(180deg, rgb(255 255 255 / .02), rgb(255 255 255 / .1)); overflow: hidden; cursor: pointer; }
.w3-play .pg-rh .ln kbd { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); }
.w3-play .pg-rh .ln.hit { background: rgb(63 208 138 / .45); }
.w3-play .pg-rh .ln.bad { background: rgb(255 90 90 / .3); }
.w3-play .pg-rh .hitl { position: absolute; left: 0; right: 0; top: calc(70% + 12px); height: 4px; background: #ffd23f; border-radius: 4px; box-shadow: 0 0 12px #ffd23f; pointer-events: none; }
.w3-play .pg-rh .nt { position: absolute; left: 50%; transform: translateX(-50%); width: 46px; height: 28px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(180deg, #b38cff, #7a4af0); box-shadow: 0 0 12px rgb(150 110 255 / .7); font-size: 16px; }
.w3-play .pg-rh .nt.miss { opacity: .25; }
/* mash */
.w3-play .pg-mash { display: flex; align-items: center; justify-content: center; gap: 26px; }
.w3-play .pg-meter { position: relative; width: 44px; height: 140px; border-radius: 14px; background: rgb(255 255 255 / .1); overflow: hidden; }
.w3-play .pg-meter i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(0deg, #ff8a1f, #ffd23f); }
.w3-play .pg-meter b { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); font-size: 22px; }
.w3-play .pg-meter b.bump { animation: pgbump .15s; }
@keyframes pgbump { 50% { transform: translateX(-50%) scale(1.35); } }
.w3-play .pg-mash .pg-go { margin: 0; }
/* catch */
.w3-play .pg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 360px; margin: 0 auto; }
.w3-play .pg-grid button { position: relative; height: 56px; border-radius: 14px; border: 0; background: rgb(255 255 255 / .07); cursor: pointer; font-size: 30px; }
.w3-play .pg-grid button kbd { position: absolute; left: 5px; top: 5px; font-size: 9px; padding: 1px 4px; opacity: .55; }
.w3-play .pg-grid button.on { background: rgb(255 255 255 / .18); }
.w3-play .pg-grid button.on span { animation: pgpop .18s; display: inline-block; }
.w3-play .pg-grid button.hit { background: rgb(63 208 138 / .5); }
@keyframes pgpop { from { transform: scale(.2); } }
/* balance, sneak: tracks and meters */
.w3-play .pg-bal { display: flex; align-items: center; justify-content: center; gap: 22px; }
.w3-play .pg-track { position: relative; width: 56px; height: 150px; border-radius: 16px; background: rgb(255 255 255 / .08); }
.w3-play .pg-track .z { position: absolute; left: 4px; right: 4px; background: rgb(63 208 138 / .35); border: 2px solid #3fd08a; border-radius: 10px; }
.w3-play .pg-track b { position: absolute; left: 50%; transform: translate(-50%, 50%); font-size: 26px; filter: grayscale(.6) drop-shadow(0 2px 3px rgb(0 0 0 / .6)); }
.w3-play .pg-track b.in { filter: drop-shadow(0 0 8px #8ff5c4); }
.w3-play .pg-fill { width: 200px; }
.w3-play .pg-fill span { display: block; font-size: 12px; font-weight: 800; opacity: .75; margin-bottom: 4px; }
.w3-play .pg-fill i { display: block; height: 14px; width: 0; border-radius: 8px; background: linear-gradient(90deg, #3fd08a, #8ff5c4); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2); }
.w3-play .pg-sneak { display: flex; align-items: center; justify-content: center; gap: 24px; }
.w3-play .pg-boss { text-align: center; width: 110px; padding: 10px; border-radius: 16px; background: rgb(255 255 255 / .08); transition: background .15s; }
.w3-play .pg-boss b { display: block; font-size: 42px; transition: transform .25s; transform: scaleX(-1); }
.w3-play .pg-boss span { font-weight: 900; font-size: 13px; }
.w3-play .pg-boss.turn { background: rgb(255 190 60 / .4); }
.w3-play .pg-boss.turn b { transform: scaleX(1) rotate(-8deg); }
.w3-play .pg-boss.look { background: rgb(255 70 70 / .5); }
.w3-play .pg-boss.look b { transform: scale(1.15); }
.w3-play .pg-me b { font-size: 44px; opacity: .35; transition: opacity .1s, transform .1s; display: block; }
.w3-play .pg-me.on b { opacity: 1; transform: scale(1.15) rotate(-6deg); }
/* sort */
.w3-play .pg-sort { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 10px; align-items: center; }
.w3-play .pg-sort > button { height: 110px; border-radius: 18px; border: 2px dashed rgb(255 255 255 / .25); background: rgb(255 255 255 / .06); color: #fff; font-weight: 800; font-size: 13px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.w3-play .pg-sort > button span { font-size: 30px; }
.w3-play .pg-card { min-height: 70px; padding: 12px; border-radius: 16px; background: #fff; color: #10131c; font: 800 18px/1.2 var(--f-display); display: grid; place-items: center; text-align: center; box-shadow: 0 8px 24px -8px rgb(0 0 0 / .6); }
.w3-play .pg-card.in { animation: pgcard .25s; }
.w3-play .pg-card.go-l { transform: translateX(-60%) rotate(-12deg); opacity: 0; transition: .25s; }
.w3-play .pg-card.go-r { transform: translateX(60%) rotate(12deg); opacity: 0; transition: .25s; }
.w3-play .pg-card.go-d { transform: translateY(40%); opacity: 0; transition: .25s; }
@keyframes pgcard { from { transform: translateY(-30%) scale(.8); opacity: 0; } }
/* dialog */
.w3-play .pg-q { background: #fff; color: #10131c; border-radius: 16px 16px 16px 4px; padding: 10px 14px; margin-bottom: 10px; }
.w3-play .pg-q small { display: block; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: #7a4af0; }
.w3-play .pg-q p { margin: 2px 0 0; font: 700 16px/1.3 var(--f-display); }
.w3-play .pg-ans { display: grid; gap: 6px; }
.w3-play .pg-ans button { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; border-radius: 12px; padding: 9px 12px; background: rgb(255 255 255 / .1); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
.w3-play .pg-ans button:hover:not(:disabled) { background: rgb(255 255 255 / .2); }
.w3-play .pg-ans button.bold { background: rgb(122 74 240 / .3); }
.w3-play .pg-ans button small { opacity: .7; font-weight: 800; }
.w3-play .pg-ans button:disabled { opacity: .45; cursor: default; }
.w3-play .pg-ans button.picked { opacity: 1; background: rgb(63 208 138 / .45); }
.w3-play .pg-ans button.wrong { opacity: 1; background: rgb(255 90 90 / .4); }
.w3-play .pg-conf { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12px; font-weight: 800; }
.w3-play .pg-conf span { opacity: .75; }
.w3-play .pg-conf div { position: relative; flex: 1; height: 10px; border-radius: 6px; background: rgb(255 255 255 / .1); }
.w3-play .pg-conf .z { position: absolute; left: 38%; width: 24%; top: 0; bottom: 0; background: rgb(63 208 138 / .55); border-radius: 6px; }
.w3-play .pg-conf b { position: absolute; top: -4px; width: 4px; height: 18px; border-radius: 3px; background: #fff; transform: translateX(-50%); box-shadow: 0 0 6px #fff; }
/* the result */
.w3-play .pg-end { position: absolute; inset: -4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: rgb(12 14 24 / .9); border-radius: 16px; animation: pgend .3s; z-index: 2; }
.w3-play .pg-end b { font: 800 34px var(--f-display); }
.w3-play .pg-end.ok b { color: #8ff5c4; }
.w3-play .pg-end.no b { color: #ffa25a; }
.w3-play .pg-end i { font-style: normal; font-size: 26px; color: #ffd23f; letter-spacing: 4px; }
.w3-play .pg-end small { font-weight: 800; opacity: .8; }
@keyframes pgend { from { opacity: 0; transform: scale(.9); } }
/* pop-ups over your head */
.w3-pops { position: fixed; inset: 0; pointer-events: none; z-index: 8999; }
.w3-popt { position: absolute; transform: translate(-50%, -50%); font: 800 20px var(--f-display); color: #fff; text-shadow: 0 2px 8px rgb(0 0 0 / .7), 0 0 2px #000; white-space: nowrap; animation: w3pop 1.1s ease-out forwards; }
.w3-popt.good { color: #8ff5c4; }
.w3-popt.bad { color: #ff8a8a; }
@keyframes w3pop { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 30% { transform: translate(-50%, -60%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -190%); } }
@media (max-width: 640px) {
  .w3-play { bottom: 8px; }
  .w3-play .pg { padding: 10px 12px 12px; }
  .w3-play .pg-mem button { height: 72px; font-size: 32px; }
  .w3-play .pg-rh { height: 150px; }
  .w3-play .pg-word { font-size: 26px; }
  .w3-play .pg-sort > button { height: 90px; }
}

/* ---------- phones ---------- */
/* where your left thumb walks: a faint ring until you touch (then the real stick appears under your thumb) */
.w3-hud.touch::before { content: ''; position: absolute; left: 30px; bottom: 30px; width: 104px; height: 104px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .28); background: radial-gradient(circle, rgb(255 255 255 / .32) 0 20px, rgb(255 255 255 / .06) 21px); pointer-events: none; transition: opacity .2s; }
.w3-hud.touch.joying::before, .w3-hud.touch.driving::before { opacity: 0; }
.w3-hud.touch .w3-keys { display: none; }
.w3-hud.touch .w3-dock { left: auto; right: 50%; transform: translateX(50%); }
/* a narrow phone held upright: the name card makes room for the clock */
@media (max-width: 520px) {
  .w3-me { max-width: calc(100vw - 150px); gap: 8px; padding: 7px 10px 7px 7px; border-radius: 18px; }
  .w3-av { width: 40px; height: 40px; }
  .w3-name { font-size: 14px; } .w3-sub { font-size: 10.5px; }
  .w3-bar i { font-size: 10px; } .w3-bar span { min-width: 12px; height: 5px; }
  .w3-money { top: 78px; } .w3-cash { font-size: 16px; }
  .w3-clock { right: 10px; top: 12px; padding: 5px 9px; font-size: 10.5px; max-width: 128px; }
  .w3-mini { right: 10px; top: 46px; width: 104px; height: 104px; }
  .w3-hud.touch::before { left: 22px; bottom: 112px; width: 92px; height: 92px; }
  .w3-hud.touch .w3-tap-e { bottom: 118px; right: 14px; } .w3-hud.touch .w3-tap-j { bottom: 196px; right: 22px; }
}
/* a phone on its side (short screens): everything smaller, the middle of the screen is the game */
@media (max-height: 500px) {
  .w3-me { top: 8px; left: 8px; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 16px; max-width: 300px; }
  .w3-av { width: 34px; height: 34px; }
  .w3-name { font-size: 13px; } .w3-sub { font-size: 10px; } .w3-bars { margin-top: 1px; gap: 3px; }
  .w3-bar i { font-size: 9px; } .w3-bar span { height: 4px; min-width: 14px; }
  .w3-money { top: 62px; left: 8px; padding: 4px 10px; border-radius: 12px; } .w3-money small { display: none; } .w3-cash { font-size: 15px; }
  .w3-clock { top: 8px; right: 8px; padding: 4px 9px; font-size: 10.5px; }
  .w3-mini { top: 38px; right: 8px; width: 88px; height: 88px; }
  .w3-dock { bottom: 4px; padding: 3px 6px; gap: 0; border-radius: 20px; }
  .w3-dock button { min-width: 44px; font-size: 16px; padding: 3px 4px; gap: 0; } .w3-dock button small { font-size: 8.5px; }
  .w3-dock .w3-age { width: 54px; height: 54px; margin: -14px 4px 0; } .w3-dock .w3-age b { font-size: 18px; } .w3-dock .w3-age span { font-size: 9px; }
  .w3-prompt { bottom: 62px; padding: 6px 12px 6px 6px; font-size: 13px; } .w3-prompt kbd { width: 24px; height: 24px; font-size: 12px; }
  .w3-hud.touch::before { left: 26px; bottom: 22px; width: 84px; height: 84px; }
  .w3-hud.touch .w3-tap-e { bottom: 64px; right: 12px; width: 54px; height: 54px; } .w3-hud.touch .w3-tap-j { bottom: 126px; right: 18px; width: 46px; height: 46px; }
  .w3-hint { top: 6px; font-size: 11px; padding: 6px 12px; }
  .w3-speed { bottom: 6px; right: 76px; padding: 6px 10px; } .w3-speed b { font-size: 26px; }
  .w3-banner b { font-size: 24px; } .w3-banner small { font-size: 12px; }
  .w3-shift { top: 6px; padding: 6px 12px 9px; font-size: 12px; }
  /* mini games: a wider, shorter panel */
  .w3-play { bottom: 6px; width: min(700px, calc(100vw - 16px)); }
  .w3-play .pg { padding: 8px 12px 10px; border-radius: 16px; max-height: calc(100vh - 12px); overflow-y: auto; }
  .w3-play header { margin-bottom: 4px; } .w3-play header > i { width: 32px; height: 32px; font-size: 20px; } .w3-play header b { font-size: 15px; } .w3-play header small { font-size: 11px; }
  .w3-play .pg-b { min-height: 96px; }
  .w3-play .pg-step { margin-bottom: 4px; font-size: 12px; }
  .w3-play .pg-mem button { height: 58px; font-size: 28px; }
  .w3-play .pg-rh { height: 118px; }
  .w3-play .pg-meter, .w3-play .pg-track { height: 104px; }
  .w3-play .pg-grid button { height: 40px; font-size: 24px; } .w3-play .pg-grid { max-width: 300px; gap: 5px; }
  .w3-play .pg-word { font-size: 24px; margin-bottom: 6px; } .w3-play .pg-letters button, .w3-play .pg-pad button { height: 36px; width: 40px; }
  .w3-play .pg-sort > button { height: 76px; } .w3-play .pg-card { min-height: 52px; font-size: 15px; }
  .w3-play .pg-q { padding: 6px 10px; margin-bottom: 6px; } .w3-play .pg-q p { font-size: 13.5px; } .w3-play .pg-ans { gap: 4px; } .w3-play .pg-ans button { padding: 6px 10px; font-size: 12.5px; }
  .w3-play .pg-go { margin-top: 6px; padding: 8px 18px; } .w3-play .pg-go.big { padding: 10px 22px; font-size: 15px; }
  .w3-play .pg-tm { margin-top: 6px; }
}

/* ---------- 3D films (js/w3d/cine3d.js) ---------- */
.w3-film { position: fixed; inset: 0; z-index: 9500; pointer-events: none; display: none; --grey: 0; }
.w3-film.on { display: block; pointer-events: auto; cursor: pointer; backdrop-filter: grayscale(var(--grey)); -webkit-backdrop-filter: grayscale(var(--grey)); }
.w3-film .wf-bar { position: absolute; left: 0; right: 0; top: 0; height: 9vh; background: #000; animation: wfbar .8s ease both; }
.w3-film .wf-bar.b { top: auto; bottom: 0; }
@keyframes wfbar { from { transform: scaleY(0); } }
.w3-film .wf-txt { position: absolute; left: 50%; bottom: 13vh; transform: translate(-50%, 14px); text-align: center; color: #fff; opacity: 0; transition: opacity .8s, transform .8s; text-shadow: 0 2px 18px rgb(0 0 0 / .8); width: min(90vw, 760px); }
.w3-film .wf-txt.on { opacity: 1; transform: translate(-50%, 0); }
.w3-film .wf-txt i { display: block; font-style: normal; font-size: clamp(26px, 4vw, 40px); }
.w3-film .wf-txt b { display: block; font: 700 clamp(28px, 5vw, 56px)/1.05 var(--f-display); letter-spacing: -.01em; }
.w3-film .wf-txt small { display: block; font: 800 clamp(14px, 2vw, 20px) var(--f-body); opacity: .9; margin-top: 6px; }
.w3-film .wf-skip { position: absolute; right: 18px; bottom: calc(9vh + 10px); font: 800 12px var(--f-body); color: rgb(255 255 255 / .7); }
.w3-film .wf-fade { position: absolute; inset: 0; background: #000; opacity: 1; transition: opacity .4s; pointer-events: none; }
.w3-film.wf-flash::after { content: ''; position: absolute; inset: 0; background: #fff; opacity: .85; }
@media (max-height: 500px) { .w3-film .wf-txt { bottom: 11vh; } .w3-film .wf-txt b { font-size: 26px; } }
