@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Share+Tech+Mono&display=swap');

:root {
  --bg-base: #020202;
  --bg-panel: #111111;
  --bg-panel-mid: #1a1a1a;
  --red: #cc0000;
  --red-dark: #7a0000;
  --text-main: #ffffff;
  --text-muted: #888888;
  --terminal-green: #00ff88;
  --header-total: 104px;
  --panel-glow: 0 0 40px rgba(204, 0, 0, 0.36);
  --cursor: crosshair;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'Share Tech Mono', ui-monospace, monospace;
  background: var(--bg-base);
  color: var(--text-main);
  cursor: var(--cursor);
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 17px 17px;
  opacity: 0.24;
  pointer-events: none;
  z-index: 1;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, transparent 54%, rgba(0, 0, 0, 0.54) 100%);
  pointer-events: none;
  z-index: 2;
}

.ticker-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 38px;
  background: var(--red);
  color: #050505;
  border-bottom: 2px solid #e24c4c;
  z-index: 30;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ticker-track {
  white-space: nowrap;
  text-transform: uppercase;
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 0.88rem;
  animation: marquee-scroll 18s linear infinite;
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.app-header {
  position: fixed;
  top: 38px;
  left: 0;
  right: 0;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.15rem;
  background: rgba(0, 0, 0, 0.78);
  border-bottom: 1px solid var(--red-dark);
  backdrop-filter: blur(8px);
  z-index: 28;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-skull {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid var(--red);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  background: radial-gradient(circle at 35% 30%, #ff5a5a, #b30000 68%, #4a0000 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), var(--panel-glow);
  animation: skull-pulse 1.8s ease-in-out infinite;
}

@keyframes skull-pulse {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.06);
    filter: brightness(1.16);
  }
}

.header-title {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.9rem, 4.2vw, 2.8rem);
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  text-shadow: 0 0 15px rgba(204, 0, 0, 0.6);
}

.connection-pill {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.65);
}

.version-chip {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 190, 100, 0.6);
  color: #ffbe64;
  background: rgba(0, 0, 0, 0.72);
}

.connection-pill.tone-online {
  color: #9fffd0;
  border-color: rgba(0, 255, 136, 0.45);
}

.connection-pill.tone-offline {
  color: #ff8d8d;
  border-color: rgba(204, 0, 0, 0.64);
}

.connection-pill.tone-booting {
  color: #ffe2a6;
  border-color: rgba(255, 180, 60, 0.45);
}

.app-shell {
  position: relative;
  z-index: 14;
  min-height: 100vh;
  padding: calc(var(--header-total) + 1rem) 1rem 2rem;
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 360px minmax(520px, 1fr);
  grid-template-rows: auto auto auto;
  grid-template-areas:
    'left center'
    'terminal center'
    'activity activity';
  gap: 1rem;
}

.panel {
  background: linear-gradient(160deg, rgba(17, 17, 17, 0.93), rgba(26, 26, 26, 0.87));
  border: 1px solid rgba(122, 0, 0, 0.85);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 14px 36px rgba(0, 0, 0, 0.55);
  position: relative;
  overflow: hidden;
}

.panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 5px
  );
  opacity: 0.09;
  pointer-events: none;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.95rem 1rem 0.8rem;
}

.panel-head h2 {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.98rem;
}

.chip {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.28rem 0.5rem;
  border: 1px solid rgba(204, 0, 0, 0.64);
  color: #ff9e9e;
  background: rgba(0, 0, 0, 0.62);
}

.leaderboard-panel {
  grid-area: left;
}

.leaderboard-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  padding: 0 0.75rem 0.62rem;
}

.leaderboard-tab {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.6);
  color: #d3d3d3;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.42rem 0.5rem;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.leaderboard-tab:hover {
  border-color: rgba(204, 0, 0, 0.68);
  color: #fff;
  transform: translateY(-1px);
}

.leaderboard-tab.is-active {
  border-color: rgba(204, 0, 0, 0.92);
  color: #fff;
  background: linear-gradient(145deg, rgba(204, 0, 0, 0.34), rgba(27, 0, 0, 0.84));
  box-shadow: 0 0 16px rgba(204, 0, 0, 0.35);
}

.leaderboard-rows {
  padding: 0 0.7rem 0.65rem;
  max-height: 492px;
  overflow-y: auto;
  display: grid;
  gap: 0.44rem;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 0.54rem;
  padding: 0.5rem 0.56rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(33, 33, 33, 0.74);
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.leaderboard-row:nth-child(even) {
  background: rgba(26, 26, 26, 0.9);
}

.leaderboard-row:hover {
  transform: translateY(-1px);
  border-color: rgba(204, 0, 0, 0.55);
  box-shadow: 0 0 20px rgba(204, 0, 0, 0.35);
}

.leaderboard-row.is-local {
  background: rgba(126, 0, 0, 0.34);
  border-color: rgba(204, 0, 0, 0.88);
  box-shadow: 0 0 24px rgba(204, 0, 0, 0.5);
}

.leaderboard-rank {
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
}

.leaderboard-identity {
  display: flex;
  align-items: center;
  gap: 0.52rem;
  min-width: 0;
}

.leaderboard-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(130deg, #2f3138, #191b1f);
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
}

.leaderboard-meta {
  min-width: 0;
}

.leaderboard-name {
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  font-size: 0.8rem;
}

.leaderboard-sub {
  color: var(--text-muted);
  font-size: 0.68rem;
}

.leaderboard-score {
  text-align: right;
  font-family: 'Orbitron', sans-serif;
  color: #ff5d5d;
  font-size: 0.84rem;
}

.leaderboard-score.metric-ads-closed {
  color: #ffbe64;
}

.sync-label {
  padding: 0.28rem 1rem 0.86rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.63rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.terminal-panel {
  grid-area: terminal;
}

.activity-panel {
  grid-area: activity;
  padding-bottom: 0.7rem;
}

.activity-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0 0.9rem 0.5rem;
}

.activity-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  min-width: 230px;
}

.activity-window-group {
  grid-template-columns: repeat(6, minmax(52px, 1fr));
  min-width: min(100%, 380px);
  width: 100%;
}

.activity-toggle {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.6);
  color: #d2d2d2;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 0.5rem;
  cursor: pointer;
}

.activity-toggle.is-active {
  border-color: rgba(204, 0, 0, 0.92);
  color: #fff;
  background: linear-gradient(145deg, rgba(204, 0, 0, 0.34), rgba(27, 0, 0, 0.84));
  box-shadow: 0 0 15px rgba(204, 0, 0, 0.28);
}

.activity-chart-status {
  margin: 0 0.9rem 0.45rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  color: #d1d1d1;
}

.activity-chart-shell {
  margin: 0 0.9rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(204, 0, 0, 0.45);
  background: rgba(0, 0, 0, 0.55);
  padding: 0.4rem;
}

.activity-chart-svg {
  width: 100%;
  height: 220px;
  display: block;
}

.activity-hourly-shell {
  margin: 0 0.9rem 0.2rem;
}

.activity-hourly-shell h3 {
  margin: 0 0 0.4rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.activity-hourly-table-wrap {
  max-height: 220px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.44);
}

.activity-hourly-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.69rem;
}

.activity-hourly-table th,
.activity-hourly-table td {
  text-align: left;
  padding: 0.4rem 0.48rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.activity-hourly-table th {
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.05em;
  color: #f0f0f0;
}

.terminal-body {
  position: relative;
  margin: 0 0.8rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(204, 0, 0, 0.35);
  background: rgba(0, 0, 0, 0.72);
  min-height: 215px;
  overflow: hidden;
}

.terminal-body::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.14;
  pointer-events: none;
}

.terminal-lines {
  position: relative;
  z-index: 1;
  max-height: 215px;
  overflow-y: auto;
  padding: 0.7rem 0.76rem 0.9rem;
  color: #e0e0e0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.terminal-line {
  margin-bottom: 0.3rem;
  word-break: break-word;
}

.terminal-stamp {
  color: var(--terminal-green);
}

.terminal-line.tone-warn .terminal-stamp {
  color: #ff7070;
}

.terminal-static {
  filter: contrast(1.45);
}

.terminal-sync-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(204, 0, 0, 0.2);
}

.terminal-sync-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(204, 0, 0, 0.25), #cc0000, rgba(204, 0, 0, 0.2));
}

.terminal-sync-bar.active {
  animation: sync-bar 1s linear;
}

@keyframes sync-bar {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

.core-panel {
  grid-area: center;
  border: 2px solid rgba(204, 0, 0, 0.85);
  box-shadow: var(--panel-glow), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 1.5rem 1rem 1.7rem;
}

.mainframe-tag {
  display: inline-block;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.67rem;
  padding: 0.38rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(204, 0, 0, 0.85);
  background: rgba(0, 0, 0, 0.72);
  box-shadow: 0 0 16px rgba(204, 0, 0, 0.45);
}

.global-label {
  margin-top: 0.88rem;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  color: #c7c7c7;
}

.global-count-value {
  text-align: center;
  margin: 0.45rem 0 0.8rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(2rem, 5.8vw, 4.15rem);
  text-shadow: 0 0 20px rgba(204, 0, 0, 0.58), 0 0 5px rgba(0, 0, 0, 0.9);
}

.global-ads-label {
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.64rem;
  color: #deb674;
}

.global-ads-value {
  text-align: center;
  margin: 0.35rem 0 0.8rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(1.2rem, 3vw, 1.9rem);
  color: #ffbe64;
  text-shadow: 0 0 14px rgba(255, 190, 100, 0.35);
}

.core-button-shell {
  position: relative;
  margin: 0 auto;
  width: min(620px, 86vw);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.core-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(204, 0, 0, 0.32);
  filter: blur(1px);
  animation: core-ring-pulse 2.3s ease-in-out infinite;
}

.ring-one {
  inset: 8%;
}

.ring-two {
  inset: 2%;
  animation-delay: 0.45s;
}

.ring-three {
  inset: -4%;
  animation-delay: 0.9s;
}

@keyframes core-ring-pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.12;
  }
  50% {
    opacity: 0.85;
  }
  100% {
    transform: scale(1.08);
    opacity: 0;
  }
}

.core-deploy-btn {
  width: min(340px, 72vw);
  height: min(340px, 72vw);
  min-width: 220px;
  min-height: 220px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.16);
  background: radial-gradient(circle at 30% 28%, #ff4b4b, #cc0000 58%, #560000 100%);
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 88px rgba(204, 0, 0, 0.62), 0 0 20px rgba(0, 0, 0, 0.7);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.core-deploy-btn:hover:not(.is-cooldown) {
  transform: translateY(-2px) scale(1.01);
}

.core-deploy-btn:active:not(.is-cooldown) {
  transform: scale(0.98);
}

.core-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.16),
    rgba(255, 255, 255, 0.16) 1px,
    transparent 1px,
    transparent 6px
  );
  mix-blend-mode: soft-light;
  opacity: 0.2;
  pointer-events: none;
}

.core-deploy-label {
  font-size: clamp(1.1rem, 2.6vw, 2rem);
  text-shadow: 0 0 16px rgba(0, 0, 0, 0.85);
}

.core-cooldown-value,
.core-rearming {
  display: none;
}

.core-cooldown-value {
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-family: 'Share Tech Mono', monospace;
}

.core-rearming {
  width: 78%;
}

.core-rearming span {
  display: block;
  text-align: center;
  margin-bottom: 0.45rem;
  letter-spacing: 0.1em;
  font-size: 0.74rem;
}

.core-rearming-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.core-rearming-progress {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.22),
    rgba(255, 255, 255, 0.22) 10px,
    rgba(204, 0, 0, 0.75) 10px,
    rgba(204, 0, 0, 0.75) 20px
  );
}

.core-deploy-btn.is-cooldown {
  background: linear-gradient(145deg, #16181c, #08090a);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 36px rgba(0, 0, 0, 0.85), 0 0 18px rgba(0, 0, 0, 0.75);
}

.registry-form {
  display: grid;
  gap: 0.6rem;
  padding: 0 0.95rem;
}

.registry-email-wrap {
  display: grid;
  gap: 0.4rem;
}

.registry-email-wrap[hidden] {
  display: none !important;
}

.registry-form input {
  border-radius: 10px;
  border: 1px solid rgba(204, 0, 0, 0.72);
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  padding: 0.74rem 0.7rem;
  text-transform: uppercase;
  outline: none;
}

.registry-form input:focus {
  border-color: rgba(255, 88, 88, 0.9);
  box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.2);
}

.registry-form button {
  border: none;
  border-radius: 10px;
  background: linear-gradient(95deg, #920000, #cc0000, #ff3939);
  color: white;
  padding: 0.8rem;
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 26px rgba(204, 0, 0, 0.45);
}

.registry-helper {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #b5b5b5;
}

.registry-actions {
  display: grid;
  gap: 0.5rem;
}

#account-auth-btn {
  background: linear-gradient(95deg, #920000, #cc0000, #ff3939);
}

.registry-error {
  margin: 0;
  color: #ff6f6f;
  font-size: 0.77rem;
  min-height: 1em;
  display: none;
}

.registry-profile {
  display: none;
  margin: 0 0.95rem;
  padding: 0.8rem;
  border-radius: 11px;
  border: 1px solid rgba(204, 0, 0, 0.8);
  background: linear-gradient(150deg, rgba(204, 0, 0, 0.2), rgba(0, 0, 0, 0.86));
}

.status-row {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.66rem;
  color: #f4c1c1;
  letter-spacing: 0.09em;
}

.profile-codename {
  margin: 0.42rem 0 0.5rem;
  font-size: 1.45rem;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
}

.profile-email {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  color: #d0d0d0;
  word-break: break-word;
}

.profile-emoji-shell {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.4);
  padding: 0.55rem 0.62rem;
  margin-bottom: 0.66rem;
}

.profile-emoji-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 0.45rem;
}

.profile-emoji-display {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  font-size: 1rem;
}

.profile-emoji-input {
  border-radius: 8px;
  border: 1px solid rgba(204, 0, 0, 0.7);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 0.48rem 0.54rem;
  text-transform: none;
}

.profile-emoji-save-btn {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(204, 0, 0, 0.25);
  color: #fff;
  padding: 0.5rem 0.62rem;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.profile-emoji-save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.profile-emoji-status {
  margin: 0.42rem 0 0;
  min-height: 1.1em;
  font-size: 0.66rem;
  color: #ff9f9f;
}

.profile-emoji-status.tone-pending {
  color: #ffe2a6;
}

.profile-emoji-status.tone-success {
  color: #9fffd0;
}

.profile-emoji-grid {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.3rem;
}

.profile-emoji-option {
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  padding: 0.32rem 0.15rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.profile-emoji-option:hover {
  border-color: rgba(204, 0, 0, 0.88);
  box-shadow: 0 0 12px rgba(204, 0, 0, 0.3);
}

.profile-emoji-option.is-selected {
  border-color: rgba(255, 190, 100, 0.95);
  background: rgba(255, 190, 100, 0.15);
  box-shadow: 0 0 12px rgba(255, 190, 100, 0.38);
}

.profile-emoji-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.48rem;
}

.profile-stat-block {
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.4);
  padding: 0.56rem 0.58rem;
}

.profile-count-label {
  margin: 0;
  font-size: 0.68rem;
  color: #c2c2c2;
  text-transform: uppercase;
}

.profile-count-value {
  margin: 0.34rem 0 0;
  font-size: 1.9rem;
  font-family: 'Share Tech Mono', monospace;
  color: #ff5252;
}

.profile-count-value.ads-closed {
  color: #ffbe64;
}

.burn-btn {
  width: 100%;
  padding: 0.65rem;
  border-radius: 9px;
  border: 1px solid rgba(204, 0, 0, 0.9);
  background: rgba(0, 0, 0, 0.64);
  color: #ffd1d1;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.signout-btn {
  width: 100%;
  padding: 0.65rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(22, 22, 22, 0.8);
  color: #f3f3f3;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.directive-box {
  margin: 0.9rem 0.95rem 1rem;
  border-radius: 10px;
  border: 1px dashed rgba(204, 0, 0, 0.55);
  background: rgba(0, 0, 0, 0.55);
  color: #d4d4d4;
  font-style: italic;
  padding: 0.66rem;
}

.static-rail {
  position: fixed;
  top: calc(var(--header-total) + 1rem);
  bottom: 0.8rem;
  width: 122px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.2rem;
}

.static-rail.left {
  left: 0.32rem;
}

.static-rail.right {
  right: 0.32rem;
}

.rail-ad {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, #15171a, #24262d);
  color: #d0d0d0;
  padding: 0.55rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  filter: grayscale(1);
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.rail-ad:hover {
  filter: grayscale(0);
  border-color: rgba(204, 0, 0, 0.88);
  transform: scale(1.02);
  box-shadow: 0 0 18px rgba(204, 0, 0, 0.45);
}

.chaos-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
}

.chaos-ad {
  position: absolute;
  width: clamp(180px, 20vw, 250px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(145deg, rgba(18, 18, 20, 0.96), rgba(36, 36, 42, 0.96));
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.62);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.7rem 0.75rem 0.72rem;
  pointer-events: auto;
  animation: ad-drift var(--motion-duration, 11s) ease-in-out infinite alternate;
  transform: translate3d(0, 0, 0);
}

.chaos-ad.motion-speed-slow {
  animation-timing-function: ease-in-out;
}

.chaos-ad.motion-speed-med {
  animation-timing-function: cubic-bezier(0.37, 0.01, 0.2, 1);
}

.chaos-ad.motion-speed-fast {
  animation-timing-function: cubic-bezier(0.56, 0.02, 0.42, 1);
}

.chaos-ad.motion-speed-drift {
  animation-timing-function: cubic-bezier(0.28, 0.1, 0.2, 1);
}

.chaos-ad.motion-sway-low {
  --sway-amplitude: 8px;
}

.chaos-ad.motion-sway-mid {
  --sway-amplitude: 15px;
}

.chaos-ad.motion-sway-high {
  --sway-amplitude: 22px;
}

.chaos-ad::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.08) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.08;
  pointer-events: none;
}

.chaos-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.79rem;
  margin-right: 1.2rem;
  margin-bottom: 0.35rem;
}

.chaos-body {
  font-size: 0.72rem;
  color: #dddddd;
  margin-bottom: 0.62rem;
}

.chaos-cta {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  padding: 0.18rem 0.5rem;
  font-size: 0.62rem;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.08em;
}

.chaos-close-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(204, 0, 0, 0.74);
  background: rgba(0, 0, 0, 0.7);
  color: #ff7979;
  cursor: pointer;
  font-size: 0.72rem;
  display: grid;
  place-items: center;
  z-index: 80;
}

.chaos-ad.tier-standard {
  z-index: 40;
}

.chaos-ad.tier-shiny {
  z-index: 45;
  background: linear-gradient(135deg, #4f2d00, #ffb43c 55%, #7d3900);
  border-color: #ffd48c;
  box-shadow: 0 0 26px rgba(255, 188, 80, 0.65), 0 20px 35px rgba(0, 0, 0, 0.72);
}

.chaos-ad.tier-shiny::after {
  content: '✨ SHINY ✨';
  position: absolute;
  top: 7px;
  right: 32px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.56rem;
  padding: 0.18rem 0.3rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.45);
  background: rgba(0, 0, 0, 0.48);
}

.chaos-ad.tier-glitch {
  z-index: 50;
  animation-duration: 7.5s;
}

.chaos-ad.tier-glitch .chaos-close-btn:hover {
  transform: translateX(2px) translateY(-2px);
}

.chaos-ad.is-glitching {
  filter: contrast(1.5) saturate(1.3);
}

.chaos-ad.rgb-split {
  text-shadow: -1px 0 #00ffff, 1px 0 #ff00ff;
}

.chaos-ad.micro-jitter {
  transform: translate3d(var(--jitter-x), var(--jitter-y), 0) rotate(var(--jitter-rotate));
}

.chaos-ad.is-blocking {
  border-color: rgba(255, 0, 0, 0.95);
  box-shadow: 0 0 26px rgba(255, 0, 0, 0.58), 0 20px 30px rgba(0, 0, 0, 0.7);
}

.chaos-ad.swarm-mini {
  width: 142px;
  padding: 0.5rem;
  font-size: 0.66rem;
  animation: swarm-spin 5.5s linear infinite;
  z-index: 50;
}

.chaos-ad.swarm-mini .chaos-close-btn {
  width: 32px;
  height: 32px;
  top: 4px;
  right: 4px;
  font-size: 0.9rem;
}

.chaos-ad.swarm-mini .chaos-body,
.chaos-ad.swarm-mini .chaos-cta {
  display: none;
}

@keyframes swarm-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes ad-drift {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  20% {
    transform: translate3d(
        calc(var(--motion-dx) * 0.28 + var(--sway-amplitude, 9px)),
        calc(var(--motion-dy) * 0.25),
        0
      )
      rotate(calc(var(--motion-rotate) * 0.28));
  }
  44% {
    transform: translate3d(
        calc(var(--motion-dx) * 0.55 - var(--sway-amplitude, 9px)),
        calc(var(--motion-dy) * 0.52),
        0
      )
      rotate(calc(var(--motion-rotate) * 0.5));
  }
  74% {
    transform: translate3d(
        calc(var(--motion-dx) + var(--sway-amplitude, 9px)),
        var(--motion-dy),
        0
      )
      rotate(var(--motion-rotate));
  }
  100% {
    transform: translate3d(
        calc(var(--motion-dx) * 0.6 - var(--sway-amplitude, 9px)),
        calc(var(--motion-dy) * -0.45),
        0
      )
      rotate(calc(var(--motion-rotate) * -0.8));
  }
}

.aura-bloom {
  animation: ad-drift var(--motion-duration, 11s) ease-in-out infinite alternate, aura-breathe 3s ease-in-out infinite;
}

@keyframes aura-breathe {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.08);
  }
}

.mega-overlay-root {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}

.chaos-mega-overlay {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.78);
  display: grid;
  place-items: center;
}

.chaos-mega-shell {
  width: min(80vw, 980px);
  min-height: 56vh;
  border-radius: 16px;
  border: 2px solid rgba(204, 0, 0, 0.95);
  background: linear-gradient(170deg, rgba(20, 20, 23, 0.95), rgba(6, 6, 8, 0.95));
  box-shadow: 0 0 35px rgba(204, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  animation: mega-tear 420ms linear infinite;
}

.chaos-mega-header {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #ff8f8f;
  margin-bottom: 0.95rem;
}

.chaos-mega-title {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 4.4vw, 3.3rem);
  letter-spacing: 0.01em;
}

.chaos-mega-body {
  margin: 0.85rem 0 1rem;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  max-width: 80%;
  color: #e4e4e4;
}

.chaos-mega-progress {
  width: 100%;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(204, 0, 0, 0.8);
  overflow: hidden;
}

.chaos-mega-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    rgba(204, 0, 0, 0.95),
    rgba(204, 0, 0, 0.95) 12px,
    rgba(255, 255, 255, 0.35) 12px,
    rgba(255, 255, 255, 0.35) 20px
  );
  animation: mega-progress 2.2s linear infinite;
}

@keyframes mega-progress {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0%);
  }
}

@keyframes mega-tear {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 24px;
  }
}

.screen-crackle::before {
  opacity: 0.48;
}

.swarm-flash::after {
  background: rgba(255, 255, 255, 0.08);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.drawer-dock {
  position: static;
}

.registry-root,
.toolkit-root,
.briefing-root {
  position: fixed;
  bottom: 0;
  pointer-events: auto;
}

.registry-root {
  right: 0.58rem;
  width: min(430px, calc(100vw - 1rem));
  z-index: 122;
}

.toolkit-root {
  left: 50%;
  transform: translateX(-50%);
  width: min(1040px, calc(100vw - 1rem));
  z-index: 120;
}

.briefing-root {
  left: 0.58rem;
  width: min(470px, calc(100vw - 1rem));
  z-index: 121;
}

.registry-toggle-btn,
.toolkit-toggle-btn,
.briefing-toggle-btn {
  width: 100%;
  border: 1px solid rgba(204, 0, 0, 0.82);
  border-bottom: none;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  padding: 0.56rem 0.7rem;
  background: linear-gradient(100deg, rgba(44, 0, 0, 0.95), rgba(145, 0, 0, 0.9));
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.registry-toggle-btn:hover,
.toolkit-toggle-btn:hover,
.briefing-toggle-btn:hover {
  border-color: rgba(255, 106, 106, 0.92);
  box-shadow: 0 0 16px rgba(204, 0, 0, 0.38);
}

.registry-toggle-btn:focus-visible,
.toolkit-toggle-btn:focus-visible,
.briefing-toggle-btn:focus-visible {
  outline: 2px solid rgba(255, 190, 100, 0.92);
  outline-offset: 2px;
}

.registry-panel,
.toolkit-panel,
.briefing-panel {
  border: 1px solid rgba(204, 0, 0, 0.82);
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  background: linear-gradient(170deg, rgba(8, 8, 8, 0.96), rgba(21, 21, 21, 0.96));
  box-shadow: 0 0 26px rgba(204, 0, 0, 0.38);
  padding: 0.8rem 0.9rem 0.9rem;
  max-height: 58vh;
  overflow-y: auto;
}

.registry-panel[hidden],
.toolkit-panel[hidden],
.briefing-panel[hidden] {
  display: none !important;
}

.briefing-content {
  padding: 0 0.15rem;
  font-size: 0.74rem;
  color: #e4e4e4;
}

.briefing-content p {
  margin: 0.48rem 0;
  line-height: 1.45;
}

.briefing-list {
  margin: 0.35rem 0 0.5rem;
  padding-left: 1rem;
}

.briefing-list li {
  margin: 0.24rem 0;
}

.briefing-term {
  border-bottom: 1px dashed rgba(255, 190, 100, 0.62);
  cursor: help;
  color: #ffbe64;
}

.toolkit-head h3 {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.toolkit-credits-value {
  margin: 0.35rem 0 0;
  color: #ffbe64;
  font-size: 0.74rem;
  line-height: 1.45;
  white-space: normal;
}

.toolkit-status {
  min-height: 1.1em;
  margin: 0.5rem 0;
  color: #b9d2ff;
  font-size: 0.72rem;
}

.toolkit-upgrades {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.5rem;
}

.toolkit-upgrade-card {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.55);
  padding: 0.5rem;
}

.global-toolkit-tooltip {
  position: fixed;
  z-index: 220;
  width: max-content;
  border-radius: 10px;
  border: 1px solid rgba(204, 0, 0, 0.82);
  background: rgba(6, 6, 8, 0.96);
  color: #fff;
  box-shadow: 0 0 22px rgba(204, 0, 0, 0.34);
  padding: 0.55rem 0.6rem;
  font-size: 0.66rem;
  line-height: 1.45;
  letter-spacing: 0.03em;
  white-space: pre-line;
  pointer-events: none;
}

.global-toolkit-tooltip[hidden] {
  display: none !important;
}

.toolkit-upgrade-card h4 {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.toolkit-upgrade-level {
  margin: 0.35rem 0 0.45rem;
  color: #d8d8d8;
  font-size: 0.68rem;
}

.toolkit-buy-btn,
.toolkit-ability-btn {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(204, 0, 0, 0.62);
  background: linear-gradient(95deg, #720000, #b90000);
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.64rem;
  padding: 0.46rem;
  cursor: pointer;
}

.toolkit-buy-btn:disabled,
.toolkit-ability-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.toolkit-abilities-shell {
  margin-top: 0.62rem;
}

.toolkit-abilities-shell h4 {
  margin: 0 0 0.4rem;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.toolkit-abilities {
  display: grid;
  gap: 0.44rem;
}

.toolkit-ability-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 0.5rem;
  align-items: center;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.46);
  padding: 0.45rem;
}

.toolkit-ability-name {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.68rem;
}

.toolkit-ability-level {
  margin: 0.22rem 0 0;
  color: #c8c8c8;
  font-size: 0.66rem;
}

.burn-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: rgba(0, 0, 0, 0.82);
  display: grid;
  place-items: center;
}

.burn-modal[hidden] {
  display: none !important;
}

.burn-modal-card {
  width: min(460px, calc(100vw - 1rem));
  border-radius: 12px;
  border: 1px solid rgba(204, 0, 0, 0.92);
  background: linear-gradient(160deg, rgba(22, 6, 6, 0.96), rgba(6, 6, 8, 0.96));
  padding: 0.9rem;
}

.burn-modal-card h3 {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
}

.burn-modal-card p {
  margin: 0.55rem 0;
  color: #e0e0e0;
  font-size: 0.78rem;
}

.burn-modal-card input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(204, 0, 0, 0.75);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 0.6rem;
  text-transform: uppercase;
}

.burn-modal-status {
  min-height: 1.15em;
  margin: 0.45rem 0 0;
  font-size: 0.74rem;
  color: #ff6f6f;
}

.burn-modal-status.tone-pending {
  color: #ffe2a6;
}

.burn-modal-status.tone-success {
  color: #9fffd0;
}

.burn-modal-actions {
  margin-top: 0.62rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.burn-modal-actions button {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.55rem;
  cursor: pointer;
}

@media (max-width: 1340px) {
  .static-rail {
    display: none;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      'center'
      'left'
      'terminal'
      'activity';
    max-width: 900px;
  }
}

@media (max-width: 700px) {
  .app-shell {
    padding-left: 0.52rem;
    padding-right: 0.52rem;
  }

  .app-header {
    height: 60px;
  }

  .header-skull {
    width: 38px;
    height: 38px;
  }

  .header-title {
    font-size: clamp(1.4rem, 8vw, 2rem);
  }

  .connection-pill {
    font-size: 0.58rem;
    letter-spacing: 0.09em;
  }

  .version-chip {
    font-size: 0.56rem;
    letter-spacing: 0.08em;
    padding: 0.34rem 0.5rem;
  }

  .core-deploy-btn {
    width: min(280px, 78vw);
    height: min(280px, 78vw);
  }

  .chaos-ad {
    width: clamp(162px, 58vw, 225px);
  }

  .toolkit-ability-row {
    grid-template-columns: 1fr;
  }

  .toolkit-root {
    width: calc(100vw - 0.5rem);
  }

  .briefing-root {
    left: 0.25rem;
    width: calc(100vw - 0.5rem);
  }

  .registry-root {
    right: 0.25rem;
    width: calc(100vw - 0.5rem);
  }

  .profile-emoji-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .activity-window-group {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1500px) {
  .drawer-dock {
    position: fixed;
    left: 0.32rem;
    right: 0.32rem;
    bottom: 0;
    z-index: 124;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.35rem;
    max-height: min(84vh, 880px);
    overflow-y: auto;
    pointer-events: none;
    padding-top: 0.25rem;
  }

  .drawer-dock > .registry-root,
  .drawer-dock > .toolkit-root,
  .drawer-dock > .briefing-root {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    z-index: auto;
    pointer-events: auto;
  }

  .drawer-dock .registry-panel,
  .drawer-dock .briefing-panel {
    max-height: min(36vh, 360px);
  }

  .drawer-dock .toolkit-panel {
    max-height: min(44vh, 460px);
  }

  .app-shell {
    padding-bottom: calc(var(--header-total) + 7.4rem);
  }
}
