@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Oxanium:wght@500;600;700&family=Sora:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #0b0d10;
  --panel: rgba(18, 22, 28, 0.72);
  --panelSolid: #12161c;
  --border: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.62);
  --accentHue: 120;
  --accent: hsl(var(--accentHue) 100% 58%);
  --accentSoft: hsl(var(--accentHue) 100% 58% / 0.16);
  --accentBorder: hsl(var(--accentHue) 100% 58% / 0.22);
  --accentRing: hsl(var(--accentHue) 100% 58% / 0.12);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.bgGlow {
  position: fixed;
  inset: -30%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(1240px 920px at 16% 12%, rgba(53, 199, 255, 0.11), transparent 67%),
    radial-gradient(1100px 860px at 82% 16%, rgba(182, 123, 255, 0.10), transparent 65%),
    radial-gradient(1320px 980px at 26% 92%, rgba(0, 255, 65, 0.09), transparent 69%),
    radial-gradient(1380px 1020px at 70% 88%, rgba(255, 210, 74, 0.09), transparent 70%);
}

.bgGlow::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(closest-side, hsl(var(--h1, 195) 94% 62% / 0.12), transparent 70%),
    radial-gradient(closest-side, hsl(var(--h2, 266) 92% 65% / 0.10), transparent 70%),
    radial-gradient(closest-side, hsl(var(--h3, 120) 92% 58% / 0.09), transparent 72%),
    radial-gradient(closest-side, hsl(var(--h4, 46) 95% 62% / 0.09), transparent 72%);
  background-repeat: repeat;
  background-size: 1100px 900px, 900px 760px, 1200px 980px, 1000px 820px;
  filter: blur(2px);
  opacity: 1;
  transform: translate3d(var(--parX1, 0px), var(--parY1, 0px), 0) scale(1.05);
  will-change: transform, background-position;
  animation: none;
}

@keyframes glowRise {
  0% {
    background-position:
      0 120%,
      0 135%,
      0 150%,
      0 165%;
  }

  50% {
    background-position:
      70px 45%,
      -55px 35%,
      45px 28%,
      -35px 22%;
  }

  100% {
    background-position:
      0 -20%,
      0 -35%,
      0 -50%,
      0 -65%;
  }
}

@keyframes glowTintDrift {
  0% {
    background-position: 20% 30%, 80% 25%, 55% 85%;
  }

  25% {
    background-position: 28% 22%, 72% 32%, 60% 78%;
  }

  50% {
    background-position: 22% 38%, 82% 18%, 52% 88%;
  }

  75% {
    background-position: 16% 28%, 88% 30%, 58% 82%;
  }

  100% {
    background-position: 20% 30%, 80% 25%, 55% 85%;
  }
}

.bgGlow::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 92%, rgba(255, 255, 255, 0.16) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 88%, rgba(255, 255, 255, 0.12) 0 1.6px, transparent 2.6px),
    radial-gradient(circle at 44% 96%, rgba(255, 255, 255, 0.10) 0 1.2px, transparent 2.2px),
    radial-gradient(circle at 86% 94%, rgba(255, 255, 255, 0.08) 0 1px, transparent 2px);
  background-repeat: repeat;
  background-size: 260px 260px, 340px 340px, 420px 420px, 520px 520px;
  filter: blur(0.6px);
  opacity: 0.55;
  transform: translate3d(var(--parX2, 0px), var(--parY2, 0px), 0) scale(1.07);
  will-change: transform, background-position;
  animation: none;
}

.portfolioBody .bgGlow::after {
  animation: bubbleRise 26s linear infinite;
}

@keyframes bubbleRise {
  0% {
    background-position:
      0 120%,
      0 130%,
      0 140%,
      0 150%;
  }

  50% {
    background-position:
      34px 45%,
      -22px 35%,
      18px 28%,
      -12px 22%;
  }

  100% {
    background-position:
      0 -20%,
      0 -30%,
      0 -40%,
      0 -50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bgGlow::before,
  .bgGlow::after {
    animation: none;
  }

  .portfolioBody .bgGlow::after {
    animation: none !important;
  }
}

.container {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 70px;
}

.nodesBody .container {
  width: min(1600px, 96vw);
  padding: 36px 0 60px;
}

.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.header {
  margin-bottom: 18px;
}

.topNav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.navLinks {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.navLink {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
}

.navLink:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.navLinkActive {
  color: var(--text);
  border-color: var(--accentBorder);
  background: var(--accentSoft);
}

h1 {
  margin: 12px 0 8px;
  font-size: 44px;
  letter-spacing: -0.02em;
}

.accent {
  color: var(--accent);
}

.muted {
  color: var(--muted);
}

.tiny {
  font-size: 12px;
}

.heroTop {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.55);
  background: rgba(255, 255, 255, 0.03);
}

.heroText {
  min-width: 0;
}

.heroText h1 {
  margin: 0;
  font-size: 44px;
}

.heroText .muted {
  margin: 10px 0 0;
  line-height: 1.55;
  max-width: 620px;
}

.heroActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.btnPrimary,
.btnGhost {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.btnTiny {
  padding: 6px 10px;
  font-size: 11px;
}

.btnPrimary {
  background: var(--accentSoft);
  border-color: var(--accentBorder);
  color: var(--text);
}

.btnPrimary:hover,
.btnGhost:hover {
  border-color: var(--accentBorder);
  box-shadow: 0 0 0 3px var(--accentRing);
}

.section {
  margin-top: 40px;
}

.sectionTitle {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 14px;
}

.sectionTitle h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.inputSmall {
  min-width: 160px;
  padding: 8px 10px;
  font-size: 12px;
}

.editorShell {
  padding-top: 30px;
}

.editorTopBar {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.projectHeader h1 {
  margin: 0;
  font-size: 28px;
}

.projectHeader p {
  margin: 4px 0 0;
}

.editorControls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.editorControlsGroup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.controlSeparator {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
}

.iconButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease;
}

.iconButtonToggle {
  width: 38px;
  padding: 0;
}

.iconButton img {
  width: 18px;
  height: 18px;
  display: block;
}

.iconButton:hover {
  transform: translateY(-1px);
  border-color: var(--accentBorder);
}

.iconButtonPrimary {
  background: var(--accentSoft);
  border-color: var(--accentBorder);
}

.iconButtonCreate {
  background: hsl(270 80% 55% / 0.35);
  border-color: hsl(270 80% 60% / 0.55);
}

.iconButtonCreate:hover {
  border-color: hsl(270 80% 60% / 0.8);
}

.iconButtonEmulate {
  background: hsl(210 90% 55% / 0.2);
  border-color: hsl(210 90% 55% / 0.4);
}

.iconButtonValid {
  background: hsl(140 70% 45% / 0.2);
  border-color: hsl(140 70% 45% / 0.5);
}

.iconButtonValid:hover {
  border-color: hsl(140 70% 45% / 0.7);
}

.iconButtonEmulate:hover {
  border-color: hsl(210 90% 55% / 0.65);
}

.iconButtonLabel {
  font-size: 11px;
  color: var(--text);
}

.iconButtonSmall {
  width: 28px;
  height: 28px;
  border-radius: 10px;
}

.iconButtonSmall img {
  width: 14px;
  height: 14px;
}

.editorMain {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.graphPane {
  display: flex;
  flex-direction: column;
  padding: 12px;
  min-height: 78vh;
}

.graphHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.graphTitle {
  font-weight: 700;
}

.graphViewport {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: rgba(8, 10, 14, 0.7);
  border-radius: 14px;
  border: 1px solid var(--border);
  min-height: 70vh;
  height: 100%;
  cursor: grab;
}

.nodesBody {
  overflow: hidden;
}

.graphViewport:active {
  cursor: grabbing;
}

.graphViewport::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 0);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 0;
}

.edgeLayer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  transform-origin: 0 0;
  z-index: 2;
}

.edgeLayer path {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.edgeAuto {
  stroke-width: 3;
}

.edgeOption {
  stroke-width: 2.2;
}

.edgeEndpoint {
  opacity: 0.9;
}

.edgeDragLine {
  pointer-events: none;
}

.isHidden {
  display: none !important;
}

.conditionLayer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform-origin: 0 0;
  z-index: 1;
}

.conditionGroup {
  position: absolute;
  border-radius: 16px;
  border: 1.5px dashed rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
  padding: 18px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.conditionGroupLabel {
  position: absolute;
  top: -12px;
  left: 16px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #0b0d12;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
}

.conditionLegend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.conditionLegendItem {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 18, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px 8px;
}

.conditionLegendSwatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.nodeLayer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  z-index: 3;
  pointer-events: none;
}

.nodeCard {
  position: absolute;
  width: 220px;
  min-height: 96px;
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  cursor: grab;
  user-select: none;
  pointer-events: auto;
}

.nodeCard:active {
  cursor: grabbing;
}

.nodeHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.nodeHeaderActions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nodeTitle {
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 0;
}

.nodeBody {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: 11px;
  line-height: 1.4;
  resize: vertical;
  font-family: inherit;
}

.nodeBody:focus {
  outline: none;
  border-color: var(--accentBorder);
  box-shadow: 0 0 0 2px var(--accentRing);
}

.nodeMeta {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.nodeMetaInput {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: 10px;
}

.inputWithIcon {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}

.nodeMetaSelect {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: 10px;
}

.nodeMetaSelect:focus {
  outline: none;
  border-color: var(--accentBorder);
  box-shadow: 0 0 0 2px var(--accentRing);
}

.nodeMetaLabel {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nodeRedirect {
  display: grid;
  gap: 6px;
}

.nodeRedirectActions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.nodeMetaInput:focus {
  outline: none;
  border-color: var(--accentBorder);
  box-shadow: 0 0 0 2px var(--accentRing);
}

.nodeMetaInput::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.nodeMetaToggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
}

.nodeMetaToggle span {
  pointer-events: none;
}

.nodeOptions {
  display: grid;
  gap: 6px;
}

.nodeOptionsTitle {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nodeOptionsList {
  display: grid;
  gap: 6px;
  overflow: visible;
}

.nodeOptionRow {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 6px;
  align-items: center;
  position: relative;
  padding-right: 18px;
  width: 100%;
}

.nodeConnectorRow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nodeConnector {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.6);
  cursor: crosshair;
  flex: 0 0 auto;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.nodeConnectorRight {
  right: -7px;
}

.nodeConnectorOptionRight {
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%);
}

.nodeDeleteIcon {
  width: 28px;
  height: 28px;
}

.nodeAddOptionIcon {
  width: 28px;
  height: 28px;
}

.nodeOptionsActions {
  display: flex;
  justify-content: flex-start;
  margin-top: 6px;
}

.nodeOptionDelete {
  width: 28px;
  height: 28px;
}

.nodeDefault {
  background: rgba(38, 40, 50, 0.9);
}

.nodeAuto {
  background: rgba(40, 70, 56, 0.9);
}

.nodeChoice {
  background: rgba(40, 52, 78, 0.9);
}

.nodeQuest {
  background: rgba(72, 40, 86, 0.9);
}

.nodeEnd {
  background: rgba(78, 40, 40, 0.9);
}

.nodeSelected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accentRing);
}

.isPanning {
  cursor: grabbing;
}

.modalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 10, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modalOverlay.isVisible {
  display: flex;
}

.modalCard {
  padding: 24px;
  max-width: 420px;
  text-align: center;
}

.formCard {
  width: min(540px, 90vw);
  max-width: 540px;
  text-align: left;
}

.formGrid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.formGrid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.labelText {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.formCheckbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.formGrid label.formCheckbox {
  flex-direction: row;
}

.formCheckbox input {
  margin: 0;
}

.required {
  color: #ff6b6b;
}

.fieldError {
  min-height: 16px;
  font-size: 11px;
  color: #ff6b6b;
}

.inputError {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

.inputArea {
  min-height: 80px;
  resize: vertical;
}

.validationList {
  background: rgba(10, 12, 16, 0.7);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px;
  max-height: 240px;
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
}

.validationList ul {
  margin: 0;
  padding-left: 18px;
}

.keypressLegend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.keypressItem {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 18, 25, 0.6);
}

.keypressItem span {
  color: var(--text);
  font-weight: 600;
}

.siteFooter {
  display: flex;
  justify-content: center;
  padding: 20px 0 40px;
  color: var(--muted);
  font-size: 12px;
}
.emulatorCard {
  width: min(760px, 90vw);
  max-width: 760px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.emulatorHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.emulatorControls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.emulatorControls label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.emulatorChat {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  background: rgba(10, 12, 16, 0.75);
  min-height: 240px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.emulatorMessage {
  font-size: 12px;
  line-height: 1.5;
  padding: 8px 10px;
  border-radius: 10px;
  width: fit-content;
  max-width: 80%;
}

.emulatorMessage-npc {
  background: rgba(88, 105, 255, 0.2);
  border: 1px solid rgba(88, 105, 255, 0.35);
}

.emulatorMessage-player {
  background: rgba(72, 213, 151, 0.2);
  border: 1px solid rgba(72, 213, 151, 0.35);
  margin-left: auto;
}

.emulatorMessage-system {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
}

.emulatorActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btnDanger {
  border-color: rgba(255, 107, 107, 0.5);
  color: #ff6b6b;
}

.modalActions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.modalFileInput {
  display: none;
}

.fileInputLabel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.fileInputLabel input {
  display: none;
}

.nodesLayout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.nodePanel {
  padding: 14px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panelHeader {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.codeArea {
  width: 100%;
  flex: 1;
  background: rgba(10, 12, 16, 0.8);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
}

.outline {
  flex: 1;
  overflow: auto;
  padding-right: 6px;
}

.outlineCount {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.outlineList {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.6;
}

.infoPanel {
  padding: 18px;
}

.input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  outline: none;
  font-size: 14px;
  min-width: 190px;
}

.input:focus {
  border-color: hsl(var(--accentHue) 100% 58% / 0.35);
  box-shadow: 0 0 0 3px var(--accentRing);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.card {
  padding: 10px 16px;
  transition: transform 160ms ease, border-color 160ms ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--accentBorder);
}

.cardLayout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 260px);
  gap: 16px;
  align-items: stretch;
}

.cardLeft {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.cardBody {
  min-width: 0;
}

.cardHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cardHeaderLeft,
.cardBody,
.cardLeft {
  min-width: 0;
}

.cardHeaderRight {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.titleRow {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.cardTitle {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 0;
}

.subtitleInline {
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: -0.01em;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.cardSub {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.dateInline {
  white-space: nowrap;
}

.cardList {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
  columns: 2;
  column-gap: 28px;
}

.cardList li {
  break-inside: avoid;
  margin: 0 0 6px;
}

.tagRow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}

.pill {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 13px;
}

.devPill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 165, 0, 0.35);
  background: rgba(255, 165, 0, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
}

.devDot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 165, 0, 0.95);
  position: relative;
}

.devDot::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  background: rgba(255, 165, 0, 0.22);
  animation: devPulse 1.6s ease-out infinite;
}

@keyframes devPulse {
  0% {
    transform: scale(0.55);
    opacity: 0.85;
  }

  70% {
    transform: scale(1.25);
    opacity: 0.12;
  }

  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.activePill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 65, 0.35);
  background: rgba(0, 255, 65, 0.10);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
  line-height: 1;
}

.activeDot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 255, 65, 0.95);
  position: relative;
}

.activeDot::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  background: rgba(0, 255, 65, 0.20);
  animation: activePulse 1.6s ease-out infinite;
}

@keyframes activePulse {
  0% {
    transform: scale(0.55);
    opacity: 0.85;
  }

  70% {
    transform: scale(1.25);
    opacity: 0.12;
  }

  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.cardFooterSplit {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.footerLeft,
.footerRight {
  display: flex;
}

.tileGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 320px;
  max-width: 100%;
}

.tile {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.tileLabel {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.tileValue {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: -0.01em;
  color: var(--text);
}

.tileValueMuted {
  color: var(--muted);
  font-weight: 850;
}

.tileLink {
  display: block;
  text-decoration: none;
  color: var(--text);
}

.tileLink:hover {
  border-color: var(--accentBorder);
  text-decoration: none;
}

.tileLink:hover .tileValue {
  color: var(--accent);
}

.tileLinkArrowRight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tileArrowMid {
  color: var(--muted);
  font-weight: 900;
  flex: 0 0 auto;
}

.cardThumb {
  width: 100%;
  align-self: stretch;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.thumbCol {
  width: 100%;
  max-width: 260px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.thumbLink {
  display: block;
  width: 100%;
  max-width: 260px;
  border-radius: 24px;
}

.thumbImgLarge {
  width: 100%;
  max-width: 260px;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  object-fit: cover;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.6);
  display: block;
}

.thumbLink .thumbImgLarge {
  transition: transform 160ms ease, border-color 160ms ease;
}

.thumbLink:hover .thumbImgLarge {
  transform: translateY(-2px);
  border-color: var(--accentBorder);
}

.statsTitle {
  margin: 0 0 14px;
}

.statsPanel {
  padding: 16px;
}

.statsGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 0;
}

.statBox {
  position: relative;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.statBox::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--statColor, transparent) 18%, transparent),
    transparent 70%
  );
  opacity: 0.9;
}

.noResults {
  display: none;
  text-align: center;
  margin-top: 18px;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
  color: rgba(235, 240, 255, 0.6);
}

.eventsGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.eventCard {
  position: relative;
  overflow: hidden;
  padding: 10px 16px;
  transition: transform 160ms ease, border-color 160ms ease;
  border-color: color-mix(in srgb, hsl(var(--eventHue, 205) 58% 58%) 12%, var(--border));
  background:
    linear-gradient(
      140deg,
      hsl(var(--eventHue, 205) 58% 58% / 0.05) 0%,
      hsl(var(--eventHue, 205) 58% 58% / 0.015) 44%,
      rgba(255, 255, 255, 0.02) 100%
    );
}

.eventCard::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: hsl(var(--eventHue, 205) 58% 58%);
  opacity: 0.38;
}

.eventCard:hover {
  transform: translateY(-2px);
  border-color: var(--accentBorder);
}

.eventTop {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.eventTopText {
  min-width: 0;
}

.eventContentRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: stretch;
}

.eventContentRowNoLinks {
  grid-template-columns: 1fr;
}

.eventMain {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.eventOrb {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.96);
  border: 1px solid hsl(var(--eventHue, 205) 58% 58% / 0.22);
  background:
    radial-gradient(circle at 30% 30%, hsl(var(--eventHue, 205) 58% 64% / 0.14), transparent 60%),
    hsl(var(--eventHue, 205) 40% 34% / 0.16);
  box-shadow: 0 8px 18px hsl(var(--eventHue, 205) 42% 30% / 0.10);
}

.eventTitleRow {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.eventWhen {
  margin-top: 6px;
  letter-spacing: 0.04em;
}

.eventRole {
  font-size: 16px;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.eventSummary {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.eventHighlights {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
  columns: 2;
  column-gap: 24px;
}

.eventHighlights li {
  break-inside: avoid;
  margin: 0 0 6px;
}

.eventAside {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.eventTileGrid {
  grid-template-columns: 1fr;
  width: calc((320px - 10px) / 2);
  max-width: 100%;
}

.otherWorkGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.otherWorkCard {
  position: relative;
  overflow: hidden;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  border-color: color-mix(in srgb, hsl(var(--otherHue, 44) 68% 58%) 14%, var(--border));
  background:
    linear-gradient(
      145deg,
      hsl(var(--otherHue, 44) 68% 58% / 0.06) 0%,
      hsl(var(--otherHue, 44) 60% 56% / 0.02) 42%,
      rgba(255, 255, 255, 0.02) 100%
    );
}

.otherWorkCard::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: hsl(var(--otherHue, 44) 68% 58%);
  opacity: 0.34;
}

.otherWorkCard::after {
  content: "";
  position: absolute;
  inset: auto -22% -46% auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, hsl(var(--otherHue, 44) 72% 64% / 0.16), transparent 70%);
  pointer-events: none;
}

.otherWorkCard:hover {
  transform: translateY(-2px);
  border-color: var(--accentBorder);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.46);
}

.otherWorkHead {
  display: grid;
  gap: 8px;
}

.otherMetaRow {
  display: flex;
  align-items: center;
  min-height: 18px;
  letter-spacing: 0.02em;
}

.otherWorkSummary {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.otherWorkList {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.otherWorkList li {
  margin: 0 0 6px;
}

.otherWorkBottom {
  margin-top: auto;
  padding-top: 10px;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 12px;
}

.otherWorkTileGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 320px;
  max-width: 100%;
  margin-left: auto;
  flex: 0 0 auto;
}

.otherWorkTileGrid > :only-child {
  grid-column: 2;
}

select.input option,
select.input optgroup {
  background: #0b0f14;
  color: rgba(235, 240, 255, 0.92);
}

.label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.statLabelRow {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.statIconImg {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 16px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.62;
}

.statValue {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--statColor, var(--text));
  position: relative;
  z-index: 1;
}

.updatedGap {
  margin-top: 8px;
}

.contactGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.contactCard {
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.cardHeading {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.contactList {
  display: grid;
  gap: 10px;
}

.contactItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
}

.contactItem:hover {
  border-color: rgba(0, 255, 65, 0.22);
  text-decoration: none;
}

.contactLeft {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.contactIcon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  flex: 0 0 36px;
  overflow: hidden;
}

.contactIconImg {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.contactLabel {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.contactValue {
  margin-top: 3px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.contactArrow {
  color: var(--muted);
  font-weight: 900;
}

.contactItem:link,
.contactItem:visited {
  color: var(--text);
}

.contactItem:hover,
.contactItem:active {
  color: var(--text);
  text-decoration: none;
}

.whyList {
  margin: 0;
  padding-left: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  color: var(--muted);
}

b,
strong {
  color: var(--accent);
  font-weight: 700;
}

.whyList li {
  margin: 0;
}

.footer {
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.tileLabelRow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tileMiniIcon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.62;
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 500ms ease, transform 500ms ease;
  will-change: opacity, transform;
}

.revealIn {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 980px) {
  .cardFooterSplit {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    max-width: none;
    margin: 14px 0 0;
    padding: 0;
    justify-items: stretch;
    align-items: stretch;
  }

  .cardFooterSplit .footerLeft,
  .cardFooterSplit .footerRight {
    display: contents;
  }

  .cardFooterSplit .tileGrid {
    display: contents;
  }

  .cardFooterSplit .tile,
  .cardFooterSplit .tileLink {
    width: 100%;
    min-width: 0;
  }

  .cardFooterSplit .tileLabelRow {
    min-width: 0;
  }
}

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

  .cardThumb {
    justify-content: center;
    align-self: start;
  }

  .thumbCol {
    width: min(260px, 100%);
    max-width: none;
    justify-content: center;
  }

  .thumbImgLarge {
    max-width: none;
  }

  .cardFooterSplit {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    align-items: stretch;
  }

  .footerLeft,
  .footerRight,
  .footerLeft .tileGrid,
  .footerRight .tileGrid {
    display: contents;
  }

  .tile,
  .tileLink {
    width: 100%;
  }
}

@media (max-width: 860px) {
  .cardList {
    columns: 1;
  }

  .eventHighlights {
    columns: 1;
  }

  .otherWorkGrid {
    grid-template-columns: 1fr;
  }

  .statsGrid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contactGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .eventContentRow {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .eventAside {
    justify-content: flex-start;
    align-items: flex-start;
  }

  .eventTop {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .otherWorkTileGrid {
    width: min(320px, 100%);
    margin-left: auto;
  }
}

@media (max-width: 820px) {
  .controls {
    flex-wrap: nowrap;
  }

  #searchInput {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }

  #sortSelect {
    flex: 0 0 150px;
    width: 150px;
  }
}

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

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

@media (max-width: 420px) {
  #sortSelect {
    flex: 0 0 120px;
    width: 120px;
  }

  .thumbCol {
    width: min(220px, 100%);
  }
}

@media (max-width: 980px) {
  .cardFooterSplit {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 520px;
    margin: 14px auto 0;
    align-items: stretch;
    justify-items: stretch;
  }

  .footerLeft,
  .footerRight {
    display: contents;
  }

  .cardFooterSplit .tile,
  .cardFooterSplit .tileLink {
    width: 100%;
  }

  .cardFooterSplit .tileGrid {
    display: contents;
  }
}

html,
body {
  overflow-x: hidden;
}

.container {
  overflow-x: clip;
}

.heroText h1 {
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .heroTop {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .avatar {
    width: 78px;
    height: 78px;
  }

  .heroText h1 {
    font-size: 36px;
    line-height: 1.05;
  }

  .heroText .muted {
    max-width: none;
  }
}

@media (max-width: 380px) {
  .heroText h1 {
    font-size: 32px;
  }
}

@media (max-width: 920px) {
  .cardFooterSplit {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 14px 0 0 !important;
    align-items: stretch !important;
    justify-items: stretch !important;
  }

  .cardFooterSplit .footerLeft,
  .cardFooterSplit .footerRight,
  .cardFooterSplit .tileGrid {
    display: contents !important;
  }

  .cardFooterSplit .tile,
  .cardFooterSplit .tileLink {
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 520px) {
  .bgGlow::before,
  .bgGlow::after {
    animation: none !important;
    will-change: auto;
  }

  .bgGlow::before {
    filter: none;
    transform: none;
  }

  .bgGlow::after {
    opacity: 0.22;
    filter: none;
    transform: none;
  }
}

@media (max-width: 520px) {
  .controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }

  .controls .input {
    min-width: 0;
    width: 100%;
  }

  #searchInput,
  #sortSelect {
    width: 100%;
  }
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #07080a;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 65, 0.35);
}


/* --- Redesign Overrides (merged from theme-redesign.css) --- */

:root {
  --bg-0: #050505;
  --bg-1: #0c0c0c;
  --bg-2: #171717;
  --surface-0: rgba(20, 20, 20, 0.86);
  --surface-1: rgba(30, 30, 30, 0.78);
  --surface-2: rgba(38, 38, 38, 0.52);
  --line-soft: rgba(190, 190, 190, 0.18);
  --line-strong: rgba(228, 228, 228, 0.38);
  --text-0: #f2f2f2;
  --text-1: #c8c8c8;
  --text-2: #9b9b9b;
  --accent: #4da3ff;
  --shadow-lg: 0 22px 65px rgba(0, 0, 0, 0.52);
  --radius-card: 18px;
  --radius-pill: 999px;
  --font-ui: "Sora", "Segoe UI", sans-serif;
  --font-display: "Oxanium", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  background: linear-gradient(160deg, var(--bg-0), var(--bg-1) 48%, #131313 82%, #1c1c1c);
  color: var(--text-0);
  font-family: var(--font-ui);
  line-height: 1.5;
  letter-spacing: 0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  opacity: 0.32;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.045) 0 2px, transparent 2px 100%),
    radial-gradient(circle at 78% 74%, rgba(255, 255, 255, 0.04) 0 1.5px, transparent 1.5px 100%),
    conic-gradient(
      from 45deg at 50% 50%,
      transparent 0deg 86deg,
      rgba(230, 230, 230, 0.028) 86deg 92deg,
      transparent 92deg 176deg,
      rgba(230, 230, 230, 0.028) 176deg 182deg,
      transparent 182deg 266deg,
      rgba(230, 230, 230, 0.028) 266deg 272deg,
      transparent 272deg 356deg,
      rgba(230, 230, 230, 0.028) 356deg 360deg
    );
  background-size: 280px 280px, 340px 340px, 120px 120px;
  background-position: 0 0, 120px 80px, 0 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  opacity: 0.22;
  background:
    repeating-linear-gradient(
      35deg,
      transparent 0 46px,
      rgba(235, 235, 235, 0.024) 46px 47px,
      transparent 47px 92px
    );
}

.bgGlow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: none;
  opacity: 0;
}

/* Disable legacy bubble pseudo-layers from styles.css */
.bgGlow::before,
.bgGlow::after {
  content: none !important;
  display: none !important;
}

.container {
  width: min(1240px, calc(100% - 56px));
  margin: 0 auto;
}

.header {
  padding-top: 30px;
}

.topNav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, rgba(15, 20, 28, 0.9), rgba(19, 25, 35, 0.82));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 10px 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.topNav::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(110, 138, 178, 0.12) 0%, transparent 45%),
    linear-gradient(300deg, rgba(95, 122, 162, 0.1) 0%, transparent 52%);
  opacity: 0.48;
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

.brand .accent,
.accent {
  color: var(--accent);
}

.navLinks {
  display: flex;
  gap: 10px;
}

.navLink {
  text-decoration: none;
  color: var(--text-1);
  border: 1px solid transparent;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  transition: all 0.2s ease;
}

.navLink:hover,
.navLink:focus-visible,
.navLinkActive {
  color: var(--text-0);
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line-strong));
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  outline: none;
}

.heroTop {
  margin-top: 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(188, 188, 188, 0.26);
  background:
    linear-gradient(145deg, rgba(11, 11, 11, 0.94), rgba(23, 23, 23, 0.92)),
    linear-gradient(118deg, rgba(77, 163, 255, 0.14) 0 28%, transparent 28.4% 100%),
    linear-gradient(24deg, rgba(255, 255, 255, 0.05) 0 14%, transparent 14.3% 100%);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.heroTop::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(77, 163, 255, 0.45), rgba(255, 255, 255, 0.06) 28%, transparent 58%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
  opacity: 0.8;
}

.heroTop::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      -35deg,
      transparent 0 22px,
      rgba(255, 255, 255, 0.03) 22px 23px,
      transparent 23px 46px
    );
  opacity: 0.5;
}

.avatar {
  width: clamp(78px, 13vw, 118px);
  height: clamp(78px, 13vw, 118px);
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  object-fit: cover;
  border: 1px solid rgba(220, 220, 220, 0.42);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.46);
}

.heroText h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3.5vw, 2.35rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.heroText p {
  margin: 6px 0 0;
  max-width: 64ch;
}

.section,
.statsPanel {
  margin-top: 22px;
}

.sectionTitle {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 32px;
  margin-bottom: 14px;
}

.sectionTitle h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  position: relative;
  padding-left: 15px;
}

.sectionTitle h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 3px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 72%, #d7d7d7), #d7d7d7);
}

.glass,
.statsPanel,
.card,
.contactCard,
.eventCard,
.otherWorkCard,
.graphPane,
.editorTopBar,
.modalCard {
  border-radius: var(--radius-card);
  border: 1px solid var(--line-soft);
  background: linear-gradient(160deg, var(--surface-0), var(--surface-1));
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

.statsPanel {
  padding: 11px 12px;
}

.statsGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.statBox {
  padding: 9px 11px 10px;
  border-radius: 15px;
  border: 1px solid rgba(190, 190, 190, 0.2);
  background: linear-gradient(155deg, rgba(20, 20, 20, 0.88), rgba(14, 14, 14, 0.72));
  position: relative;
  overflow: hidden;
}

.statBox::after {
  content: "";
  position: absolute;
  right: -16px;
  bottom: 8px;
  width: 90px;
  height: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--statColor, var(--accent)) 72%, transparent);
  opacity: 0.5;
  transform: rotate(-33deg);
}

.statLabelRow,
.tileLabelRow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.statLabelRow {
  white-space: nowrap;
  flex-wrap: nowrap;
}

.statIconImg,
.tileMiniIcon,
.contactIconImg {
  width: 14px;
  height: 14px;
  object-fit: contain;
  opacity: 0.92;
}

.statValue {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 2.3vw, 1.55rem);
  letter-spacing: 0.02em;
}

.updatedGap {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-2);
}

.controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
}

.controls .input {
  width: auto;
}

.controls #searchInput {
  min-width: 260px;
  flex: 1 1 auto;
}

.controls #sortSelect {
  min-width: 150px;
  flex: 0 0 auto;
}

.input,
.inputSmall,
.nodeMetaInput,
.nodeMetaSelect {
  width: 100%;
  background: rgba(14, 14, 14, 0.9);
  color: var(--text-0);
  border: 1px solid rgba(188, 188, 188, 0.32);
  border-radius: 11px;
  min-height: 40px;
  padding: 9px 12px;
  font: inherit;
}

.input:focus,
.inputSmall:focus,
.nodeMetaInput:focus,
.nodeMetaSelect:focus,
textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 72%, #d8d8d8);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent);
}

.input::placeholder,
.nodeMetaInput::placeholder,
.nodeBody::placeholder {
  color: rgba(180, 180, 180, 0.58);
}

.grid,
.eventsGrid,
.otherWorkGrid {
  display: grid;
  gap: 16px;
}

.grid {
  grid-template-columns: 1fr;
}

.card,
.eventCard,
.otherWorkCard,
.contactCard {
  padding: 16px;
}

.card:hover,
.eventCard:hover,
.otherWorkCard:hover {
  border-color: color-mix(in srgb, var(--accent) 56%, var(--line-strong));
}

.cardLayout {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 290px);
  gap: 16px;
  align-items: stretch;
}

.cardTitle {
  margin: 0;
  font-size: 1.24rem;
  letter-spacing: 0.012em;
}

.cardSub,
.subtitleInline,
.muted,
.tiny {
  color: var(--text-2);
}

.cardHeader {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.titleRow {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.subtitleInline,
.dateInline,
.eventWhen,
.otherMetaRow,
.tileLabel,
.contactLabel,
.label,
.graphHint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.activePill,
.devPill,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid var(--line-soft);
}

.activePill {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: #eaf4ff;
}

.devPill {
  background: rgba(150, 150, 150, 0.2);
  color: #d7d7d7;
}

.activeDot,
.devDot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.activeDot {
  background: var(--accent);
}

.devDot {
  background: #9f9f9f;
}

.cardList,
.eventHighlights,
.otherWorkList,
.whyList {
  margin: 11px 0 0;
  padding-left: 20px;
  color: var(--text-1);
}

.cardList li,
.eventHighlights li,
.otherWorkList li,
.whyList li {
  margin: 5px 0;
}

.eventHighlights {
  columns: 1;
  column-gap: 0;
  padding-left: 20px;
}

.tagRow {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  background: rgba(178, 178, 178, 0.14);
}

.cardFooterSplit,
.tileGrid {
  display: grid;
  gap: 10px;
}

.cardFooterSplit {
  grid-template-columns: 1fr minmax(210px, 280px);
  margin-top: 14px;
}

.tileGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tile {
  min-height: 74px;
  border: 1px solid rgba(188, 188, 188, 0.24);
  border-radius: 14px;
  padding: 10px;
  background: rgba(6, 18, 24, 0.56);
}

.tileValue,
.contactValue {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.93rem;
  color: var(--text-0);
}

.tileLink {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.18s ease, border-color 0.2s ease;
}

.tileLink:hover,
.tileLink:focus-visible,
.contactItem:hover,
.contactItem:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line-strong));
  outline: none;
}

.thumbCol,
.cardThumb {
  min-height: 100%;
}

.thumbLink,
.thumbImgLarge {
  display: block;
  width: 100%;
  height: 100%;
}

.thumbImgLarge {
  min-height: 220px;
  object-fit: cover;
  border-radius: 15px;
  border: 1px solid rgba(188, 188, 188, 0.24);
}

.thumbLink:hover .thumbImgLarge,
.thumbLink:focus-visible .thumbImgLarge {
  border-color: color-mix(in srgb, var(--accent) 56%, var(--line-strong));
}

.eventTop {
  display: flex;
  gap: 13px;
  align-items: center;
}

.eventOrb {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: rgba(172, 172, 172, 0.15);
  border: 1px solid rgba(205, 205, 205, 0.34);
  color: #efefef;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

.eventRole {
  color: var(--text-1);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.eventAwardTag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 218, 116, 0.72);
  background:
    linear-gradient(165deg, rgba(255, 243, 189, 0.5), rgba(255, 196, 70, 0.26) 56%, rgba(164, 111, 24, 0.28));
  color: rgba(255, 247, 224, 0.98);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.68rem;
  text-shadow: 0 1px 1px rgba(74, 46, 8, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 222, 0.42),
    0 6px 16px rgba(80, 48, 6, 0.38);
}

.eventTitleRow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: baseline;
}

.eventSummary,
.otherWorkSummary {
  margin: 10px 0 0;
  color: var(--text-1);
}

.eventContentRow {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.eventAside {
  align-items: center;
}

.eventTileGrid {
  display: flex;
  flex-direction: row;
  gap: 10px;
  width: auto;
  grid-template-columns: none;
}

.eventTileGrid .tile {
  min-width: 165px;
}

.contactGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.cardHeading {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Keep Other Work cards visually consistent regardless of per-item hue metadata */
.otherWorkCard {
  border-color: rgba(188, 188, 188, 0.22);
  background: linear-gradient(160deg, var(--surface-0), var(--surface-1));
}

.otherWorkCard::before,
.otherWorkCard::after {
  content: none !important;
  display: none !important;
}

.contactList {
  display: grid;
  gap: 10px;
}

.contactItem {
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(188, 188, 188, 0.24);
  background: rgba(13, 13, 13, 0.58);
  border-radius: 13px;
  padding: 11px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  transition: transform 0.18s ease, border-color 0.2s ease;
}

.contactLeft {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contactIcon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(188, 188, 188, 0.28);
  display: grid;
  place-items: center;
  background: rgba(16, 16, 16, 0.78);
}

.contactArrow,
.tileArrowMid {
  font-size: 1.1rem;
  color: var(--accent);
}

.footer,
.siteFooter {
  margin: 34px 0 28px;
  text-align: center;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.reveal {
  opacity: 0;
  transform: translateY(14px) scale(0.99);
}

.revealIn {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.noResults {
  border: 1px dashed var(--line-soft);
  border-radius: 14px;
  padding: 16px;
  color: var(--text-2);
}

.editorShell {
  padding-bottom: 28px;
}

.editorTopBar {
  margin-top: 18px;
  padding: 16px;
}

.projectHeader h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.projectHeader p {
  margin: 8px 0 0;
}

.editorControls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.editorControlsGroup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(188, 188, 188, 0.2);
  background: rgba(10, 10, 10, 0.46);
}

.editorControlsGroup .iconButton,
.editorControlsGroup .controlSeparator,
.editorControlsGroup .inputSmall {
  flex: 0 0 auto;
}

.editorControlsRight {
  flex-wrap: nowrap;
}

#npcSelect {
  min-width: 124px;
  width: 124px;
}

.iconButton,
.btnPrimary,
.btnGhost,
.btnDanger,
.btnTiny {
  min-height: 38px;
  border-radius: 11px;
  border: 1px solid rgba(188, 188, 188, 0.32);
  background: rgba(14, 14, 14, 0.78);
  color: var(--text-0);
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.iconButton:hover,
.btnPrimary:hover,
.btnGhost:hover,
.btnDanger:hover,
.btnTiny:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line-strong));
}

.iconButton:disabled,
.btnPrimary:disabled,
.btnGhost:disabled,
.btnDanger:disabled,
.btnTiny:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.iconButton img {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.iconButtonPrimary,
.btnPrimary {
  background: linear-gradient(
    130deg,
    color-mix(in srgb, var(--accent) 36%, transparent),
    rgba(126, 126, 126, 0.18)
  );
}

.btnGhost {
  background: rgba(18, 18, 18, 0.52);
}

.btnDanger {
  background: rgba(85, 85, 85, 0.32);
  border-color: rgba(130, 130, 130, 0.52);
}

.btnTiny {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 0.79rem;
}

.controlSeparator {
  width: 1px;
  height: 26px;
  background: rgba(188, 188, 188, 0.24);
  margin: 0 4px;
}

.editorMain {
  margin-top: 14px;
}

.graphPane {
  position: relative;
  padding: 14px;
}

.graphHeader {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.graphTitle {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.workspaceFullscreenToggle {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  min-width: 32px;
  padding: 0;
  border-radius: 9px;
  z-index: 8;
}

.workspaceFullscreenGlyph {
  width: 12px;
  height: 12px;
  position: relative;
  display: block;
}

.workspaceFullscreenGlyph::before,
.workspaceFullscreenGlyph::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(224, 224, 224, 0.9);
  border-radius: 2px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.workspaceFullscreenGlyph::after {
  transform: scale(0.62);
  opacity: 0;
}

.workspaceFullscreenToggle[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line-strong));
  background: linear-gradient(
    130deg,
    color-mix(in srgb, var(--accent) 36%, transparent),
    rgba(126, 126, 126, 0.18)
  );
}

.workspaceFullscreenToggle[aria-pressed="true"] .workspaceFullscreenGlyph::before {
  opacity: 0;
  transform: scale(1.15);
}

.workspaceFullscreenToggle[aria-pressed="true"] .workspaceFullscreenGlyph::after {
  opacity: 1;
  transform: scale(1);
}

.keypressLegend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keypressItem {
  border: 1px solid rgba(188, 188, 188, 0.24);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.76rem;
  color: var(--text-1);
}

.keypressItem span {
  font-family: var(--font-mono);
  margin-right: 4px;
  color: var(--text-0);
}

.graphViewport {
  position: relative;
  min-height: 72vh;
  overflow: auto;
  --workspace-pan-x: 0px;
  --workspace-pan-y: 0px;
  --workspace-zoom: 1;
  border: 1px solid rgba(188, 188, 188, 0.24);
  border-radius: 15px;
  background:
    linear-gradient(rgba(188, 188, 188, 0.042) 1px, transparent 1px),
    linear-gradient(90deg, rgba(188, 188, 188, 0.036) 1px, transparent 1px),
    linear-gradient(160deg, rgba(10, 10, 10, 0.9), rgba(18, 18, 18, 0.9));
  background-size:
    calc(34px * var(--workspace-zoom)) calc(34px * var(--workspace-zoom)),
    calc(34px * var(--workspace-zoom)) calc(34px * var(--workspace-zoom)),
    auto;
  background-position:
    var(--workspace-pan-x) var(--workspace-pan-y),
    var(--workspace-pan-x) var(--workspace-pan-y),
    0 0;
}

.graphViewport::before,
.graphViewport::after {
  content: none !important;
  display: none !important;
}

.graphViewport.isPanning {
  cursor: grabbing;
}

.edgeLayer,
.conditionLayer,
.nodeLayer {
  position: absolute;
  inset: 0;
}

.edgeLayer {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.edgeLayer path {
  stroke: color-mix(in srgb, var(--accent) 58%, #d6d6d6);
  stroke-width: 2.2;
  fill: none;
}

.nodeCard {
  position: absolute;
  width: 290px;
  border: 1px solid rgba(188, 188, 188, 0.28);
  border-radius: 15px;
  background: linear-gradient(165deg, rgba(20, 20, 20, 0.92), rgba(12, 12, 12, 0.9));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.5);
  color: var(--text-0);
}

.nodeCard.nodeSelected {
  border-color: color-mix(in srgb, var(--accent) 72%, #f0f0f0);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent), 0 18px 36px rgba(0, 0, 0, 0.55);
}

/* Restore type-based node card differentiation for graph clarity */
.nodeCard.nodeDefault {
  border-color: rgba(154, 163, 176, 0.5);
  background: linear-gradient(165deg, rgba(29, 33, 40, 0.92), rgba(14, 16, 21, 0.9));
}

.nodeCard.nodeAuto {
  border-color: rgba(86, 221, 169, 0.56);
  background: linear-gradient(165deg, rgba(16, 40, 34, 0.92), rgba(12, 23, 20, 0.9));
}

.nodeCard.nodeChoice {
  border-color: rgba(98, 166, 255, 0.58);
  background: linear-gradient(165deg, rgba(15, 31, 52, 0.92), rgba(11, 21, 35, 0.9));
}

.nodeCard.nodeQuest {
  border-color: rgba(189, 125, 255, 0.58);
  background: linear-gradient(165deg, rgba(36, 20, 54, 0.9), rgba(19, 14, 29, 0.9));
}

.nodeCard.nodeEnd {
  border-color: rgba(255, 123, 123, 0.6);
  background: linear-gradient(165deg, rgba(50, 20, 24, 0.92), rgba(25, 12, 14, 0.9));
}

.nodeHeader {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(188, 188, 188, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nodeTitle {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.nodeBody {
  width: 100%;
  min-height: 74px;
  border: 0;
  border-bottom: 1px solid rgba(188, 188, 188, 0.18);
  background: rgba(10, 20, 28, 0.75);
  color: var(--text-0);
  resize: vertical;
  padding: 10px 12px;
  font: inherit;
}

.nodeMeta,
.nodeRedirect,
.nodeOptions {
  padding: 10px 12px;
  display: grid;
  gap: 9px;
}

.nodeMetaLabel,
.nodeOptionsTitle {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}

.nodeMetaToggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-1);
}

.nodeOptionsList {
  display: grid;
  gap: 8px;
}

.nodeOptionRow {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.nodeOptionsActions {
  display: flex;
  justify-content: flex-end;
}

.nodeConnector {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(188, 188, 188, 0.4);
  background: rgba(9, 23, 30, 0.85);
}

.conditionLegend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.conditionLegendItem {
  border: 1px solid rgba(188, 188, 188, 0.26);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.conditionLegendSwatch {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
}

.conditionGroup {
  position: absolute;
  border: 1px dashed rgba(188, 188, 188, 0.38);
  border-radius: 18px;
  background: rgba(188, 188, 188, 0.08);
  pointer-events: none;
}

.conditionGroupLabel {
  position: absolute;
  top: -13px;
  left: 10px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(9, 20, 26, 0.88);
  border: 1px solid rgba(188, 188, 188, 0.24);
  border-radius: 999px;
  padding: 3px 8px;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
}

.modalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 7, 10, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
  padding: 18px;
}

.modalOverlay.isVisible {
  display: flex;
}

.modalCard {
  width: min(690px, calc(100% - 28px));
  padding: 18px;
}

.modalCard h2 {
  margin: 0;
  font-family: var(--font-display);
}

.modalActions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.formGrid {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.formGrid label {
  display: grid;
  gap: 6px;
  color: var(--text-1);
}

.inputArea {
  min-height: 88px;
}

.formCheckbox {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.fieldError {
  min-height: 14px;
  color: #ff948d;
  font-size: 0.76rem;
}

.required {
  color: #ffb38f;
}

.inputError {
  border-color: #ff8f86;
}

.modalFileInput {
  width: 100%;
  margin-top: 10px;
}

.emulatorCard {
  width: min(920px, calc(100% - 28px));
}

.emulatorHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.emulatorControls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-top: 12px;
}

.emulatorChat {
  margin-top: 12px;
  border: 1px solid rgba(188, 188, 188, 0.24);
  border-radius: 14px;
  min-height: 170px;
  max-height: 46vh;
  overflow: auto;
  padding: 12px;
  background: rgba(6, 17, 23, 0.74);
  display: grid;
  gap: 8px;
}

.emulatorMessage {
  max-width: 78%;
  padding: 9px 11px;
  border-radius: 12px;
}

.emulatorMessage-npc {
  background: rgba(186, 186, 186, 0.14);
  border: 1px solid rgba(186, 186, 186, 0.28);
}

.emulatorMessage-player {
  margin-left: auto;
  background: rgba(122, 122, 122, 0.2);
  border: 1px solid rgba(145, 145, 145, 0.3);
}

.emulatorActions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tiny {
  font-size: 0.76rem;
}

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

.isHidden {
  display: none !important;
}

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

  .cardThumb {
    order: -1;
  }

  .thumbImgLarge {
    min-height: 190px;
  }

  .cardFooterSplit {
    grid-template-columns: 1fr;
  }

  .contactGrid,
  .statsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .container {
    width: min(1240px, calc(100% - 28px));
  }

  .topNav {
    border-radius: var(--radius-card);
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .heroTop {
    grid-template-columns: 1fr;
  }

  .sectionTitle {
    flex-direction: column;
    align-items: flex-start;
  }

  .controls {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .editorControls {
    flex-direction: column;
    align-items: stretch;
  }

  .editorControlsGroup {
    width: 100%;
  }

  .statsGrid,
  .contactGrid,
  .tileGrid {
    grid-template-columns: 1fr;
  }

  .eventContentRow {
    grid-template-columns: 1fr;
  }

  .eventTileGrid {
    width: 100%;
    flex-wrap: wrap;
  }

  .eventTileGrid .tile {
    min-width: 0;
    flex: 1 1 180px;
  }

  .graphViewport {
    min-height: 62vh;
  }

  .nodeCard {
    width: 248px;
  }

  .nodeOptionRow {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.nodesBody.isWorkspaceFullscreen .bgGlow,
.nodesBody.isWorkspaceFullscreen .header,
.nodesBody.isWorkspaceFullscreen .siteFooter {
  display: none !important;
}

.nodesBody.isWorkspaceFullscreen .container.editorShell {
  width: 100vw;
  max-width: none;
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
}

.nodesBody.isWorkspaceFullscreen .editorTopBar {
  position: fixed;
  right: 30px;
  top: 30px;
  bottom: auto;
  width: auto;
  margin: 0;
  padding: 0;
  z-index: 25;
  display: flex;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  border-radius: 0;
}

.nodesBody.isWorkspaceFullscreen .projectHeader,
.nodesBody.isWorkspaceFullscreen #statusText {
  display: none !important;
}

.nodesBody.isWorkspaceFullscreen .editorControls {
  width: auto;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 6px;
  margin-top: 0;
}

.nodesBody.isWorkspaceFullscreen .editorControlsGroup {
  width: auto;
  flex-direction: column;
  align-items: flex-end;
  flex-wrap: nowrap;
  padding: 0;
  gap: 6px;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.nodesBody.isWorkspaceFullscreen .editorControlsRight {
  flex-wrap: nowrap;
}

.nodesBody.isWorkspaceFullscreen .controlSeparator {
  display: none;
}

.nodesBody.isWorkspaceFullscreen .editorTopBar .iconButton {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 0;
}

.nodesBody.isWorkspaceFullscreen #npcSelect {
  display: none;
}

.nodesBody.isWorkspaceFullscreen .editorMain {
  margin-top: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
}

.nodesBody.isWorkspaceFullscreen .graphPane {
  min-height: 100vh;
  height: 100vh;
  padding: 10px;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  overflow: hidden;
}

.nodesBody.isWorkspaceFullscreen .graphHeader {
  display: none;
}

.nodesBody.isWorkspaceFullscreen .graphViewport {
  min-height: 0;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.nodesBody.isWorkspaceFullscreen .workspaceFullscreenToggle {
  top: 30px;
  left: 14px;
  right: auto;
  border-radius: 0;
}

.nodesBody.isWorkspaceFullscreen {
  overflow: hidden;
}
