/* Font stacks: the translation layer (src/i18n/index.js) sets these per language; the values here are the English defaults. */
:root { --f-display: Impact, "Arial Black", "Segoe UI", sans-serif; --f-text: "Segoe UI", system-ui, Arial, sans-serif; --f-serif: Georgia, "Times New Roman", serif; }
/* Scripts without italics or capitals (Japanese, Korean, Chinese): no synthetic slant, no letter-spacing meant for capitals. */
.wide-glyphs .hud .where b, .wide-glyphs .hud .banner.title h2, .wide-glyphs .hud .banner.trip h2, .wide-glyphs #ui .menu .hint { font-style: normal; }
.wide-glyphs .hud .banner h2, .wide-glyphs #ui .menu h3 { letter-spacing: 2px; }
/* ---------------------------------------------------------------- HUD */
.hud { position: absolute; inset: 0; font-family: var(--f-text); text-shadow: 0 1px 2px rgba(0,0,0,0.9), 0 0 6px rgba(0,0,0,0.5); transition: opacity 0.5s; }
.hud.off { opacity: 0; }
.hud .tr { position: absolute; top: 18px; right: 22px; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.hud .clock { font: 700 22px/1 Consolas, monospace; color: #e9eef7; letter-spacing: 1px; }
.hud .money { font: 900 30px/1 var(--f-display); color: #7be07b; letter-spacing: 1px; }
.hud .money.up { animation: cashUp 0.7s; }
.hud .money.down { animation: cashDown 0.7s; }
@keyframes cashUp { 0% { color: #fff; transform: scale(1.25); } 100% { color: #7be07b; transform: none; } }
@keyframes cashDown { 0% { color: #ff5a5a; transform: scale(1.2); } 100% { color: #7be07b; transform: none; } }
.hud .bars { display: flex; flex-direction: column; gap: 4px; width: 190px; }
.hud .bar { height: 9px; background: rgba(0,0,0,0.55); border: 1px solid rgba(0,0,0,0.8); border-radius: 2px; overflow: hidden; }
.hud .bar i { display: block; height: 100%; transition: width 0.15s; }
.hud .bar.hp i { background: linear-gradient(180deg, #ff6a6a, #c42222); }
.hud .bar.ar i { background: linear-gradient(180deg, #7ac4ff, #2a6fc0); }
.hud .bar.hp.low { animation: pulse 0.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 10px #ff3030; } }
.hud .weapon b { display: block; font: 700 15px/1.2 var(--f-text); color: #ffe9a8; letter-spacing: 0.5px; text-transform: uppercase; }
.hud .weapon span { font: 700 20px/1 Consolas, monospace; color: #fff; }
.hud .weapon small { color: #b8c0cc; font-size: 14px; }
.hud .stars { font-size: 26px; letter-spacing: 2px; height: 30px; opacity: 0; transition: opacity 0.3s; }
.hud .stars.hot { opacity: 1; }
.hud .stars i { font-style: normal; color: rgba(0,0,0,0.55); -webkit-text-stroke: 1px rgba(255,255,255,0.25); }
.hud .stars i.on { color: #ffd23f; -webkit-text-stroke: 1px #7a5a00; }
.hud .stars.search i.on { animation: blink 0.7s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
/* search bar under the stars: only while the police are searching (class "on" set by UI.stars) */
.hud .hide { display: none; }
.hud .hide.on { display: block; }
.hud .hide b { display: block; white-space: nowrap; font: 700 11px/1 var(--f-text); color: #cfd8e6; letter-spacing: 1.5px; }
.hud .hide span { display: block; width: 132px; height: 5px; margin: 4px 0 0 auto; background: rgba(0,0,0,0.55); border: 1px solid #000; }
.hud .hide i { display: block; height: 100%; background: #ffd23f; }
.hud .radar { position: absolute; left: 22px; bottom: 22px; width: 200px; height: 200px; border-radius: 50%; box-shadow: 0 2px 14px rgba(0,0,0,0.6); }
.hud .radar canvas { width: 200px; height: 200px; display: block; }
.hud .where { position: absolute; right: 26px; bottom: 26px; max-width: 60vw; text-align: right; opacity: 0; transform: translateY(8px); transition: opacity 0.5s, transform 0.5s; }
.hud .where.on { opacity: 1; transform: none; }
.hud .where b { display: block; font: italic 900 30px/1.1 var(--f-serif); color: #fff; }
.hud .where span { font: 600 15px/1.3 var(--f-text); color: #ffb38a; letter-spacing: 1px; text-transform: uppercase; }
.hud .obj { position: absolute; left: 22px; top: 18px; max-width: min(420px, 40vw); overflow-wrap: break-word; }
.hud .obj .o { font: 600 17px/1.35 var(--f-text); color: #fff; background: rgba(0,0,0,0.42); border-left: 4px solid #ffd23f; padding: 8px 12px; border-radius: 2px; }
.hud .obj .o.fail { border-left-color: #ff5a5a; }
.hud .obj .t, .hud .obj .m { margin-top: 6px; display: flex; align-items: center; gap: 10px; font: 700 14px/1.15 var(--f-text); color: #cfd8e6; text-transform: uppercase; letter-spacing: 1px; }
.hud .obj .t b { font: 700 24px/1 Consolas, monospace; color: #fff; }
.hud .obj .t.low b { color: #ff5a5a; }
.hud .obj .m div { flex: none; width: 160px; height: 9px; background: rgba(0,0,0,0.55); border: 1px solid #000; }
.hud .obj .m i { display: block; height: 100%; background: linear-gradient(90deg, #ffd23f, #ff7a3d); }
.hud .sub { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); max-width: 70vw; width: max-content; text-align: center; font: 600 19px/1.35 var(--f-text); color: #fff; background: rgba(0,0,0,0.38); padding: 6px 14px; border-radius: 4px; opacity: 0; transition: opacity 0.25s; }
.hud .sub.on { opacity: 1; }
.hud .sub b { color: #ffd23f; font-weight: 700; }
.hud .prompt { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); font: 700 16px/1 var(--f-text); color: #111; background: #ffd23f; padding: 8px 14px; border-radius: 4px; text-shadow: none; opacity: 0; transition: opacity 0.15s; white-space: pre-wrap; max-width: 86vw; width: max-content; text-align: center; line-height: 1.25; }
.hud .prompt.on { opacity: 0.95; }
.hud .cross { position: absolute; left: 50%; top: 50%; width: 0; height: 0; opacity: 0; }
.hud .cross.on { opacity: 0.9; }
.hud .cross b { position: absolute; left: -1.5px; top: -1.5px; width: 3px; height: 3px; background: #fff; border-radius: 50%; box-shadow: 0 0 2px #000; }
.hud .cross i { position: absolute; background: #fff; box-shadow: 0 0 2px #000; }
.hud .cross i:nth-child(1) { left: -1px; top: -14px; width: 2px; height: 7px; }
.hud .cross i:nth-child(2) { left: -1px; top: 7px; width: 2px; height: 7px; }
.hud .cross i:nth-child(3) { top: -1px; left: -14px; height: 2px; width: 7px; }
.hud .cross i:nth-child(4) { top: -1px; left: 7px; height: 2px; width: 7px; }
.hud .scope { position: absolute; inset: 0; opacity: 0; background: radial-gradient(circle at 50% 50%, transparent 0, transparent 33vh, rgba(0,0,0,0.97) 34vh), linear-gradient(#000, #000) 50% 50% / 1px 66vh no-repeat, linear-gradient(#000, #000) 50% 50% / 66vh 1px no-repeat; }
.hud .scope.on { opacity: 1; }
.hud .banner { position: absolute; left: 0; right: 0; top: 30%; text-align: center; opacity: 0; transform: scale(0.9); transition: opacity 0.4s, transform 0.4s; pointer-events: none; }
.hud .banner.on { opacity: 1; transform: none; }
.hud .banner h2 { margin: 0; font: 900 72px/1 var(--f-display); letter-spacing: 5px; color: #ffd23f; -webkit-text-stroke: 2px #201400; text-shadow: 0 4px 0 rgba(0,0,0,0.55), 0 0 40px rgba(255,170,60,0.45); }
.hud .banner h2 { padding: 0 3vw; }
.hud .banner p { margin: 10px 4vw 0; font: 700 22px/1.2 var(--f-text); color: #fff; }
.hud .banner.bad h2 { color: #e23a3a; -webkit-text-stroke: 2px #200; text-shadow: 0 4px 0 rgba(0,0,0,0.6), 0 0 40px rgba(255,40,40,0.4); }
.hud .banner.trip h2 { background: linear-gradient(90deg, #35e0ff, #ff3fa4, #ffd23f); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 0; font-style: italic; }
.hud .banner.title h2 { font: italic 900 54px/1.1 var(--f-serif); color: #fff; -webkit-text-stroke: 0; letter-spacing: 1px; }
.hud .note { position: absolute; right: 22px; top: 215px; text-align: right; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.hud .note div { max-width: min(46vw, 560px); font: 600 15px/1.25 var(--f-text); background: rgba(0,0,0,0.5); padding: 7px 11px; border-right: 3px solid #7be07b; border-radius: 2px; animation: noteIn 0.25s; }
.hud .note div.bad { border-right-color: #ff5a5a; }
@keyframes noteIn { from { opacity: 0; transform: translateX(14px); } }
.hud .fps { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); font: 12px Consolas, monospace; color: #b8ffb8; display: none; }
#ui .fade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }

/* ---------------------------------------------------------------- menus */
#ui .menu { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(4,8,16,0.55); pointer-events: auto; }
#ui .menu.on { display: flex; }
#ui .menu.title { justify-content: flex-start; padding-left: 9vw; background: linear-gradient(90deg, rgba(8,4,20,0.82) 0%, rgba(8,4,20,0.45) 42%, transparent 72%); }
#ui .menu .panel { min-width: 380px; max-width: min(620px, 94vw); max-height: 88vh; overflow: auto; background: rgba(12,16,28,0.9); border: 1px solid rgba(255,255,255,0.14); border-top: 4px solid #ff3fa4; border-radius: 6px; padding: 22px 26px 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
#ui .menu.title .panel { background: none; border: 0; box-shadow: none; padding: 0; overflow: visible; max-height: none; }
#ui .menu h3 { margin: 0 0 4px; font: 900 34px/1 var(--f-display); letter-spacing: 3px; color: #ffd23f; }
#ui .menu.title h3 { font-size: 92px; letter-spacing: 6px; background: linear-gradient(180deg, #ffd23f 0%, #ff7a3d 55%, #ff3fa4 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 0 rgba(0,0,0,0.45)); }
#ui .menu .hint { margin: 0 0 14px; color: #c9b8e8; font: italic 15px/1.3 var(--f-serif); }
#ui .menu.title .hint { font-size: 22px; color: #ffe1f0; margin-bottom: 30px; }
#ui .menu .ver { position: absolute; right: 14px; bottom: 12px; padding: 4px 8px; border-radius: 3px; background: rgba(6,8,16,0.55); font: 600 13px/1 var(--f-text); letter-spacing: 1px; color: rgba(255,255,255,0.9); pointer-events: none; }
#ui .menu ul { list-style: none; margin: 10px 0 12px; padding: 0; }
#ui .menu li { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 9px 12px; margin: 2px 0; border-radius: 4px; font: 600 17px/1.25 var(--f-text); color: #dfe6f2; cursor: pointer; border-left: 3px solid transparent; }
#ui .menu.title li { font-size: 24px; padding: 10px 14px; text-shadow: 0 2px 6px #000; }
#ui .menu li.sel { background: rgba(255,63,164,0.2); border-left-color: #ff3fa4; color: #fff; }
#ui .menu li.dis { opacity: 0.38; cursor: default; }
#ui .menu li.txt { cursor: default; padding: 4px 12px; font-size: 14px; }
#ui .menu li small { display: block; font: 400 13px/1.2 var(--f-text); color: #9fb0c8; margin-top: 2px; }
#ui .menu li b { color: #7be07b; white-space: nowrap; font-weight: 700; }
#ui .menu li span { min-width: 0; overflow-wrap: anywhere; }
#ui .menu li.txt b { color: #dfe6f2; font-weight: 400; white-space: normal; text-align: right; }
#ui .menu li.txt span { flex: none; max-width: 55%; }
#ui .menu kbd { background: #2a3248; border: 1px solid #556; border-radius: 3px; padding: 1px 6px; font: 600 12px Consolas, monospace; color: #ffd23f; }
#ui .menu .keys { margin: 0; font: 12px/1.3 var(--f-text); color: #7f8ca3; letter-spacing: 0.5px; }
/* the flag of a language (src/i18n/flags.js): sized by the text around it */
.flag { display: inline-block; width: 1.5em; height: 1em; margin-right: 0.55em; vertical-align: -0.12em; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,0.28), 0 1px 3px rgba(0,0,0,0.5); }
.flag svg { display: block; width: 100%; height: 100%; }
#ui .menu li b .flag { margin-right: 0.45em; }
#ui .mapview { position: absolute; inset: 0; display: none; pointer-events: auto; }
#ui .mapview.on { display: block; }
#ui .mapview canvas { width: 100%; height: 100%; display: block; }
