:root {
  --nf-ink: #0a1014;
  --nf-glass: rgba(13, 23, 29, .84);
  --nf-line: rgba(212, 230, 226, .2);
  --nf-paper: #edf0e8;
  --nf-muted: #a8b4b4;
  --nf-dim: #667579;
  --nf-amber: #f1bd78;
  --nf-teal: #a1e5de;
  --nf-red: #ef705c;
  --nf-display: "Bahnschrift", "Arial Narrow", "Segoe UI Variable Display", "Franklin Gothic Medium", sans-serif;
  --nf-body: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}

.nightfall-ui,
.nightfall-ui * { box-sizing: border-box; }
.nightfall-ui [hidden] { display: none !important; }
.nightfall-ui {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  color: var(--nf-paper);
  font-family: var(--nf-body);
  font-size: 14px;
  pointer-events: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  isolation: isolate;
}
.nightfall-ui button { font: inherit; }
.screen-wash {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .92;
  background:
    linear-gradient(90deg, rgba(4, 10, 13, .9) 0%, rgba(4, 10, 13, .67) 34%, rgba(4, 10, 13, .13) 76%, rgba(4, 10, 13, .35) 100%),
    linear-gradient(0deg, rgba(3, 8, 10, .76), transparent 31%, transparent 71%, rgba(3, 8, 10, .64));
  transition: opacity .45s ease;
  pointer-events: none;
}
.is-playing .screen-wash { opacity: .33; }
.is-paused .screen-wash,
.is-result .screen-wash { opacity: .78; backdrop-filter: blur(2px); }
.screen-grain {
  position: absolute;
  inset: -50%;
  z-index: 5;
  opacity: .11;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}
#ui-root > .screen-wash,
#ui-root > .screen-grain { pointer-events: none !important; }

.screen {
  position: absolute;
  inset: 0;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vw, 72px);
  pointer-events: auto;
  animation: screen-in .35s cubic-bezier(.2,.75,.2,1) both;
}
.screen-title { display: block; padding: 0 clamp(26px, 7.2vw, 132px); overflow: hidden; }
.screen-title::before {
  content: "";
  position: absolute;
  top: 13%;
  left: 51.5%;
  width: 1px;
  height: 57%;
  background: linear-gradient(transparent, rgba(200, 221, 215, .14), transparent);
}
.title-topline,
.title-bottom,
.hud-topline {
  position: absolute;
  left: clamp(26px, 7.2vw, 132px);
  right: clamp(26px, 7.2vw, 132px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.title-topline { top: clamp(26px, 4.7vh, 54px); }
.title-brand,
.hud-brand { display: inline-flex; align-items: center; gap: 11px; color: #e8ece5; font: 700 12px/1 var(--nf-display); letter-spacing: .17em; }
.title-brand b,
.hud-brand b { color: var(--nf-amber); padding: 0 2px; font-weight: 600; }
.brand-mark {
  width: 27px;
  height: 27px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(241, 189, 120, .75);
  color: var(--nf-amber);
  font: 700 15px/1 var(--nf-display);
  letter-spacing: -.06em;
  transform: skew(-8deg);
}
.top-status { display: flex; align-items: center; gap: 10px; color: rgba(219, 228, 222, .68); font-size: 9px; letter-spacing: .22em; }
.top-status b { color: var(--nf-amber); font-size: 10px; }
.status-line { width: 7px; height: 7px; border-radius: 50%; background: var(--nf-teal); box-shadow: 0 0 12px rgba(161, 229, 222, .85); }
.title-content { min-height: 100vh; max-width: 1450px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 315px); align-items: center; gap: clamp(38px, 8vw, 130px); padding: 12vh 0 13vh; }
.title-copy { max-width: 720px; padding-top: 2vh; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: rgba(177, 199, 197, .83); font: 650 9px/1.4 var(--nf-display); letter-spacing: .25em; }
.eyebrow-rule { display: inline-block; width: 28px; height: 1px; background: var(--nf-amber); box-shadow: 0 0 9px rgba(241, 189, 120, .45); }
.eyebrow-sep { color: var(--nf-amber); margin: 0 1px; }
.title-copy h1 { display: flex; flex-direction: column; align-items: flex-start; margin: 0; text-shadow: 0 4px 28px rgba(0, 0, 0, .48); }
.title-prefix { display: flex; align-items: center; gap: 7px; color: var(--nf-amber); font: 700 clamp(13px, 1.2vw, 17px)/1 var(--nf-display); letter-spacing: .3em; margin: 0 0 5px 4px; }
.title-prefix span { color: rgba(237, 240, 232, .5); font-weight: 400; }
.title-name { color: #f0f1e9; font: 720 clamp(56px, 8.4vw, 126px)/.88 var(--nf-display); letter-spacing: -.035em; }
.title-subtitle { margin: 28px 0 0; color: rgba(234, 239, 232, .74); font: 600 clamp(13px, 1.25vw, 17px)/1.72 var(--nf-display); letter-spacing: .18em; }
.title-subtitle strong { color: var(--nf-paper); font-weight: 700; }
.title-description { max-width: 410px; margin: 19px 0 0; color: rgba(204, 217, 214, .7); font-size: 13px; line-height: 1.85; letter-spacing: .015em; }
.title-actions { display: flex; align-items: center; gap: 28px; margin-top: 28px; }
.ui-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-width: 182px;
  min-height: 50px;
  padding: 0 17px 0 21px;
  border: 1px solid rgba(241, 189, 120, .7);
  color: #101619;
  background: var(--nf-amber);
  cursor: pointer;
  font: 750 10px/1 var(--nf-display) !important;
  letter-spacing: .2em;
  text-align: left;
  transition: background .18s ease, color .18s ease, transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.ui-button i { font: 400 16px/1 var(--nf-body); font-style: normal; transition: transform .18s ease; }
.ui-button:hover { background: #ffd59b; box-shadow: 0 0 24px rgba(241, 189, 120, .17); transform: translateY(-1px); }
.ui-button:hover i { transform: translate(2px, -2px); }
.ui-button:focus-visible,
.text-button:focus-visible,
.hud-pause:focus-visible,
.touch-aim:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.button-secondary { color: var(--nf-paper); background: rgba(14, 25, 30, .55); border-color: rgba(210, 228, 224, .32); }
.button-secondary:hover { color: var(--nf-ink); border-color: var(--nf-paper); background: var(--nf-paper); }
.text-button { display: inline-flex; align-items: center; gap: 12px; padding: 10px 0; border: 0; color: rgba(222, 231, 225, .78); background: transparent; cursor: pointer; font: 650 9px/1 var(--nf-display); letter-spacing: .18em; transition: color .18s ease; }
.text-button span { color: var(--nf-amber); font: 400 14px/1 var(--nf-body); }
.text-button:hover { color: #fff; }
.title-footnote { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-top: 35px; color: rgba(157, 177, 175, .65); font: 600 8px/1.5 var(--nf-display); letter-spacing: .16em; }
.title-footnote i { width: 3px; height: 3px; border-radius: 50%; background: var(--nf-amber); opacity: .75; }
.briefing-lock { color: var(--nf-amber); font-size: 13px; }
.mission-card { align-self: center; margin-top: 44px; padding: 21px 21px 19px; border: 1px solid rgba(198, 223, 218, .2); background: linear-gradient(135deg, rgba(14, 26, 32, .82), rgba(11, 20, 25, .54)); box-shadow: 0 18px 46px rgba(0, 0, 0, .18); backdrop-filter: blur(13px); }
.mission-card-head,
.field-row,
.brief-source { display: flex; align-items: center; justify-content: space-between; }
.mission-card-head { color: var(--nf-amber); font: 700 9px/1 var(--nf-display); letter-spacing: .2em; }
.brief-index { color: rgba(167, 187, 184, .52); font-size: 8px; letter-spacing: .15em; }
.card-hairline { height: 1px; margin: 17px 0; background: rgba(209, 224, 218, .15); }
.field-row { gap: 18px; margin: 16px 0; font-size: 8px; letter-spacing: .12em; }
.field-row > span { color: rgba(161, 183, 180, .57); font-weight: 650; }
.field-row > b { color: rgba(231, 238, 230, .87); font: 700 9px/1.2 var(--nf-display); letter-spacing: .09em; text-align: right; }
.field-row .threat-medium { display: flex; align-items: center; gap: 7px; color: #edaa69; }
.threat-medium i { width: 5px; height: 5px; border-radius: 50%; background: #edaa69; box-shadow: 0 0 8px rgba(237, 170, 105, .8); }
.mission-card-note { margin: 0; color: rgba(201, 214, 210, .72); font-size: 11px; font-style: italic; line-height: 1.65; }
.brief-source { margin-top: 16px; color: rgba(159, 180, 176, .53); font: 650 7px/1 var(--nf-display); letter-spacing: .14em; }
.brief-source b { color: rgba(204, 220, 214, .75); font-size: 8px; }
.title-bottom { bottom: clamp(24px, 4.4vh, 48px); color: rgba(145, 166, 162, .57); font: 650 8px/1 var(--nf-display); letter-spacing: .16em; }
.title-bottom-left,
.title-bottom-right { display: flex; align-items: center; gap: 12px; }
.bottom-diamond { width: 5px; height: 5px; border: 1px solid var(--nf-amber); transform: rotate(45deg); }
.bottom-divider { color: rgba(241, 189, 120, .68); }
.bottom-version { color: rgba(226, 233, 225, .77); }

.screen-briefing,
.screen-pause,
.screen-result,
.screen-failed { background: rgba(4, 9, 12, .34); backdrop-filter: blur(4px); }
.overlay-panel { position: relative; width: min(650px, 100%); padding: clamp(26px, 5vw, 58px); border: 1px solid rgba(189, 218, 211, .22); background: linear-gradient(135deg, rgba(13, 24, 29, .97), rgba(10, 18, 22, .91)); box-shadow: 0 24px 90px rgba(0,0,0,.48); }
.overlay-panel::before,
.overlay-panel::after { content: ""; position: absolute; width: 23px; height: 23px; border-color: var(--nf-amber); opacity: .75; pointer-events: none; }
.overlay-panel::before { top: -1px; left: -1px; border-top: 1px solid; border-left: 1px solid; }
.overlay-panel::after { right: -1px; bottom: -1px; border-right: 1px solid; border-bottom: 1px solid; }
.panel-topline { display: flex; justify-content: space-between; gap: 20px; margin-bottom: clamp(37px, 6vh, 63px); padding-bottom: 12px; border-bottom: 1px solid rgba(203, 224, 218, .14); color: rgba(166, 187, 183, .65); font: 650 8px/1 var(--nf-display); letter-spacing: .18em; }
.panel-topline b { color: var(--nf-amber); font-weight: 700; }
.overlay-panel .eyebrow { margin-bottom: 20px; }
.overlay-panel h2 { margin: 0; color: #f0f1e9; font: 730 clamp(42px, 7vw, 75px)/.91 var(--nf-display); letter-spacing: -.035em; }
.overlay-panel h2 em { color: var(--nf-amber); font-style: normal; }
.briefing-copy,
.pause-copy,
.result-copy { max-width: 470px; margin: 23px 0 0; color: rgba(201, 215, 210, .73); font-size: 12px; line-height: 1.85; }
.briefing-stats { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 29px; padding: 19px 0; border-top: 1px solid rgba(204, 222, 216, .14); border-bottom: 1px solid rgba(204, 222, 216, .14); }
.briefing-stats > div,
.pause-status > div,
.result-metrics > div { display: flex; flex-direction: column; gap: 9px; padding: 0 15px; border-left: 1px solid rgba(204, 222, 216, .14); }
.briefing-stats > div:first-child,
.pause-status > div:first-child,
.result-metrics > div:first-child { padding-left: 0; border-left: 0; }
.briefing-stats span,
.pause-status span,
.result-metrics span { color: rgba(159, 180, 177, .61); font: 650 7px/1.2 var(--nf-display); letter-spacing: .14em; }
.briefing-stats b { color: var(--nf-paper); font: 700 12px/1 var(--nf-display); letter-spacing: .08em; }
.briefing-controls { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px 8px; margin-top: 20px; }
.briefing-controls > div { display: flex; flex-direction: column; gap: 7px; }
.briefing-controls kbd,
.control-key kbd,
.esc-note kbd { display: inline-block; width: fit-content; padding: 5px 6px; border: 1px solid rgba(192, 215, 209, .21); color: var(--nf-paper); background: rgba(179, 209, 202, .055); font: 650 8px/1 var(--nf-display); letter-spacing: .1em; }
.briefing-controls span { color: rgba(171, 189, 185, .59); font-size: 8px; }
.panel-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; }
.panel-actions .ui-button { min-width: 195px; }
.briefing-side-note { position: absolute; right: clamp(24px, 4vw, 60px); bottom: 36px; display: flex; align-items: center; gap: 10px; color: rgba(182, 201, 196, .53); font: 650 8px/1 var(--nf-display); letter-spacing: .14em; }
.briefing-side-note b { color: var(--nf-amber); }
.briefing-side-line { display: inline-block; width: 30px; height: 1px; background: var(--nf-amber); opacity: .7; }
.pause-panel { width: min(510px, 100%); }
.pause-panel .panel-topline { margin-bottom: 41px; }
.pause-panel h2 { font-size: clamp(46px, 7vw, 67px); }
.pause-status { display: flex; margin-top: 29px; padding: 19px 0; border-top: 1px solid rgba(204, 222, 216, .14); border-bottom: 1px solid rgba(204, 222, 216, .14); }
.pause-status b { color: var(--nf-paper); font: 700 13px/1 var(--nf-display); letter-spacing: .08em; }
.pause-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; margin-top: 25px; }
.pause-actions .ui-button { width: 100%; }
.pause-actions .button-secondary { width: auto; min-width: 190px; }
.esc-note { display: flex; align-items: center; gap: 8px; margin-left: auto; color: rgba(157, 178, 174, .57); font: 650 7px/1 var(--nf-display); letter-spacing: .11em; }
.esc-note kbd { padding: 4px 5px; }
.result-panel { width: min(690px, 100%); }
.result-stamp { position: absolute; top: 26px; right: 30px; display: flex; flex-direction: column; gap: 3px; padding: 9px 12px; border: 1px solid rgba(161, 229, 222, .5); color: var(--nf-teal); transform: rotate(5deg); font: 700 7px/1 var(--nf-display); letter-spacing: .16em; }
.result-stamp b { font-size: 10px; }
.result-stamp-failed { border-color: rgba(239, 112, 92, .6); color: var(--nf-red); }
.result-panel .panel-topline { margin-bottom: 39px; }
.result-panel h2 { font-size: clamp(44px, 7vw, 76px); }
.result-panel h2 em { color: var(--nf-teal); }
.failed-panel h2 em { color: var(--nf-red); }
.result-metrics { display: grid; grid-template-columns: 1.1fr .9fr 1fr; margin-top: 31px; padding: 20px 0; border-top: 1px solid rgba(204, 222, 216, .14); border-bottom: 1px solid rgba(204, 222, 216, .14); }
.result-metrics b { color: var(--nf-paper); font: 720 20px/1 var(--nf-display); letter-spacing: .06em; }
.result-metrics .rating { color: var(--nf-teal); }
.result-metrics .rating span { color: var(--nf-amber); font-size: 13px; }
.result-metrics .status-lost { color: var(--nf-red); font-size: 10px; }
.result-actions { display: flex; align-items: center; gap: 27px; margin-top: 27px; }

/* In-mission readouts */
.hud { position: absolute; inset: 0; color: rgba(238, 242, 235, .92); pointer-events: none; }
#ui-root.is-playing .hud { pointer-events: none !important; }
.hud-topline { top: 0; left: 0; right: 0; height: 55px; padding: 0 clamp(18px, 3.1vw, 55px); border-bottom: 1px solid rgba(204, 224, 219, .11); background: linear-gradient(180deg, rgba(3, 10, 13, .46), rgba(3, 10, 13, .03)); }
.hud-brand { font-size: 9px; letter-spacing: .14em; gap: 8px; }
.hud-brand .brand-mark { width: 21px; height: 21px; font-size: 11px; }
.mission-chip { display: flex; align-items: center; gap: 9px; color: rgba(224, 234, 226, .74); font: 650 8px/1 var(--nf-display); letter-spacing: .15em; }
.live-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--nf-teal); box-shadow: 0 0 9px var(--nf-teal); animation: pulse-dot 2s ease-in-out infinite; }
.chip-divider { width: 1px; height: 10px; background: rgba(210, 226, 220, .27); }
.mission-state { color: var(--nf-amber); }
.hud-top-right { display: flex; gap: 9px; color: rgba(187, 202, 196, .52); font: 650 7px/1 var(--nf-display); letter-spacing: .13em; }
.hud-separator { color: var(--nf-amber); }
.hud-objective { position: absolute; top: 82px; left: clamp(20px, 3.2vw, 58px); display: grid; grid-template-columns: 18px auto 48px; align-items: center; column-gap: 12px; min-width: 224px; padding: 11px 13px 11px 11px; border-left: 1px solid rgba(241, 189, 120, .65); background: linear-gradient(90deg, rgba(5, 12, 15, .68), rgba(5, 12, 15, .18)); }
.objective-mark { position: relative; width: 15px; height: 15px; display: grid; place-items: center; border: 1px solid rgba(241, 189, 120, .69); transform: rotate(45deg); }
.objective-mark span { position: absolute; width: 3px; height: 3px; background: var(--nf-amber); }
.objective-mark span:nth-child(2) { width: 1px; height: 11px; }
.objective-mark span:nth-child(3) { width: 11px; height: 1px; }
.objective-copy { margin: 4px 0 0; color: rgba(229, 237, 228, .88); font: 650 10px/1.15 var(--nf-display); letter-spacing: .07em; }
.hud-objective .eyebrow { margin: 0; color: rgba(165, 187, 182, .6); font-size: 7px; letter-spacing: .16em; }
.objective-count { display: flex; align-items: baseline; gap: 3px; justify-content: flex-end; color: var(--nf-paper); font: 700 13px/1 var(--nf-display); }
.objective-count i { color: rgba(173, 192, 186, .44); font-size: 9px; font-style: normal; }
.objective-count span:last-child { color: rgba(174, 192, 186, .62); font-size: 9px; }
.wave-progress { position: absolute; right: 13px; bottom: -1px; left: 0; height: 1px; background: rgba(209, 223, 216, .12); }
.wave-progress span { display: block; width: 0%; height: 100%; background: var(--nf-amber); box-shadow: 0 0 8px rgba(241, 189, 120, .73); transition: width .35s ease; }
.hud-bottom { position: absolute; right: clamp(22px, 3.3vw, 58px); bottom: clamp(18px, 3.8vh, 43px); left: clamp(22px, 3.3vw, 58px); display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; }
.vitals-panel,
.weapon-panel { display: flex; align-items: center; min-width: 205px; padding: 12px 14px; background: linear-gradient(135deg, rgba(4, 12, 15, .7), rgba(4, 12, 15, .24)); border-top: 1px solid rgba(196, 217, 211, .22); }
.vitals-panel { gap: 11px; width: min(250px, 26vw); }
.vitals-icon { position: relative; display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border: 1px solid rgba(161, 229, 222, .44); border-radius: 50%; }
.vitals-icon::before,.vitals-icon::after { content: ""; position: absolute; background: var(--nf-teal); }
.vitals-icon::before { width: 12px; height: 2px; }
.vitals-icon::after { width: 2px; height: 12px; }
.vitals-icon span { position: absolute; inset: -4px 12px; border-top: 1px solid rgba(161, 229, 222, .55); border-bottom: 1px solid rgba(161, 229, 222, .24); }
.vitals-icon span:nth-child(2) { transform: rotate(90deg); }
.vitals-copy { flex: 1; min-width: 0; }
.vitals-label,.vitals-sub,.weapon-meta,.weapon-foot { display: flex; align-items: center; justify-content: space-between; }
.vitals-label { color: rgba(176, 197, 190, .62); font: 650 7px/1 var(--nf-display); letter-spacing: .16em; }
.vitals-label b { color: var(--nf-paper); font-size: 11px; letter-spacing: .06em; }
.meter { height: 3px; margin: 7px 0; background: rgba(185, 208, 200, .18); }
.health-fill { display: block; width: 100%; height: 100%; background: var(--nf-teal); box-shadow: 0 0 8px rgba(161, 229, 222, .4); transition: width .22s ease, background .22s ease; }
.vitals-sub { color: rgba(153, 178, 173, .51); font: 650 6px/1 var(--nf-display); letter-spacing: .12em; }
.armor-label b { color: rgba(211, 225, 218, .72); font-size: 7px; }
.is-critical .health-fill { background: var(--nf-red); box-shadow: 0 0 9px rgba(239, 112, 92, .65); }
.is-critical .vitals-icon { border-color: rgba(239, 112, 92, .68); animation: critical-pulse 1.2s ease-in-out infinite; }
.hud-center-bottom { display: flex; flex-direction: column; align-items: center; gap: 7px; margin-bottom: 2px; color: rgba(181, 198, 193, .57); font: 650 7px/1 var(--nf-display); letter-spacing: .15em; }
.sector-coord { color: rgba(184, 201, 194, .55); font-size: 6px; letter-spacing: .16em; }
.sector-coord b { color: var(--nf-amber); padding: 0 5px; }
.compass { display: flex; align-items: center; gap: 9px; }
.compass i { display: block; width: 2px; height: 2px; border: 1px solid rgba(203, 222, 215, .4); transform: rotate(45deg); }
.compass-label { color: rgba(187, 203, 197, .55); }
.compass-active { color: var(--nf-amber); font-weight: 800; }
.contact-bearing { color: var(--nf-red); font-weight: 750; letter-spacing: .1em; text-shadow: 0 0 8px rgba(239, 112, 92, .36); }
.mission-live { margin-top: 1px; }
.mission-live b { margin-left: 5px; color: var(--nf-paper); }
.weapon-panel { flex-direction: column; align-items: stretch; width: min(240px, 28vw); }
.weapon-meta { gap: 12px; color: var(--nf-paper); font: 700 9px/1 var(--nf-display); letter-spacing: .1em; }
.weapon-name b { color: rgba(168, 191, 184, .58); font-size: 7px; }
.weapon-mode { color: rgba(157, 182, 175, .55); font: 650 6px/1 var(--nf-display); letter-spacing: .08em; white-space: nowrap; }
.weapon-mode i { display: inline-block; width: 3px; height: 3px; border-radius: 50%; margin: 0 3px 1px; background: var(--nf-teal); }
.ammo-readout { display: flex; align-items: baseline; gap: 6px; margin: 7px 0 5px; font-family: var(--nf-display); }
.ammo-current { color: #f3f2e9; font-size: 39px; font-weight: 720; line-height: .95; letter-spacing: -.04em; }
.ammo-slash { color: rgba(173, 194, 187, .4); font-size: 18px; }
.ammo-reserve { color: rgba(188, 205, 197, .6); font-size: 15px; font-weight: 650; }
.weapon-foot { color: rgba(169, 190, 183, .55); font: 650 6px/1 var(--nf-display); letter-spacing: .14em; }
.reload-label { color: var(--nf-teal); }
.is-reloading .reload-label { color: var(--nf-amber); animation: reload-blink .7s steps(2,end) infinite; }
.grenade-count { display: flex; align-items: center; gap: 6px; }
.grenade-count b { color: rgba(157, 182, 174, .52); font-size: 6px; }
.grenade-count > span { color: var(--nf-paper); font-size: 9px; }
.frag-icon { display: inline-block; width: 7px; height: 8px; border: 1px solid rgba(241, 189, 120, .72); border-radius: 2px; transform: rotate(30deg); }
.crosshair { position: absolute; top: 50%; left: 50%; width: 24px; height: 24px; transform: translate(-50%, -50%); opacity: .84; pointer-events: none; transition: transform .12s ease, opacity .12s ease; }
.crosshair i { position: absolute; width: 1px; height: 5px; background: rgba(235, 241, 233, .92); box-shadow: 0 0 4px rgba(0,0,0,.8); }
.crosshair i:nth-child(1) { top: 0; left: 11px; }
.crosshair i:nth-child(2) { right: 0; top: 11px; width: 5px; height: 1px; }
.crosshair i:nth-child(3) { bottom: 0; left: 11px; }
.crosshair i:nth-child(4) { left: 0; top: 11px; width: 5px; height: 1px; }
.crosshair b { position: absolute; top: 10px; left: 10px; width: 3px; height: 3px; border: 1px solid var(--nf-amber); border-radius: 50%; }
.crosshair.is-aiming { transform: translate(-50%, -50%) scale(.72); }
.is-aiming .crosshair { opacity: 1; }
.is-aiming .crosshair i { background: #fff; }
.scope-overlay { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .16s ease; }
.scope-aperture { position: relative; display: grid; place-items: center; width: min(68vmin, 620px); aspect-ratio: 1; border: 1px solid rgba(214, 191, 143, .36); border-radius: 50%; box-shadow: 0 0 0 100vmax rgba(2, 7, 9, .5), inset 0 0 45px rgba(15, 12, 8, .2), 0 0 24px rgba(218, 184, 129, .08); }
.scope-reticle { position: relative; display: block; width: 38px; height: 38px; opacity: .85; }
.scope-reticle i { position: absolute; background: rgba(239, 230, 207, .9); box-shadow: 0 0 5px rgba(3, 9, 9, .85); }
.scope-reticle i:nth-child(1),.scope-reticle i:nth-child(3) { left: 18px; width: 1px; height: 12px; }
.scope-reticle i:nth-child(1) { top: 0; }
.scope-reticle i:nth-child(3) { bottom: 0; }
.scope-reticle i:nth-child(2),.scope-reticle i:nth-child(4) { top: 18px; width: 12px; height: 1px; }
.scope-reticle i:nth-child(2) { right: 0; }
.scope-reticle i:nth-child(4) { left: 0; }
.scope-reticle b { position: absolute; top: 17px; left: 17px; width: 4px; height: 4px; border: 1px solid var(--nf-amber); border-radius: 50%; box-shadow: 0 0 7px rgba(241, 189, 120, .55); }
.is-aiming .scope-overlay { opacity: 1; }
.is-aiming .crosshair { opacity: 0; }
.hit-marker { position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; transform: translate(-50%, -50%); opacity: 0; pointer-events: none; }
.hit-marker i { position: absolute; top: 5px; left: 14px; width: 1px; height: 6px; background: var(--nf-amber); transform-origin: 50% 10px; box-shadow: 0 0 7px rgba(241, 189, 120, .7); }
.hit-marker i:nth-child(2) { transform: rotate(90deg); }
.hit-marker i:nth-child(3) { transform: rotate(180deg); }
.hit-marker i:nth-child(4) { transform: rotate(270deg); }
.hit-marker.is-hit { animation: hit-confirm .24s ease-out both; }
.damage-vignette { position: absolute; inset: 0; opacity: calc(var(--damage-intensity, 0) * .88); background: radial-gradient(ellipse at center, transparent 36%, rgba(139, 27, 25, .14) 65%, rgba(166, 26, 24, .62) 100%); transition: opacity .15s ease; pointer-events: none; }
.damage-active .damage-vignette { animation: damage-flash .42s ease-out; }
.reload-callout { position: absolute; top: calc(50% + 34px); left: 50%; display: flex; align-items: center; gap: 4px; color: var(--nf-amber); font: 700 7px/1 var(--nf-display); letter-spacing: .18em; opacity: 0; transform: translateX(-50%); transition: opacity .1s ease; }
.reload-callout span { display: block; width: 2px; height: 7px; background: var(--nf-amber); animation: reload-bars .55s ease-in-out infinite alternate; }
.reload-callout span:nth-child(2) { animation-delay: .1s; }
.reload-callout span:nth-child(3) { animation-delay: .2s; }
.is-reloading .reload-callout { opacity: 1; }
.toast-stack { position: absolute; top: 35%; left: 50%; display: flex; flex-direction: column; gap: 7px; transform: translateX(-50%); }
.mission-toast { min-width: 180px; padding: 10px 16px; border-left: 1px solid var(--nf-amber); color: rgba(239, 242, 233, .93); background: rgba(7, 14, 17, .75); font: 650 9px/1.3 var(--nf-display); letter-spacing: .13em; text-align: center; opacity: 0; transform: translateY(5px); transition: opacity .25s ease, transform .25s ease; }
.mission-toast.is-visible { opacity: 1; transform: translateY(0); }
.controls-strip { position: absolute; bottom: 12px; left: 50%; display: flex; align-items: center; gap: 13px; opacity: .68; transform: translateX(-50%); transition: opacity .18s ease; }
.controls-strip:hover { opacity: .96; }
.control-key { display: flex; align-items: center; gap: 5px; color: rgba(225, 235, 230, .8); font: 650 8px/1 var(--nf-display); letter-spacing: .08em; white-space: nowrap; }
.control-key kbd { padding: 4px 5px; font-size: 7px; }
.hud-pause { position: absolute; top: 69px; right: clamp(18px, 3.1vw, 55px); width: 27px; height: 27px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(197, 220, 213, .25); color: rgba(228, 236, 228, .73); background: rgba(5, 12, 15, .42); pointer-events: auto; cursor: pointer; transition: color .16s ease, border-color .16s ease; }
.hud-pause:hover { color: var(--nf-amber); border-color: var(--nf-amber); }
.hud-pause span { font-size: 12px; }
.touch-controls { display: none; }
.touch-actions button { display: grid; place-items: center; border: 1px solid rgba(161, 229, 222, .42); color: var(--nf-teal); background: rgba(5, 12, 15, .72); pointer-events: auto; cursor: pointer; font: 750 9px/1 var(--nf-display); letter-spacing: .1em; touch-action: none; }
.touch-actions button:active,.touch-actions button.is-active { color: var(--nf-ink); background: var(--nf-teal); }
.touch-stick { position: absolute; width: 112px; height: 112px; border: 1px solid rgba(191, 217, 208, .35); border-radius: 50%; background: rgba(5, 12, 15, .44); pointer-events: auto; touch-action: none; }
.touch-stick::before { content: ""; position: absolute; inset: 16%; border: 1px dashed rgba(191, 217, 208, .22); border-radius: 50%; }
.touch-stick-knob { position: absolute; top: 50%; left: 50%; width: 42px; height: 42px; border: 1px solid rgba(161, 229, 222, .7); border-radius: 50%; background: rgba(161, 229, 222, .15); box-shadow: 0 0 14px rgba(161, 229, 222, .14); transform: translate(-50%, -50%); transition: background .12s ease; }
.touch-stick.is-active .touch-stick-knob { background: rgba(161, 229, 222, .34); }

@keyframes screen-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .38; } }
@keyframes critical-pulse { 0%,100% { box-shadow: 0 0 0 rgba(239,112,92,0); } 50% { box-shadow: 0 0 15px rgba(239,112,92,.3); } }
@keyframes reload-blink { 50% { opacity: .42; } }
@keyframes reload-bars { to { height: 3px; opacity: .48; } }
@keyframes hit-confirm { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.72); } 35% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.12); } }
@keyframes damage-flash { 0%,100% { opacity: calc(var(--damage-intensity, 0) * .88); } 30% { opacity: 1; } }

@media (max-width: 980px) {
  .screen-title { padding-inline: 5vw; }
  .title-topline,.title-bottom { left: 5vw; right: 5vw; }
  .title-content { gap: 5vw; grid-template-columns: minmax(0,1fr) minmax(220px, 270px); }
  .title-name { font-size: clamp(56px, 9.2vw, 94px); }
  .mission-card { padding: 17px; }
  .controls-strip { gap: 8px; }
  .control-key { gap: 4px; }
}
@media (max-width: 700px) {
  .screen-title { padding: 0 22px; }
  .title-topline { top: 20px; left: 22px; right: 22px; }
  .title-brand { font-size: 9px; gap: 7px; }
  .brand-mark { width: 23px; height: 23px; font-size: 12px; }
  .top-status { gap: 6px; font-size: 7px; letter-spacing: .12em; }
  .title-content { min-height: 100vh; display: flex; align-items: center; padding: 90px 0 90px; }
  .title-copy { width: 100%; padding: 0; }
  .title-copy .eyebrow { margin-bottom: 18px; font-size: 7px; }
  .title-name { font-size: clamp(56px, 16vw, 88px); }
  .title-subtitle { margin-top: 22px; font-size: 12px; }
  .title-description { max-width: 340px; font-size: 11px; }
  .title-actions { flex-wrap: wrap; gap: 15px 22px; }
  .title-actions .ui-button { min-width: 174px; min-height: 46px; }
  .title-footnote { margin-top: 23px; gap: 8px; font-size: 7px; }
  .mission-card { display: none; }
  .title-bottom { left: 22px; right: 22px; bottom: 18px; font-size: 6px; }
  .title-bottom-left { max-width: 55%; line-height: 1.5; }
  .title-bottom-right { gap: 6px; font-size: 6px; }
  .screen-title::before { display: none; }
  .hud-topline { height: 45px; padding-inline: 15px; }
  .hud-brand { font-size: 7px; }
  .hud-brand .brand-mark { width: 17px; height: 17px; font-size: 9px; }
  .mission-chip { gap: 5px; font-size: 6px; letter-spacing: .08em; }
  .hud-top-right { display: none; }
  .hud-objective { top: 59px; left: 13px; min-width: 192px; grid-template-columns: 15px auto 39px; column-gap: 8px; padding: 9px 9px 9px 8px; }
  .objective-mark { width: 12px; height: 12px; }
  .objective-copy { font-size: 8px; }
  .hud-objective .eyebrow { font-size: 6px; }
  .hud-pause { top: 54px; right: 14px; width: 25px; height: 25px; }
  .hud-bottom { right: 12px; bottom: 12px; left: 12px; gap: 6px; }
  .vitals-panel,.weapon-panel { min-width: 0; padding: 9px 9px; }
  .vitals-panel { width: 41%; gap: 7px; }
  .vitals-icon { flex-basis: 25px; width: 25px; height: 25px; }
  .vitals-icon span { inset: -3px 9px; }
  .vitals-icon::before { width: 9px; }
  .vitals-icon::after { height: 9px; }
  .weapon-panel { width: 43%; }
  .weapon-name { font-size: 7px; }
  .weapon-mode { font-size: 5px; }
  .ammo-current { font-size: 30px; }
  .ammo-reserve { font-size: 12px; }
  .hud-center-bottom { display: none; }
  .controls-strip { display: none; }
  .touch-controls { display: none; }
  .toast-stack { top: 31%; }
  .overlay-panel { padding: 27px 24px; }
  .panel-topline { margin-bottom: 38px; font-size: 7px; }
  .overlay-panel h2 { font-size: clamp(42px, 13vw, 62px); }
  .briefing-copy,.pause-copy,.result-copy { font-size: 11px; }
  .briefing-stats { margin-top: 22px; }
  .briefing-stats > div { padding: 0 8px; }
  .briefing-stats span,.pause-status span,.result-metrics span { font-size: 6px; letter-spacing: .08em; }
  .briefing-stats b { font-size: 9px; }
  .briefing-controls { grid-template-columns: repeat(3,1fr); row-gap: 12px; }
  .panel-actions { margin-top: 22px; }
  .panel-actions .ui-button { min-width: 165px; gap: 12px; padding-inline: 13px; font-size: 8px !important; }
  .briefing-side-note { right: 20px; bottom: 13px; font-size: 6px; }
  .pause-status,.result-metrics { gap: 5px; }
  .pause-status > div,.result-metrics > div { padding-inline: 8px; }
  .pause-status b,.result-metrics b { font-size: 14px; }
  .result-stamp { top: 20px; right: 18px; transform: scale(.82) rotate(5deg); transform-origin: top right; }
  .result-panel .panel-topline { padding-right: 70px; margin-bottom: 38px; }
  .result-actions { align-items: flex-start; flex-direction: column; gap: 10px; }
  .pause-actions .button-secondary { min-width: 165px; }
  .esc-note { margin: 3px 0 0; }
}
@media (pointer: coarse) {
  .touch-controls { position: absolute; inset: 0; display: block; pointer-events: none; }
  .is-paused .touch-controls,.is-result .touch-controls { display: none; }
  .touch-stick { left: 16px; bottom: 98px; }
  .touch-actions { position: absolute; right: 14px; bottom: 96px; display: grid; grid-template-columns: 62px 72px; grid-template-rows: 42px 42px 42px; gap: 7px; pointer-events: none; }
  .touch-actions button { min-width: 0; border-radius: 3px; font-size: 8px; }
  .touch-fire { grid-column: 2; grid-row: 1 / span 3; border-radius: 50% !important; width: 70px; height: 132px; }
  .touch-aim { grid-column: 1; grid-row: 1; }
  .touch-reload { grid-column: 1; grid-row: 2; }
  .touch-grenade { grid-column: 1; grid-row: 3; }
  .touch-aim,.touch-reload,.touch-grenade { height: 42px; }
}
@media (max-width: 700px) and (max-height: 520px) {
  .screen-title { overflow-y: auto; }
  .title-content { min-height: 100%; align-items: flex-start; padding: 64px 0 58px; }
  .title-name { font-size: clamp(48px, 10vw, 68px); }
  .title-subtitle { margin-top: 14px; }
  .title-description { margin-top: 10px; line-height: 1.5; }
  .title-actions { margin-top: 15px; }
  .title-footnote { margin-top: 12px; }
}
@media (max-height: 560px) {
  .screen-title { overflow-y: auto; padding-top: 56px; padding-bottom: 42px; }
  .title-content { min-height: auto; align-items: flex-start; gap: 28px; padding: 18px 0; }
  .title-name { font-size: clamp(52px, 8vw, 78px); }
  .title-copy .eyebrow { margin-bottom: 12px; }
  .title-subtitle { margin-top: 14px; }
  .title-description { margin-top: 10px; line-height: 1.6; }
  .title-actions { margin-top: 16px; }
  .title-footnote { margin-top: 14px; }
  .mission-card { padding: 14px; }
  .mission-card-note { margin-block: 12px; }
}
@media (max-width: 390px) {
  .title-name { font-size: 54px; }
  .top-status { font-size: 6px; }
  .title-bottom-right span:last-child { display: none; }
  .hud-objective { min-width: 171px; }
  .weapon-meta { gap: 5px; }
  .weapon-mode { letter-spacing: .02em; }
  .vitals-label,.vitals-sub { letter-spacing: .06em; }
}
@media (prefers-reduced-motion: reduce) {
  .nightfall-ui *, .nightfall-ui *::before, .nightfall-ui *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
