:root {
  --ct-bg: #0a0e14;
  --ct-surface: #111827;
  --ct-border: #1f2937;
  --ct-green: #34d399;
  --ct-gold: #fbbf24;
  --ct-rug: #f87171;
  --ct-omega: #a78bfa;
  --ct-muted: #94a3b8;
  --ct-text: #e8fff0;
  --ct-shell-h: 54px;
  --ct-mood-color: var(--ct-green);
}

body.ct-page {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: var(--ct-bg);
  color: var(--ct-text);
  font-variant-numeric: tabular-nums;
}

#ct-shell-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}

#ct-shell {
  position: relative;
  height: var(--ct-shell-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: linear-gradient(180deg, #0f172a 0%, var(--ct-bg) 100%);
  border-bottom: 1px solid var(--ct-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  font-size: 0.7rem;
  overflow: hidden;
}

#ct-shell-mood {
  height: 2px;
  background: var(--ct-mood-color);
  transition: background 0.4s ease;
}

#ct-shell .ct-shell__brand {
  color: var(--ct-green);
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-decoration: none;
}

#ct-shell .ct-shell__headline {
  color: var(--ct-gold);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 22vw;
}

#ct-shell .ct-shell__line {
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

#ct-shell .ct-shell__waves {
  color: var(--ct-omega);
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.62rem;
  padding: 2px 6px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 4px;
}

#ct-shell .ct-shell__chip {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--ct-border);
  color: var(--ct-green);
  white-space: nowrap;
}

#ct-shell .ct-shell__chip--rug {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fca5a5;
}

#ct-shell .ct-shell__pills {
  display: flex;
  gap: 4px;
  align-items: center;
}

#ct-shell .ct-shell__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid var(--ct-border);
  color: var(--ct-green);
  text-decoration: none;
  font-weight: 700;
}

#ct-shell .ct-shell__pill--omega {
  border-color: rgba(167, 139, 250, 0.45);
  color: var(--ct-omega);
}

#ct-shell .ct-shell__pill--rug {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fca5a5;
}

#ct-shell .ct-shell__pill--rug.is-active {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.14);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.25);
}

#ct-shell .ct-shell__pill--grave {
  border-color: rgba(148, 163, 184, 0.45);
  color: #cbd5e1;
}

#ct-shell .ct-shell__pill--grave.is-active {
  border-color: #94a3b8;
  background: rgba(100, 116, 139, 0.14);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.25);
}

#ct-shell .ct-shell__pill.is-active {
  border-color: var(--ct-green);
  background: rgba(52, 211, 153, 0.12);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.2);
}

#ct-shell .ct-shell__pill--omega.is-active {
  border-color: var(--ct-omega);
  background: rgba(167, 139, 250, 0.12);
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.2);
}

#ct-shell a:not(.ct-shell__brand):not(.ct-shell__pill) {
  color: var(--ct-green);
  text-decoration: none;
}

#ct-shell a:hover {
  text-decoration: underline;
}

#ct-shell button {
  font: inherit;
  padding: 5px 10px;
  border-radius: 6px;
  border: none;
  background: var(--ct-green);
  color: var(--ct-bg);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

#ct-shell button.ghost {
  background: transparent;
  border: 1px solid var(--ct-border);
  color: var(--ct-text);
}

#ct-shell-marquee {
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 14px;
  overflow: hidden;
  opacity: 0.55;
  font-size: 0.58rem;
  pointer-events: none;
}

#ct-shell-marquee span {
  display: inline-block;
  padding-left: 100%;
  white-space: nowrap;
  animation: ct-marquee 28s linear infinite;
}

@keyframes ct-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

@media (max-width: 900px) {
  #ct-shell .ct-shell__waves { display: none; }
}

@media (max-width: 720px) {
  #ct-shell .ct-shell__line,
  #ct-shell-marquee { display: none; }
  #ct-shell .ct-shell__headline { max-width: 36vw; }
  #ct-shell a:not(.ct-shell__pill):not(.ct-shell__brand) { display: none; }
  #ct-shell button.ghost { display: none; }
}