@font-face {
  font-family: 'Street Terminal';
  src: url('/assets/fonts/VT323-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  font-family: 'Street Terminal', 'Courier New', monospace;
  --paper: #d1c8ad;
  --muted: #a29c88;
  --accent: #bba16e;
  --ink: #1a1b17f5;
  --line: #77705a70;
  --wear: repeating-linear-gradient(0deg, #aaa08004 0 1px, transparent 1px 4px);
  color: var(--paper);
}

button, input, kbd { font-family: inherit; }
button { border-radius: 0 !important; }
button:hover { filter: none; color: #eee3c3; }
button:focus-visible, input:focus-visible { outline: 2px dashed #d0b880; outline-offset: 4px; }
input { border: 1px solid #746b53; border-bottom: 2px solid #97886a; background: #151711e8; border-radius: 0; font-size: 22px; }
input::placeholder { color: #8b8674; }
kbd { font-size: 16px; font-weight: 400; }
.eyebrow, .edition { font-size: 17px; letter-spacing: 1px; font-weight: 400; }
.text-button { font-size: 17px; letter-spacing: 0; text-decoration-color: #746b53; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.quiet-button { background: #191b16d9; border: 1px solid #77705a; border-bottom-width: 3px; font-size: 17px; letter-spacing: 0; padding: 6px 11px; }

#entry { bottom: 10vh; text-shadow: 2px 2px #0b0d0a; }
#entry h1 { font-family: inherit; font-size: clamp(90px, 12vw, 148px); letter-spacing: -3px; margin: 14px 0 3px; line-height: .9; color: #d1c7a9; text-shadow: 3px 0 #564d38, -1px 2px #060807; }
#entry h1 span { color: #8f5743; }
#entry .edition { color: #989481; letter-spacing: 2px; }
.tagline { font-size: 24px; color: #b5ac92; margin-bottom: 32px; }
#join-form { width: 320px; gap: 12px; }
#play, #crew-form button, #resume { background: var(--wear), #b3a384; color: #191b16; font-size: 21px; font-weight: 400; letter-spacing: .7px; border: 2px solid #d2c09c; border-right-color: #6c6046; border-bottom-color: #6c6046; box-shadow: 3px 3px #090c08; padding: 13px 17px; }
#play:hover, #crew-form button:hover, #resume:hover { background-color: #ccba95; color: #13160f; }
.crew-row { font-size: 18px; color: #746c57; gap: 17px; }
.crew-row .text-button { font-size: 18px; }
#connection { color: #a49b81; font-size: 18px; line-height: 1.35; max-width: 340px; }
.entry-foot { font-size: 15px; letter-spacing: 1px; color: #817c68; margin-top: 30px; }
body:not(.playing)::after { background: linear-gradient(90deg, #10130ff2, #14171188 45%, transparent 90%); }

#hud { text-shadow: 1px 2px #0c0e0a; }
#pickup-feedback { position: absolute; bottom: calc(100% + 10px); left: 0; width: 300px; max-width: 65vw; color: #d7c598; font-size: 21px; line-height: 1.12; text-shadow: 1px 2px #10110e; }
#heading { justify-content: flex-end; pointer-events: none; }
#crew { pointer-events: auto; }
#objective { top: 26px !important; padding: 4px 12px 4px 0; }
#objective-title, #rank, #radar>div, #world-event .eyebrow, #world-event small, #vehicle-hud>small, .bag-foot { display: none; }
#objective .objective-line { height: 21px; width: 2px; }
#sound { top: 64px; }
#crosshair { color: #fff; filter: none; }
#crosshair.pistol { width: var(--spread); height: var(--spread); background: currentColor; border: 0; border-radius: 50%; box-shadow: 0 0 0 2px #10110e; }
#crosshair.shotgun { width: var(--spread); height: var(--spread); border: 2px solid currentColor; box-shadow: 0 0 0 1px #10110e, inset 0 0 0 1px #10110e; }
#crosshair.smg i { width: 10px; height: 3px; box-shadow: 0 0 0 1px #10110e; }
#crosshair.smg i:nth-child(1), #crosshair.smg i:nth-child(2) { top: -1px; }
#crosshair.smg i:nth-child(3), #crosshair.smg i:nth-child(4) { left: -1px; width: 3px; height: 10px; }
#crosshair.shotgun::after, #crosshair.smg::after { content: ''; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; transform: translate(-50%, -50%); background: currentColor; border-radius: 0; box-shadow: 0 0 0 1px #10110e; }
#crosshair.obstructed { color: #bc8067; border-color: #bc8067; }
#crosshair.pistol.obstructed, #crosshair.obstructed::after { background: #bc8067; }
#hitmarker { --hit-scale: 1.4; font-family: 'Street Terminal', 'Courier New', monospace; font-size: 42px; font-weight: 400; color: #fff; text-shadow: -1px -1px #10110e, 0 -1px #10110e, 1px -1px #10110e, -1px 0 #10110e, 1px 0 #10110e, -1px 1px #10110e, 0 2px #10110e, 1px 1px #10110e; }
#hitmarker.kill { --hit-scale: 1.6; font-size: 52px; color: #d76552; }
#hitmarker.hit { animation: street-hit-pop 180ms ease-out both; }
#hitmarker.hit.kill { animation: street-hit-pop 300ms ease-out both; }
@keyframes street-hit-pop {
  0% { transform: translate(-50%, -50%) scale(var(--hit-scale)); opacity: 1; }
  35%, 65% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}
#heading .eyebrow { color: #a5a08b; font-size: 14px; letter-spacing: 1px; }
#heading h2 { color: #d4cbb1; font-size: 28px; font-weight: 400; letter-spacing: 1px; margin: 3px 0 0; }
#district-sub { font-size: 16px; letter-spacing: 0; color: #a6a18d; }
#crew-label { color: #c1a66c; }
#objective { background: linear-gradient(90deg, #1c1e17e8, #1c1e1755 75%, transparent); padding: 8px 17px 8px 0; gap: 10px; top: 128px; }
.objective-line { height: 38px; width: 3px; background: #a28c5d; box-shadow: 1px 0 #15170e; }
#objective h3 { font-size: 21px; font-weight: 400; margin-bottom: 1px; letter-spacing: 0; }
#objective p { font-size: 18px; color: #b4ac92; line-height: 1.1; }
#objective-distance { font-size: 17px; }
#vitals { width: 218px; padding: 9px 10px 7px; background: var(--wear), linear-gradient(90deg, #171914e3, #171914b0); border-left: 2px solid #82775d; }
.health-label { font-size: 20px; margin-bottom: 5px; }
#health-number { font-weight: 400; }
#money { font-size: 22px; }
.health-track { height: 6px; background: #0c100c; border: 1px solid #938265; box-shadow: none; }
#health-fill { background: #b6a37a; transition: width .13s steps(8); }
.stamina-track { height: 3px; background: #080c0999; margin-top: 3px; }
#stamina-fill { background: #a299786b; }
#weapon-status { margin-top: 10px; gap: 11px; }
#weapon-icon svg { color: #c1b89d; width: 43px; }
#ammo-count { font-size: 39px; line-height: .85; font-weight: 400; letter-spacing: 0; }
#ammo-count small { font-size: 21px; color: #8f8b78; }
#weapon-name { font-size: 15px; color: #aaa48c; letter-spacing: .3px; margin-top: 4px; }
#rank { font-size: 13px; letter-spacing: .3px; margin-top: 10px; color: #86826f; }
.quick-slot { background: var(--wear), #181c16e0; border: 1px solid #776e55; box-shadow: 2px 3px #090e09a0; padding: 12px 8px 6px; }
.quick-slot.active { border: 2px solid #c0a46d; border-bottom-color: #716047; background: var(--wear), #48422ed9; }
.quick-slot kbd { font-size: 14px; left: 4px; top: 0; color: #b7ad90; }
.quick-slot small { font-size: 15px; bottom: 0; right: 4px; }
.quick-slot svg { color: #c6bca2; }

#map-open { border: 2px solid #93805b; border-top-color: #6d634d; background: #25271f; box-shadow: 3px 4px #0c100bdd; }
#minimap { opacity: .85; image-rendering: pixelated; filter: saturate(.8) sepia(.08); }
#radar>div { font-size: 13px; letter-spacing: 0; margin-top: 7px; color: #b1a68a; }
#radar kbd { font-size: 15px; }
#gps { background: var(--wear), #1c1f17ed; border-left: 3px solid #a88d54; box-shadow: 2px 3px #090e0ab0; padding: 7px 10px; }
#gps-arrow { color: #c8b276; font-family: 'Courier New', monospace; font-size: 30px; }
#gps strong { font-size: 23px; line-height: 1; color: #d5c8a5; font-weight: 400; }
#gps span { font-size: 16px; color: #a5a18b; margin-top: 1px; }
#hint { font-size: 15px; letter-spacing: 0; color: #bbae8d; }
#hint span { color: #8b907c; }
#sound { font-size: 14px; letter-spacing: .5px; top: 75px; }
#context { background: var(--wear), #191d15ec; border: 1px solid #857454; border-bottom: 2px solid #4d4837; border-radius: 0; padding: 5px 9px; font-size: 20px; box-shadow: 2px 3px #10140bb0; }
#context kbd { padding: 0 4px; font-size: 19px; border: 1px solid #857454; }
#waypoint { color: #c7ad6b; }
#waypoint span { font-size: 17px; }
#waypoint { pointer-events: none; text-shadow: 0 2px 3px #000; }
#waypoint > b { width: 38px; height: 38px; margin: 0 auto; }
#waypoint > b svg { display: block; margin: 3px; overflow: visible; filter: drop-shadow(0 2px 2px #000); }
#waypoint .waypoint-needle { display: none; fill: #f2d491; stroke: #161c16; stroke-width: 1.5; }
#waypoint .waypoint-pin { fill: #1b251bc7; stroke: #f2d491; stroke-width: 2; }
#waypoint[data-edge="true"] > b { border: 1px solid #d0bd8a8a; border-radius: 50%; background: #101b15e6; box-shadow: 0 2px 8px #0008; }
#waypoint[data-edge="true"] .waypoint-needle { display: block; }
#waypoint[data-edge="true"] .waypoint-pin { display: none; }
#waypoint[data-edge="true"] > span { margin-top: 4px; padding: 1px 5px; background: #101b15e6; border-radius: 2px; color: #e4d9b8; font-variant-numeric: tabular-nums; }
#toast { background: var(--wear), #1a1d15ef; border: 1px solid #5c5d45; border-left: 3px solid #b29969; box-shadow: 3px 4px #0b100a80; padding: 9px 17px; font-size: 21px; letter-spacing: 0; top: 23%; }
#chatter { background: var(--wear), #181b15f2; border: 1px solid #696a53; border-radius: 0; box-shadow: 3px 4px #0b100aa0; color: #d2c8ad; font-size: 22px; line-height: 1.15; padding: 10px 13px; max-width: 325px; }
#chatter strong { color: #a99d78; font-size: 16px; letter-spacing: .5px; margin-bottom: 4px; }
#wanted { color: #c4b797; font-size: 17px; letter-spacing: 1px; }
#world-event { font-size: 20px; gap: 8px; flex-direction: row; align-items: center; color: #bbb294; padding: 5px 8px; background: #1b1e17cf; border: 1px solid #77705a70; text-align: left; }
#world-event strong { font-weight: 400; color: #cbb47b; white-space: nowrap; }
#world-event.tracked { border-color: #bba16e; }
#world-event:disabled { opacity: .55; cursor: default; }
#world-event .eyebrow { font-size: 14px; }
#world-event small { font-size: 15px; color: #9f9e85; }
#damage-numbers span { font-family: 'Street Terminal', 'Courier New', monospace; font-weight: 400; font-size: 38px; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; color: #f1e9ce; text-shadow: -2px -2px #10110e, 0 -2px #10110e, 2px -2px #10110e, -2px 0 #10110e, 2px 0 #10110e, -2px 2px #10110e, 0 2px #10110e, 2px 2px #10110e; transform: translate(-50%, -50%); animation: street-damage-pop 900ms ease-out forwards; }
#damage-numbers span.heavy { font-size: 44px; color: #ddc29a; }
#damage-numbers span.kill { font-size: 50px; color: #d76552; }
@keyframes street-damage-pop {
  0% { transform: translate(-50%, -50%) scale(.72); opacity: 1; }
  12% { transform: translate(-50%, calc(-50% - 10px)) scale(1.22); opacity: 1; }
  28% { transform: translate(-50%, calc(-50% - 20px)) scale(1); opacity: 1; }
  60% { transform: translate(-50%, calc(-50% - 34px)) scale(1); opacity: 1; }
  100% { transform: translate(-50%, calc(-50% - 52px)) scale(1); opacity: 0; }
}
#vehicle-hud small { font-family: inherit; font-size: 12px; letter-spacing: 1px; }
#gauge-ticks text { font-family: inherit; font-size: 16px; }
.gauge-unit { font-family: inherit; font-size: 13px; letter-spacing: 1px; }
#speed { font-family: inherit; font-size: 15px; }

#dialogue, #bag, #map-panel { background: var(--wear), #1b1e17f5; border: 1px solid #6e6851; border-top: 3px solid #8c7c59; border-radius: 0; box-shadow: 5px 6px #0a0e09aa; }
#dialogue { width: min(400px, 90vw); padding: 19px 22px 13px; }
#dialogue::after { background: #1b1e17; border-color: #6e6851; }
#speaker { color: #b5a16e; font-size: 19px; letter-spacing: 1px; }
#speech { font-size: 24px; line-height: 1.18; color: #d0c7ae; margin: 10px 0 15px; }
#choices button { background: #4c493177; border-left: 3px solid #a38b5a; font-size: 21px; padding: 9px 11px; }
#choices button:hover { background: #5e573a; }
#dialogue-close { font-size: 16px; }
#bag { width: 368px; padding: 24px; }
.panel-heading .eyebrow { font-size: 15px; }
.panel-heading h2 { font-family: inherit; font-size: 36px; font-weight: 400; margin-top: 3px; line-height: 1; }
.close-button { font-size: 36px; color: #a1987c; }
.bag-item { border-bottom: 1px dashed #736a4c; padding: 16px 0; }
.bag-item strong { font-size: 23px; font-weight: 400; margin-bottom: 2px; }
.bag-item p { font-size: 18px; line-height: 1.15; color: #a4a087; }
.bag-item small { font-size: 21px; }
.bag-consumable > svg { width: 46px; height: 48px; }
.bag-consumable > div { min-width: 0; }
.bag-consumable:disabled { opacity: .55; cursor: default; }
.bag-use { display: inline-block; color: #d4c292; font-size: 18px; margin-top: 5px; }
#brew-effect { color: #d4c292; font-size: 18px; margin-top: 7px; }
.bag-foot { font-size: 17px; line-height: 1.2; color: #8c917b; }
.map-foot { font-size: 17px; color: #b1aa8c; }
.map-foot small { font-size: 16px; color: #868d77; }
#city-map { image-rendering: pixelated; filter: saturate(.95); }
#pause, #death { background: var(--wear), #141810e6; backdrop-filter: grayscale(1); }
#pause h2, #death h2 { font-family: inherit; font-weight: 400; font-size: 76px; letter-spacing: 1px; margin: 12px 0; }
#death h2 { color: #aa6a52; font-size: 110px; letter-spacing: 5px; text-shadow: 3px 3px #392c22; }
#pause p, #death p { color: #b0a88c; font-size: 22px; line-height: 1.2; }
#pause .eyebrow { color: #9c9173; font-size: 18px; }
.controls { grid-template-columns: 160px 220px; gap: 8px; font-size: 19px; }
.controls span { color: #8f9079; }
.controls b { color: #c3baa0; }
#respawn-count { font-size: 20px; letter-spacing: 1px; color: #a29676; }
#fatal { background: #1b1e16; border: 2px solid #a18456; font-size: 22px; line-height: 1.3; }

#street-offer { position: absolute; left: 50%; bottom: 106px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 8px 13px; pointer-events: auto; background: var(--wear), #1a1d15ed; color: var(--paper); border: 1px solid #71664d; border-left: 3px solid #ac925c; box-shadow: 3px 3px #0a0e09aa; font-size: 21px; white-space: nowrap; }
#street-offer kbd { border: 1px solid #8c7c5a; padding: 0 4px; font-size: 20px; }
#street-offer strong { color: #cbb47b; font-weight: 400; }
#job-clock { position: absolute; left: 48px; top: 58px; font-size: 20px; color: #c6ad73; font-variant-numeric: tabular-nums; }
#job-clock.urgent { color: #cd886b; }
#run-result { color: #c3b28e; font-size: 25px; margin: 6px 0 25px; }

@media (max-width: 800px) {
  #heading h2 { font-size: 25px; }
  #heading .eyebrow { font-size: 12px; }
  #district-sub { font-size: 15px; }
  #objective { top: 112px; }
  #job-clock { left: 30px; top: 54px; }
  #objective h3 { font-size: 20px; }
  #objective p { font-size: 17px; }
  #vitals { width: 175px; }
  #rank { font-size: 11px; }
  #crew { font-size: 15px; }
  #radar>div { font-size: 11px; }
  #gps { padding: 7px 6px; gap: 6px; }
  #gps-arrow { font-size: 22px; }
  #gps strong { font-size: 20px; }
  #gps span { font-size: 14px; }
  #bag { width: min(350px, 95vw); }
  #world-event { top: 145px; }
  #toast { max-width: 80vw; font-size: 19px; }
  #wanted { right: 18px; }
  #vehicle-hud { bottom: 188px; }
}

@media (max-width: 550px) {
  #quickbar { bottom: 170px; }
  #street-offer { bottom: 230px; }
  #vehicle-hud { bottom: 235px; }
  #entry h1 { font-size: 106px; }
  #entry .edition { font-size: 14px; }
  #entry { bottom: 7vh; }
  #join-form { width: min(320px, 86vw); }
  #pause h2 { font-size: 55px; }
  .controls { grid-template-columns: 140px 185px; font-size: 17px; }
  #world-event { top: 181px; }
}

@keyframes street-feedback-fade {
  0%, 60% { opacity: 1; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #hitmarker.hit, #hitmarker.hit.kill, #damage-numbers span { animation-name: street-feedback-fade; }
}
