/* Component-specific styles — camera, avatars, keypad, game, etc */

/* ─── Camera placeholder ─── */
.camera-stage {
  position: relative;
  background: radial-gradient(ellipse at center, #0a1828 0%, #02060d 100%);
  border: 1px solid var(--hud-line);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  height: 100%;
  flex: 1;
}
.camera-stage.large { min-height: 0; }
.cam-bg {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent 0, transparent 20px, rgba(0,212,255,0.04) 20px, rgba(0,212,255,0.04) 21px),
    repeating-linear-gradient(90deg, transparent 0, transparent 20px, rgba(0,212,255,0.04) 20px, rgba(0,212,255,0.04) 21px);
}
.silhouette {
  height: 75%;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 12px rgba(0,212,255,0.3));
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.scan-line {
  position: absolute; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--hud-cyan) 50%, transparent);
  box-shadow: 0 0 12px var(--hud-cyan), 0 0 24px var(--hud-cyan);
  animation: scan 3s linear infinite;
  z-index: 3;
}
@keyframes scan {
  0% { top: 5%; }
  50% { top: 95%; }
  100% { top: 5%; }
}
.face-bracket {
  position: absolute;
  width: 28px; height: 28px;
  border: 2px solid var(--hud-orange);
  z-index: 4;
  animation: lock 1.5s ease-in-out infinite;
}
.face-bracket.tl { top: 28%; left: 36%; border-right: none; border-bottom: none; }
.face-bracket.tr { top: 28%; right: 36%; border-left: none; border-bottom: none; }
.face-bracket.bl { top: 50%; left: 36%; border-right: none; border-top: none; }
.face-bracket.br { top: 50%; right: 36%; border-left: none; border-top: none; }
@keyframes lock {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); box-shadow: 0 0 12px var(--hud-orange); }
}
.cam-tick {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--hud-cyan-soft);
  padding: 4px 8px;
  z-index: 5;
}
.cam-tick.tl { top: 8px; left: 12px; }
.cam-tick.tr { top: 8px; right: 12px; color: var(--hud-red); }
.cam-tick.bl { bottom: 8px; left: 12px; color: var(--hud-text-faint); }
.cam-tick.br { bottom: 8px; right: 12px; color: var(--hud-text-faint); }
.crosshair {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 4; pointer-events: none;
}
.crosshair .ch.h {
  position: absolute; left: 0; right: 0;
  border-top: 1px dashed rgba(0,212,255,0.2);
}
.crosshair .ch.v {
  position: absolute; top: 0; bottom: 0;
  border-left: 1px dashed rgba(0,212,255,0.2);
}

/* ─── Avatar ─── */
.avatar {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all .2s ease;
  overflow: hidden;
}
.avatar-overlay {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,0.18) 2px 3px);
  pointer-events: none;
}
.avatar-target {
  position: absolute; inset: -3px;
  border: 1px solid var(--hud-cyan);
  animation: target 2s linear infinite;
  pointer-events: none;
}
@keyframes target {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ─── Keypad ─── */
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}
.key {
  height: 64px;
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid var(--hud-line);
  color: var(--hud-cyan);
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 600;
  cursor: pointer;
  transition: all .1s ease;
  letter-spacing: 0.05em;
}
.key:hover { background: rgba(0,212,255,0.15); box-shadow: var(--glow); }
.key:active { transform: translateY(1px); background: rgba(0,212,255,0.25); }
.key.del { color: var(--hud-orange); border-color: rgba(255,138,61,0.4); }

.pin-display {
  display: flex; gap: 12px; justify-content: center;
  margin-bottom: 18px;
}
.pin-slot {
  width: 48px; height: 56px;
  border: 1px solid var(--hud-line);
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  color: var(--hud-cyan);
  position: relative;
}
.pin-slot.filled { box-shadow: var(--glow); border-color: var(--hud-cyan); }
.pin-slot.error { border-color: var(--hud-red); box-shadow: 0 0 12px rgba(255,77,109,0.5); animation: shake .3s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ─── Word game ─── */
.word-card {
  background: rgba(0,212,255,0.05);
  border: 1px solid var(--hud-line);
  padding: 18px 22px;
  cursor: pointer;
  transition: all .15s ease;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.05em;
  color: var(--hud-text);
  font-family: 'Rajdhani', monospace;
  position: relative;
  overflow: hidden;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.word-card:hover { background: rgba(0,212,255,0.15); box-shadow: var(--glow); transform: translateY(-2px); }
.word-card.correct { background: rgba(74,222,128,0.2); border-color: var(--hud-green); color: var(--hud-green); }
.word-card.wrong { background: rgba(255,77,109,0.2); border-color: var(--hud-red); color: var(--hud-red); }

/* ─── Tables ─── */
.hud-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.hud-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hud-text-faint);
  border-bottom: 1px solid var(--hud-line-soft);
}
.hud-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--hud-line-dim);
  color: var(--hud-text);
  font-family: 'JetBrains Mono', monospace;
}
.hud-table tr:hover td { background: rgba(0,212,255,0.04); }
.hud-table .late { color: var(--hud-orange); }
.hud-table .ok { color: var(--hud-green); }
.hud-table .badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  border: 1px solid currentColor;
}

/* ─── Stat cards ─── */
.stat-card {
  background: rgba(11,18,28,0.6);
  border: 1px solid var(--hud-line-soft);
  padding: 16px 20px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--hud-cyan);
  box-shadow: 0 0 8px var(--hud-cyan);
}
.stat-card.warn::before { background: var(--hud-orange); box-shadow: 0 0 8px var(--hud-orange); }
.stat-card.danger::before { background: var(--hud-red); box-shadow: 0 0 8px var(--hud-red); }
.stat-card.ok::before { background: var(--hud-green); box-shadow: 0 0 8px var(--hud-green); }
.stat-label {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--hud-text-faint);
}
.stat-value {
  font-family: 'Rajdhani', 'JetBrains Mono', monospace;
  font-size: 38px;
  font-weight: 600;
  color: var(--hud-text);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-top: 4px;
}
.stat-unit { font-size: 14px; color: var(--hud-text-dim); margin-left: 4px; }
.stat-delta { font-size: 11px; color: var(--hud-green); margin-top: 4px; }
.stat-delta.down { color: var(--hud-red); }

/* ─── Big time display ─── */
.big-time {
  font-family: 'Rajdhani', 'JetBrains Mono', monospace;
  font-size: 88px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--hud-cyan);
  text-shadow: 0 0 24px rgba(0,212,255,0.5);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}
.big-time > span { display: inline-block; min-width: 1ch; text-align: center; }
.big-time > span:not(.colon) { min-width: 2ch; }
.big-time .colon { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

/* ─── Form input ─── */
.hud-input {
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--hud-line);
  color: var(--hud-text);
  padding: 12px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  letter-spacing: 0.1em;
  width: 100%;
  outline: none;
  transition: all .15s ease;
}
.hud-input:focus { border-color: var(--hud-cyan); box-shadow: var(--glow); }

/* ─── Chart bars ─── */
.chart-bar-row {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px;
  margin-bottom: 8px;
}
.chart-bar-row .lbl { width: 80px; color: var(--hud-text-dim); }
.chart-bar-row .bar-track {
  flex: 1; height: 14px;
  background: rgba(0,212,255,0.06);
  border: 1px solid var(--hud-line-dim);
  position: relative;
}
.chart-bar-row .bar-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(0,212,255,0.4), var(--hud-cyan));
  box-shadow: var(--glow);
}
.chart-bar-row .val {
  width: 60px; text-align: right; color: var(--hud-cyan);
  font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums;
}

/* ─── Toggle ─── */
.hud-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer;
}
.hud-toggle .switch {
  width: 44px; height: 22px;
  background: rgba(0,212,255,0.08);
  border: 1px solid var(--hud-line);
  position: relative;
  transition: all .2s ease;
}
.hud-toggle .switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: var(--hud-text-dim);
  transition: all .2s ease;
}
.hud-toggle.on .switch { background: rgba(0,212,255,0.3); box-shadow: var(--glow); }
.hud-toggle.on .switch::after { left: 24px; background: var(--hud-cyan); }

/* ─── Hall of Fame (page 8) ─── */
.hof-wrap {
  position: absolute;
  inset: 38px 14px 8px 14px;
  display: flex; flex-direction: column;
  gap: 4px;
}
.hof-head {
  display: flex; align-items: center; gap: 10px;
  padding: 0 4px 4px;
  border-bottom: 1px dashed var(--hud-line-soft);
  animation: hof-fade-in 0.4s ease-out;
  flex-shrink: 0;
}
.hof-icon {
  font-size: 18px;
  width: 24px; text-align: center;
  filter: drop-shadow(0 0 6px currentColor);
}
.hof-titles { flex: 1; line-height: 1.1; min-width: 0; }
.hof-title {
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em;
}
.hof-en {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px; letter-spacing: 0.14em;
  color: var(--hud-text-faint);
  margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hof-pager { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.hof-dot {
  width: 4px; height: 4px;
  background: var(--hud-line-soft);
  transition: all .3s ease;
  border-radius: 1px;
}
.hof-dot.on { width: 12px; }

.hof-body {
  flex: 1;
  display: grid;
  grid-template-columns: 36% 1fr;
  gap: 10px;
  min-height: 0;
  padding: 2px 2px;
}

/* ─── LEFT: Champion spotlight (compact horizontal) ─── */
.hof-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border: 1px solid var(--hud-line-soft);
  background:
    radial-gradient(ellipse at 30% 50%, color-mix(in oklab, var(--hof-color) 22%, transparent), transparent 65%),
    linear-gradient(180deg, rgba(0, 212, 255, 0.04), transparent);
  overflow: hidden;
  animation: hof-fade-in 0.5s ease-out;
  min-height: 0;
}
.hof-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 40%, color-mix(in oklab, var(--hof-color) 10%, transparent) 50%, transparent 60%);
  background-size: 200% 200%;
  animation: hof-shine 4s ease-in-out infinite;
  pointer-events: none;
}
.hof-hero-rays {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hof-hero-rays span {
  position: absolute;
  left: 25%; top: 50%;
  width: 1px; height: 200%;
  background: linear-gradient(180deg, transparent, var(--hof-color), transparent);
  opacity: 0.18;
  transform-origin: top center;
  animation: hof-rays-spin 18s linear infinite;
}
.hof-hero-rays span:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg); }
.hof-hero-rays span:nth-child(2) { transform: translate(-50%, -50%) rotate(45deg); animation-duration: 22s; }
.hof-hero-rays span:nth-child(3) { transform: translate(-50%, -50%) rotate(90deg); animation-duration: 26s; animation-direction: reverse; }
.hof-hero-rays span:nth-child(4) { transform: translate(-50%, -50%) rotate(135deg); animation-duration: 30s; }

/* Compact stacked left side: rank tag (top) + avatar (large) */
.hof-hero-left {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  z-index: 2;
}
.hof-hero-rank {
  display: flex; align-items: center; gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px; letter-spacing: 0.14em;
}
.hof-hero-medal {
  font-weight: 700;
  filter: drop-shadow(0 0 4px currentColor);
}
.hof-hero-tag {
  color: var(--hud-text-faint);
  padding: 0 4px;
  border: 1px solid var(--hud-line-soft);
  font-size: 7.5px;
}
.hof-hero-avatar {
  position: relative;
}
.hof-hero-glow {
  position: absolute; inset: -10px;
  border-radius: 50%;
  z-index: -1;
  animation: hof-glow-pulse 2.5s ease-in-out infinite;
}

/* Right side of hero: name + meta + value (vertical stack) */
.hof-hero-right {
  display: flex; flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  z-index: 2;
}
.hof-hero-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  filter: drop-shadow(0 0 6px currentColor);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hof-hero-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: var(--hud-text-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hof-hero-value {
  display: flex; align-items: baseline; gap: 3px;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 1px;
  filter: drop-shadow(0 0 8px currentColor);
}
.hof-hero-num {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hof-hero-unit {
  font-size: 9px;
  color: var(--hud-text-faint);
  letter-spacing: 0.1em;
}

@keyframes hof-shine {
  0%, 100% { background-position: -100% -100%; }
  50%      { background-position: 100% 100%; }
}
@keyframes hof-rays-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes hof-glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.08); }
}

/* ─── RIGHT: Ranking list (full right column) ─── */
.hof-ranks {
  display: flex; flex-direction: column;
  justify-content: space-between;
  gap: 3px;
  padding: 0;
  min-height: 0;
}
.hof-rank-row {
  display: grid;
  grid-template-columns: 22px 1fr 50px auto;
  align-items: center;
  gap: 6px;
  padding: 2px 5px;
  border-left: 2px solid transparent;
  background: linear-gradient(90deg, rgba(0,212,255,0.04), transparent);
  animation: hof-row-in 0.5s cubic-bezier(.2,.8,.3,1) both;
  position: relative;
  min-height: 0;
  flex: 1;
}
.hof-rank-row.rank-0 {
  border-left-color: var(--hof-color, var(--hud-cyan));
  background: linear-gradient(90deg, color-mix(in oklab, var(--hof-color, var(--hud-cyan)) 14%, transparent), transparent);
  box-shadow: inset 0 0 12px color-mix(in oklab, var(--hof-color, var(--hud-cyan)) 10%, transparent);
}
.hof-rank-row.rank-1 { border-left-color: var(--hud-line); }
.hof-rank-row.rank-2 { border-left-color: var(--hud-line-soft); opacity: 0.85; }

.hof-rank-no {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--hud-text-dim);
  text-align: center;
  filter: drop-shadow(0 0 4px currentColor);
}
.hof-rank-info { line-height: 1.1; min-width: 0; }
.hof-rank-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--hud-text);
  letter-spacing: 0.04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hof-rank-dept {
  font-family: 'JetBrains Mono', monospace;
  font-size: 7.5px;
  letter-spacing: 0.08em;
  color: var(--hud-text-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hof-rank-bar {
  height: 5px;
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid var(--hud-line-soft);
  position: relative;
  overflow: hidden;
}
.hof-rank-fill {
  height: 100%;
  transition: width 0.6s cubic-bezier(.2,.8,.3,1);
}
.hof-rank-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--hud-text);
  font-variant-numeric: tabular-nums;
  filter: drop-shadow(0 0 4px currentColor);
}
.hof-rank-unit {
  font-size: 7.5px;
  color: var(--hud-text-faint);
  margin-left: 2px;
  font-weight: 400;
}

.hof-foot {
  display: flex; justify-content: space-between;
  padding: 0 4px;
  font-size: 9px;
  flex-shrink: 0;
}
.hof-progress {
  height: 2px;
  background: rgba(0,212,255,0.08);
  border-radius: 1px;
  overflow: hidden;
  flex-shrink: 0;
}
.hof-progress-fill {
  height: 100%;
  transition: none;
}

@keyframes hof-fade-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes hof-row-in {
  from { opacity: 0; transform: translateX(-16px); filter: blur(2px); }
  to   { opacity: 1; transform: translateX(0); filter: blur(0); }
}
@keyframes hof-edge {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}

/* ─── Dot-matrix display (Page 7 admin login) — CRT old-TV style ─── */
.dot-matrix-display {
  position: relative;
  width: 100%;
  /* Outer CRT bezel — dark plastic frame */
  padding: 18px 26px;
  background:
    linear-gradient(160deg, #1a1612 0%, #0a0905 50%, #14100c 100%);
  border: 1px solid #2a2520;
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 200, 140, 0.08),
    inset 0 -2px 4px rgba(0, 0, 0, 0.6),
    0 4px 16px rgba(0, 0, 0, 0.5),
    0 0 24px rgba(0, 212, 255, 0.10);
  overflow: visible;
}

/* Inner CRT screen — curved tube, deep recess */
.crt-bezel {
  position: relative;
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse at center, rgba(0, 212, 255, 0.08), transparent 65%),
    radial-gradient(ellipse at 50% 30%, rgba(40, 80, 110, 0.25), transparent 70%),
    linear-gradient(180deg, #02080e, #04101a);
  border-radius: 22px / 26px; /* Slight CRT curvature */
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.9),
    inset 0 0 30px rgba(0, 212, 255, 0.10),
    inset 0 4px 8px rgba(255, 200, 140, 0.04),
    0 0 20px rgba(0, 212, 255, 0.15);
  overflow: hidden;
}
.dmd-canvas {
  width: 100%; height: 100%;
  display: block;
  /* Slight color shift mimicking CRT phosphor */
  filter: saturate(1.15) contrast(1.05);
}

/* CRT screen curvature — barrel highlight on top, vignette via screen */
.crt-curve {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(255, 255, 255, 0.10), transparent 50%),
    radial-gradient(ellipse 90% 60% at 50% 110%, rgba(0, 0, 0, 0.4), transparent 60%);
  border-radius: inherit;
  mix-blend-mode: screen;
}

/* Horizontal scanlines — every 3px, very faint */
.crt-scanlines {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, transparent 0px, rgba(0, 0, 0, 0.18) 1px, transparent 2px, transparent 3px);
  background-size: 100% 3px;
  mix-blend-mode: multiply;
  opacity: 0.85;
}

/* RGB chromatic aberration — subtle red/blue offset on edges */
.crt-rgb {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 0, 80, 0.06) 0%, transparent 4%, transparent 96%, rgba(0, 180, 255, 0.06) 100%);
  mix-blend-mode: screen;
}

/* CRT vignette — dark corners */
.crt-vignette {
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
  border-radius: inherit;
}

/* Flicker — subtle brightness pulse + occasional rolling band */
.crt-flicker {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.025) 50%, transparent 100%);
  background-size: 100% 200%;
  animation: crt-roll 7s linear infinite, crt-pulse 0.18s steps(2) infinite;
  mix-blend-mode: screen;
  opacity: 0.6;
}
@keyframes crt-roll {
  0%   { background-position: 0 -100%; }
  100% { background-position: 0 200%; }
}
@keyframes crt-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.65; }
}

.dmd-corner {
  position: absolute; width: 14px; height: 14px;
  border: 2px solid var(--hud-cyan);
  pointer-events: none;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
  z-index: 5;
}
.dmd-corner.ctl { top: 4px; left: 4px; border-right: none; border-bottom: none; }
.dmd-corner.ctr { top: 4px; right: 4px; border-left: none; border-bottom: none; }
.dmd-corner.cbl { bottom: 4px; left: 4px; border-right: none; border-top: none; }
.dmd-corner.cbr { bottom: 4px; right: 4px; border-left: none; border-top: none; }
.dmd-label {
  position: absolute; bottom: 2px; left: 30px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: 0.2em;
  color: var(--hud-text-faint);
  pointer-events: none;
  z-index: 5;
}

/* ─── Success page · explosion-implosion ─── */
.success-slide {
  position: relative;
  overflow: hidden;
}
.success-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}
.success-stage {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%;
  gap: 14px;
}

/* Big check ring — hidden during explode, materializes on implode, settles on reveal */
.success-bigring {
  position: relative;
  width: 220px; height: 220px;
  color: var(--hud-green);
  filter: drop-shadow(0 0 24px rgba(74,222,128,0.7));
}
.sbr-svg { width: 100%; height: 100%; }
.sbr-rot-a { transform-origin: 100px 100px; animation: sbr-rot 8s linear infinite; }
.sbr-rot-b { transform-origin: 100px 100px; animation: sbr-rot 12s linear infinite reverse; }
@keyframes sbr-rot {
  to { transform: rotate(360deg); }
}
.sbr-check {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
}

/* Phase: cosmos — entire viewport filled with stars; ring & content hidden */
.phase-cosmos .success-bigring { opacity: 0; transform: scale(0.4); }
.phase-cosmos .success-title,
.phase-cosmos .success-sub,
.phase-cosmos .success-brand,
.phase-cosmos .success-cards,
.phase-cosmos .success-countdown,
.phase-cosmos .hud-btn { opacity: 0; transform: translateY(12px); pointer-events: none; }

/* Phase: collapse — gravitational implosion; content still hidden */
.phase-collapse .success-bigring { opacity: 0; transform: scale(0.4); }
.phase-collapse .success-title,
.phase-collapse .success-sub,
.phase-collapse .success-brand,
.phase-collapse .success-cards,
.phase-collapse .success-countdown,
.phase-collapse .hud-btn { opacity: 0; transform: translateY(12px); pointer-events: none; }

/* Phase: reveal — ring materializes from white flash, then text + cards cascade in */
.phase-reveal .success-bigring {
  opacity: 1; transform: scale(1);
  animation: bigring-emerge 0.45s ease-out, bigring-pulse 2.4s ease-in-out infinite 0.45s;
}
@keyframes bigring-emerge {
  0%   { opacity: 0; transform: scale(2.4); filter: drop-shadow(0 0 80px rgba(255,255,255,1)) brightness(2.5); }
  40%  { opacity: 1; transform: scale(0.92); filter: drop-shadow(0 0 50px rgba(255,255,255,0.8)) brightness(1.6); }
  100% { opacity: 1; transform: scale(1); filter: drop-shadow(0 0 24px rgba(74,222,128,0.7)) brightness(1); }
}
.phase-reveal .sbr-check { animation: sbr-check-draw 0.35s ease-out 0.2s forwards; }
@keyframes sbr-check-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes bigring-pulse {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(74,222,128,0.6)); }
  50%      { filter: drop-shadow(0 0 36px rgba(74,222,128,0.95)); }
}
.phase-reveal .sbr-check { stroke-dashoffset: 0; }
.phase-reveal .success-title    { animation: sr-rise 0.3s ease-out 0.0s both; }
.phase-reveal .success-sub      { animation: sr-rise 0.3s ease-out 0.06s both; }
.phase-reveal .success-brand    { animation: sr-rise 0.3s ease-out 0.10s both; }
.phase-reveal .success-cards    { animation: sr-rise 0.3s ease-out 0.16s both; }
.phase-reveal .success-countdown{ animation: sr-rise 0.3s ease-out 0.24s both; }
.phase-reveal .hud-btn          { animation: sr-rise 0.3s ease-out 0.30s both; }
@keyframes sr-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.success-title {
  font-size: 64px; font-weight: 700; letter-spacing: 0.22em;
  color: var(--hud-green);
  text-shadow:
    0 0 18px rgba(74,222,128,0.7),
    0 0 40px rgba(74,222,128,0.35);
  margin-top: 8px;
}
.success-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.22em;
  color: var(--hud-cyan);
  text-shadow: 0 0 8px rgba(0,212,255,0.4);
}
.success-brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.4em;
  color: var(--hud-text-faint);
  margin-top: -4px;
}
.success-cards { margin-top: 8px; }
.success-countdown {
  margin-top: 16px;
  color: var(--hud-orange);
}

/* Avatar grid */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.avatar-cell {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer;
  padding: 8px 4px;
  border: 1px solid transparent;
  transition: all .15s ease;
}
.avatar-cell:hover { border-color: var(--hud-line-soft); background: rgba(0,212,255,0.04); }
.avatar-cell.selected {
  border-color: var(--hud-cyan);
  background: rgba(0,212,255,0.1);
  box-shadow: var(--glow);
}
.avatar-cell .name { font-size: 11px; color: var(--hud-text); letter-spacing: 0.05em; }

/* "Please select first" effect */
.avatar-cell.pulse {
  animation: ac-pulse 0.6s ease-in-out 2;
}
@keyframes ac-pulse {
  0%, 100% { border-color: transparent; background: transparent; transform: scale(1); }
  50% {
    border-color: var(--hud-orange);
    background: rgba(255,138,61,0.12);
    transform: scale(1.04);
    box-shadow: 0 0 12px rgba(255,138,61,0.35);
  }
}
.hud-panel.roster-need-select {
  animation: rns-shake 0.4s ease-in-out 2;
  border-color: var(--hud-orange) !important;
  box-shadow: 0 0 20px rgba(255,138,61,0.4) !important;
}
@keyframes rns-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.roster-toast {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 14px;
  padding: 14px 28px;
  background: rgba(8, 14, 22, 0.92);
  border: 2px solid var(--hud-orange);
  box-shadow: 0 0 30px rgba(255,138,61,0.6), inset 0 0 20px rgba(255,138,61,0.15);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; letter-spacing: 0.18em;
  color: var(--hud-orange);
  text-shadow: 0 0 10px rgba(255,138,61,0.7);
  white-space: nowrap;
  z-index: 10;
  animation: rt-pop 0.3s ease-out, rt-blink 0.5s steps(2) infinite 0.3s;
}
.rt-arrow { animation: rt-arrow 0.5s ease-in-out infinite; }
@keyframes rt-arrow {
  0%, 100% { transform: translateX(0); opacity: 0.5; }
  50% { transform: translateX(2px); opacity: 1; }
}
@keyframes rt-pop {
  0% { transform: translate(-50%, -50%) scale(0.7); opacity: 0; }
  60% { transform: translate(-50%, -50%) scale(1.08); }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes rt-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* Section heading bar */
.section-bar {
  display: flex; align-items: center; gap: 16px;
  padding: 6px 0;
  margin-bottom: 14px;
}
.section-bar .label {
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--hud-cyan); font-weight: 600;
}
.section-bar .line {
  flex: 1; height: 1px; background: var(--hud-line-soft);
  position: relative;
}
.section-bar .line::after {
  content: ''; position: absolute;
  right: 0; top: -3px;
  width: 7px; height: 7px;
  background: var(--hud-cyan);
  box-shadow: var(--glow);
}

/* Terminal-style line readout */
.term-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--hud-text-dim);
  line-height: 1.7;
}
.term-line .arrow { color: var(--hud-cyan); }
.term-line .ok-tag { color: var(--hud-green); }
.term-line .warn-tag { color: var(--hud-orange); }

/* radial / hex shapes */
.hex-bar {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 3px;
  height: 16px;
}
.hex-bar > span {
  background: rgba(0,212,255,0.1);
  height: 100%;
}
.hex-bar > span.fill { background: var(--hud-cyan); box-shadow: 0 0 4px var(--hud-cyan); }
.hex-bar > span.warn { background: var(--hud-orange); box-shadow: 0 0 4px var(--hud-orange); }

/* Column flex helpers */
.col { display: flex; flex-direction: column; }
.row { display: flex; flex-direction: row; }
.gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-6 { gap: 6px; }
.flex1 { flex: 1; min-height: 0; min-width: 0; }

/* ─── Page 2: Confirm Identity (dynamic effects) ─── */
.confirm-title { animation: confirm-title-glow 2.4s ease-in-out infinite; }
@keyframes confirm-title-glow {
  0%, 100% { text-shadow: 0 0 12px rgba(0,212,255,0.4); }
  50% { text-shadow: 0 0 24px rgba(0,212,255,0.9), 0 0 4px rgba(0,212,255,0.6); }
}

.confirm-photo-wrap { padding: 6px; }
.confirm-scan {
  position: absolute; left: 6px; right: 6px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--hud-cyan), transparent);
  box-shadow: 0 0 10px var(--hud-cyan);
  pointer-events: none;
  animation: cs-sweep 2.2s linear infinite;
  z-index: 3;
}
@keyframes cs-sweep {
  0%   { top: 6px; opacity: 0.2; }
  50%  { top: calc(100% - 8px); opacity: 1; }
  100% { top: 6px; opacity: 0.2; }
}
.confirm-corner {
  position: absolute; width: 16px; height: 16px;
  border: 2px solid var(--hud-cyan);
  box-shadow: 0 0 10px rgba(0,212,255,0.6);
  pointer-events: none; z-index: 3;
  animation: cc-pulse 1.8s ease-in-out infinite;
}
@keyframes cc-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}
.confirm-corner.ctl { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.confirm-corner.ctr { top: 6px; right: 6px; border-left: none; border-bottom: none; }
.confirm-corner.cbl { bottom: 6px; left: 6px; border-right: none; border-top: none; }
.confirm-corner.cbr { bottom: 6px; right: 6px; border-left: none; border-top: none; }

/* Matching beam between two panels */
.match-beam {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 0 4px; min-width: 24px;
}
.mb-pulse {
  width: 2px; flex: 1;
  background: linear-gradient(180deg, transparent, var(--hud-cyan), transparent);
  box-shadow: 0 0 8px var(--hud-cyan);
  position: relative; overflow: hidden; min-height: 40px;
}
.mb-pulse::after {
  content: ''; position: absolute; left: -2px; right: -2px; height: 30%;
  background: linear-gradient(180deg, transparent, var(--hud-cyan-soft), transparent);
  filter: blur(2px);
  animation: mbp-flow 1.6s ease-in-out infinite;
}
.mb-pulse.rev::after { animation-direction: reverse; animation-delay: 0.4s; }
@keyframes mbp-flow {
  0% { top: -30%; opacity: 0.3; }
  50% { opacity: 1; }
  100% { top: 100%; opacity: 0.3; }
}
.mb-label {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: 0.2em;
  color: var(--hud-cyan);
  text-shadow: 0 0 6px var(--hud-cyan);
}
.mb-text { writing-mode: vertical-rl; text-orientation: mixed; transform: rotate(180deg); }
.mb-arrow { animation: mb-arr 1.2s ease-in-out infinite; }
.mb-arrow.rev { animation-direction: reverse; transform: rotate(180deg); }
@keyframes mb-arr {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(2px); }
}

/* DB rings behind matched avatar */
.db-rings {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none; z-index: 0;
}
.db-ring {
  position: absolute; top: 50%; left: 50%;
  border: 1px solid var(--hud-cyan);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: db-ring-pulse 2.4s ease-out infinite;
}
.db-ring.r1 { width: 100px; height: 100px; animation-delay: 0s; }
.db-ring.r2 { width: 100px; height: 100px; animation-delay: 0.8s; }
.db-ring.r3 { width: 100px; height: 100px; animation-delay: 1.6s; }
@keyframes db-ring-pulse {
  0%   { width: 80px;  height: 80px;  opacity: 0.7; border-width: 2px; }
  100% { width: 220px; height: 220px; opacity: 0;   border-width: 1px; }
}

/* Confirm action buttons */
.confirm-btn {
  position: relative; overflow: hidden;
}
.confirm-btn::after {
  content: ''; position: absolute; left: -50%; top: 0; bottom: 0; width: 50%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  pointer-events: none;
  animation: cb-sweep 2.8s linear infinite;
  animation-delay: var(--delay, 0s);
}
.confirm-btn.hud-btn.primary { --delay: 0s; }
.confirm-btn.hud-btn.warn    { --delay: 1.4s; }
@keyframes cb-sweep {
  0% { left: -50%; }
  60%, 100% { left: 150%; }
}
.confirm-btn.active { transform: translateY(-2px); }
.confirm-btn.hud-btn.primary.active { box-shadow: 0 0 24px rgba(0,212,255,0.6), inset 0 0 12px rgba(0,212,255,0.2); }
.confirm-btn.hud-btn.warn.active    { box-shadow: 0 0 24px rgba(255,138,61,0.6), inset 0 0 12px rgba(255,138,61,0.2); }

/* Countdown bar — inline below buttons */
.confirm-countdown {
  width: min(720px, 90%);
  padding: 8px 16px 4px;
  margin-top: 4px;
}
.cc-row {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.16em;
  color: var(--hud-text-dim);
}
.cc-label { color: var(--hud-cyan); text-shadow: 0 0 6px rgba(0,212,255,0.5); }
.cc-value {
  font-size: 18px; font-weight: 700;
  color: var(--hud-cyan); letter-spacing: 0.06em;
  text-shadow: 0 0 12px rgba(0,212,255,0.7);
  font-variant-numeric: tabular-nums;
  min-width: 56px;
}
.cc-unit { font-size: 12px; opacity: 0.7; margin-left: 2px; }
.cc-hint { margin-left: auto; color: var(--hud-text-faint); font-size: 10px; }

.cc-bar {
  position: relative; height: 6px;
  background: rgba(0,212,255,0.06);
  border: 1px solid var(--hud-line-dim);
  overflow: hidden;
}
.cc-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--hud-cyan-soft), var(--hud-cyan));
  box-shadow: 0 0 10px rgba(0,212,255,0.7);
  transition: width 0.05s linear;
  position: relative;
}
.cc-fill::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 2px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 0 10px rgba(255,255,255,0.8);
  animation: cc-tip 0.7s ease-in-out infinite;
}
@keyframes cc-tip {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.cc-ticks {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: repeat(20, 1fr);
  pointer-events: none;
}
.cc-tick {
  border-right: 1px solid rgba(0,16,32,0.6);
}
.cc-tick:last-child { border-right: none; }

/* Critical state — last 3s */
.confirm-countdown.critical .cc-label,
.confirm-countdown.critical .cc-value {
  color: var(--hud-orange);
  text-shadow: 0 0 14px rgba(255,138,61,0.8);
  animation: cc-blink 0.5s steps(2) infinite;
}
.confirm-countdown.critical .cc-fill {
  background: linear-gradient(90deg, var(--hud-red), var(--hud-orange));
  box-shadow: 0 0 14px rgba(255,138,61,0.9);
}
@keyframes cc-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ─── Recognition FAIL state ─── */
.fail-block { padding: 4px 0 2px; }

.fail-banner {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 6px 8px;
  background: linear-gradient(90deg, transparent, rgba(255,138,61,0.08), transparent);
  border-top: 1px solid rgba(255,138,61,0.4);
  border-bottom: 1px solid rgba(255,138,61,0.4);
  position: relative; overflow: hidden;
}
.fail-banner::before, .fail-banner::after {
  content: ''; position: absolute; left: 0; right: 0; height: 1px;
  background: repeating-linear-gradient(90deg, var(--hud-orange) 0, var(--hud-orange) 4px, transparent 4px, transparent 8px);
  opacity: 0.5;
}
.fail-banner::before { top: 2px; } .fail-banner::after { bottom: 2px; }
.fail-chev {
  color: var(--hud-orange); font-size: 14px; letter-spacing: 0.1em;
  animation: chev-pulse 1.4s ease-in-out infinite;
  text-shadow: 0 0 8px rgba(255,138,61,0.6);
}
.fail-chev.right { animation-delay: 0.7s; }
@keyframes chev-pulse {
  0%, 100% { opacity: 0.35; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(-3px); }
}
.fail-chev.right { animation-name: chev-pulse-r; }
@keyframes chev-pulse-r {
  0%, 100% { opacity: 0.35; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(3px); }
}
.fail-title {
  font-family: 'Rajdhani', monospace; font-size: 19px; font-weight: 700;
  letter-spacing: 0.22em; color: var(--hud-orange);
  text-shadow: 0 0 14px rgba(255,138,61,0.7);
  position: relative; white-space: nowrap;
  animation: glitch-skew 3.2s steps(8) infinite;
}
@keyframes glitch-skew {
  0%, 92%, 100% { transform: skewX(0); }
  93% { transform: skewX(-3deg) translateX(-1px); }
  95% { transform: skewX(2deg) translateX(1px); }
  97% { transform: skewX(-1deg); }
}
.fail-title::before, .fail-title::after {
  content: attr(data-text); position: absolute; left: 0; top: 0;
  width: 100%; opacity: 0.7;
}
.fail-title::before { color: var(--hud-red); transform: translate(-1.5px, 0); mix-blend-mode: screen; clip-path: inset(0 0 55% 0); animation: glitch-rgb 2.4s steps(10) infinite; }
.fail-title::after  { color: var(--hud-cyan); transform: translate(1.5px, 0); mix-blend-mode: screen; clip-path: inset(55% 0 0 0); animation: glitch-rgb 2.4s steps(10) infinite reverse; }
@keyframes glitch-rgb {
  0%, 88%, 100% { transform: translate(0, 0); opacity: 0; }
  89% { transform: translate(-2px, 1px); opacity: 0.85; }
  92% { transform: translate(2px, -1px); opacity: 0.85; }
  95% { transform: translate(-1px, 0); opacity: 0.5; }
}

/* unknown avatar */
.unknown-avatar {
  width: 56px; height: 56px; flex-shrink: 0; position: relative;
  background:
    repeating-linear-gradient(45deg, rgba(255,138,61,0.06) 0, rgba(255,138,61,0.06) 4px, transparent 4px, transparent 8px),
    rgba(255,138,61,0.04);
  border: 1px dashed rgba(255,138,61,0.5);
  display: flex; align-items: center; justify-content: center;
}
.unknown-avatar .qmark {
  font-family: 'Rajdhani', monospace; font-size: 34px; font-weight: 700;
  color: var(--hud-orange);
  text-shadow: 0 0 12px rgba(255,138,61,0.7);
  animation: q-flicker 1.6s ease-in-out infinite;
}
@keyframes q-flicker {
  0%, 100% { opacity: 1; }
  47% { opacity: 1; } 48% { opacity: 0.2; } 49% { opacity: 1; }
  73% { opacity: 0.4; } 74% { opacity: 1; }
}
.ua-corner {
  position: absolute; width: 10px; height: 10px;
  border: 2px solid var(--hud-orange);
}
.ua-corner.tl { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.ua-corner.tr { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.ua-corner.bl { bottom: -1px; left: -1px; border-right: none; border-top: none; }
.ua-corner.br { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.ua-scan {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--hud-orange), transparent);
  box-shadow: 0 0 8px var(--hud-orange);
  animation: ua-scan-y 1.8s linear infinite;
}
@keyframes ua-scan-y {
  0% { top: 0; opacity: 0.2; }
  50% { top: calc(100% - 2px); opacity: 1; }
  100% { top: 0; opacity: 0.2; }
}

.glitch-id {
  font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 600;
  letter-spacing: 0.18em; color: var(--hud-text);
  text-shadow: 0 0 6px rgba(0,212,255,0.3);
}
.g-flicker {
  display: inline-block; color: var(--hud-orange);
  animation: g-flick 0.6s steps(3) infinite;
}
@keyframes g-flick {
  0%, 100% { opacity: 1; }
  33% { opacity: 0.3; }
  66% { opacity: 0.7; }
}

/* fail readout */
.fail-readout {
  border: 1px solid rgba(255,138,61,0.25);
  background: rgba(255,138,61,0.03);
  padding: 6px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--hud-text-dim);
  display: flex; flex-direction: column; gap: 3px;
}
.fr-line { display: flex; align-items: center; gap: 6px; }
.fr-tag {
  display: inline-block; padding: 0px 5px; font-size: 9px; font-weight: 700;
  letter-spacing: 0.1em;
}
.fr-tag.err  { background: rgba(255,77,109,0.18); color: var(--hud-red); border: 1px solid rgba(255,77,109,0.4); }
.fr-tag.warn { background: rgba(255,138,61,0.15); color: var(--hud-orange); border: 1px solid rgba(255,138,61,0.4); }

/* ─── Neural-network telemetry (scan state filler) ─── */
.nn-telemetry {
  border: 1px solid var(--hud-line-dim);
  background: rgba(0,212,255,0.03);
  padding: 8px 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.nn-row {
  display: grid;
  grid-template-columns: 38px 1fr 52px;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.nn-lbl { color: var(--hud-text-dim); letter-spacing: 0.15em; }
.nn-val { color: var(--hud-cyan); text-align: right; font-variant-numeric: tabular-nums; }
.nn-bar {
  height: 6px;
  background: rgba(0,212,255,0.06);
  border: 1px solid var(--hud-line-dim);
  position: relative; overflow: hidden;
}
.nn-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(0,212,255,0.3), var(--hud-cyan));
  box-shadow: 0 0 6px rgba(0,212,255,0.6);
  position: relative;
  animation: nn-flow 1.4s linear infinite;
}
.nn-fill.warn {
  background: linear-gradient(90deg, rgba(255,138,61,0.3), var(--hud-orange));
  box-shadow: 0 0 6px rgba(255,138,61,0.6);
}
@keyframes nn-flow {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}
.nn-fill::after {
  content: '';
  position: absolute; top: 0; right: 0; bottom: 0; width: 3px;
  background: rgba(255,255,255,0.6);
  animation: nn-tip 1.4s ease-in-out infinite;
}
@keyframes nn-tip {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* manual-cta — main dramatic button */
.manual-cta {
  position: relative;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: 1px solid var(--hud-cyan);
  color: var(--hud-text);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  margin-top: 4px;
  transition: transform 0.15s ease;
  flex-shrink: 0;
  min-height: 56px;
}
.manual-cta:hover { transform: translateY(-1px); }
.manual-cta:active { transform: translateY(0); }
.mcta-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(0,212,255,0.12) 0%, rgba(0,212,255,0.04) 50%, rgba(255,138,61,0.08) 100%);
  z-index: 0;
}
.mcta-bg::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0, transparent 6px, rgba(0,212,255,0.05) 6px, rgba(0,212,255,0.05) 7px);
}
.mcta-bg::after {
  content: ''; position: absolute; left: -50%; top: 0; bottom: 0; width: 50%;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,0.4), transparent);
  animation: mcta-sweep 2.4s linear infinite;
}
@keyframes mcta-sweep {
  0% { left: -50%; } 100% { left: 150%; }
}
.mcta-corner {
  position: absolute; width: 14px; height: 14px;
  border: 2px solid var(--hud-cyan); z-index: 2;
  box-shadow: 0 0 8px rgba(0,212,255,0.5);
}
.mcta-corner.tl { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.mcta-corner.tr { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.mcta-corner.bl { bottom: -1px; left: -1px; border-right: none; border-top: none; }
.mcta-corner.br { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.manual-cta:hover .mcta-corner { border-color: var(--hud-orange); box-shadow: 0 0 12px var(--hud-orange); }

.mcta-content {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
}
.mcta-icon {
  font-size: 20px; color: var(--hud-cyan);
  text-shadow: 0 0 12px var(--hud-cyan);
  animation: mcta-icon-pulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes mcta-icon-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.mcta-text { display: flex; flex-direction: column; flex: 1; min-width: 0; overflow: hidden; }
.mcta-main {
  font-size: 15px; font-weight: 600;
  letter-spacing: 0.08em; color: var(--hud-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mcta-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: 0.12em;
  color: var(--hud-cyan-soft); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mcta-arrow {
  font-family: 'Rajdhani', monospace; font-size: 16px; font-weight: 700;
  letter-spacing: 0.1em; color: var(--hud-orange);
  text-shadow: 0 0 8px rgba(255,138,61,0.6);
  animation: mcta-arrow-shift 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes mcta-arrow-shift {
  0%, 100% { transform: translateX(0); opacity: 0.7; }
  50% { transform: translateX(4px); opacity: 1; }
}
