body { background: #080909; }
#player-nametags { position: absolute; inset: 0; overflow: hidden; pointer-events: none; user-select: none; }
.player-nametag { position: absolute; top: 0; left: 0; display: inline-flex; align-items: center; gap: 5px; max-width: min(220px, 45vw); padding: 1px 5px 2px 2px; overflow: hidden; white-space: nowrap; font: 18px/18px 'VT323', monospace; color: #e9e2cc; background: #11130ebd; border-bottom: 1px solid #89836c99; text-shadow: 1px 1px #080909; pointer-events: none; }
.player-nametag .player-level { flex: 0 0 auto; padding: 0 3px; min-width: 16px; box-sizing: border-box; text-align: center; font-size: 15px; color: #e3c282; background: #76613f52; border: 1px solid #a5895066; }
.player-nametag .player-name { overflow: hidden; text-overflow: ellipsis; color: var(--player-gang-color, #e9e2cc); }
.player-nametag { border-bottom-color: var(--player-gang-color, #89836c99); }
body:not(.playing) #game { visibility: hidden; }
body.bodycam-playing #hud, body.bodycam-playing #dialogue, body.bodycam-playing #opening { display: none !important; }
#boot { position: fixed; z-index: 25; inset: 0; display: grid; place-items: center; background: #080909; color: #c7bfa8; }
#boot-loading { font-size: 22px; letter-spacing: 3px; }
#boot-start { padding: 15px 25px; background: none; color: #ded6c0; font: 30px 'VT323', monospace; letter-spacing: 3px; text-transform: uppercase; border-bottom: 1px solid #4d493f; }
#production-credit { display: grid; place-items: center; position: absolute; inset: 0; background: #000; padding: 0; opacity: 0; overflow: hidden; }
#production-credit img { display: block; width: 100vw; height: 100dvh; object-fit: cover; transform: scale(var(--logo-scale, 1)); }
@media (prefers-reduced-motion: reduce) { #production-credit img { transform: none; } }
#credits-skip { position: absolute; right: 28px; bottom: 25px; font-size: 20px; color: #8f897b; }
#world-transition { position: fixed; z-index: 35; inset: 0; background: #080909; opacity: 0; transition: opacity .42s ease; display: flex; align-items: flex-end; justify-content: flex-end; padding: 6vh 6vw; }
#world-transition > span { font-size: 22px; color: #8e8878; letter-spacing: 3px; }
.loading-dots { display: inline-block; width: 2ch; overflow: hidden; vertical-align: bottom; animation: load-dots .85s steps(3, end) infinite; }
@keyframes load-dots { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@media (prefers-reduced-motion: reduce) { .loading-dots { animation: none; } }
#fatal { z-index: 60; }
#entry { left: 8vw; bottom: 14vh; width: min(420px, 86vw); display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
#entry h1 { font-family: Impact, 'Arial Narrow', sans-serif; font-size: clamp(64px, 8vw, 112px); line-height: .87; letter-spacing: -1px; margin: 0 0 30px; color: #e3dfcf; text-shadow: 2px 2px #111; }
#join-form { width: auto; }
#play, #entry > .text-button { background: none; color: #ddd9cd; border: 0; box-shadow: none; padding: 2px 0; font-size: 30px; letter-spacing: 0; text-transform: none; }
#play { color: #fff9e8; }
#play:hover, #entry > .text-button:hover { color: #fff; background: none; transform: translateX(5px); text-decoration: none; }
#play:focus-visible, #entry > .text-button:focus-visible { outline-offset: 8px; }
#progress { margin-left: 14px; font-size: 22px; color: #928c7c; }
#connection { margin: 0; max-width: 360px; font-size: 20px; }
#connection:empty { display: none; }
body:not(.playing)::after { background: #080909; }
#heading { top: 20px; right: 24px; left: auto; }
#crew { background: #11130f66; border: 0; box-shadow: none; font-size: 25px; padding: 4px 10px; }
#objective, #hint, #quickbar { display: none; }
#money { display: inline; color: #c8bc9c; font-size: 22px; font-variant-numeric: tabular-nums; }
#vitals { left: 28px; bottom: 26px; width: 175px; border: 0; background: none; padding: 0; }
.health-label { margin-bottom: 4px; }
#health-number { font-size: 20px; }
.health-track { height: 4px; border: 0; }
.stamina-track { height: 2px; }
#weapon-status { margin-top: 12px; gap: 8px; }
#weapon-icon svg { width: 32px; }
#ammo-count { font-size: 32px; }
#ammo-count small { font-size: 19px; }
#radar { right: 26px; bottom: 24px; width: 158px; }
#map-open { box-shadow: none; border: 1px solid #777569; }
#gps { border: 0; background: #161710b3; padding: 6px 8px; box-shadow: none; }
#gps-arrow { font-size: 23px; }
#gps strong { font-size: 21px; }
#gps span { font-size: 15px; }
#vehicle-hud { bottom: 140px; left: 22px; }
#street-offer { bottom: 26px; font-size: 20px; padding: 5px 9px; background: #1516119c; border: 0; box-shadow: none; }
#world-event { top: 64px; right: 26px; font-size: 18px; border: 0; background: #17181188; }
#job-clock { top: 25px; left: 28px; font-size: 21px; }
#toast { top: 16%; border: 0; border-bottom: 1px solid #8c8068; box-shadow: none; }
#toast .edit-line { float: none; margin-left: 12px; pointer-events: auto; }
.dialogue-panel, #dialogue { position: fixed; z-index: 12; left: 50%; top: auto; bottom: 28px; transform: translateX(-50%); width: min(900px, calc(100vw - 48px)); min-height: 190px; display: flex; align-items: stretch; gap: 24px; padding: 20px 24px; background: #121311f7; border: 2px solid #bcb6a4; box-shadow: 0 5px 0 #080909; text-shadow: none; }
#dialogue::after { display: none; }
.live-portrait-slot { width: 144px; height: 144px; flex: 0 0 auto; align-self: center; overflow: hidden; background: #202321; border: 1px solid #777466; }
.live-headshot { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.dialogue-copy { flex: 1; min-width: 0; padding-right: 15px; }
#speaker, #intro-caption .dialogue-copy > span { color: #aaa38e; font-size: 22px; letter-spacing: 0; }
#speech, #intro-speech { font-size: clamp(23px, 2.1vw, 29px); line-height: 1.17; color: #e6e1d1; margin: 9px 0 12px; min-height: 64px; cursor: pointer; }
#choices { display: flex; flex-wrap: wrap; gap: 6px 24px; }
#choices button { border: 0; padding: 3px 0; background: none; color: #cfbc8b; font-size: 23px; text-align: left; }
#choices button::before { content: '› '; }
#choices button:hover { background: none; color: #fff; }
#dialogue-close { position: absolute; top: 7px; right: 13px; font-size: 29px; padding: 0; color: #8e8b7c; }
.edit-line { float: right; padding: 3px 10px; font-size: 19px; color: #bdb5a1; background: #34372c; pointer-events: auto; }
#chatter .edit-line { margin-left: 14px; pointer-events: auto; }
body.playing #game { cursor: default; }
body.dialog-open #hud > :not(#damage-flash):not(#kill-flash) { visibility: hidden; }
#chatter { left: 50% !important; top: auto !important; bottom: 35px; transform: translateX(-50%); width: min(650px, 80vw); padding: 12px; font-size: 23px; border: 0; box-shadow: none; background: #11130fed; display: flex; align-items: center; gap: 15px; }
#chatter .live-portrait-slot { width: 88px; height: 88px; }
.chatter-copy { flex: 1; min-width: 0; }
#chatter strong { display: inline; margin-right: 9px; font-size: 19px; }
#pause { z-index: 20; background: #11130feb; padding: 36px; overflow-y: auto; }
.pause-content { width: min(420px, 88vw); margin: auto; display: flex; flex-direction: column; align-items: stretch; gap: 15px; }
#resume, #pause .text-button { text-align: left; background: none; border: 0; box-shadow: none; color: #e0dbc9; font-size: 28px; padding: 0; }
#resume { color: #fff8e2; font-size: 33px; }
#pause #sound { position: static; font-size: 26px; letter-spacing: 0; }
#server-status { margin: 12px 0 0; color: #a7a08d; font-size: 20px; }
#crew-status { font-size: 18px; display: block; margin-top: 6px; color: #969484; }
#pause-objective { font-size: 22px; margin: 7px 0; }
#run-score { margin: 0; color: #b8ae92; font-size: 21px; }
#crew-scores { margin: 0; padding-left: 1.4em; font-size: 20px; }
#crew-scores:empty { display: none; }
#pause details { font-size: 23px; }
#pause summary { cursor: pointer; }
#pause .controls { margin-top: 16px; grid-template-columns: 150px 1fr; font-size: 18px; }
#pause small { font-size: 17px; color: #8e907f; }
.character-heading input { width: min(240px, 43vw); padding: 8px 12px; }
.character-heading h2 { font-size: 28px; }
#opening { position: fixed; z-index: 10; inset: 0; pointer-events: none; }
#intro-transition { position: absolute; inset: 0; background: #080909; }
#intro-location { position: absolute; left: 7vw; bottom: 20vh; display: grid; gap: 5px; color: #d8d1bd; text-shadow: 2px 3px #10110f; }
#intro-location strong { font: 400 clamp(30px, 3.3vw, 48px) 'VT323', monospace; letter-spacing: 2px; }
#intro-time { font-size: 25px; color: #aaa898; letter-spacing: 2px; }
.letterbox { position: absolute; left: 0; right: 0; height: 9vh; background: #080909; }
.letterbox.top { top: 0; }
.letterbox.bottom { bottom: 0; }
#intro-skip { position: absolute; right: 28px; top: 22px; font-size: 21px; color: #a8a89b; pointer-events: auto; }
#intro-skip kbd { font-size: 15px; margin-left: 7px; }
#intro-caption { bottom: 4vh; width: min(800px, 88vw); min-height: 140px; border-width: 1px; background: #101210f2; }
#intro-caption .live-portrait-slot { width: 110px; height: 110px; }
#intro-speech { min-height: 0; font-size: 26px; }
body.intro-playing #hud { visibility: hidden; }
body.intro-playing #game { cursor: default; }
#dialogue-editor { width: min(860px, 94vw); max-height: 90vh; overflow: auto; padding: 24px; color: #dfd9c9; background: #171914; border: 2px solid #777366; font: 23px 'VT323', monospace; }
#dialogue-editor::backdrop { background: #080908b8; }
#dialogue-editor header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
#dialogue-editor h2 { margin: 0; font: inherit; font-size: 32px; }
#dialogue-editor button { color: inherit; background: #35382d; padding: 8px 14px; font: inherit; }
#dialogue-editor-close { background: none !important; font-size: 30px !important; }
.dialogue-selectors { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 14px; }
.dialogue-selectors label { display: grid; gap: 5px; }
#dialogue-editor select, #dialogue-draft { width: 100%; color: #efe9d8; background: #0e100d; border: 1px solid #666457; font: inherit; padding: 10px; }
#dialogue-draft { margin: 16px 0 10px; min-height: 135px; resize: vertical; }
.dialogue-tools, #dialogue-editor footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
#dialogue-sample { display: flex; gap: 18px; padding: 18px; border: 1px solid #bcb6a4; min-height: 150px; margin: 24px 0; }
#dialogue-sample .live-portrait-slot { width: 110px; height: 110px; }
#dialogue-sample strong { font-weight: 400; color: #c5b383; }
#dialogue-sample p { margin: 7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#dialogue-editor-status { flex: 1; min-width: 220px; font-size: 19px; color: #aaa893; }
@media (max-width: 700px) {
  #entry { bottom: 12vh; }
  .dialogue-panel, #dialogue { bottom: 12px; width: calc(100vw - 24px); min-height: 148px; gap: 14px; padding: 15px; }
  .dialogue-panel > .live-portrait-slot { width: 85px; height: 85px; }
  #speech, #intro-speech { font-size: 23px; }
  #choices button { font-size: 21px; }
  #radar { right: 16px; width: 132px; }
  #vitals { left: 16px; width: 150px; }
}
