/* Bag Raid — neon trash chrome, readable type. Not Greyson / Backrooms. */

:root {
  --br-bg0: #120018;
  --br-bg1: #2a0040;
  --br-neon: #ff2db8;
  --br-acid: #b8ff00;
  --br-warn: #ff7a3d;
  --br-ink: #fff5ff;
  --br-muted: #d7b6e4;
  --br-panel: rgba(18, 0, 28, 0.92);
  --br-border: #ff2db8;
  --br-font-ui: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --br-font-display: "Oxanium", "IBM Plex Sans", sans-serif;
  --wx-fog: #ff2db8;
  --wx-ambient: #ff6ad5;
  --wx-sun: #ffe066;
  --wx-ground: #4a1038;
  --wx-punch: 0;
  --panic: 0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--br-bg0);
  color: var(--br-ink);
  font-family: var(--br-font-ui);
}

body.wx-pink { --br-neon: #ff2db8; --br-acid: #ffe066; --br-border: #ff6ad5; --br-bg0: #2a001c; }
body.wx-crt { --br-neon: #1cff6a; --br-acid: #c8ff00; --br-border: #6dff9a; --br-bg0: #02140a; }
body.wx-jpeg { --br-neon: #ff7a3d; --br-acid: #ff3d6e; --br-border: #ffb347; --br-bg0: #1a0a12; }

#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  cursor: crosshair;
}
body.br-look-locked #game { cursor: none; }

#grit {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 4;
  opacity: 0.28;
  mix-blend-mode: soft-light;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.18) 0 1px,
      transparent 1px 3px
    ),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

#grit::before,
#grit::after {
  content: "";
  position: absolute;
  inset: -18%;
  pointer-events: none;
}

/* Pink dust motes drifting through the dump */
#grit::before {
  background-image:
    radial-gradient(circle, var(--wx-fog) 0 1.4px, transparent 1.8px),
    radial-gradient(circle, var(--wx-sun) 0 1px, transparent 1.5px);
  background-size: 68px 74px, 44px 52px;
  background-position: 0 0, 22px 18px;
  opacity: 0.42;
  mix-blend-mode: screen;
  animation: wx-mote-drift 8s linear infinite;
}

#grit::after { display: none; }

@keyframes wx-mote-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-34px, 52px, 0); }
}

body.wx-crt #grit {
  mix-blend-mode: overlay;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 18, 0, 0.55) 0 1px,
      transparent 1px 3px
    ),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

body.wx-crt #grit::before {
  background:
    repeating-linear-gradient(
      180deg,
      rgba(0, 255, 80, 0.07) 0 2px,
      rgba(0, 0, 0, 0.35) 2px 3px,
      transparent 3px 5px
    );
  mix-blend-mode: multiply;
  opacity: 0.48;
  animation: crt-roll 5.5s linear infinite;
  inset: 0;
}

body.wx-crt #grit::after {
  display: block;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(28, 255, 106, 0.12),
    transparent 18%,
    transparent 82%,
    rgba(200, 255, 0, 0.14)
  );
  mix-blend-mode: screen;
  opacity: 0.42;
  animation: crt-flicker 0.14s steps(2) infinite;
}

@keyframes crt-roll {
  from { transform: translateY(0); }
  to { transform: translateY(5px); }
}
@keyframes crt-flicker {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 0.42; }
}

body.wx-jpeg #grit {
  image-rendering: pixelated;
  filter: contrast(1.12) saturate(1.16);
  mix-blend-mode: soft-light;
}

body.wx-jpeg #grit::before {
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.22) 0 8px, transparent 8px 16px),
    repeating-linear-gradient(0deg, rgba(255, 61, 110, 0.08) 0 8px, rgba(255, 122, 61, 0.06) 8px 16px);
  background-size: 16px 16px, 16px 16px;
  image-rendering: pixelated;
  mix-blend-mode: overlay;
  opacity: 0.40;
  animation: jpeg-block-shift 1.8s steps(3) infinite;
}

body.wx-jpeg #grit::after {
  display: block;
  inset: 0;
  background:
    repeating-conic-gradient(
      from 0deg at 50% 50%,
      rgba(255, 122, 61, 0.05) 0 90deg,
      rgba(255, 61, 110, 0.06) 90deg 180deg,
      rgba(255, 180, 70, 0.04) 180deg 270deg,
      rgba(80, 40, 20, 0.07) 270deg 360deg
    );
  background-size: 18px 18px;
  mix-blend-mode: soft-light;
  opacity: 0.22;
  animation: none;
}

@keyframes jpeg-block-shift {
  0% { transform: translate(0, 0); }
  33% { transform: translate(4px, -2px); }
  66% { transform: translate(-3px, 3px); }
  100% { transform: translate(0, 0); }
}

#chroma {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 5;
  box-shadow:
    inset 0 0 90px color-mix(in srgb, var(--wx-fog) 22%, transparent),
    inset 0 0 28px color-mix(in srgb, var(--wx-sun) 10%, transparent);
  mix-blend-mode: screen;
  opacity: 0.26;
}

body.wx-pink #grit::before { opacity: 0.16; }
body.wx-pink #chroma {
  box-shadow:
    inset 0 0 64px rgba(255, 45, 184, 0.08),
    inset 0 -12px 28px rgba(255, 224, 102, 0.04);
}

body.wx-crt #chroma {
  box-shadow:
    inset 0 0 90px rgba(28, 255, 106, 0.22),
    inset 0 -36px 56px rgba(200, 255, 0, 0.12),
    inset 0 28px 40px rgba(0, 255, 120, 0.06);
}

body.wx-jpeg #chroma {
  box-shadow:
    inset 8px 0 18px rgba(255, 61, 110, 0.22),
    inset -8px 0 18px rgba(70, 190, 255, 0.16),
    inset 0 0 70px rgba(255, 122, 61, 0.14);
}

@media (prefers-reduced-motion: reduce) {
  #grit::before,
  #grit::after,
  body.wx-crt #grit::before,
  body.wx-crt #grit::after,
  body.wx-jpeg #grit::before {
    animation: none;
  }
}

.back-link {
  position: fixed;
  top: 12px;
  left: 14px;
  z-index: 30;
  color: var(--br-acid);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-shadow: 2px 2px 0 #000;
  border: 2px solid var(--br-border);
  padding: 4px 10px;
  background: var(--br-panel);
}
.back-link:hover { background: var(--br-neon); color: #120018; }

.hidden { display: none !important; }

/* —— Menu / overlays —— */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 45, 184, 0.35), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(184, 255, 0, 0.2), transparent 45%),
    linear-gradient(160deg, #1a0028 0%, #3a0060 45%, #0d0018 100%);
  padding: 24px;
}

.browser-frame {
  width: min(560px, 100%);
  border: 3px solid var(--br-border);
  background: var(--br-panel);
  box-shadow:
    8px 8px 0 #000,
    0 0 0 4px var(--br-acid);
  position: relative;
}

.browser-tabs {
  display: flex;
  gap: 4px;
  background: #2a0038;
  padding: 6px 8px 0;
  border-bottom: 2px solid var(--br-border);
  font-size: 11px;
}
.browser-tabs span {
  background: #4a1058;
  border: 2px solid var(--br-border);
  border-bottom: none;
  padding: 4px 10px;
  color: var(--br-muted);
}
.browser-tabs span.on {
  background: var(--br-panel);
  color: var(--br-acid);
}

.browser-body { padding: 22px 24px 26px; }

.brand {
  font-family: var(--br-font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: 0.04em;
  color: var(--br-neon);
  text-shadow: 3px 3px 0 #000;
  margin: 8px 0 10px;
}

.tagline {
  color: var(--br-ink);
  font-size: 14px;
  line-height: 1.45;
  max-width: 36em;
  margin-bottom: 14px;
}

.weather-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px dashed var(--br-acid);
  padding: 6px 12px;
  margin-bottom: 16px;
  background: rgba(184, 255, 0, 0.08);
  font-size: 12px;
  text-transform: uppercase;
}
.weather-chip b { color: var(--br-neon); }

.controls-mini {
  list-style: none;
  font-size: 12px;
  color: var(--br-muted);
  margin: 0 0 18px;
  line-height: 1.6;
}
.controls-mini kbd {
  display: inline-block;
  border: 1px solid var(--br-border);
  padding: 0 5px;
  background: #000;
  color: var(--br-acid);
  font-family: inherit;
}

.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

button {
  font-family: var(--br-font-ui);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 3px solid #000;
  padding: 10px 20px;
  cursor: pointer;
}
button.primary {
  background: var(--br-neon);
  color: #120018;
  box-shadow: 4px 4px 0 var(--br-acid);
}
button.primary:hover { filter: brightness(1.1); }
button.ghost {
  background: transparent;
  color: var(--br-acid);
  border-color: var(--br-acid);
  box-shadow: 3px 3px 0 #000;
  font-family: var(--br-font-ui);
  font-size: 0.78rem;
}
button:disabled { opacity: 0.5; cursor: wait; }

.boot-status {
  margin-top: 10px;
  min-height: 1.2em;
  font-size: 12px;
  color: var(--br-warn);
}

.haul-frame {
  width: min(600px, 100%);
  max-height: min(92vh, 760px);
  overflow: auto;
}

.end-eyebrow {
  font-size: 12px;
  color: var(--br-acid);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 2px;
}
.end-title {
  font-size: clamp(2.8rem, 10vw, 4.2rem);
  margin: 4px 0 6px;
}

#end.win .end-eyebrow { color: var(--br-acid); }
#end.fail .end-eyebrow { color: var(--br-warn); }
#end.fail .end-title {
  color: var(--br-warn);
  text-shadow:
    4px 4px 0 #000,
    -2px 0 #ff2244,
    2px 0 var(--br-neon);
}
#end.fail .browser-frame {
  border-color: var(--br-warn);
  box-shadow:
    8px 8px 0 #000,
    0 0 0 4px #ff2244;
}

.haul-kicker {
  font-family: var(--br-font-ui);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  color: var(--br-neon);
  margin: 8px 0 8px;
}
#end.fail .haul-kicker { color: var(--br-warn); }

.haul-fill {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 2px dashed var(--br-acid);
  background: rgba(184, 255, 0, 0.06);
  font-size: 12px;
  letter-spacing: 0.06em;
}
#end.fail .haul-fill {
  border-color: var(--br-warn);
  background: rgba(255, 122, 61, 0.08);
}
.haul-fill-row {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 10px;
  align-items: center;
}
.haul-fill-row b { color: var(--br-ink); }
.haul-meter {
  height: 10px;
  background: #000;
  border: 2px solid var(--br-border);
  overflow: hidden;
}
.haul-meter i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--br-acid), var(--br-neon));
  transform-origin: left center;
  transform: scaleX(0);
}
#end.fail .haul-meter i {
  background: linear-gradient(90deg, var(--br-warn), var(--br-neon));
}

.haul-list {
  list-style: none;
  margin: 0 0 16px;
  max-height: 200px;
  overflow: auto;
  border: 2px solid var(--br-border);
  background: #000;
  padding: 4px 10px;
  font-size: 13px;
}
.haul-list li {
  padding: 7px 0;
  border-bottom: 1px dotted #442;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.haul-list li:last-child { border-bottom: none; }
.haul-name {
  font-family: var(--br-font-ui);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  color: var(--br-ink);
}
.haul-meta {
  color: var(--br-acid);
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.haul-empty { color: var(--br-muted); font-style: italic; }

.haul-cta { margin-top: 4px; }
button.haul-replay {
  font-size: 1rem;
  padding: 12px 24px;
  box-shadow: 5px 5px 0 var(--br-acid), 0 0 18px rgba(255, 45, 184, 0.35);
}
#end.win button.haul-replay {
  font-size: 1.18rem;
  padding: 14px 28px;
  letter-spacing: 0.1em;
  box-shadow: 6px 6px 0 var(--br-acid), 0 0 22px rgba(255, 45, 184, 0.5);
  animation: haul-raid-again 1.15s ease-in-out infinite;
}
#end.fail button.haul-replay {
  background: var(--br-warn);
  box-shadow: 5px 5px 0 #000, 0 0 16px rgba(255, 122, 61, 0.4);
}
@keyframes haul-raid-again {
  0%, 100% { transform: translateY(0) scale(1); filter: brightness(1); }
  50% { transform: translateY(-2px) scale(1.03); filter: brightness(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  #end.win button.haul-replay { animation: none; }
}

.end-hero {
  font-family: var(--br-font-ui);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--br-acid);
  margin: 6px 0 4px;
}
#end.fail .end-hero { color: var(--br-warn); }

/* —— HUD —— */
#hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  isolation: isolate;
}

.hud-top {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  align-items: stretch;
  max-width: min(96vw, 1100px);
}

.os-bar {
  pointer-events: auto;
  background: var(--br-panel);
  border: 2px solid var(--br-border);
  padding: 6px 12px;
  font-size: 12px;
  box-shadow: 3px 3px 0 #000;
  min-width: 140px;
}
.os-bar .lbl { color: var(--br-muted); display: block; font-size: 10px; text-transform: uppercase; }
.os-bar .val { color: var(--br-acid); font-size: 15px; font-family: var(--br-font-ui); font-weight: 700; line-height: 1.15; max-width: 14em; }
/* Weather / courtyard chips stay in the DOM for the day tint. They are not a goal.
   Raid TODAY'S DUMP and hub COURTYARD MOOD both wear .wx-chip and stay chip-quiet. */
#hud .wx-chip { display: none !important; }
/* Fold is a late warning, not the standing fear. Bag + goal line carry the raid. */
#fold-bar:not(.critical) { display: none !important; }

.os-bar.fold .val { color: var(--br-warn); }
#obj-bar .val { color: #7dfff0; max-width: 16em; }
.os-bar.fold.critical .val { color: #ff2244; animation: blink 0.4s steps(2) infinite; }

@keyframes blink { 50% { opacity: 0.3; } }

.hud-bl {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}

.hp-wrap {
  background: var(--br-panel);
  border: 2px solid var(--br-border);
  padding: 6px 10px;
  width: 200px;
  box-shadow: 3px 3px 0 #000;
}
.hp-wrap span { font-size: 10px; color: var(--br-muted); }
.hp-track {
  margin-top: 4px;
  height: 12px;
  background: #000;
  border: 1px solid var(--br-neon);
}
.hp-track i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--br-neon), var(--br-acid));
  transform-origin: left center;
}

.bag-dock {
  background: var(--br-panel);
  border: 2px solid var(--br-acid);
  padding: 8px;
  box-shadow: 3px 3px 0 #000;
  min-width: 260px;
}
.bag-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--br-muted);
  margin-bottom: 6px;
}
.bag-slots {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}
.bag-slot {
  aspect-ratio: 1;
  border: 2px solid #553;
  background: #0a0010;
  font-size: 9px;
  text-align: center;
  padding: 2px;
  color: var(--br-ink);
  overflow: hidden;
  line-height: 1.1;
  cursor: pointer;
  pointer-events: auto;
}
.bag-slot.active {
  border-color: var(--br-acid);
  box-shadow: 0 0 0 1px var(--br-neon);
}
.bag-slot.filled { background: #220033; }

.hud-br {
  position: absolute;
  right: 14px;
  bottom: 14px;
  text-align: right;
  pointer-events: auto;
}
.weapon-tag {
  background: var(--br-panel);
  border: 2px solid var(--br-neon);
  padding: 8px 12px;
  box-shadow: -3px 3px 0 #000;
  font-size: 12px;
}
.weapon-tag .name {
  font-family: var(--br-font-ui);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--br-neon);
  display: block;
}
.weapon-tag .hook { color: var(--br-acid); font-size: 11px; }

#btn-mute {
  position: absolute;
  top: 12px;
  right: 14px;
  pointer-events: auto;
  z-index: 12;
}

#btn-feedback-hud {
  position: absolute;
  top: 52px;
  right: 14px;
  pointer-events: auto;
  z-index: 12;
  padding: 5px 10px;
  font-size: 0.72rem;
}

#goal-line {
  position: absolute;
  left: 50%;
  bottom: 14px;
  top: auto;
  transform: translateX(-50%);
  z-index: 12;
  max-width: min(36em, 88vw);
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  color: rgba(247, 255, 232, 0.62);
  font-family: var(--br-font-ui);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-align: center;
  text-shadow: 0 1px 0 #000, 0 0 8px #000;
  pointer-events: none;
}
#hud.mode-homebase #goal-line {
  display: block;
  color: rgba(247, 255, 232, 0.88);
  font-size: 0.8rem;
}

#deploy-prompt {
  position: absolute;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  z-index: 13;
  min-width: 16rem;
  padding: 10px 12px 12px;
  background: rgba(5, 3, 8, 0.94);
  border: 3px solid #d8ff2a;
  box-shadow: 5px 5px 0 #000;
  text-align: center;
  pointer-events: auto;
}
#deploy-prompt.hidden,
#deploy-prompt[hidden] { display: none !important; }
.deploy-prompt-kicker,
.deploy-prompt-sub {
  margin: 0;
  font-family: var(--br-font-ui);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 255, 232, 0.78);
}
.deploy-prompt-kicker { font-size: 0.68rem; }
.deploy-prompt-sub {
  margin-top: 6px;
  font-size: 0.72rem;
  color: #d8ff2a;
}
#btn-deploy-confirm {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px 10px;
  font-family: var(--br-font-display);
  font-weight: 700;
  font-size: 1.85rem;
  letter-spacing: 0.16em;
  line-height: 0.9;
  color: #120018;
  background: #d8ff2a;
  border: 3px solid #020208;
  box-shadow: 4px 4px 0 #000;
  cursor: pointer;
}

#pedestal-prompt {
  position: absolute;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  z-index: 12;
  padding: 8px;
  background: rgba(5, 3, 8, 0.92);
  border: 3px solid #f2ead2;
  box-shadow: 5px 5px 0 #000;
  text-align: center;
  pointer-events: auto;
}
#pedestal-prompt.hidden,
#pedestal-prompt[hidden] { display: none !important; }
#pedestal-prompt.took {
  border-color: #d8ff2a;
  box-shadow: 5px 5px 0 #000, 0 0 22px color-mix(in srgb, #d8ff2a 70%, transparent);
}
.pedestal-name {
  font-family: var(--br-font-ui);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 255, 232, 0.72);
  margin: 0 0 6px;
}
.pedestal-cta { justify-content: center; gap: 8px; }
#pedestal-prompt .pedestal-cta button {
  pointer-events: auto;
  min-width: 7.6rem;
  padding: 14px 18px 10px;
  font-family: var(--br-font-display);
  font-weight: 700;
  font-size: 1.85rem;
  letter-spacing: 0.14em;
  line-height: 0.9;
  color: #120018;
  border: 3px solid #020208;
}
#btn-pedestal-take {
  background: #d8ff2a;
  box-shadow: 4px 4px 0 #000;
}
#btn-pedestal-leave {
  background: #ff7adf;
  box-shadow: 4px 4px 0 #000;
}
#pedestal-prompt kbd {
  display: block;
  margin-top: 6px;
  font-family: var(--br-font-ui);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  opacity: 0.7;
}

body.pedestal-take-sting #pickup-flash { opacity: 1; }
body.pedestal-take-sting .bag-dock {
  border-color: var(--br-neon);
  box-shadow: 3px 3px 0 #000, 0 0 22px color-mix(in srgb, var(--br-acid) 80%, transparent);
}

#crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid var(--br-acid);
  border-radius: 2px;
  box-shadow: 0 0 0 1px #000;
  opacity: 0.85;
}
#crosshair::before, #crosshair::after {
  content: "";
  position: absolute;
  background: var(--br-neon);
}
#crosshair::before { left: 50%; top: -6px; width: 2px; height: 30px; margin-left: -1px; }
#crosshair::after { top: 50%; left: -6px; height: 2px; width: 30px; margin-top: -1px; }

#extract-banner {
  position: absolute;
  left: 50%;
  bottom: 28%;
  transform: translateX(-50%);
  background: #000;
  border: 3px solid var(--br-acid);
  color: var(--br-acid);
  font-family: var(--br-font-ui);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 8px 18px;
  letter-spacing: 0.06em;
  box-shadow: 4px 4px 0 var(--br-neon);
}

#blind-veil {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 0, 0.85) 0 40px,
    rgba(255, 0, 180, 0.75) 40px 80px
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s;
}
#blind-veil.on { opacity: 0.85; }

#hint {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--br-muted);
  text-align: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 4px 10px;
  border: 1px solid #442;
  max-width: 90vw;
}

#toast {
  position: absolute;
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
  background: var(--br-neon);
  color: #120018;
  font-family: var(--br-font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 6px 14px;
  border: 3px solid #000;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
#toast.show { opacity: 1; }

/* Quiet click-to-look chip — never a center billboard */
#look-prompt {
  position: absolute;
  left: 50%;
  bottom: 3.5%;
  transform: translateX(-50%);
  z-index: 11;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--br-acid);
  background: rgba(8, 0, 14, 0.62);
  border: 1px solid color-mix(in srgb, var(--br-acid) 50%, #000);
  padding: 4px 10px;
  opacity: 0;
  pointer-events: none;
  text-shadow: 1px 1px 0 #000;
  transition: opacity 0.18s ease;
}
#look-prompt.show { opacity: 1; }
#look-prompt[hidden] { display: none !important; }

/* —— Feel pass: homebase / CRED / extract meter —— */
.os-bar.cred .val { color: var(--br-neon); }
.cred-payout {
  font-family: var(--br-font-ui);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--br-neon);
  text-shadow: 3px 3px 0 #000;
  margin: 4px 0 10px;
  letter-spacing: 0.04em;
}
.cred-payout.zero { color: var(--br-muted); text-shadow: none; font-size: 1.3rem; }

#hud.mode-homebase .raid-only { display: none !important; }
#hud.mode-raid .home-only { display: none !important; }
#hud.mode-homebase .home-only { display: block; }

/* First-run: hide shop / stash / changelog / upgrade depth until firstExtractOk */
body.br-first-run .meta-depth,
body.br-first-run .council-plaque,
body.br-first-run #btn-council-board,
body.br-first-run #btn-boot-feedback,
body.br-first-run #btn-feedback-hud,
#hud.first-run .meta-depth,
#hud.first-run .council-plaque,
#hud.first-run #btn-council-board,
#hud.first-run #btn-feedback-hud {
  display: none !important;
}

.tip-overlay {
  background:
    radial-gradient(ellipse at 40% 30%, rgba(255, 45, 184, 0.28), transparent 55%),
    linear-gradient(165deg, #160022 0%, #2a0048 50%, #0a0014 100%);
}
.intro-card {
  width: min(520px, 100%);
  padding: 28px 28px 22px;
  background: var(--br-panel);
  border: 2px solid var(--br-border);
  box-shadow: 6px 6px 0 #000;
  text-align: center;
}
.intro-kicker {
  font-family: var(--br-font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  color: var(--br-acid);
  margin: 0 0 12px;
}
.intro-line {
  font-family: var(--br-font-ui);
  font-weight: 600;
  font-size: 1.28rem;
  line-height: 1.45;
  color: var(--br-ink);
  margin: 0 auto 22px;
  max-width: 22em;
  text-shadow: 0 1px 0 #000;
}
.intro-actions { margin-top: 4px; }
.boot-cta {
  margin-top: 4px;
  justify-content: center;
}
#btn-boot-play {
  font-family: var(--br-font-ui);
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 3.5rem);
  letter-spacing: 0.16em;
  line-height: 1;
  padding: 18px 48px;
  min-width: min(100%, 280px);
}
#btn-boot-feedback {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.68rem;
  padding: 4px 8px;
  opacity: 0.7;
  box-shadow: none;
}
.tip-overlay .boot-status {
  margin: 12px 0 0;
  min-height: 0;
  color: var(--br-muted);
  font-size: 12px;
}
.tip-overlay .boot-status:empty { display: none; }

#extract-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  bottom: 26%;
}
#extract-banner.hidden { display: none !important; }

.extract-meter {
  width: 180px;
  height: 10px;
  background: #000;
  border: 2px solid var(--br-acid);
  overflow: hidden;
}
.extract-meter i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--br-acid), var(--br-neon));
  transform-origin: left center;
  transform: scaleX(0);
}

#hit-flash {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 14;
  background: radial-gradient(circle at 50% 50%, rgba(255, 45, 184, 0.35), transparent 60%);
  opacity: 0;
  transition: opacity 0.08s;
}
/* Take damage: heavy red vignette, bias from edges (asymmetric hurt). */
#hit-flash.on {
  opacity: 1;
  background:
    radial-gradient(ellipse 130% 95% at 12% 38%, rgba(255, 18, 48, 0.72), transparent 54%),
    radial-gradient(ellipse 120% 110% at 92% 62%, rgba(160, 0, 28, 0.62), transparent 50%),
    radial-gradient(circle at 48% 52%, rgba(255, 45, 184, 0.18), transparent 58%),
    linear-gradient(
      98deg,
      rgba(255, 24, 52, 0.48) 0%,
      transparent 16%,
      transparent 78%,
      rgba(120, 0, 22, 0.55) 100%
    );
}
/* Channel interrupt: orange slap, same overlay contract. */
#hit-flash.break {
  opacity: 1;
  background:
    radial-gradient(ellipse 115% 90% at 28% 44%, rgba(255, 122, 61, 0.7), transparent 52%),
    radial-gradient(ellipse 100% 100% at 78% 56%, rgba(255, 90, 20, 0.48), transparent 48%),
    linear-gradient(
      105deg,
      rgba(255, 122, 61, 0.42) 0%,
      transparent 20%,
      transparent 74%,
      rgba(200, 60, 10, 0.4) 100%
    );
}

.os-bar.fold.critical {
  border-color: #ff2244;
  box-shadow: 0 0 12px rgba(255, 34, 68, 0.55);
}

#hint.home-hint {
  bottom: 10%;
  color: var(--br-acid);
  border-color: var(--br-neon);
}

/* —— Progress: shop.exe / craft-bay.exe —— */
.panel-overlay {
  z-index: 22;
  background:
    radial-gradient(ellipse at 25% 20%, rgba(255, 45, 184, 0.45), transparent 50%),
    radial-gradient(ellipse at 75% 80%, rgba(184, 255, 0, 0.18), transparent 45%),
    linear-gradient(155deg, #14001e 0%, #3a0066 48%, #080010 100%);
}
.panel-frame { width: min(520px, 100%); max-height: min(90vh, 720px); overflow: auto; }
.panel-brand { font-size: clamp(2.4rem, 9vw, 3.6rem); margin-bottom: 6px; }

.wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--br-neon);
  padding: 6px 12px;
  margin: 0 0 14px;
  background: rgba(255, 45, 184, 0.12);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.wallet-chip b { color: var(--br-acid); font-family: var(--br-font-ui); font-weight: 700; font-size: 1.05rem; }

.shop-list {
  list-style: none;
  margin: 0 0 16px;
  border: 2px solid var(--br-border);
  background: #000;
  max-height: 320px;
  overflow: auto;
}
.shop-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  padding: 10px 12px;
  border-bottom: 1px dotted #442;
  align-items: center;
}
.shop-list li:last-child { border-bottom: none; }
.shop-list .row-main { grid-column: 1 / -1; }
.shop-list .name {
  font-family: var(--br-font-ui);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--br-neon);
  letter-spacing: 0.02em;
}
.shop-list .blurb {
  font-size: 11px;
  color: var(--br-muted);
  line-height: 1.35;
  margin-top: 2px;
}
.shop-list .price {
  font-family: var(--br-font-ui);
  font-weight: 700;
  color: var(--br-acid);
  font-size: 0.98rem;
  white-space: nowrap;
}
.shop-list .owned {
  font-size: 11px;
  color: var(--br-muted);
  letter-spacing: 0.08em;
}
.shop-list button.buy {
  font-family: var(--br-font-ui);
  font-size: 0.72rem;
  padding: 6px 12px;
  background: var(--br-acid);
  color: #120018;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 var(--br-neon);
}
.shop-list button.buy:disabled {
  background: #333;
  color: #888;
  box-shadow: none;
  opacity: 1;
  cursor: default;
}
.shop-list li.recipe-row .needs {
  font-size: 11px;
  color: var(--br-warn);
  margin-top: 2px;
}

.stash-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
  min-height: 28px;
}
.stash-chips li {
  border: 1px solid var(--br-border);
  background: #1a0028;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--br-ink);
}
.stash-chips li.empty {
  border-style: dashed;
  color: var(--br-muted);
  font-style: italic;
}

.mod-score {
  font-size: 12px;
  color: var(--br-muted);
  letter-spacing: 0.08em;
  margin: -4px 0 8px;
  min-height: 1em;
}
.mod-score.has-score { color: var(--br-acid); }

#grit, #chroma {
  transition: opacity 0.35s ease;
}

/* —— Feedback.exe / AI council intake —— */
.feedback-overlay {
  z-index: 24;
  background:
    radial-gradient(ellipse at 20% 15%, rgba(184, 255, 0, 0.35), transparent 48%),
    radial-gradient(ellipse at 85% 80%, rgba(255, 45, 184, 0.4), transparent 50%),
    linear-gradient(155deg, #1c0028 0%, #4a006e 46%, #0a0014 100%);
}
.feedback-stamp {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #120018;
  background: var(--br-acid);
  border: 2px solid #000;
  padding: 4px 10px;
  box-shadow: 3px 3px 0 var(--br-neon);
  margin-bottom: 10px;
}
.feedback-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--br-acid);
  margin: 4px 0 6px;
}
#feedback-text {
  width: 100%;
  resize: vertical;
  min-height: 110px;
  background: #000;
  color: var(--br-acid);
  border: 3px dashed var(--br-neon);
  box-shadow: 4px 4px 0 #000;
  font-family: var(--br-font-ui);
  font-size: 14px;
  line-height: 1.4;
  padding: 10px 12px;
  outline: none;
}
#feedback-text:focus {
  border-style: solid;
  border-color: var(--br-acid);
  box-shadow: 4px 4px 0 var(--br-neon);
}
#feedback-text::placeholder { color: #6a4a78; }
.feedback-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin: 8px 0 14px;
  font-size: 11px;
  color: var(--br-muted);
}
#feedback-count { color: var(--br-acid); }
#feedback-status { color: var(--br-warn); text-align: right; }
.feedback-id {
  font-size: 12px;
  color: var(--br-acid);
  letter-spacing: 0.08em;
  margin: 0 0 16px;
  border: 2px dotted var(--br-border);
  padding: 8px 10px;
  background: #000;
}

/* —— Fold panic: connection dying (time-scaled, not spam) —— */
body.fold-panic #grit,
body.fold-panic #chroma {
  transition: none;
}

body.fold-panic #chroma {
  filter: contrast(calc(1 + var(--panic) * 0.12)) saturate(calc(1 + var(--panic) * 0.18));
}

#fold-fx {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 6;
  opacity: 0;
  mix-blend-mode: screen;
}

body.fold-panic #fold-fx {
  opacity: calc(0.16 + var(--panic) * 0.42);
}

body.fold-panic-mid #fold-fx {
  opacity: calc(0.32 + var(--panic) * 0.38);
}

body.fold-panic-dying #fold-fx {
  opacity: calc(0.52 + var(--panic) * 0.42);
  mix-blend-mode: plus-lighter;
}

#fold-fx .fold-static {
  position: absolute;
  inset: -18%;
  opacity: calc(var(--panic) * 0.85);
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
  animation: fold-static-shift 0.12s steps(2) infinite;
}

body.fold-panic-mid #fold-fx .fold-static {
  filter: contrast(1.6) saturate(1.8);
  animation-duration: 0.08s;
}

body.fold-panic-dying #fold-fx .fold-static {
  filter: contrast(2.1) saturate(2.4) hue-rotate(40deg);
  animation-duration: 0.05s;
}

#fold-fx .fold-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 2px,
    rgba(255, 45, 184, 0.1) 2px 3px,
    transparent 3px 5px,
    rgba(0, 229, 255, 0.08) 5px 6px
  );
  opacity: calc(var(--panic) * 0.9);
}

#fold-fx .fold-bloom {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(184, 255, 0, 0.22), transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(255, 45, 184, 0.2), transparent 45%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 229, 255, 0.16), transparent 40%);
  opacity: 0;
}

body.fold-panic-dying #fold-fx .fold-bloom {
  opacity: calc(0.45 + var(--panic) * 0.55);
}

@keyframes fold-static-shift {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-1.6%, 1.1%); }
}

.os-bar.fold.panic {
  border-color: var(--br-acid);
  box-shadow:
    3px 3px 0 #000,
    -1px 0 #00e5ff,
    1px 0 var(--br-neon);
  animation: fold-hud-glitch 0.22s steps(2) infinite;
}
.os-bar.fold.panic .lbl {
  color: #ffe066;
  text-shadow: -1px 0 #00e5ff, 1px 0 var(--br-neon);
}
.os-bar.fold.panic .val {
  text-shadow: -2px 0 #00e5ff, 2px 0 var(--br-neon);
}

.os-bar.fold.panic-mid {
  animation-duration: 0.12s;
  border-color: #ffe066;
  box-shadow:
    0 0 14px rgba(184, 255, 0, 0.45),
    -2px 0 #00e5ff,
    2px 0 var(--br-neon);
}

.os-bar.fold.dying {
  animation: fold-hud-dying 0.08s steps(2) infinite;
  border-color: #00e5ff;
  background: rgba(8, 0, 16, 0.92);
  box-shadow:
    0 0 18px rgba(255, 45, 184, 0.7),
    0 0 8px rgba(184, 255, 0, 0.5);
}
.os-bar.fold.dying .lbl,
.os-bar.fold.dying .val {
  color: #fff;
  text-shadow: -3px 0 var(--br-neon), 3px 0 #00e5ff, 0 0 8px #b8ff00;
}

@keyframes fold-hud-glitch {
  0% { transform: translate(0, 0); }
  50% { transform: translate(1px, -1px); }
}

@keyframes fold-hud-dying {
  0% { transform: translate(0, 0) skewX(0deg); filter: none; }
  50% { transform: translate(-2px, 1px) skewX(-1deg); filter: hue-rotate(50deg); }
}

#fold-residue {
  pointer-events: none;
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 24;
  font-family: var(--br-font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  color: #00e5ff;
  text-shadow: 3px 3px 0 #000, -2px 0 var(--br-neon), 2px 0 #b8ff00;
  border: 3px solid var(--br-neon);
  background: rgba(8, 0, 14, 0.82);
  padding: 6px 14px;
  opacity: 0;
  mix-blend-mode: screen;
}

body.fold-fail-sting #fold-residue {
  opacity: 1;
  animation: fold-residue-hold 1.7s ease forwards;
}

body.fold-fail-sting #fold-fx {
  opacity: 0.72;
  mix-blend-mode: screen;
  animation: fold-fail-flash 1.7s ease forwards;
}

body.fold-fail-sting #fold-fx .fold-static,
body.fold-fail-sting #fold-fx .fold-scan,
body.fold-fail-sting #fold-fx .fold-bloom {
  opacity: 0.9;
}

@keyframes fold-residue-hold {
  0% { opacity: 1; filter: contrast(1.8); }
  70% { opacity: 0.85; }
  100% { opacity: 0; }
}

@keyframes fold-fail-flash {
  0% { opacity: 0.85; }
  18% { opacity: 0.55; }
  100% { opacity: 0; }
}

/* —— P0 core juice: four verbs only (pickup / hit / channel / extract) —— */
#pickup-flash {
  pointer-events: none;
  position: fixed;
  left: 0;
  bottom: 0;
  width: min(460px, 58vw);
  height: min(260px, 42vh);
  z-index: 13;
  background: radial-gradient(
    circle at 16% 84%,
    color-mix(in srgb, var(--br-neon) 72%, #fff) 0 18%,
    color-mix(in srgb, var(--br-neon) 48%, transparent) 42%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.08s linear;
}
#pickup-flash.on { opacity: 1; }

.bag-dock.pop {
  border-color: var(--br-neon);
  box-shadow: 3px 3px 0 #000, 0 0 18px color-mix(in srgb, var(--br-neon) 80%, transparent);
}
.bag-slot.stacked {
  border-color: var(--br-neon);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--br-acid) 70%, transparent);
  background: color-mix(in srgb, var(--br-neon) 18%, #220033);
}
.bag-slot.pop {
  animation: bag-slot-pop 0.2s ease-out;
  border-color: var(--br-neon);
  background: color-mix(in srgb, var(--br-neon) 28%, #220033);
}
body[data-stage='exit'] #chroma {
  /* Exit Yard punch rides existing chroma, never a new HUD chip. */
  filter: saturate(1.08);
}
@keyframes bag-slot-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

#deal-flash {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 13;
  background: radial-gradient(
    circle at 50% 50%,
    transparent 58%,
    color-mix(in srgb, var(--wx-sun, var(--br-acid)) 42%, transparent) 100%
  );
  opacity: 0;
  transition: opacity 0.06s linear;
}
#deal-flash.on { opacity: 1; }
/* Kill confirm: stronger lime edge punch + brief core bloom. */
#deal-flash.kill {
  opacity: 1;
  background:
    radial-gradient(
      circle at 50% 48%,
      color-mix(in srgb, var(--br-acid) 32%, transparent) 0%,
      transparent 36%
    ),
    radial-gradient(
      circle at 50% 50%,
      transparent 46%,
      color-mix(in srgb, #d4ff2a 78%, transparent) 100%
    );
}

/* Heavy bag: stress the weight readout, leave dock layout alone. */
body.bag-heavy #bag-wt-n {
  color: var(--br-warn);
  text-shadow:
    0 0 6px color-mix(in srgb, var(--br-warn) 75%, transparent),
    0 1px 0 #000;
}

/* Channel hold: subtle screen-edge pulse (slow, not spammy). */
body.channeling-exit::after,
body.channeling-upload::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 12;
  animation: channel-edge-pulse 1.35s ease-in-out infinite;
}
body.channeling-exit::after {
  box-shadow:
    inset 0 0 72px color-mix(in srgb, #7dfff0 28%, transparent),
    inset 0 0 18px color-mix(in srgb, #7dfff0 18%, transparent);
}
body.channeling-upload::after {
  box-shadow:
    inset 0 0 72px color-mix(in srgb, var(--br-warn) 30%, transparent),
    inset 0 0 18px color-mix(in srgb, var(--br-warn) 16%, transparent);
}
@keyframes channel-edge-pulse {
  0%,
  100% { opacity: 0.22; }
  50% { opacity: 0.48; }
}
@media (prefers-reduced-motion: reduce) {
  body.channeling-exit::after,
  body.channeling-upload::after {
    animation: none;
    opacity: 0.32;
  }
}

#crosshair.punch {
  transform: scale(1.2);
  box-shadow: 0 0 0 1px #000, 0 0 10px color-mix(in srgb, var(--br-acid) 70%, transparent);
}

#extract-banner.exit {
  border-color: #7dfff0;
  color: #7dfff0;
  box-shadow: 4px 4px 0 var(--br-neon), 0 0 16px rgba(125, 255, 240, 0.45);
}
#extract-banner.upload {
  border-color: var(--br-warn);
  color: var(--br-warn);
}

#extract-banner.tick {
  box-shadow: 4px 4px 0 var(--br-neon), 0 0 14px color-mix(in srgb, var(--br-acid) 55%, transparent);
}
#extract-banner.exit.tick {
  box-shadow: 4px 4px 0 #7dfff0, 0 0 22px rgba(125, 255, 240, 0.7);
}
#extract-banner.tick .extract-meter {
  box-shadow: 0 0 8px color-mix(in srgb, var(--br-acid) 70%, transparent);
}
#extract-banner.exit.tick .extract-meter {
  box-shadow: 0 0 12px rgba(125, 255, 240, 0.8);
}
#extract-banner.tick .extract-meter i {
  filter: brightness(1.28);
}

#extract-sting {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 16;
  background:
    radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--br-acid) 50%, #fff) 0%, transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 42%);
  opacity: 0;
  mix-blend-mode: screen;
}
body.extract-success-sting #extract-sting {
  animation: extract-success-flash 0.5s ease forwards;
}
body.extract-success-sting.stage-clear-punch #extract-sting {
  animation: stage-clear-flash 0.92s ease forwards;
  background:
    radial-gradient(circle at 50% 38%, #7dfff0 0%, transparent 48%),
    radial-gradient(circle at 50% 62%, rgba(125, 255, 240, 0.38) 0%, transparent 64%),
    linear-gradient(180deg, rgba(125, 255, 240, 0.3), transparent 46%);
}
body.stage-clear-punch #deal-flash {
  opacity: 1;
  background: radial-gradient(
    circle at 50% 50%,
    transparent 50%,
    color-mix(in srgb, #7dfff0 58%, transparent) 100%
  );
}
@keyframes extract-success-flash {
  0% { opacity: 0.82; }
  32% { opacity: 0.4; }
  100% { opacity: 0; }
}
@keyframes stage-clear-flash {
  0% { opacity: 0.96; }
  16% { opacity: 0.42; }
  34% { opacity: 0.88; }
  68% { opacity: 0.28; }
  100% { opacity: 0; }
}

#end.win.extract-pop .browser-frame {
  animation: extract-card-pop 0.45s ease;
}
#end.win.extract-pop .cred-payout {
  animation: extract-cred-flash 0.5s ease;
}
#end.win.extract-pop.stage-clear-haul .browser-frame {
  animation: stage-clear-card-pop 0.58s ease;
  box-shadow: 8px 8px 0 #000, 0 0 0 3px #7dfff0, 0 0 28px rgba(125, 255, 240, 0.55);
}
#end.win.extract-pop.stage-clear-haul .cred-payout {
  animation: extract-cred-flash 0.65s ease;
  color: #7dfff0;
  text-shadow: 3px 3px 0 #000, 0 0 18px rgba(125, 255, 240, 0.7);
}
#end.win.stage-clear-haul .end-eyebrow,
#end.win.stage-clear-haul .end-hero {
  color: #7dfff0;
}
#end.win.stage-clear-haul .end-title {
  text-shadow: 4px 4px 0 #000, 0 0 22px rgba(125, 255, 240, 0.45);
}
@keyframes extract-card-pop {
  0% { transform: scale(1.03); box-shadow: 8px 8px 0 #000, 0 0 0 4px var(--br-acid), 0 0 28px var(--br-acid); }
  100% { transform: scale(1); }
}
@keyframes stage-clear-card-pop {
  0% { transform: scale(1.07); box-shadow: 8px 8px 0 #000, 0 0 0 5px #7dfff0, 0 0 44px #7dfff0; }
  100% { transform: scale(1); box-shadow: 8px 8px 0 #000, 0 0 0 3px #7dfff0, 0 0 24px rgba(125, 255, 240, 0.55); }
}
@keyframes extract-cred-flash {
  0% { filter: brightness(1.8); letter-spacing: 0.12em; }
  100% { filter: none; }
}

/* Hub tycoon panel — CRED in, TYCOON BUCKS out. One bucks sink. Not a raid HUD chip. */
.tycoon-sinks { margin-top: 8px; }
#hud.mode-tycoon .raid-only { display: none !important; }
#hud.mode-tycoon .home-only { display: none !important; }
#hud.mode-tycoon #goal-line {
  display: block;
  color: #b8ff00;
}
.haul-bank-note {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--br-acid);
}
.haul-bank-note[hidden] { display: none; }

.tycoon-kicker {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--br-muted);
  margin: 0 0 6px;
}
.tycoon-tick {
  margin: 0 0 12px;
  font-family: var(--br-font-ui);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--br-muted);
}
.tycoon-tick.live {
  color: var(--br-acid);
  animation: tycoon-tick-pulse 1s steps(2, end) infinite;
}
@keyframes tycoon-tick-pulse {
  50% { opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
  .tycoon-tick.live { animation: none; }
}
