:root {
  --bg-pearl: #fffafc;
  --bg-blush: #ffd1dc;
  --bg-lilac: #e6e6fa;
  --ink-deep: #3b2f46;
  --ink-muted: rgba(59, 47, 70, 0.58);
  --line-soft: rgba(255, 255, 255, 0.78);
  --glass-fill: rgba(255, 255, 255, 0.44);
  --glass-fill-strong: rgba(255, 255, 255, 0.62);
  --glass-shadow: 0 24px 80px rgba(167, 137, 196, 0.18);
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --transition-base: 220ms ease;
  --font-sans: "Satoshi", "SF Pro Display", "Avenir Next", "Segoe UI Variable", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "IBM Plex Mono", monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
  font-family: var(--font-sans);
  color: var(--ink-deep);
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0) 32%),
    radial-gradient(circle at 82% 14%, rgba(255, 216, 234, 0.7) 0%, rgba(255, 216, 234, 0) 30%),
    radial-gradient(circle at 74% 68%, rgba(230, 230, 250, 0.78) 0%, rgba(230, 230, 250, 0) 36%),
    linear-gradient(160deg, #fffefe 0%, #fff5f8 44%, #fbf7ff 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.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;
}

.mesh {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.72;
  mix-blend-mode: screen;
  animation: drift 18s ease-in-out infinite alternate;
}

.mesh-orb-a {
  top: 8%;
  left: -4%;
  width: 28rem;
  height: 28rem;
  background: radial-gradient(circle, rgba(255, 209, 220, 0.7) 0%, rgba(255, 209, 220, 0) 68%);
}

.mesh-orb-b {
  top: 16%;
  right: -6%;
  width: 24rem;
  height: 24rem;
  background: radial-gradient(circle, rgba(230, 230, 250, 0.82) 0%, rgba(230, 230, 250, 0) 70%);
  animation-duration: 22s;
}

.mesh-orb-c {
  bottom: -4%;
  left: 28%;
  width: 32rem;
  height: 32rem;
  background: radial-gradient(circle, rgba(255, 243, 247, 0.9) 0%, rgba(255, 243, 247, 0) 70%);
  animation-duration: 24s;
}

.mesh-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 7rem 7rem;
  mask-image: radial-gradient(circle at center, black 20%, transparent 86%);
  opacity: 0.32;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 2rem;
}

.glass-panel,
.glass-pill {
  position: relative;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.64);
  box-shadow: var(--glass-shadow), var(--glass-inner);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
}

.glass-panel::before,
.glass-pill::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.7);
  pointer-events: none;
  mask: linear-gradient(white, white) content-box, linear-gradient(white, white);
  mask-composite: exclude;
  padding: 0.5px;
}

.command-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(44rem, calc(100vw - 4rem));
  margin: 0 auto 1.75rem;
  padding: 1rem 1.2rem;
  border-radius: 999px;
}

.command-bar__icon {
  display: grid;
  place-items: center;
  width: 3.15rem;
  height: 3.15rem;
  border-radius: 999px;
  background: linear-gradient(160deg, rgba(255, 217, 232, 0.85), rgba(231, 222, 255, 0.92));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.72),
    0 14px 30px rgba(202, 161, 210, 0.24);
}

.command-bar__icon span {
  width: 1rem;
  height: 1.4rem;
  border: 2.5px solid rgba(102, 76, 128, 0.72);
  border-bottom-width: 5px;
  border-radius: 0.8rem;
  position: relative;
}

.command-bar__icon span::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.55rem;
  width: 0.65rem;
  height: 0.25rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(102, 76, 128, 0.72);
}

.command-bar__copy {
  flex: 1;
}

.command-bar__prompt {
  margin: 0.18rem 0 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgba(59, 47, 70, 0.82);
}

.command-bar__shortcut {
  padding: 0.52rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 209, 220, 0.58);
  color: rgba(105, 74, 103, 0.9);
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(96, 76, 116, 0.52);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(15rem, 18rem) minmax(32rem, 1fr) minmax(20rem, 24rem);
  gap: 1.5rem;
  align-items: stretch;
}

.sidebar,
.editor,
.assistant-panel {
  border-radius: var(--radius-xl);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1.4rem;
  min-height: calc(100vh - 8rem);
}

.sidebar h1 {
  margin: 0.35rem 0 0;
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}

.project-pill {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.project-pill strong,
.metric strong,
.assistant-panel__header h2,
.bento-card strong {
  display: block;
  letter-spacing: -0.03em;
}

.project-pill p,
.metric span,
.bento-card span,
.chat-bubble p {
  margin: 0;
}

.project-pill__dot,
.presence-pill__dot,
.status-chip__dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: linear-gradient(160deg, #ff8bb4, #a784ff);
  box-shadow: 0 0 0 0.3rem rgba(255, 209, 220, 0.34);
}

.file-tree {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: rgba(76, 58, 94, 0.84);
  padding: 0.85rem 0.95rem;
  text-align: left;
  transition: transform var(--transition-base), background var(--transition-base), box-shadow var(--transition-base);
}

.tree-row:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.28);
}

.tree-row--active {
  background: linear-gradient(130deg, rgba(255, 213, 227, 0.76), rgba(241, 236, 255, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 12px 30px rgba(208, 168, 211, 0.18);
}

.tree-icon {
  position: relative;
  width: 1rem;
  height: 1rem;
  border: 1.8px solid rgba(140, 112, 175, 0.68);
  flex-shrink: 0;
}

.tree-icon.folder {
  border-radius: 0.38rem;
  border-top-left-radius: 0.16rem;
}

.tree-icon.folder::before {
  content: "";
  position: absolute;
  top: -0.28rem;
  left: 0.08rem;
  width: 0.5rem;
  height: 0.34rem;
  border: 1.8px solid rgba(140, 112, 175, 0.68);
  border-bottom: 0;
  border-radius: 0.24rem 0.24rem 0 0;
}

.tree-icon.file {
  border-radius: 0.22rem;
}

.tree-icon.file::before {
  content: "";
  position: absolute;
  top: -0.02rem;
  right: -0.02rem;
  width: 0.42rem;
  height: 0.42rem;
  border-top: 1.8px solid rgba(140, 112, 175, 0.68);
  border-right: 1.8px solid rgba(140, 112, 175, 0.68);
}

.sidebar-card {
  margin-top: auto;
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 0.8rem;
  margin-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.54);
}

.metric strong {
  font-size: 1.2rem;
}

.metric span {
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.editor {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 8rem);
  overflow: hidden;
}

.editor__topbar,
.editor__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.35rem;
}

.editor__topbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.44);
}

.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.78rem 1.05rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.tab--active {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.tab__glow {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: linear-gradient(160deg, #ff98c1, #9cc8ff);
  box-shadow: 0 0 1rem rgba(204, 170, 255, 0.65);
}

.editor__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.live-pill {
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  background: linear-gradient(140deg, rgba(255, 222, 232, 0.82), rgba(228, 234, 255, 0.84));
  color: rgba(98, 74, 119, 0.92);
  font-weight: 700;
}

.editor__content {
  position: relative;
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1rem;
  padding: 1.6rem 1.4rem 1.8rem;
  flex: 1;
}

.editor__content::before {
  content: "";
  position: absolute;
  inset: 1.2rem;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.16)),
    rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.editor__gutter,
.editor__code {
  position: relative;
  z-index: 1;
}

.editor__gutter {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: flex-end;
  padding: 0.6rem 0 0;
  color: rgba(90, 78, 105, 0.34);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.editor__code {
  margin: 0;
  padding: 0.45rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.98rem;
  line-height: 1.85;
  white-space: pre-wrap;
  color: rgba(48, 39, 58, 0.92);
}

.token-keyword {
  color: #d864ba;
}

.token-function {
  color: #5cc7ff;
}

.token-variable {
  color: #8d76ff;
}

.token-property {
  color: #ff9d7d;
}

.token-string {
  color: #c06bff;
}

.editor__footer {
  border-top: 1px solid rgba(255, 255, 255, 0.42);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.74rem 0.92rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  font-size: 0.88rem;
}

.status-chip--soft {
  color: rgba(95, 71, 118, 0.88);
}

.assistant-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: calc(100vh - 8rem);
  padding: 1.3rem;
}

.assistant-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.assistant-panel__header h2 {
  margin: 0.3rem 0 0;
  font-size: 1.5rem;
}

.presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.82rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  font-size: 0.82rem;
  color: rgba(82, 62, 103, 0.86);
}

.chat-feed {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  flex: 1;
}

.chat-bubble {
  padding: 1rem 1.05rem;
  border-radius: 24px;
}

.chat-bubble--user {
  align-self: flex-end;
  max-width: 88%;
}

.chat-bubble--agent {
  align-self: flex-start;
  max-width: 92%;
  background: linear-gradient(140deg, rgba(255, 222, 235, 0.9), rgba(236, 232, 255, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 22px 46px rgba(200, 171, 224, 0.18);
}

.chat-bubble--wide {
  max-width: none;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.bento-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-height: 7.3rem;
  padding: 1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 18px 44px rgba(192, 170, 223, 0.16);
}

.bento-card--accent {
  flex-direction: row;
  align-items: center;
  background: linear-gradient(145deg, rgba(255, 240, 246, 0.86), rgba(238, 236, 255, 0.94));
}

.bento-card__icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-right: 0.8rem;
  border-radius: 1rem;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.92), rgba(231, 224, 255, 0.84));
  color: #7f68ff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.86),
    0 14px 30px rgba(169, 139, 214, 0.24);
}

.prompt-box {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.95rem 1rem;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.3));
}

.prompt-box input {
  flex: 1;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(67, 53, 81, 0.78);
}

.prompt-box input:focus {
  outline: none;
}

.prompt-box__send {
  border: 0;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  background: linear-gradient(140deg, rgba(255, 216, 228, 0.88), rgba(231, 233, 255, 0.92));
  color: rgba(86, 66, 110, 0.92);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.prompt-box__orb {
  position: relative;
  width: 2.55rem;
  height: 2.55rem;
  flex-shrink: 0;
}

.orb-core,
.orb-wave {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.orb-core {
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.92), rgba(255, 125, 197, 0.7) 34%, rgba(146, 124, 255, 0.82) 70%);
  box-shadow:
    0 0 26px rgba(193, 133, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  animation: pulse 3s ease-in-out infinite;
}

.orb-wave {
  border: 1px solid rgba(203, 178, 255, 0.62);
  opacity: 0;
}

.orb-wave-a {
  animation: ripple 2.4s linear infinite;
}

.orb-wave-b {
  animation: ripple 2.4s linear 1.2s infinite;
}

[data-tilt] {
  transform-style: preserve-3d;
  transition: transform 180ms ease;
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(2%, -2%, 0) scale(1.08);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.94);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes ripple {
  0% {
    transform: scale(0.8);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}

@media (max-width: 1200px) {
  .workspace {
    grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
  }

  .assistant-panel {
    grid-column: 1 / -1;
    min-height: auto;
  }
}

@media (max-width: 880px) {
  .app-shell {
    padding: 1.2rem;
  }

  .command-bar {
    width: min(100%, 44rem);
    margin-bottom: 1rem;
  }

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

  .sidebar,
  .editor,
  .assistant-panel {
    min-height: auto;
  }

  .editor__content {
    grid-template-columns: 2.8rem 1fr;
    padding: 1rem;
  }

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

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