@font-face { font-family: Oxanium; font-style: normal; font-weight: 800; font-display: swap; src: url('/nightshift/fonts/oxanium-800-latin.woff2') format('woff2'); }
@font-face { font-family: Rajdhani; font-style: normal; font-weight: 500; font-display: swap; src: url('/nightshift/fonts/rajdhani-500-latin.woff2') format('woff2'); }
@font-face { font-family: Rajdhani; font-style: normal; font-weight: 700; font-display: swap; src: url('/nightshift/fonts/rajdhani-700-latin.woff2') format('woff2'); }
:root { color-scheme: dark; --font-display: Oxanium, Arial, sans-serif; --font-ui: Rajdhani, Arial, sans-serif; font-family: var(--font-ui); font-weight: 500; color: #ece9df; background: #0b1220; font-synthesis: none; --amber: #f6d05b; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 2px solid #ffc476; outline-offset: 5px; }
button:disabled { opacity: .35; cursor: default; }
[hidden] { display: none !important; }
.game-shell { width: min(1440px, 100%); padding: 0 clamp(14px, 3.2vw, 48px); margin: auto; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font: 700 13px/1.2 var(--font-ui); letter-spacing: .12em; }
.back { color: #abb9c0; display: flex; gap: 12px; align-items: center; }
.back:hover { color: var(--amber); }
.wordmark { font: 800 12px var(--font-display); letter-spacing: .1em; }
.edition { margin-left: 12px; font-weight: 400; color: #768993; }
.actions { display: flex; gap: 16px; align-items: center; }
.actions button { background: none; border: 0; color: #b3c1c7; padding: 10px 0; font: inherit; font-size: 12px; letter-spacing: .08em; }
.actions #pause { font-size: 19px; min-width: 24px; }
.drive { position: relative; isolation: isolate; width: 100%; height: min(73vw, calc(100svh - 122px), 820px); min-height: 430px; overflow: hidden; background: #172532; border: 1px solid #7cc5d52e; }
canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.vignette { position: absolute; pointer-events: none; inset: 0; background: linear-gradient(#07111bd9, #07111b40 12%, transparent 28%, transparent 70%, #07111b60); }
.hud { position: absolute; top: 26px; left: 30px; right: 30px; display: flex; justify-content: space-between; gap: 20px; pointer-events: none; text-shadow: 0 2px 8px #000; }
.hud span { font: 700 12px var(--font-ui); letter-spacing: .13em; }
.timer, .speed, .district { display: flex; flex-direction: column; gap: 5px; }
.timer strong, .speed strong { font: 700 clamp(36px, 4.7vw, 64px)/.9 var(--font-ui); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.timer strong span { font: inherit; font-size: .5em; color: #c6c4b5; }
.timer.low { color: #ff8c77; }
.timer > small { font: 700 12px var(--font-ui); letter-spacing: .04em; color: #b8c9ce; }
.drive[data-urgency="tight"] .timer > small { color: #ffd478; }
.drive[data-urgency="critical"] .timer, .drive[data-urgency="critical"] .timer > small, .drive[data-urgency="critical"] .timer strong span { color: #ff897e; }
.drive[data-urgency="critical"] .progress i { background: #ff897e; }
.drive[data-urgency="critical"] .timer strong { animation: deadline-pulse 1s ease-in-out infinite; }
@keyframes deadline-pulse { 50% { text-shadow: 0 0 18px #ff766677; } }
.district { align-items: center; padding-top: 2px; }
.district strong { font: 800 12px var(--font-display); letter-spacing: .08em; }
.district > span { color: var(--amber); }
.hull { display: flex; gap: 5px; padding-top: 7px; }
.hull i { display: block; width: 22px; height: 5px; background: #92dfcd; transform: skew(-16deg); }
.hull i.lost { background: #64708355; }
.hull.critical i:not(.lost) { background: #ff897e; }
.speed { text-align: right; }
.progress { position: absolute; inset: 0 0 auto; height: 3px; background: #ffffff15; }
.progress i { display: block; height: 100%; width: 0; background: var(--amber); }
.toast { position: absolute; top: 24%; left: 12px; right: 12px; text-align: center; color: #ffe5b2; font: 800 clamp(12px, 1.7vw, 22px) var(--font-display); letter-spacing: .05em; text-shadow: 0 2px 6px #000; opacity: 0; transform: translateY(5px); transition: opacity .25s, transform .25s; pointer-events: none; }
.toast.visible { opacity: 1; transform: none; }
.charge { position: absolute; bottom: 28px; left: 30px; width: 200px; pointer-events: none; font: 700 13px var(--font-ui); letter-spacing: .08em; text-shadow: 0 1px 5px #000; }
.charge > div:first-child { display: flex; justify-content: space-between; gap: 20px; }
.charge-track { height: 5px; margin-top: 9px; background: #10202cd9; border: 1px solid #9cb4bb40; }
.charge-track i { display: block; height: 100%; width: 25%; background: #ffc476; }
.charge small { display: block; margin-top: 9px; font-size: 14px; font-weight: 500; line-height: 1.25; letter-spacing: .01em; color: #c2cdd0; }
.charge.drafting { color: #9fe6e2; }
.charge.drafting .charge-track i { background: #9fe6e2; }
.drive[data-mode="survival"] .charge { width: 240px; }
.drive[data-mode="survival"] .charge-track { border-color: #90bfb93d; }
.drive[data-mode="survival"] .pedals .brake { min-width: 86px; }
.route-prompt { position: absolute; top: 15%; left: 50%; transform: translateX(-50%); width: min(600px, 90%); padding: 16px; background: #0a1729e8; border-top: 2px solid var(--amber); box-shadow: 0 10px 30px #0003; }
.route-prompt > span { font: 700 12px var(--font-ui); color: #c1cdd0; letter-spacing: .1em; }
.route-prompt > div { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.route-prompt strong { color: #8296a0; font: 800 clamp(11px, 1.7vw, 17px) var(--font-display); letter-spacing: .02em; }
.route-prompt strong.selected { color: #ffe1a7; }
.route-prompt small { display: flex; justify-content: space-between; margin-top: 6px; color: #b0bfc5; font: 700 12px var(--font-ui); letter-spacing: .06em; }
.overlay { position: absolute; inset: 0; display: grid; align-items: safe center; overflow-y: auto; padding: 34px clamp(25px, 6vw, 90px); background: linear-gradient(90deg, #0b1220eb, #0b122080 45%, #0b122005); }
.overlay.paused, .overlay.ended { background: #091522dc; backdrop-filter: blur(5px); }
.start-panel { width: min(540px, 100%); }
.mode-picker { display: flex; gap: 24px; margin: -6px 0 22px; }
.mode-picker button { border: 0; border-bottom: 2px solid transparent; background: none; color: #a6b6c3; padding: 6px 0 8px; font: 700 13px var(--font-ui); letter-spacing: .08em; }
.mode-picker button[aria-pressed="true"] { color: var(--amber); border-bottom-color: var(--amber); }
.mode-picker button:hover { color: #f7e5ac; }
.quiet-actions { display: flex; gap: 24px; }
.eyebrow { color: var(--amber); font: 700 12px/1.5 var(--font-ui); letter-spacing: .18em; margin: 0 0 22px; }
h1 { width: fit-content; font: 800 clamp(46px, 7.8vw, 102px)/.92 var(--font-display); letter-spacing: -.065em; margin: 0; position: relative; transform: skew(-9deg); transform-origin: left center; }
h1 span { display: block; color: var(--amber); }
h1 i { position: absolute; bottom: .02em; left: calc(100% + .15em); font: 500 .4em Arial, sans-serif; color: var(--amber); }
.intro { color: #c3cbd0; font-size: 20px; line-height: 1.4; margin: 27px 0 29px; }
.primary { display: flex; align-items: center; justify-content: space-between; gap: 28px; width: min(320px, 100%); min-height: 54px; padding: 16px 20px; border: 0; background: var(--amber); color: #14202a; font: 700 16px var(--font-ui); letter-spacing: .09em; transition: background .15s, transform .15s; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%); }
.primary:hover { background: #ffe0a9; transform: translateY(-2px); }
.primary span { font: 24px/15px Arial, sans-serif; }
.controls-brief { display: flex; gap: 18px; margin-top: 23px; font: 700 12px var(--font-ui); letter-spacing: .05em; color: #c4ccd0; }
.controls-brief > span { white-space: nowrap; }
kbd { display: inline-block; font: inherit; padding: 4px 5px; background: #ffffff10; border: 1px solid #ffffff26; margin-right: 4px; }
.mobile-brief { display: none; font: 500 16px var(--font-ui); color: #b8c8cd; }
.start-footer { display: flex; gap: 25px; border-top: 1px solid #d4dbe025; padding-top: 18px; margin-top: 31px; font: 700 11px var(--font-ui); letter-spacing: .1em; color: #91a3ad; }
h2 { font: 800 clamp(34px, 5.7vw, 64px)/1.1 var(--font-display); letter-spacing: -.055em; margin: 0 0 12px; }
.pause-panel > p:not(.eyebrow), .end-panel > p:not(.eyebrow) { color: #b2c2ca; font-size: 19px; line-height: 1.4; margin: 10px 0 27px; }
.quiet { display: block; background: none; border: 0; color: #b5c4cb; padding: 14px 0; font-size: 16px; width: fit-content; }
.quiet:hover { color: #ffc476; }
.run-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; width: min(430px, 100%); padding: 10px 0 20px; }
.run-stats div { display: flex; flex-direction: column; gap: 8px; }
.run-stats strong { font: 700 36px var(--font-ui); color: #ffe1b2; font-variant-numeric: tabular-nums; }
.run-stats span { color: #a4b6bf; font: 700 11px var(--font-ui); letter-spacing: .08em; }
.end-panel .run-route { font: 700 12px/1.6 var(--font-ui); letter-spacing: .05em; }
.bottom-bar { display: flex; justify-content: space-between; align-items: center; min-height: 44px; gap: 18px; color: #90a4af; font: 700 11px var(--font-ui); letter-spacing: .1em; }
.desktop-help { color: #8095a2; }
.desktop-help b { color: #536873; margin: 0 7px; }
.footer-mark { color: var(--amber); font-size: 18px; }
.touch-controls { display: none; position: absolute; bottom: max(18px, env(safe-area-inset-bottom)); left: 16px; right: 16px; justify-content: space-between; pointer-events: none; }
.steering, .pedals { display: flex; gap: 8px; }
.touch-controls button { pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; height: 60px; min-width: 62px; border: 1px solid #b4c5cc60; background: #10212bd9; color: #f0e9dd; font: 28px Arial, sans-serif; border-radius: 3px; }
.touch-controls .brake { font: 700 13px var(--font-ui); letter-spacing: .04em; min-width: 54px; }
.touch-controls .boost { font: 700 14px var(--font-ui); letter-spacing: .03em; min-width: 86px; color: #ffc476; border-color: #ffc47680; }
.touch-controls button.held { background: #ffc476; color: #15202b; border-color: #ffe0a4; }
@media (pointer: coarse) { .touch-controls { display: flex; } .controls-brief, .desktop-help { display: none; } .mobile-brief { display: block; } .charge { bottom: 103px; } }
@media (max-width: 650px) {
  .game-shell { padding: 0 10px; } .topbar { height: 60px; gap: 8px; } .topbar .back span, .edition { display: none; } .wordmark { font-size: 11px; } .actions { gap: 14px; }
  .drive { height: calc(100svh - 101px); min-height: 480px; max-height: 900px; }
  .hud { top: 22px; left: 18px; right: 18px; gap: 8px; } .hud span { font-size: 11px; } .district strong { font-size: 10px; letter-spacing: .02em; }
  .charge { left: 18px; width: 180px; } .overlay { padding: 30px 24px; background: linear-gradient(90deg, #0b1725eb, #0b172584); }
  .eyebrow { font-size: 11px; letter-spacing: .1em; } h1 { font-size: clamp(48px, 15vw, 88px); } .intro { font-size: 18px; }
  .bottom-bar { min-height: 40px; font-size: 10px; } .desktop-help { display: none; } .controls-brief { gap: 8px; font-size: 10px; } .start-footer { gap: 14px; font-size: 10px; }
  .run-stats { gap: 12px; } .run-stats strong { font-size: 32px; } .route-prompt { top: 17%; padding: 14px 12px; } .route-prompt > span { font-size: 10px; } .route-prompt small { font-size: 11px; }
  .touch-controls { display: flex; } .charge { top: 110px; bottom: auto; width: 160px; } .controls-brief { display: none; } .mobile-brief { display: block; }
  .toast { top: 31%; }
  .route-prompt:not([hidden]) ~ .charge { visibility: hidden; }
  .hud span, .charge { font-size: 12px; } .charge small { font-size: 14px; } .district > span { font-size: 11px; }
  .drive[data-mode="survival"] .charge { width: 174px; }
}
@media (orientation: landscape) and (max-height: 540px) {
  .topbar { height: 44px; } .drive { height: calc(100svh - 52px); min-height: 260px; } .bottom-bar { display: none; } .overlay { padding: 20px 40px; } .eyebrow { margin-bottom: 12px; } h1 { font-size: 62px; } .intro { margin: 14px 0; } .primary { min-height: 44px; padding: 12px 18px; } .start-footer { margin-top: 14px; padding-top: 12px; } .mobile-brief { margin: 12px 0; font-size: 10px; } .hud { top: 16px; } .charge { left: 50%; transform: translateX(-50%); top: auto; bottom: 18px; width: 150px; } .charge small { display: none; } .route-prompt { top: 25%; width: 55%; } h2 { font-size: 40px; } .run-stats { padding: 0 0 8px; } .end-panel > p:not(.eyebrow) { margin: 5px 0 12px; }
  .start-panel { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); column-gap: 40px; }
  .start-panel .eyebrow { grid-column: 1 / -1; grid-row: 1; }
  .start-panel h1 { grid-column: 1; grid-row: 2 / 6; font-size: clamp(44px, 7.4vw, 62px); }
  .start-panel .intro { grid-column: 1; grid-row: 6; font-size: 17px; }
  .start-panel .mode-picker { grid-column: 2; grid-row: 2; margin: 0 0 10px; gap: 18px; }
  .start-panel .primary { grid-column: 2; grid-row: 3; }
  .start-panel .mobile-brief, .start-panel .controls-brief { grid-column: 2; grid-row: 4; font-size: 13px; }
  .start-panel .start-footer { grid-column: 2; grid-row: 5; gap: 12px; font-size: 10px; }
  .pause-panel > p:not(.eyebrow), .end-panel > p:not(.eyebrow) { font-size: 16px; }
  .touch-controls { display: flex; } .controls-brief, .desktop-help { display: none; } .mobile-brief { display: block; }
  .drive[data-mode="survival"] .charge { width: 180px; }
  .end-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); column-gap: 40px; }
  .end-panel .eyebrow { grid-column: 1 / -1; grid-row: 1; }
  .end-panel h2 { grid-column: 1; grid-row: 2; }
  .end-panel #end-detail { grid-column: 1; grid-row: 3; }
  .end-panel .run-stats { grid-column: 2; grid-row: 2 / 4; align-self: center; gap: 14px; }
  .end-panel .run-stats strong { font-size: 30px; }
  .end-panel .run-route { grid-column: 1; grid-row: 4; }
  .end-panel .primary { grid-column: 2; grid-row: 4; }
  .end-panel .quiet-actions { grid-column: 2; grid-row: 5; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
