:root {
  /* Last year's terminal look: phosphor green on near-black, red for targets, pixel display type. */
  --bg: #050805;
  --panel: #0b120b;
  --line: #1d3a1f;
  --green: #00ff41;
  --green-dim: #7fd88f;
  --text: #c9f7d2;
  --muted: #73a37c;
  --red: #ff4141;
  --amber: #ffd23f;
  --display: 'VT323', ui-monospace, Menlo, monospace;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: var(--mono); font-size: 16px; line-height: 1.5; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }

.crt {
  position: fixed; inset: 0; pointer-events: none; z-index: 60;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.22) 2px 3px);
}

#app {
  max-width: 560px; margin: 0 auto; min-height: 100dvh;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.screen { min-height: 100dvh; display: flex; flex-direction: column; }
.screen.center { justify-content: center; padding-block: max(24px, env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-bottom, 0px)); text-align: center; }

/* HUD frame with pulsing corner brackets (four corners from two elements) */
.hud { position: relative; padding: 28px 20px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 0 18px rgba(0,255,65,.12); }
.hud::before, .hud::after, .hud > .corners::before, .hud > .corners::after {
  content: ""; position: absolute; width: 26px; height: 26px; border: 0 solid var(--green); animation: corners 2.5s infinite;
}
.hud::before { top: -2px; left: -2px; border-width: 3px 0 0 3px; }
.hud::after { top: -2px; right: -2px; border-width: 3px 3px 0 0; }
.hud > .corners::before { bottom: -2px; left: -2px; border-width: 0 0 3px 3px; }
.hud > .corners::after { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; }
@keyframes corners { 0%, 100% { border-color: var(--green); } 50% { border-color: var(--red); } }

.tag { font-family: var(--display); font-size: 22px; letter-spacing: .08em; text-transform: uppercase; color: var(--green); margin: 0 0 8px; }
.tag.red { color: var(--red); }
.label { font-family: var(--display); font-size: 20px; letter-spacing: .1em; text-transform: uppercase; color: var(--green-dim); margin: 26px 0 8px; }
.label.amber, .amber { color: var(--amber); }
.dim { color: var(--muted); }
.muted { color: var(--muted); margin: 8px 0; }
.small { font-size: 13px; }
.body-text { margin: 8px 0; }
.ok { color: var(--green); }
.error { color: var(--red); margin: 6px 0 0; }

.title { font-family: var(--display); font-weight: 400; font-size: clamp(72px, 24vw, 120px); line-height: .85; margin: 4px 0 16px; }
.rainbow {
  background-image: linear-gradient(-225deg, #ff4141 0%, #00ff41 29%, #ffff50 67%, #ff4141 100%);
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: slide 3s linear infinite;
}
@keyframes slide { to { background-position: 200% center; } }
.typed { font-family: var(--display); font-size: 25px; line-height: 1.2; min-height: 5em; text-transform: uppercase; margin: 0 0 20px; }
.typed::after { content: "▌"; color: var(--green); animation: blink .8s step-end infinite; }
.blink-text { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.rec { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--red); vertical-align: 2px; animation: blink 1.2s step-end infinite; }

.btn {
  font-family: var(--display); font-size: 26px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--green); background: transparent; border: 2px solid var(--green);
  padding: 8px 22px; min-height: 48px; cursor: pointer; transition: background .15s, color .15s;
}
.btn:hover, .btn:active { background: var(--green); color: var(--bg); }
.btn.big { font-size: 30px; padding: 12px 26px; }
.btn.ghost { border-color: var(--line); color: var(--green-dim); }
.btn.ghost:hover, .btn.ghost:active { background: var(--line); color: var(--green); }
.btn:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px dashed var(--amber); outline-offset: 3px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }

.lurker { display: block; width: 70%; max-width: 300px; margin: 32px auto 0; opacity: 0; animation: lurk 7s ease-in-out infinite; }
.lurker.small { width: 46%; margin: 10px auto 0; }
@keyframes lurk { 0%, 100% { opacity: 0; } 50% { opacity: .3; } }

.progress { border: 1px solid var(--green); padding: 3px; background: #0f1a10; margin-top: 14px; }
.progress-fill { height: 28px; width: 0; background: var(--green); }
.decrypting .progress-fill { animation: load 3s linear forwards; }
@keyframes load { to { width: 100%; } }
.hex { font-family: var(--display); font-size: 18px; color: var(--muted); word-break: break-all; min-height: 3.6em; margin: 14px 0 0; }

/* main shell */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 0 10px; background: var(--bg);
  font-family: var(--display); font-size: 20px; letter-spacing: .08em; color: var(--green);
  border-bottom: 1px solid var(--line);
}
.badge { font-size: 16px; color: var(--bg); background: var(--amber); padding: 0 8px; }
.panels { flex: 1; padding: 18px 0 calc(96px + env(safe-area-inset-bottom, 0px)); }
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 560px; margin: 0 auto; background: var(--bg); border-top: 1px solid var(--line);
  padding: 6px max(10px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
}
.tabs button {
  font-family: var(--display); font-size: 21px; letter-spacing: .05em; color: var(--muted); background: none; border: 0;
  min-height: 48px; cursor: pointer; border-top: 3px solid transparent;
}
.tabs button[aria-current="page"] { color: var(--green); border-top-color: var(--green); text-shadow: 0 0 8px rgba(0,255,65,.5); }

.target-name { font-family: var(--display); font-weight: 400; font-size: clamp(60px, 19vw, 92px); line-height: .9; color: var(--red); margin: 2px 0 16px; text-transform: uppercase; text-shadow: 0 0 14px rgba(255,65,65,.35); overflow-wrap: anywhere; }
.cam { position: relative; margin: 0; border: 2px solid var(--green); background: #000; }
.cam img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; filter: grayscale(.35) contrast(1.08) brightness(.95); }
.cam::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,255,65,.08), rgba(0,255,65,.08)), repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 3px, rgba(0,0,0,.18) 3px 4px); pointer-events: none; }
.cam figcaption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; justify-content: space-between; padding: 6px 10px; font-family: var(--display); font-size: 18px; color: var(--green); background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.intel { font-family: var(--display); font-size: 23px; line-height: 1.25; color: var(--text); margin: 0; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.list .item { min-width: 0; overflow-wrap: anywhere; }
.list a { color: var(--green); font-size: 14px; }
.list .remove { flex: none; font-family: var(--display); font-size: 18px; color: var(--muted); background: none; border: 1px solid var(--line); padding: 2px 10px; min-height: 36px; cursor: pointer; }
.list .remove:hover { color: var(--red); border-color: var(--red); }
.list li.fresh { animation: fresh 1.2s ease-out; }
@keyframes fresh { from { background: rgba(0,255,65,.18); } to { background: transparent; } }

.form { display: grid; gap: 6px; margin: 14px 0 6px; }
.form label { font-family: var(--display); font-size: 19px; letter-spacing: .06em; color: var(--green-dim); text-transform: uppercase; margin-top: 6px; }
.form input { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--bg); border: 1px solid var(--line); padding: 12px; border-radius: 0; }
.form input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.form input::placeholder { color: #47684d; }
.form .btn { margin-top: 12px; justify-self: start; }

.orders, .steps { margin: 6px 0 0; padding-left: 1.4em; }
.orders li { font-family: var(--display); font-size: 23px; line-height: 1.2; margin: 0 0 10px; }
.steps li { margin: 0 0 8px; }
.countdown { margin-top: 18px; padding: 12px 14px; border: 1px dashed var(--line); }
.countdown .label { margin-top: 0; }
.clock { font-family: var(--display); font-size: 46px; line-height: 1; color: var(--amber); margin: 0; font-variant-numeric: tabular-nums; }
.intercept { margin-top: 18px; padding: 12px 14px; border: 1px dashed rgba(255,210,63,.35); }
.intercept .label { margin-top: 0; }
.feed { list-style: none; margin: 0 0 20px; padding: 0; }
.feed li { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.feed .when { font-family: var(--display); font-size: 17px; color: var(--muted); }
.feed .what { font-family: var(--display); font-size: 22px; color: var(--green); line-height: 1.1; }
.feed .body { margin: 2px 0 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .lurker { opacity: .25; }
}

.new-tag { display: inline-block; margin-left: 8px; padding: 0 6px; font-family: var(--display); font-size: 16px; line-height: 1.3; color: var(--bg); background: var(--amber); vertical-align: 1px; }
.label .dim { font-size: 16px; letter-spacing: .04em; }
