/**
 * MIRACULOUS S7: THE BURROW // CHRYSALIS PARADOX
 * Master Stylesheet: Modern Glassmorphism, Neon Holographics & Accessible UI
 */

:root {
  --bg-deep: #070913;
  --bg-card: rgba(18, 22, 40, 0.78);
  --bg-card-hover: rgba(26, 32, 58, 0.88);
  --border-neon: rgba(0, 210, 255, 0.35);
  --border-subtle: rgba(255, 255, 255, 0.12);

  --accent-cyan: #00d2ff;
  --accent-violet: #9b51e0;
  --accent-magenta: #ff007f;
  --accent-gold: #ffbe0b;
  --accent-crimson: #ff3366;
  --accent-emerald: #06d6a0;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-bright: #ffffff;

  --font-display: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-neon-cyan: 0 0 25px rgba(0, 210, 255, 0.3);
  --shadow-neon-violet: 0 0 25px rgba(155, 81, 224, 0.35);
  --shadow-box: 0 16px 40px rgba(0, 0, 0, 0.6);
}

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

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-display);
  overflow-x: hidden;
  line-height: 1.5;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #090c1a;
}
::-webkit-scrollbar-thumb {
  background: #2a3458;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Root App Shell */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  background: radial-gradient(circle at 50% 15%, #181d3b 0%, #080a14 70%);
}

/* TOP HUD HEADER */
.hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.75rem;
  background: rgba(10, 14, 28, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.hud-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-sigil {
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--accent-crimson), var(--accent-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 51, 102, 0.6));
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.spoiler-shield-pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent-emerald);
  background: rgba(6, 214, 160, 0.15);
  border: 1px solid var(--accent-emerald);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 0 10px rgba(6, 214, 160, 0.2);
}

.brand-main {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-bright);
}

.brand-main .highlight {
  color: var(--accent-cyan);
  text-shadow: 0 0 12px var(--accent-cyan);
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

/* NAVIGATION TABS */
.hud-nav {
  display: flex;
  gap: 0.5rem;
  background: rgba(18, 24, 48, 0.6);
  padding: 0.3rem 0.4rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-tab-btn:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.08);
}

.nav-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.25), rgba(155, 81, 224, 0.25));
  color: var(--accent-cyan);
  border: 1px solid var(--border-neon);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

/* HUD CONTROLS */
.hud-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.audio-vis-box {
  display: flex;
  align-items: center;
  background: rgba(15, 20, 38, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.2rem 0.5rem;
}

.audio-vis-box canvas {
  width: 60px;
  height: 22px;
}

.btn-hud {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-bright);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-hud:hover {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--accent-cyan);
}

.btn-hud.active {
  background: rgba(0, 210, 255, 0.3);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.4);
}

.volume-input {
  width: 60px;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

/* MAIN VIEW CONTAINER */
.main-viewport {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}

.view-panel {
  display: none;
  width: 100%;
  flex: 1;
  position: relative;
}

.view-panel.active {
  display: flex;
  flex-direction: column;
}

/* VIEW 1: THE BURROW 3D */
#view-burrow {
  height: calc(100vh - 65px);
  position: relative;
  overflow: hidden;
}

.burrow-3d-canvas-wrapper {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.burrow-overlay-hud {
  position: absolute;
  top: 1.5rem;
  left: 2rem;
  z-index: 10;
  pointer-events: none;
  max-width: 480px;
}

.burrow-hud-badge {
  display: inline-block;
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
  letter-spacing: 0.08em;
}

.burrow-hud-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-bright);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.burrow-hud-instructions {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.burrow-quick-picker {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 0.5rem;
  background: rgba(12, 16, 32, 0.85);
  backdrop-filter: blur(12px);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
  max-width: 90vw;
}

.picker-shard-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.picker-shard-pill:hover {
  background: rgba(0, 210, 255, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* VIEW 2: CHRYSALIS CONSPIRACY BOARD */
#view-conspiracy {
  min-height: calc(100vh - 65px);
  position: relative;
  background: #110e1a;
  overflow: hidden;
}

.conspiracy-board-wrapper {
  width: 100%;
  min-height: calc(100vh - 65px);
  position: relative;
  background:
    radial-gradient(circle at 50% 50%, rgba(155, 81, 224, 0.12), transparent 70%),
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 30px 30px;
}

.yarn-svg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.yarn-thread {
  fill: none;
  stroke: #ff0055;
  stroke-width: 2.5;
  stroke-dasharray: 6 3;
  animation: yarnPulse 30s linear infinite;
  filter: drop-shadow(0 0 6px rgba(255, 0, 85, 0.7));
}

@keyframes yarnPulse {
  to { stroke-dashoffset: -300; }
}

.yarn-pin {
  fill: #ffd166;
  stroke: #ff0055;
  stroke-width: 2;
  filter: drop-shadow(0 0 4px rgba(255, 209, 102, 0.8));
}

.corkboard-grid {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 65px);
  z-index: 3;
}

.conspiracy-card {
  position: absolute;
  width: 260px;
  background: rgba(22, 18, 38, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid var(--accent-violet);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  box-shadow: var(--shadow-box);
  cursor: grab;
  user-select: none;
  transition: box-shadow 0.2s, transform 0.2s;
  z-index: 4;
}

.conspiracy-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(155, 81, 224, 0.4);
  z-index: 10;
}

.conspiracy-card.is-dragging {
  cursor: grabbing;
  transform: scale(1.03);
  box-shadow: 0 20px 45px rgba(255, 0, 85, 0.5);
  z-index: 20;
}

.pin-thumbtack {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: #ff0055;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.card-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.card-tag {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 0.4rem;
}

.card-snippet {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.evidence-polaroid {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.35);
  border-left: 3px solid var(--accent-gold);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  margin-bottom: 0.75rem;
}

.evidence-icon {
  font-size: 1rem;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-inspect-node {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-bright);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-inspect-node:hover {
  background: var(--accent-violet);
  border-color: var(--accent-violet);
}

.mask-box {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-magenta);
  margin-bottom: 0.75rem;
}

.mask-alias-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-magenta);
}

.mask-role {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 0.3rem;
}

.mask-motto {
  font-style: italic;
  font-size: 0.75rem;
  color: var(--accent-gold);
  margin-bottom: 0.35rem;
}

.mask-controls {
  display: flex;
  gap: 0.5rem;
}

.btn-mask-cycle {
  flex: 1;
  background: linear-gradient(135deg, rgba(155, 81, 224, 0.4), rgba(255, 0, 127, 0.4));
  border: 1px solid var(--accent-magenta);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-mask-cycle:hover {
  background: var(--accent-magenta);
}

/* VIEW 3: PARADOX SIMULATOR */
.simulator-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  width: 100%;
}

.sim-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.sim-status-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  letter-spacing: 0.08em;
  transition: all 0.3s;
}

.status-stable {
  background: rgba(6, 214, 160, 0.15);
  border: 1px solid var(--accent-emerald);
  color: var(--accent-emerald);
}

.status-warning {
  background: rgba(255, 190, 11, 0.15);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
}

.status-danger {
  background: rgba(242, 153, 74, 0.2);
  border: 1px solid #f2994a;
  color: #f2994a;
}

.status-threat {
  background: rgba(255, 51, 102, 0.25);
  border: 1px solid var(--accent-crimson);
  color: var(--accent-crimson);
  box-shadow: 0 0 15px rgba(255, 51, 102, 0.4);
}

.status-cataclysm {
  background: rgba(255, 0, 0, 0.35);
  border: 1px solid #ff0000;
  color: #ffffff;
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.8);
  animation: cataclysmAlarm 0.8s ease-in-out infinite alternate;
}

@keyframes cataclysmAlarm {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.sim-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text-bright);
}

.sim-desc {
  color: var(--text-muted);
  max-width: 680px;
  margin: 0.5rem auto 0;
  font-size: 0.92rem;
}

.sim-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 860px) {
  .sim-grid {
    grid-template-columns: 1fr;
  }
}

.sim-fieldset {
  border: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sim-legend {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.switch-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.4rem;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.switch-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-neon);
}

.sim-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-indicator {
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  position: relative;
  transition: all 0.25s;
  flex-shrink: 0;
}

.switch-indicator::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sim-checkbox:checked + .switch-indicator {
  background: var(--accent-crimson);
  box-shadow: 0 0 12px rgba(255, 51, 102, 0.5);
}

.sim-checkbox:checked + .switch-indicator::after {
  transform: translateX(20px);
}

.switch-card:has(.sim-checkbox:checked) {
  border-color: var(--accent-crimson);
  background: rgba(35, 15, 25, 0.7);
}

.switch-content {
  flex: 1;
}

.switch-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
}

.switch-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.switch-weight {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-crimson);
  background: rgba(255, 51, 102, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.sim-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-sim-reset, .btn-sim-overload {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-sim-reset {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-sim-reset:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn-sim-overload {
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.4), rgba(255, 0, 0, 0.5));
  border: 1px solid var(--accent-crimson);
  color: #ffffff;
}

.btn-sim-overload:hover {
  background: var(--accent-crimson);
  box-shadow: 0 0 18px rgba(255, 51, 102, 0.6);
}

/* GAUGE PANEL */
.sim-gauge-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.gauge-display-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-box);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}

.gauge-dial-container {
  position: relative;
  width: 200px;
  margin: 0 auto;
}

.gauge-svg {
  width: 200px;
  height: 120px;
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 14;
  stroke-linecap: round;
}

.gauge-meter {
  fill: none;
  stroke: var(--accent-cyan);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 251;
  stroke-dashoffset: 251;
  transition: stroke-dashoffset 0.5s ease-out, stroke 0.3s ease;
}

.gauge-display-box.stage-25 .gauge-meter { stroke: var(--accent-gold); }
.gauge-display-box.stage-50 .gauge-meter { stroke: #f2994a; }
.gauge-display-box.stage-75 .gauge-meter { stroke: var(--accent-crimson); }
.gauge-display-box.stage-100 .gauge-meter { stroke: #ff0033; filter: drop-shadow(0 0 10px #ff0033); }

.gauge-center-value {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gauge-percent {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-bright);
  font-family: var(--font-mono);
}

.gauge-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

.threat-level-badge {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-bright);
}

.sim-narrativeLog {
  background: rgba(14, 18, 32, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}

.log-title {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.log-entry {
  font-size: 0.85rem;
  line-height: 1.5;
  transition: color 0.3s;
}

.log-stable { color: #81e6d9; }
.log-warn { color: #fbd38d; }
.log-danger { color: #f6ad55; }
.log-threat { color: #feb2b2; }
.log-cataclysm { color: #ff6b81; font-weight: 700; text-shadow: 0 0 10px rgba(255, 0, 0, 0.5); }

/* CAT BLANC OVERLOAD FULL-SCREEN EFFECT */
body.cat-blanc-overload {
  animation: whiteOverloadGlitch 1.5s infinite alternate;
}

body.cat-blanc-overload .app-shell {
  filter: contrast(1.2) brightness(1.1);
}

@keyframes whiteOverloadGlitch {
  0% { box-shadow: inset 0 0 80px rgba(255, 255, 255, 0.3); }
  50% { box-shadow: inset 0 0 120px rgba(0, 210, 255, 0.5); }
  100% { box-shadow: inset 0 0 160px rgba(255, 0, 85, 0.6); }
}

/* VIEW 4: UNIFICATION FORGE */
.forge-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  width: 100%;
}

.forge-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.forge-badge {
  display: inline-block;
  background: rgba(155, 81, 224, 0.15);
  border: 1px solid var(--accent-violet);
  color: var(--accent-violet);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.forge-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text-bright);
}

.forge-desc {
  color: var(--text-muted);
  max-width: 660px;
  margin: 0.5rem auto 0;
  font-size: 0.92rem;
}

.forge-interface {
  display: grid;
  grid-template-columns: 1fr 180px 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

@media (max-width: 860px) {
  .forge-interface {
    grid-template-columns: 1fr;
  }
}

.col-title {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.jewel-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.jewel-btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.jewel-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-neon);
}

.jewel-btn.active {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.25);
}

.jewel-icon {
  font-size: 1.5rem;
}

.jewel-meta {
  display: flex;
  flex-direction: column;
}

.jewel-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-bright);
}

.jewel-kwami {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.forge-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.fusion-reactor {
  width: 100px;
  height: 100px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reactor-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px dashed rgba(0, 210, 255, 0.4);
}

.reactor-ring.outer {
  width: 90px;
  height: 90px;
  animation: spinClockwise 12s linear infinite;
}

.reactor-ring.inner {
  width: 65px;
  height: 65px;
  border-color: rgba(155, 81, 224, 0.5);
  animation: spinCounter 8s linear infinite;
}

@keyframes spinClockwise {
  to { transform: rotate(360deg); }
}

@keyframes spinCounter {
  to { transform: rotate(-360deg); }
}

.reactor-core-symbol {
  font-size: 1.8rem;
  z-index: 2;
  filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.8));
}

.btn-synthesize {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  border: none;
  color: #000000;
  font-weight: 800;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
}

.btn-synthesize:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.7);
}

.fusion-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-box);
}

.fusion-header-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.fusion-card-body {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  align-items: flex-start;
}

@media (max-width: 768px) {
  .fusion-card-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.fusion-avatar-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.fusion-avatar-glyph {
  font-size: 3.5rem;
  background: rgba(255, 255, 255, 0.06);
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-neon);
}

.fusion-kwami-pair {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-weight: 700;
}

.fusion-info-content {
  flex: 1;
}

.fusion-codename {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-bright);
}

.fusion-subheading {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 1.2rem;
}

.fusion-spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .fusion-spec-grid {
    grid-template-columns: 1fr;
  }
}

.spec-cell {
  background: rgba(0, 0, 0, 0.25);
  padding: 1rem;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-cyan);
}

.spec-label {
  display: block;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.spec-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-bright);
}

.spec-value.highlight {
  color: var(--accent-gold);
}

.spec-desc {
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-top: 0.4rem;
  line-height: 1.4;
}

.fusion-countermeasure {
  background: rgba(255, 51, 102, 0.1);
  border: 1px solid rgba(255, 51, 102, 0.3);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
}

.counter-label {
  display: block;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--accent-crimson);
  margin-bottom: 0.2rem;
}

.counter-text {
  color: #e2e8f0;
}

/* VIEW 5: THEORY VAULT & POLLS */
.theory-vault-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  width: 100%;
}

.vault-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.vault-badge {
  display: inline-block;
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.vault-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text-bright);
}

.vault-desc {
  color: var(--text-muted);
  max-width: 660px;
  margin: 0.5rem auto 0;
  font-size: 0.92rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 1.2rem;
}

.section-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: -0.8rem;
  margin-bottom: 1.2rem;
}

/* POLLS GRID */
.polls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.poll-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-box);
}

.poll-question {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.poll-option-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.poll-option-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-neon);
}

.poll-option-btn.user-selected {
  border-color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.12);
}

.option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.option-pct {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-cyan);
  font-weight: 800;
}

.option-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill.a {
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
}

.progress-fill.b {
  background: linear-gradient(90deg, var(--accent-magenta), var(--accent-crimson));
}

.option-votes-count {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* PROPHECY CTA */
.prophecy-cta-card {
  background: linear-gradient(135deg, rgba(20, 28, 60, 0.9), rgba(40, 20, 65, 0.9));
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 0 35px rgba(0, 210, 255, 0.2);
}

@media (max-width: 768px) {
  .prophecy-cta-card {
    flex-direction: column;
    text-align: center;
  }
}

.cta-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 0.08em;
}

.cta-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-top: 0.25rem;
}

.cta-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.btn-generate-prophecy {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  border: none;
  color: #000000;
  font-weight: 800;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
}

.btn-generate-prophecy:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(0, 210, 255, 0.7);
}

/* THEORIES WALL */
.wall-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.btn-submit-theory-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-bright);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-submit-theory-toggle:hover {
  background: var(--accent-violet);
  border-color: var(--accent-violet);
}

.theory-submit-panel {
  background: var(--bg-card);
  border: 1px solid var(--accent-violet);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-box);
  transition: all 0.3s ease;
}

.theory-submit-panel.hidden {
  display: none;
}

.form-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 1.2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(10, 14, 28, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  color: var(--text-bright);
  font-family: var(--font-display);
  font-size: 0.88rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.form-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.btn-publish-theory {
  background: var(--accent-cyan);
  color: #000000;
  font-weight: 800;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
}

.btn-cancel-theory {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: var(--font-mono);
  padding: 0.65rem 1.2rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.theories-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.theory-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-box);
  transition: transform 0.2s, border-color 0.2s;
}

.theory-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-neon);
}

.theory-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  margin-bottom: 0.5rem;
}

.theory-tag {
  color: var(--accent-violet);
  font-weight: 700;
}

.theory-author {
  color: var(--text-muted);
}

.theory-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.theory-card-text {
  font-size: 0.86rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 1.2rem;
}

.theory-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.75rem;
}

.btn-upvote {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-upvote:hover {
  background: rgba(0, 210, 255, 0.2);
  border-color: var(--accent-cyan);
}

.theory-status {
  font-size: 0.68rem;
  color: var(--accent-emerald);
  font-family: var(--font-mono);
  font-weight: 700;
}

/* BUNNYX QUANTUM DECRYPTION LENS */
.bunnyx-quantum-lens {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 220px;
  pointer-events: none;
  z-index: 9999;
  display: none;
  touch-action: none;
}

.bunnyx-quantum-lens.active {
  display: block;
}

.lens-rim {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--accent-cyan);
  box-shadow:
    0 0 25px rgba(0, 210, 255, 0.6),
    inset 0 0 35px rgba(0, 210, 255, 0.35);
  background: radial-gradient(circle, rgba(0, 210, 255, 0.08) 0%, rgba(155, 81, 224, 0.15) 100%);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(0.5px) contrast(1.3);
}

.lens-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(0, 210, 255, 0.8);
  border-radius: 50%;
}

.lens-crosshair::before,
.lens-crosshair::after {
  content: '';
  position: absolute;
  background: rgba(0, 210, 255, 0.8);
}

.lens-crosshair::before {
  top: 50%;
  left: -8px;
  width: 32px;
  height: 1px;
  transform: translateY(-50%);
}

.lens-crosshair::after {
  top: -8px;
  left: 50%;
  width: 1px;
  height: 32px;
  transform: translateX(-50%);
}

.lens-hud-coords {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--accent-cyan);
  background: rgba(0, 0, 0, 0.7);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.lens-mode-toggle {
  position: absolute;
  top: 10px;
  right: 18px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--accent-cyan);
  color: #ffffff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
}

/* REDACTED SECRET & UV INK EFFECT */
.redacted-secret {
  background: #111;
  color: transparent;
  user-select: none;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.redacted-secret.decrypted {
  background: rgba(0, 255, 200, 0.18);
  color: #00ffc4;
  text-shadow: 0 0 10px #00ffc4;
  border: 1px solid #00ffc4;
  content: attr(data-secret);
}

.redacted-secret.decrypted::before {
  content: attr(data-secret);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 25, 30, 0.95);
  color: #00ffc4;
  padding: 0.2rem 0.5rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  white-space: normal;
  line-height: 1.4;
}

/* NATIVE DIALOGS (MODERN WEB GUIDANCE COMPLIANT) */
/* MANDATORY: Both rules stop scroll chaining behind dialog */
dialog:modal {
  overscroll-behavior: contain;
}
dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(4, 6, 15, 0.85);
  backdrop-filter: blur(12px);
}

dialog[open] {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90vw;
  max-width: 720px;
  max-height: 85vh;
  background: rgba(18, 24, 48, 0.96);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), var(--shadow-neon-cyan);
  color: var(--text-main);
  overflow-y: auto;
  z-index: 1000;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-bright);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: var(--accent-crimson);
  border-color: var(--accent-crimson);
}

.modal-shard-header {
  margin-bottom: 1.5rem;
}

.modal-tag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 0.5rem;
}

.modal-tag.canon { background: var(--accent-violet); color: #fff; }
.modal-tag.spoiler { background: var(--accent-crimson); color: #fff; }
.modal-tag.leak { background: #f2994a; color: #fff; }
.modal-tag.theory { background: var(--accent-emerald); color: #000; }
.modal-tag.threat { background: #ff0033; color: #fff; }
.modal-tag.deep { background: var(--accent-cyan); color: #000; }

.modal-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-bright);
}

.modal-subtitle {
  font-size: 0.95rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  margin-top: 0.2rem;
}

.modal-shard-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal-heading {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.modal-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #e2e8f0;
}

.modal-leaks-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.modal-leaks-list strong {
  color: var(--accent-gold);
}

.classified-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px dashed var(--accent-emerald);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}

.classified-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.classified-stamp {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-emerald);
  background: rgba(6, 214, 160, 0.15);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.classified-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.modal-footer-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.2rem;
}

.stat-badge {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-bright);
  font-family: var(--font-mono);
}

.stat-lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* PROPHECY BADGE MODAL CARD */
.prophecy-badge-card {
  background: radial-gradient(circle at 50% 20%, rgba(30, 45, 90, 0.95), rgba(12, 16, 32, 0.98));
  border: 2px solid var(--accent-cyan);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 210, 255, 0.35);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.badge-top-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
}

.badge-avatar-row {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.badge-avatar-ring {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  background: rgba(0, 210, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.badge-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-bright);
}

.badge-role {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.badge-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: var(--radius-md);
  text-align: center;
}

.metric-num {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent-gold);
  font-family: var(--font-mono);
}

.metric-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.badge-summary {
  font-size: 0.92rem;
  line-height: 1.5;
  color: #e2e8f0;
  font-style: italic;
  border-left: 3px solid var(--accent-cyan);
  padding-left: 1rem;
}

.badge-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.btn-copy-badge {
  background: var(--accent-cyan);
  color: #000000;
  border: none;
  font-weight: 800;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-badge:hover {
  background: #ffffff;
}

/* FULL-SCREEN TRANSFORMATION SPLASH */
.transformation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

.transformation-overlay.active {
  opacity: 0.95;
}

.transform-splash-content {
  text-align: center;
  color: #ffffff;
  animation: zoomFanfare 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoomFanfare {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.transform-phrase {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  text-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.05em;
}

.transform-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 0.5rem;
  text-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
}

.transform-glyph {
  font-size: 2.5rem;
  margin-top: 1rem;
}

/* REDUCED MOTION PREFERENCES (MODERN WEB GUIDANCE) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .yarn-thread {
    animation: none;
  }
  .reactor-ring {
    animation: none;
  }
}

body.reduced-motion-active *,
body.reduced-motion-active *::before,
body.reduced-motion-active *::after {
  animation: none !important;
  transition: none !important;
}
