@import url('/assets/css/tokens.css');

:root {
  --launcher-bg: #07080c;
  --launcher-panel: rgba(21, 23, 31, .74);
  --launcher-line: rgba(255, 255, 255, .1);
  --launcher-text: #f6f7fb;
  --launcher-muted: #9398a8;
  --launcher-accent: #f1f2f4;
  --launcher-cyan: #2563eb;
  --launcher-amber: #fbbf6a;
}

* { box-sizing: border-box; }

body.launcher-page [hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body.launcher-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--launcher-text);
  background:
    radial-gradient(circle at 50% -20%, #24262b 0, transparent 42%),
    linear-gradient(180deg, #090a10 0%, var(--launcher-bg) 48%, #08090d 100%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

button { color: inherit; }

a { color: inherit; text-decoration: none; }

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

.launcher-aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.launcher-aurora::after {
  position: absolute;
  inset: 0;
  content: "";
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.launcher-aurora span {
  position: absolute;
  width: 44vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .1;
}

.launcher-aurora span:nth-child(1) {
  top: 5%;
  left: -25%;
  background: #f5f5f5;
}

.launcher-aurora span:nth-child(2) {
  top: 18%;
  right: -26%;
  background: #a3a3a3;
}

.launcher-aurora span:nth-child(3) {
  bottom: -30%;
  left: 28%;
  background: #525252;
}

.launcher-shell {
  width: min(1420px, calc(100% - 64px));
  margin: 0 auto;
}

.launcher-nav {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1420px, calc(100% - 64px));
  height: 84px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.launcher-brand,
.launcher-brand > span:last-child,
.launcher-nav__actions,
.launcher-nav__center { display: flex; align-items: center; }

.launcher-brand { gap: 12px; justify-self: start; }

.launcher-brand > span:last-child { gap: 8px; }

.launcher-brand strong { font-size: 15px; letter-spacing: -.02em; }

.launcher-brand small {
  color: var(--launcher-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.launcher-brand__mark {
  position: relative;
  display: block;
  width: 29px;
  height: 29px;
  transform: rotate(30deg);
}

.launcher-brand__mark i {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(255, 255, 255, .9);
  border-radius: 4px;
  background: rgba(255, 255, 255, .05);
}

.launcher-brand__mark i:nth-child(1) { top: 0; left: 8px; }
.launcher-brand__mark i:nth-child(2) { bottom: 2px; left: 1px; }
.launcher-brand__mark i:nth-child(3) { right: 1px; bottom: 2px; }

.launcher-nav__center {
  gap: 8px;
  color: var(--launcher-muted);
  font-size: 11px;
  letter-spacing: .02em;
}

.launcher-nav__center strong { color: #cdd0db; font-weight: 550; }

.launcher-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--launcher-cyan);
  box-shadow: 0 0 12px var(--launcher-cyan);
}

.launcher-nav__separator {
  width: 1px;
  height: 12px;
  margin: 0 3px;
  background: rgba(255, 255, 255, .14);
}

.launcher-nav__actions { gap: 18px; justify-self: end; }

.launcher-theme {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #c8cad1;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  background: rgba(255, 255, 255, .035);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease,
    background 180ms ease, transform 180ms ease;
}

.launcher-theme:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08);
  transform: rotate(8deg);
}

.launcher-theme svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.launcher-theme__moon { display: none; }

.launcher-mcp-connection {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  color: #c8cad1;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease,
    background 180ms ease;
}

.launcher-mcp-connection:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08);
}

.launcher-add-computer svg {
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.launcher-mcp-connection__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8b8f9a;
  box-shadow: 0 0 8px rgba(139, 143, 154, .35);
}

.launcher-mcp-connection__dot[data-state="connected"] {
  background: #6ee7b7;
  box-shadow: 0 0 10px rgba(110, 231, 183, .75);
}

.launcher-mcp-connection__dot[data-state="configured"],
.launcher-mcp-connection__dot[data-state="error"] {
  background: #f4c95d;
  box-shadow: 0 0 10px rgba(244, 201, 93, .65);
}

.launcher-mock-badge {
  padding: 5px 9px;
  color: #b8bac1;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.launcher-exit {
  color: #b8bbc6;
  font-size: 11px;
  transition: color 180ms ease;
}

.launcher-exit:hover { color: #fff; }

.launcher-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  align-items: center;
  min-height: 440px;
  padding: 70px 5% 55px;
}

.launcher-kicker {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 22px;
  color: #aeb2c0;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.launcher-kicker i {
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, #d4d4d8, transparent);
}

.launcher-hero h1 {
  max-width: 790px;
  padding-right: .12em;
  margin: 0;
  font-size: clamp(48px, 6vw, 84px);
  font-weight: 560;
  line-height: 1.02;
  letter-spacing: -.065em;
}

.launcher-hero h1 em {
  display: inline-block;
  padding-right: .12em;
  padding-bottom: .12em;
  margin-bottom: -.12em;
  color: transparent;
  background: linear-gradient(105deg, #aeb4ca 0%, #fff 40%, #8f96ab 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-style: normal;
}

.launcher-hero__copy > p {
  max-width: 540px;
  margin: 27px 0 0;
  color: var(--launcher-muted);
  font-size: 15px;
  line-height: 1.7;
}

.launcher-orbit {
  position: relative;
  width: 350px;
  aspect-ratio: 1;
  justify-self: end;
}

.launcher-orbit__ring,
.launcher-orbit__core,
.launcher-orbit__node { position: absolute; border-radius: 50%; }

.launcher-orbit__ring { inset: 0; border: 1px solid rgba(255, 255, 255, .08); }

.launcher-orbit__ring--outer {
  background: radial-gradient(circle, transparent 58%, rgba(255, 255, 255, .035));
  box-shadow: inset 0 0 80px rgba(255, 255, 255, .025);
}

.launcher-orbit__ring--inner {
  inset: 72px;
  border-style: dashed;
  animation: orbit-spin 28s linear infinite;
}

.launcher-orbit__core {
  inset: 115px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(145deg, rgba(34, 36, 48, .9), rgba(12, 13, 18, .88));
  box-shadow: 0 25px 80px rgba(0, 0, 0, .45),
    0 0 70px rgba(255, 255, 255, .08);
  backdrop-filter: blur(20px);
}

.launcher-brand__mark--large { transform: rotate(30deg) scale(1.55); }

.launcher-orbit__node {
  width: 9px;
  height: 9px;
  border: 2px solid #0a0b10;
  background: var(--launcher-accent);
  box-shadow: 0 0 18px currentColor;
}

.launcher-orbit__node--one { top: 43px; left: 72px; color: var(--launcher-accent); }
.launcher-orbit__node--two { right: 10px; bottom: 115px; color: var(--launcher-cyan); background: currentColor; }
.launcher-orbit__node--three { bottom: 22px; left: 104px; color: var(--launcher-cyan); background: currentColor; }

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

.launcher-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.launcher-section-head > div { display: flex; gap: 15px; align-items: center; }

.launcher-section-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.025em;
}

.launcher-section-head > p {
  margin: 0;
  color: #777c8b;
  font-size: 10px;
}

.agent-picker__tools {
  display: flex;
  gap: 14px;
  align-items: center;
}

.agent-picker__tools > p {
  margin: 0;
  color: #777c8b;
  font-size: 10px;
}

.agent-rail-controls {
  display: flex;
  gap: 5px;
}

.agent-rail-controls button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--launcher-muted);
  border: 1px solid var(--launcher-line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.agent-rail-controls button:hover:not(:disabled) {
  color: var(--launcher-text);
  background: color-mix(in srgb, var(--launcher-text) 7%, transparent);
}

.agent-rail-controls button:disabled { opacity: .25; }

.agent-rail-controls svg {
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.launcher-step {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  color: #b7bac5;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.agent-picker { padding: 0 0 80px; }

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

.agent-card {
  --card-accent: var(--launcher-accent);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 310px;
  padding: 20px;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--launcher-line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(25, 27, 36, .82), rgba(12, 13, 18, .72));
  box-shadow: 0 18px 45px rgba(0, 0, 0, .16);
  cursor: pointer;
  backdrop-filter: blur(24px);
  transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.agent-card--cyan { --card-accent: var(--launcher-cyan); }
.agent-card--amber { --card-accent: var(--launcher-amber); }

.agent-card:hover:not([aria-disabled="true"]),
.agent-card[aria-pressed="true"] {
  border-color: rgba(255, 255, 255, .28);
  transform: translateY(-4px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .3),
    0 0 50px rgba(255, 255, 255, .035);
}

.agent-card[aria-pressed="true"]::after {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 19px;
  height: 19px;
  content: "✓";
  color: #0a0b0e;
  border-radius: 50%;
  background: var(--launcher-accent);
  font-size: 11px;
  font-weight: 900;
  line-height: 19px;
  text-align: center;
}

.agent-card[aria-disabled="true"] { cursor: not-allowed; opacity: .47; }

.agent-card__glow {
  position: absolute;
  top: -100px;
  left: 12%;
  width: 76%;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .75);
  filter: blur(80px);
  opacity: .09;
}

.agent-card__top,
.agent-card__device,
.agent-card__meta,
.agent-card__action { display: flex; }

.agent-card__top { position: relative; align-items: flex-start; justify-content: space-between; gap: 12px; }
.agent-card__device { align-items: center; gap: 11px; min-width: 0; }

.agent-card__screen {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 7px;
  background: #0a0b0f;
  box-shadow: inset 0 0 14px color-mix(in srgb, var(--card-accent) 12%, transparent);
}

.agent-card__screen span { color: var(--card-accent); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.agent-card__windows {
  width: 16px;
  height: 16px;
  fill: var(--card-accent);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--card-accent) 45%, transparent));
}
.agent-card__identity { min-width: 0; }
.agent-card__identity strong,
.agent-card__identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-card__identity strong { margin-bottom: 2px; font-size: 13px; }
.agent-card__identity small { color: var(--launcher-muted); font-size: 9px; }

.agent-card__status {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
  align-items: center;
  padding: 5px 8px;
  color: #a5adba;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
  font-size: 8px;
  text-transform: uppercase;
}

.agent-card__status i { width: 5px; height: 5px; border-radius: 50%; background: #717683; }
.agent-card__status--online i { background: var(--launcher-cyan); box-shadow: 0 0 8px var(--launcher-cyan); }

.agent-card__visual {
  position: relative;
  display: grid;
  flex: 1;
  place-items: center;
  min-height: 115px;
}

.agent-card__platform {
  display: grid;
  place-items: center;
  width: 74px;
  height: 58px;
  border: 1px solid color-mix(in srgb, var(--card-accent) 35%, transparent);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .015));
  box-shadow: inset 0 1px rgba(255, 255, 255, .12), 0 20px 30px rgba(0, 0, 0, .3);
}

.agent-card__platform > span {
  position: relative;
  z-index: 1;
  color: var(--card-accent);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .08em;
}

.agent-card__platform::before {
  position: absolute;
  inset: 9px;
  content: "";
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 9px;
}

.agent-card__platform::after {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 4px;
  height: 4px;
  content: "";
  border-radius: 50%;
  background: var(--card-accent);
  box-shadow: 0 0 8px var(--card-accent);
}

.agent-card__pulse {
  position: absolute;
  width: 112px;
  height: 72px;
  border: 1px solid color-mix(in srgb, var(--card-accent) 13%, transparent);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.agent-card__pulse--second { width: 145px; height: 92px; opacity: .5; transform: rotate(10deg); }

.agent-card__meta {
  gap: 12px;
  padding: 13px 0 15px;
  border-top: 1px solid rgba(255, 255, 255, .065);
}

.agent-card__meta > span { min-width: 0; }
.agent-card__meta > span:first-child { flex: 1; }

.agent-card__runtime-label {
  min-width: 0;
  overflow: hidden;
  color: #858b99;
  font-size: 8px;
  font-weight: 450;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-card__action > [data-agent-action] {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.agent-card__meta small,
.agent-card__meta strong { display: block; }
.agent-card__meta small { margin-bottom: 4px; color: #666b79; font-size: 8px; text-transform: uppercase; }
.agent-card__meta strong { overflow: hidden; color: #b7bbc7; font-size: 9px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }

.agent-card__action {
  align-items: center;
  justify-content: space-between;
  color: #c9ccd5;
  font-size: 10px;
  font-weight: 550;
}

.agent-card__action i { color: var(--card-accent); font-size: 15px; font-style: normal; transition: transform 180ms ease; }
.agent-card:hover .agent-card__action i { transform: translateX(3px); }

.workspace-picker {
  position: relative;
  max-height: 0;
  padding: 0 2px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(25px);
  transition: max-height 700ms ease, opacity 420ms ease, transform 420ms ease, padding 420ms ease;
}

.workspace-picker.is-visible {
  max-height: 1500px;
  padding-top: 20px;
  padding-bottom: 90px;
  opacity: 1;
  transform: translateY(0);
}

.workspace-picker__halo {
  position: absolute;
  top: 0;
  left: 10%;
  z-index: -1;
  width: 80%;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .045);
  filter: blur(110px);
}

.launcher-section-head--workspace { align-items: center; }
.workspace-picker__context { display: block; margin-bottom: 4px; color: #747987; font-size: 9px; text-transform: uppercase; }
.workspace-picker__context strong { color: #b7bbc8; font-weight: 650; }

.workspace-search {
  display: flex;
  align-items: center;
  width: min(330px, 100%);
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 11px;
  background: rgba(255, 255, 255, .035);
  transition: border-color 180ms ease, background 180ms ease;
}

.workspace-search:focus-within { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .055); }
.workspace-search svg { width: 16px; fill: none; stroke: #777c8b; stroke-width: 1.5; }
.workspace-search input { flex: 1; min-width: 0; height: 42px; padding: 0 10px; color: #eceef5; border: 0; outline: 0; background: transparent; font-size: 11px; }
.workspace-search input::placeholder { color: #696e7b; }
.workspace-search kbd { padding: 2px 5px; color: #6d7280; border: 1px solid rgba(255, 255, 255, .09); border-radius: 5px; background: rgba(255, 255, 255, .03); font-size: 8px; }

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

.workspace-add {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  color: var(--launcher-text);
  border: 1px solid var(--launcher-line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--launcher-text) 5%, transparent);
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease,
    transform 160ms ease;
}

.workspace-add > span:first-child { font-size: 14px; line-height: 1; }
.workspace-add:hover {
  border-color: color-mix(in srgb, var(--launcher-text) 30%, transparent);
  background: color-mix(in srgb, var(--launcher-text) 9%, transparent);
  transform: translateY(-1px);
}

.workspace-view {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
}

.workspace-view button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #707581;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

.workspace-view button[aria-pressed="true"] {
  color: #f4f4f5;
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.workspace-view svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.workspace-list { display: grid; gap: 10px; }

.workspace-list[data-view="list"] {
  grid-auto-rows: max-content;
  align-content: start;
}

.workspace-list[data-view="grid"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 12px;
}

.workspace-list[data-view="grid"] .workspace-tile {
  display: block;
  min-height: 0;
  padding: 12px 13px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(25, 27, 36, .82), rgba(12, 13, 18, .72));
  box-shadow: 0 14px 34px rgba(0, 0, 0, .12);
}

.workspace-list[data-view="grid"] .workspace-tile__icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.workspace-list[data-view="grid"] .workspace-tile__icon::before {
  top: 6px;
  left: 7px;
  width: 10px;
  height: 3px;
}

.workspace-list[data-view="grid"] .workspace-tile__icon::after {
  inset: 9px 5px 5px;
  border-radius: 3px;
}

.workspace-list[data-view="grid"] .workspace-tile__eyebrow {
  display: none;
}

.workspace-list[data-view="grid"] .workspace-tile__heading,
.workspace-list[data-view="grid"] .workspace-tile__foot {
  align-items: center;
}

.workspace-list[data-view="grid"] .workspace-tile__identity-copy > p {
  margin-top: 3px;
}

.workspace-list[data-view="grid"] .workspace-tile__foot {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 9px;
  padding-top: 8px;
}

.workspace-list[data-view="grid"] .workspace-tile__actions {
  width: auto;
  margin-left: auto;
}

.workspace-list[data-view="grid"] .workspace-action {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 8px;
  line-height: 1.1;
  white-space: nowrap;
}

.workspace-tile {
  --tile-accent: var(--launcher-accent);
  display: block;
  position: relative;
  min-width: 0;
  padding: 15px 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 16px;
  background: linear-gradient(100deg, rgba(25, 27, 35, .68), rgba(13, 14, 20, .55));
  backdrop-filter: blur(20px);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.workspace-tile::before {
  position: absolute;
  top: -70px;
  left: 12%;
  z-index: 0;
  width: 70%;
  height: 110px;
  content: "";
  border-radius: 50%;
  background: var(--tile-accent);
  filter: blur(75px);
  opacity: .035;
  pointer-events: none;
}

.workspace-tile__icon,
.workspace-tile__body { position: relative; z-index: 1; }

.workspace-tile--cyan { --tile-accent: var(--launcher-cyan); }
.workspace-tile--amber { --tile-accent: var(--launcher-amber); }
.workspace-tile:hover { border-color: rgba(255, 255, 255, .2); background: linear-gradient(145deg, rgba(29, 31, 41, .86), rgba(15, 16, 22, .74)); transform: translateY(-2px); }

.workspace-tile__icon {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--tile-accent) 20%, transparent);
  border-radius: 13px;
  background: color-mix(in srgb, var(--tile-accent) 6%, #101118);
}

.workspace-tile__icon::before {
  position: absolute;
  top: 7px;
  left: 8px;
  width: 11px;
  height: 3px;
  content: "";
  border-radius: 3px 3px 0 0;
  background: color-mix(in srgb, var(--tile-accent) 45%, #fff);
}

.workspace-tile__icon::after {
  position: absolute;
  inset: 10px 6px 6px;
  content: "";
  border: 1px solid color-mix(in srgb, var(--tile-accent) 35%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--tile-accent) 10%, transparent);
}

.workspace-tile__body { min-width: 0; }
.workspace-tile__identity {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 10px;
  align-items: center;
}
.workspace-tile__identity-copy { flex: 1; min-width: 0; }
.workspace-tile__heading,
.workspace-tile__foot,
.workspace-tile__actions,
.workspace-tile__branch,
.workspace-tile__activity { display: flex; align-items: center; }
.workspace-tile__heading,
.workspace-tile__foot { justify-content: space-between; gap: 18px; }
.workspace-tile__heading { min-width: 0; }
.workspace-tile__eyebrow { display: block; margin-bottom: 3px; color: #6f7482; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; }
.workspace-tile h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: -.015em; }
.workspace-tile__identity-copy > p { max-width: 100%; margin: 4px 0 0; overflow: hidden; color: #777c8b; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-tile__meta,
.workspace-tile__stats,
.workspace-tile__capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.workspace-tile__meta span,
.workspace-tile__stats span,
.workspace-tile__capabilities span {
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 999px;
  font-size: 7px;
}

.workspace-tile__meta span {
  color: #a8adba;
  background: rgba(255, 255, 255, .025);
}

.workspace-tile__stats {
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, .045);
}

.workspace-tile__stats span {
  color: #7f8593;
  background: rgba(255, 255, 255, .018);
}

.workspace-tile__capabilities span {
  color: color-mix(in srgb, var(--tile-accent) 72%, #d7dae2);
  border-color: color-mix(in srgb, var(--tile-accent) 18%, transparent);
  background: color-mix(in srgb, var(--tile-accent) 5%, transparent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.workspace-tile__reason {
  margin-top: 7px !important;
  color: #868b98 !important;
  font-family: inherit !important;
}
.workspace-tile__activity { gap: 6px; color: #777c8b; font-size: 8px; }
.workspace-tile__activity i { width: 4px; height: 4px; border-radius: 50%; background: var(--tile-accent); box-shadow: 0 0 8px var(--tile-accent); }
.workspace-tile__foot { padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .055); }
.workspace-tile__branch { gap: 6px; color: #8c919f; font-size: 9px; }
.workspace-tile__branch svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.workspace-tile__actions { gap: 7px; }

.workspace-action {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  color: #15161a;
  border: 1px solid #e6e7eb;
  border-radius: 8px;
  background: #e6e7eb;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease;
}

.workspace-action svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.workspace-action:hover { background: #fff; transform: translateY(-1px); }
.workspace-action--quiet { color: #aeb2be; border-color: rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .035); }
.workspace-action--quiet:hover { color: #fff; background: rgba(255, 255, 255, .08); }

.workspace-empty { padding: 60px 20px; color: #777c8b; text-align: center; }
.workspace-empty > span { display: block; margin-bottom: 14px; font-size: 28px; }
.workspace-empty strong { display: block; color: #c5c8d1; font-size: 13px; }
.workspace-empty p { font-size: 10px; }

.workspace-editor {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: 1fr;
  color: var(--launcher-text);
}

.workspace-editor[hidden] { display: none; }

body.workspace-editor-open { overflow: hidden; }

.workspace-editor__backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: rgba(2, 3, 7, .72);
  backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0;
  transition: opacity .24s ease;
}

.workspace-editor.is-visible .workspace-editor__backdrop { opacity: 1; }

.workspace-editor.is-visible .workspace-editor__panel {
  transform: translateX(0);
}

.workspace-editor__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 40vw;
  height: 100dvh;
  min-height: 0;
  margin-left: auto;
  border-left: 1px solid var(--launcher-line);
  background:
    radial-gradient(circle at 88% 0, rgba(255, 255, 255, .08),
      transparent 32%),
    linear-gradient(160deg, rgba(24, 26, 35, .98),
      rgba(8, 9, 14, .99));
  box-shadow: -24px 0 80px rgba(0, 0, 0, .48);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
  overflow: hidden;
}

.workspace-editor__panel > form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.workspace-editor__head,
.workspace-editor__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.workspace-editor__head {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: calc(22px + env(safe-area-inset-top)) 22px 22px;
  border-bottom: 1px solid var(--launcher-line);
}

.workspace-editor__head span {
  display: block;
  margin-bottom: 4px;
  color: var(--launcher-muted);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.workspace-editor__head h2 { margin: 0; font-size: 19px; letter-spacing: -.03em; }
.workspace-editor__close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--launcher-muted);
  border: 1px solid var(--launcher-line);
  border-radius: 50%;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.workspace-editor__close:hover {
  color: var(--launcher-text);
  border-color: color-mix(in srgb, var(--launcher-text) 30%, transparent);
}

.workspace-editor__fields {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 15px;
  min-height: 0;
  padding: 24px 22px 32px;
  overflow-y: auto;
  scrollbar-color: color-mix(in srgb, var(--launcher-text) 28%, transparent)
    transparent;
}

.workspace-editor__fields label { display: block; min-width: 0; }
.workspace-editor__fields label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--launcher-muted);
  font-size: 9px;
  font-weight: 600;
}

.workspace-editor__access,
.workspace-editor__clone {
  align-self: stretch;
  padding: 11px 12px;
  border: 1px solid var(--launcher-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--launcher-text) 3%, transparent);
}

.workspace-editor__check-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  color: var(--launcher-text) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
}

.workspace-editor__check-row > span:last-child {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  margin: 0 !important;
  line-height: 16px;
}

.workspace-editor__section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--launcher-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--launcher-text) 2%, transparent);
}

.workspace-editor__section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 0 13px;
  color: var(--launcher-text);
  cursor: pointer;
  list-style: none;
}

.workspace-editor__section > summary::-webkit-details-marker { display: none; }
.workspace-editor__section > summary::after {
  content: '⌄';
  color: var(--launcher-muted);
  font-size: 14px;
  transition: transform .18s ease;
}
.workspace-editor__section:not([open]) > summary::after {
  transform: rotate(-90deg);
}
.workspace-editor__section > summary > span {
  margin: 0;
  color: var(--launcher-text);
  font-size: 10px;
  font-weight: 650;
}
.workspace-editor__section > summary > small {
  margin-left: auto;
  color: var(--launcher-muted);
  font-size: 8px;
}

.workspace-editor__section-body {
  display: grid;
  gap: 12px;
  padding: 0 13px 13px;
}

.workspace-editor__section-body > label > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: var(--launcher-muted);
  font-size: 9px;
  font-weight: 600;
}

.workspace-editor__fields input,
.workspace-editor__fields select,
.workspace-editor__fields textarea {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  color: var(--launcher-text);
  border: 1px solid var(--launcher-line);
  border-radius: 10px;
  outline: 0;
  background: color-mix(in srgb, var(--launcher-text) 4%, transparent);
  font-size: 10px;
}

.workspace-editor__fields textarea {
  min-height: 76px;
  padding: 10px 11px;
  resize: vertical;
}

.workspace-editor__fields input[type="checkbox"] {
  appearance: none;
  display: grid;
  place-items: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  color: var(--launcher-bg);
  border: 1px solid var(--launcher-muted);
  border-radius: 5px;
  background: transparent;
  line-height: 1;
  cursor: pointer;
}

.workspace-editor__fields input[type="checkbox"]::after {
  content: '✓';
  opacity: 0;
  font-size: 10px;
  font-weight: 800;
  transform: translateY(-.5px);
}

.workspace-editor__fields input[type="checkbox"]:checked {
  border-color: var(--launcher-text);
  background: color-mix(in srgb, var(--launcher-text) 18%, var(--launcher-bg));
}

.workspace-editor__fields input[type="checkbox"]:checked::after {
  opacity: 1;
}

.workspace-editor__capabilities {
  margin: 0;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--launcher-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--launcher-text) 2.5%, transparent);
}

.workspace-editor__capabilities legend {
  padding: 0 5px;
  color: var(--launcher-muted);
  font-size: 9px;
  font-weight: 600;
}

.workspace-editor__capabilities > [data-workspace-capabilities] {
  min-width: 0;
}

.workspace-editor__capability-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.workspace-editor__capability {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  gap: 6px;
  min-height: 28px;
  box-sizing: border-box;
  padding: 6px 9px;
  color: var(--launcher-text);
  border: 1px solid var(--launcher-line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--launcher-text) 4%, transparent);
  font-size: 9px;
  line-height: 16px;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease,
    color .18s ease, transform .18s ease;
}

.workspace-editor__capability:hover {
  border-color: color-mix(in srgb, var(--launcher-text) 55%,
    var(--launcher-line));
  transform: translateY(-1px);
}

.workspace-editor__capability input {
  position: static;
  flex: 0 0 16px;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 1;
  overflow: visible;
  clip: auto;
  border: 1px solid var(--launcher-muted) !important;
}

.workspace-editor__capability > span {
  display: inline-flex !important;
  align-items: center;
  min-height: 16px;
  margin: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: 16px;
}

.workspace-editor__capability::before {
  display: none;
}

.workspace-editor__capability:has(input:checked) {
  color: var(--launcher-text);
  border-color: var(--launcher-line);
  background: color-mix(in srgb, var(--launcher-text) 4%, transparent);
}

.workspace-editor__source {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--launcher-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--launcher-text) 3%, transparent);
  color: var(--launcher-muted);
  font-size: 9px;
}

.workspace-editor__source label { display: block; }
.workspace-editor__source p,
.workspace-editor__source small { margin: 0; line-height: 1.45; }
.workspace-editor__source label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--launcher-muted);
  font-size: 9px;
  font-weight: 600;
}
.workspace-editor__source input {
  width: 100%;
  box-sizing: border-box;
}

.workspace-editor__dropzone {
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: start;
  column-gap: 10px;
  row-gap: 2px;
  min-height: 72px;
  padding: 10px 12px;
  box-sizing: border-box;
  border: 1px dashed var(--launcher-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--launcher-text) 3%, transparent);
  cursor: pointer;
  text-align: left;
  transition: border-color .18s ease, background .18s ease,
    transform .18s ease;
}
.workspace-editor__dropzone:hover,
.workspace-editor__dropzone.is-dragging,
.workspace-editor__dropzone.has-file {
  border-color: var(--launcher-text);
  background: color-mix(in srgb, var(--launcher-text) 9%, transparent);
}
.workspace-editor__dropzone.is-dragging { transform: scale(1.01); }
.workspace-editor__dropzone input {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
  pointer-events: none;
}
.workspace-editor__dropzone-icon {
  display: grid !important;
  grid-row: 1 / 3;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: 0 !important;
  color: var(--launcher-text) !important;
  border: 1px solid color-mix(in srgb, var(--launcher-text) 40%,
    transparent);
  border-radius: 50%;
  font-size: 17px !important;
}
.workspace-editor__dropzone strong {
  grid-column: 2;
  color: var(--launcher-text);
  font-size: 10px;
}
.workspace-editor__dropzone small {
  grid-column: 2;
  margin: 0 !important;
  color: var(--launcher-muted);
  font-size: 8px;
}
.workspace-editor__source details {
  padding: 9px 0 0;
  border-top: 1px solid var(--launcher-line);
}
.workspace-editor__source summary { cursor: pointer; }

.workspace-editor__fields input:focus,
.workspace-editor__fields select:focus {
  border-color: color-mix(in srgb, var(--launcher-text) 40%, transparent);
  background: color-mix(in srgb, var(--launcher-text) 7%, transparent);
}

.workspace-editor__fields small {
  display: block;
  margin-top: 5px;
  color: var(--launcher-muted);
  font-size: 7px;
}

.workspace-editor__wide { grid-column: 1 / -1; }
.workspace-editor__actions {
  flex: 0 0 auto;
  padding: 16px 22px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--launcher-line);
  background: color-mix(in srgb, var(--launcher-bg) 94%, transparent);
}

.workspace-editor__cancel,
.workspace-editor__save {
  min-height: 40px;
  padding: 0 15px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 650;
  cursor: pointer;
}

.workspace-editor__cancel {
  color: var(--launcher-muted);
  border: 1px solid var(--launcher-line);
  background: transparent;
}

.workspace-editor__save {
  display: inline-flex;
  gap: 20px;
  align-items: center;
  color: var(--launcher-bg);
  border: 1px solid var(--launcher-text);
  background: var(--launcher-text);
}

[data-theme="light"] .workspace-editor__panel {
  color: #151519;
  border-left-color: rgba(0, 0, 0, .12);
  background:
    radial-gradient(circle at 88% 0, rgba(0, 0, 0, .045),
      transparent 32%),
    linear-gradient(160deg, rgba(255, 255, 255, .99),
      rgba(239, 240, 244, .99));
  box-shadow: -24px 0 80px rgba(0, 0, 0, .2);
}

[data-theme="light"] .workspace-editor__backdrop {
  background: rgba(50, 50, 55, .2);
}

[data-theme="light"] .workspace-editor__fields :is(input, select, textarea) {
  color: #151519;
  background: rgba(0, 0, 0, .035);
  color-scheme: light;
}

[data-theme="light"] .workspace-editor__actions {
  background: rgba(247, 247, 249, .94);
}

[data-theme="light"] .workspace-editor__save {
  color: #fff;
  border-color: #17171b;
  background: #17171b;
}

.launcher-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  color: #686d7a;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 9px;
}

.launcher-footer span { display: flex; gap: 7px; align-items: center; }
.launcher-footer i { width: 5px; height: 5px; border-radius: 50%; background: var(--launcher-cyan); }

.launcher-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: min(420px, calc(100% - 48px));
  padding: 12px 16px;
  color: #d9dbe4;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  background: rgba(20, 22, 29, .9);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .4);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  backdrop-filter: blur(20px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.launcher-toast.is-visible { opacity: 1; transform: translateY(0); }

button:focus-visible,
a:focus-visible,
input:focus-visible { outline: 2px solid var(--launcher-accent); outline-offset: 3px; }

[data-theme="light"] {
  --launcher-bg: #f3f3f5;
  --launcher-panel: rgba(255, 255, 255, .78);
  --launcher-line: rgba(0, 0, 0, .11);
  --launcher-text: #151517;
  --launcher-muted: #68686f;
  --launcher-accent: #202023;
  color-scheme: light;
}

[data-theme="light"] body.launcher-page {
  background:
    radial-gradient(circle at 50% -20%, #fff 0, transparent 44%),
    linear-gradient(180deg, #fafafa 0%, var(--launcher-bg) 52%, #ececef 100%);
}

[data-theme="light"] .launcher-aurora::after {
  opacity: .1;
  mix-blend-mode: multiply;
}

[data-theme="light"] .launcher-aurora span { opacity: .055; }
[data-theme="light"] .launcher-aurora span:nth-child(1) { background: #111; }
[data-theme="light"] .launcher-aurora span:nth-child(2) { background: #777; }
[data-theme="light"] .launcher-aurora span:nth-child(3) { background: #aaa; }

[data-theme="light"] .launcher-nav,
[data-theme="light"] .launcher-footer {
  border-color: rgba(0, 0, 0, .09);
}

[data-theme="light"] .launcher-brand__mark i {
  border-color: rgba(0, 0, 0, .82);
  background: rgba(0, 0, 0, .025);
}

[data-theme="light"] .launcher-nav__center strong,
[data-theme="light"] .launcher-exit,
[data-theme="light"] .launcher-kicker,
[data-theme="light"] .launcher-section-head h2,
[data-theme="light"] .workspace-picker__context strong {
  color: #303036;
}

[data-theme="light"] .launcher-nav__separator {
  background: rgba(0, 0, 0, .14);
}

[data-theme="light"] .launcher-theme {
  color: #44444a;
  border-color: rgba(0, 0, 0, .11);
  background: rgba(255, 255, 255, .55);
}

[data-theme="light"] .launcher-theme:hover {
  color: #000;
  border-color: rgba(0, 0, 0, .24);
  background: #fff;
}

[data-theme="light"] .launcher-theme__sun { display: none; }
[data-theme="light"] .launcher-theme__moon { display: block; }

[data-theme="light"] .launcher-mock-badge {
  color: #5f5f66;
  border-color: rgba(0, 0, 0, .11);
  background: rgba(255, 255, 255, .55);
}

[data-theme="light"] .launcher-exit:hover { color: #000; }

[data-theme="light"] .launcher-hero h1 em {
  background: linear-gradient(105deg, #68686e 0%, #111 45%, #85858b 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

[data-theme="light"] .launcher-kicker i {
  background: linear-gradient(90deg, #343438, transparent);
}

[data-theme="light"] .launcher-orbit__ring {
  border-color: rgba(0, 0, 0, .1);
}

[data-theme="light"] .launcher-orbit__ring--outer {
  background: radial-gradient(circle, transparent 58%, rgba(0, 0, 0, .025));
  box-shadow: inset 0 0 80px rgba(0, 0, 0, .025);
}

[data-theme="light"] .launcher-orbit__core {
  border-color: rgba(0, 0, 0, .12);
  background: linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(232, 232, 235, .88));
  box-shadow: 0 25px 70px rgba(0, 0, 0, .12),
    0 0 55px rgba(255, 255, 255, .8);
}

[data-theme="light"] .launcher-orbit__node { border-color: #f5f5f6; }

[data-theme="light"] .launcher-step {
  color: #626268;
  border-color: rgba(0, 0, 0, .12);
}

[data-theme="light"] .agent-card {
  --card-accent: #343438;
  background: linear-gradient(145deg, rgba(255, 255, 255, .88), rgba(239, 239, 242, .76));
  box-shadow: 0 18px 45px rgba(0, 0, 0, .055);
}

[data-theme="light"] .agent-card--cyan { --card-accent: #00889a; }
[data-theme="light"] .agent-card--amber { --card-accent: #a86100; }

[data-theme="light"] .agent-card:hover:not([aria-disabled="true"]),
[data-theme="light"] .agent-card[aria-pressed="true"] {
  border-color: rgba(0, 0, 0, .28);
  box-shadow: 0 28px 65px rgba(0, 0, 0, .11);
}

[data-theme="light"] .agent-card[aria-pressed="true"]::after {
  color: #fff;
  background: #202023;
}

[data-theme="light"] .agent-card__glow { background: #fff; opacity: .7; }

[data-theme="light"] .agent-card__screen {
  border-color: rgba(0, 0, 0, .15);
  background: #f7f7f8;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, .025);
}

[data-theme="light"] .agent-card__status {
  color: #66666d;
  border-color: rgba(0, 0, 0, .09);
  background: rgba(255, 255, 255, .5);
}

[data-theme="light"] .agent-card__platform {
  background: linear-gradient(145deg, rgba(255, 255, 255, .9), rgba(0, 0, 0, .025));
  box-shadow: inset 0 1px #fff, 0 18px 28px rgba(0, 0, 0, .12);
}

[data-theme="light"] .agent-card__platform::before,
[data-theme="light"] .agent-card__meta,
[data-theme="light"] .workspace-tile__foot {
  border-color: rgba(0, 0, 0, .075);
}

[data-theme="light"] .agent-card__meta strong,
[data-theme="light"] .agent-card__action {
  color: #45454b;
}

[data-theme="light"] .workspace-picker__halo {
  background: rgba(0, 0, 0, .035);
}

[data-theme="light"] .workspace-search,
[data-theme="light"] .workspace-view {
  border-color: rgba(0, 0, 0, .1);
  background: rgba(255, 255, 255, .58);
}

[data-theme="light"] .workspace-search:focus-within {
  border-color: rgba(0, 0, 0, .32);
  background: #fff;
}

[data-theme="light"] .workspace-search input { color: #202024; }
[data-theme="light"] .workspace-search kbd {
  color: #65656b;
  border-color: rgba(0, 0, 0, .1);
  background: rgba(0, 0, 0, .025);
}

[data-theme="light"] .workspace-view button[aria-pressed="true"] {
  color: #18181b;
  background: #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .1);
}

[data-theme="light"] .workspace-tile {
  --tile-accent: #343438;
  border-color: rgba(0, 0, 0, .09);
  background: linear-gradient(100deg, rgba(255, 255, 255, .82), rgba(241, 241, 243, .76));
}

[data-theme="light"] .workspace-list[data-view="grid"] .workspace-tile {
  border-color: rgba(0, 0, 0, .09);
  background: linear-gradient(145deg, rgba(255, 255, 255, .9),
    rgba(239, 239, 242, .78));
  box-shadow: 0 14px 34px rgba(0, 0, 0, .055);
}

[data-theme="light"] .workspace-list[data-view="grid"]
  .workspace-tile:hover {
  border-color: rgba(0, 0, 0, .2);
  background: #fff;
}

[data-theme="light"] .workspace-tile--cyan { --tile-accent: #00889a; }
[data-theme="light"] .workspace-tile--amber { --tile-accent: #a86100; }

[data-theme="light"] .workspace-tile:hover {
  border-color: rgba(0, 0, 0, .2);
  background: #fff;
}

[data-theme="light"] .workspace-tile__icon {
  background: color-mix(in srgb, var(--tile-accent) 5%, #fff);
}

[data-theme="light"] .workspace-tile h3,
[data-theme="light"] .workspace-empty strong { color: #252529; }

[data-theme="light"] .workspace-action {
  color: #fff;
  border-color: #202023;
  background: #202023;
}

[data-theme="light"] .workspace-action:hover { background: #000; }

[data-theme="light"] .workspace-action--quiet {
  color: #4f4f55;
  border-color: rgba(0, 0, 0, .11);
  background: rgba(255, 255, 255, .55);
}

[data-theme="light"] .workspace-action--quiet:hover {
  color: #111;
  background: #fff;
}

[data-theme="light"] .launcher-toast {
  color: #333338;
  border-color: rgba(0, 0, 0, .12);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .15);
}

@media (max-width: 980px) {
  .launcher-nav { grid-template-columns: 1fr 1fr; }
  .launcher-nav__center { display: none; }
  .launcher-hero { grid-template-columns: 1fr 250px; padding-right: 0; padding-left: 0; }
  .launcher-orbit { width: 250px; }
  .launcher-orbit__ring--inner { inset: 52px; }
  .launcher-orbit__core { inset: 82px; }
  .launcher-orbit__node--two { bottom: 80px; }
  .agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-card:last-child { grid-column: 1 / -1; min-height: 230px; }
}

@media (max-width: 700px) {
  body.launcher-page {
    min-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .launcher-shell,
  .launcher-nav { width: min(100% - 28px, 1420px); }
  .launcher-nav {
    position: relative;
    z-index: 20;
    height: calc(64px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    background: transparent;
    backdrop-filter: none;
  }

  .launcher-brand small,
  .launcher-mock-badge { display: none; }
  .launcher-nav__actions { gap: 10px; }
  .launcher-exit { font-size: 0; }
  .launcher-exit span { font-size: 16px; }
  .launcher-theme { width: 40px; height: 40px; }
  .launcher-mcp-connection { min-height: 40px; padding: 0 9px; }
  .launcher-add-computer { width: 40px; padding: 0; justify-content: center; }
  .launcher-add-computer span { display: none; }
  .launcher-hero { display: block; min-height: 0; padding: 42px 0 52px; }
  .launcher-kicker { margin-bottom: 16px; font-size: 9px; }
  .launcher-hero h1 {
    max-width: 100%;
    padding-right: 0;
    font-size: clamp(40px, 10.8vw, 54px);
    letter-spacing: -.058em;
  }
  .launcher-hero h1 em { padding-right: .16em; }
  .launcher-hero__copy > p { font-size: 13px; }
  .launcher-orbit { display: none; }
  .launcher-section-head { align-items: flex-start; }
  .launcher-section-head > p { display: none; }
  .agent-grid { grid-template-columns: 1fr; }
  .agent-card { min-height: 276px; padding: 18px; border-radius: 19px; }
  .agent-card:last-child { grid-column: auto; }
  .workspace-picker.is-visible { padding-bottom: 65px; }
  .launcher-section-head--workspace { display: grid; gap: 18px; }
  .workspace-controls { width: 100%; }
  .workspace-add { min-height: 40px; padding: 0 11px; }
  .workspace-add > span:last-child { display: none; }
  .workspace-search { flex: 1; width: auto; }
  .workspace-view button { width: 40px; height: 40px; }
  .workspace-list[data-view="grid"] { grid-template-columns: 1fr; }
  .workspace-tile { padding: 14px; }
  .workspace-list[data-view="grid"] .workspace-tile {
    min-height: 0;
    padding: 14px;
  }
  .workspace-tile__icon { width: 32px; height: 32px; }
  .workspace-list[data-view="grid"] .workspace-tile__icon {
    width: 28px;
    height: 28px;
  }
  .workspace-tile__heading { align-items: flex-start; }
  .workspace-tile__foot { display: block; }
  .workspace-tile__actions { margin-top: 12px; }
  .workspace-list[data-view="grid"] .workspace-tile__foot {
    display: flex;
    align-items: center;
  }
  .workspace-list[data-view="grid"] .workspace-tile__actions {
    margin-top: 0;
    margin-left: auto;
  }
  .workspace-action { flex: 1; }
  .workspace-action { min-height: 40px; }
  .workspace-list[data-view="grid"] .workspace-action {
    flex: 0 0 auto;
    min-height: 30px;
  }
  .launcher-footer { display: grid; gap: 7px; justify-content: start; padding: 18px 0; }
  .launcher-footer span:nth-child(2) { display: none; }
}

@media (max-width: 420px) {
  .launcher-shell,
  .launcher-nav { width: calc(100% - 24px); }
  .launcher-brand { gap: 8px; }
  .launcher-brand strong { font-size: 14px; }
  .launcher-hero { padding-top: 34px; }
  .launcher-hero h1 { font-size: clamp(37px, 11vw, 43px); }
  .launcher-section-head > div { gap: 10px; }
  .workspace-controls { align-items: stretch; }
  .workspace-view { flex: 0 0 auto; }
  .workspace-search kbd { display: none; }
  .workspace-tile__activity { display: none; }
  .workspace-tile__actions { gap: 6px; }
  .workspace-action { padding-right: 8px; padding-left: 8px; }
  .workspace-list[data-view="grid"] .workspace-tile {
    padding: 12px;
  }
  .workspace-list[data-view="grid"] .workspace-tile__icon {
    width: 28px;
    height: 28px;
  }
  .workspace-list[data-view="grid"] .workspace-tile__branch {
    font-size: 8px;
  }
  .workspace-list[data-view="grid"] .workspace-action {
    padding-right: 7px;
    padding-left: 7px;
    font-size: 7.5px;
  }
  .launcher-toast {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    max-width: calc(100% - 24px);
  }
}

@media (max-width: 600px) {
  .workspace-editor__panel {
    width: 100%;
    border-left: 0;
  }

  .workspace-editor__fields { grid-template-columns: 1fr; gap: 12px; }
  .workspace-editor__wide { grid-column: auto; }
  .workspace-editor__actions { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-editor__backdrop,
  .workspace-editor__panel { transition: none; }
}

/* App viewport: o documento fica fixo e apenas coleções rolam. */
html,
body.launcher-page {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body.launcher-page { height: 100dvh; }

.launcher-shell {
  position: relative;
  display: grid;
  grid-template-rows: minmax(300px, 1.15fr) minmax(230px, .85fr) 44px;
  height: calc(100dvh - 84px);
  overflow: hidden;
}

.launcher-shell > .workspace-picker { display: none; }

.launcher-hero {
  min-height: 0;
  padding-top: clamp(18px, 5vh, 58px);
  padding-bottom: clamp(18px, 4vh, 44px);
}

.agent-picker {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: 12px;
  overflow: hidden;
}

.agent-picker .launcher-section-head { flex: 0 0 auto; }

.agent-grid {
  flex: 1;
  min-height: 0;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 32px) / 3);
  padding: 6px 2px 2px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.agent-grid::-webkit-scrollbar { display: none; }

.agent-card {
  height: 100%;
  min-height: 0;
  scroll-snap-align: start;
}

.launcher-footer { min-height: 44px; }

.launcher-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  color: var(--launcher-text);
  background: color-mix(in srgb, var(--launcher-bg) 18%, transparent);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(28px) saturate(65%);
  -webkit-backdrop-filter: blur(28px) saturate(65%);
  transition: opacity 220ms ease;
}

[data-theme="light"] .launcher-loader {
  background: color-mix(in srgb, var(--launcher-bg) 18%, transparent);
}

.is-loading-agent .launcher-loader {
  opacity: 1;
  pointer-events: auto;
}

.launcher-loader[aria-hidden="true"] { visibility: hidden; }

.launcher-loader strong {
  margin-top: 21px;
  font-size: 13px;
  font-weight: 620;
  letter-spacing: -.01em;
}

.launcher-loader small {
  margin-top: 6px;
  color: var(--launcher-muted);
  font-size: 9px;
}

.launcher-loader__orbit {
  position: relative;
  width: 118px;
  height: 118px;
}

.launcher-loader__ring,
.launcher-loader__core,
.launcher-loader__node {
  position: absolute;
  border-radius: 50%;
}

.launcher-loader__ring {
  inset: 0;
  border: 1px solid var(--launcher-line);
  border-top-color: color-mix(in srgb, var(--launcher-text) 70%, transparent);
  animation: loader-orbit 1.6s linear infinite;
}

.launcher-loader__ring--inner {
  inset: 18px;
  border-style: dashed;
  border-top-color: var(--launcher-line);
  animation-direction: reverse;
  animation-duration: 2.3s;
}

.launcher-loader__core {
  inset: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--launcher-line);
  background: color-mix(in srgb, var(--launcher-bg) 85%, #fff 15%);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .18);
  animation: loader-breathe 1.2s ease-in-out infinite alternate;
}

.launcher-loader__core .launcher-brand__mark { transform: rotate(30deg) scale(.72); }

.launcher-loader__node {
  top: 7px;
  left: 30px;
  width: 7px;
  height: 7px;
  background: var(--launcher-cyan);
  box-shadow: 0 0 12px var(--launcher-cyan);
  animation: loader-blink .8s ease-in-out infinite alternate;
}

@keyframes loader-orbit { to { transform: rotate(360deg); } }
@keyframes loader-breathe { to { transform: scale(1.06); } }
@keyframes loader-blink { to { opacity: .25; } }

.is-loading-agent .launcher-hero,
.is-loading-agent .agent-picker {
  opacity: .16;
  filter: blur(7px);
  transform: scale(.99);
  transition: opacity 180ms ease, filter 180ms ease, transform 180ms ease;
}

.workspace-back {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--launcher-muted);
  border: 1px solid var(--launcher-line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.workspace-back:hover {
  color: var(--launcher-text);
  background: color-mix(in srgb, var(--launcher-text) 7%, transparent);
}

.workspace-back svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.has-agent .launcher-shell {
  grid-template-rows: minmax(0, 1fr) 44px;
}

.has-agent .launcher-hero,
.has-agent .agent-picker { display: none; }

.has-agent .workspace-picker.is-visible {
  display: flex;
  grid-row: 1;
  flex-direction: column;
  min-height: 0;
  max-height: none;
  padding: clamp(18px, 4vh, 38px) 2px 16px;
  overflow: hidden;
  opacity: 1;
  transform: none;
}

.has-agent .workspace-picker .launcher-section-head {
  flex: 0 0 auto;
  margin-bottom: 18px;
}

.has-agent .workspace-list {
  flex: 1;
  min-height: 0;
  padding: 6px 8px 12px 2px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: color-mix(in srgb, var(--launcher-text) 22%, transparent)
    transparent;
  scrollbar-width: thin;
}

.has-agent .workspace-empty {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

@media (min-width: 701px) {
  .agent-grid { grid-template-columns: none; }
  .agent-card:last-child { grid-column: auto; min-height: 0; }
}

@media (max-width: 700px) {
  .launcher-shell {
    grid-template-rows: minmax(155px, .58fr) minmax(0, 1fr);
    height: calc(100dvh - 64px - env(safe-area-inset-top));
  }

  .launcher-hero {
    padding-top: clamp(22px, 5vh, 42px);
    padding-bottom: 20px;
  }

  .agent-picker { padding-bottom: max(12px, env(safe-area-inset-bottom)); }

  .agent-picker .launcher-section-head { margin-bottom: 14px; }
  .agent-picker__tools > p { display: none; }

  .agent-grid {
    display: flex;
    gap: 12px;
    padding: 6px 2px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .agent-grid::-webkit-scrollbar { display: none; }

  .agent-card {
    flex: 0 0 min(84vw, 330px);
    height: 100%;
    min-height: 0;
    scroll-snap-align: start;
  }

  .launcher-footer { display: none; }

  .has-agent .launcher-shell { grid-template-rows: minmax(0, 1fr); }

  .has-agent .workspace-picker.is-visible {
    padding-top: 18px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .has-agent .workspace-picker .launcher-section-head { gap: 13px; }

  .workspace-back { width: 38px; height: 38px; }
}

@media (max-height: 680px) and (min-width: 701px) {
  .launcher-shell {
    grid-template-rows: minmax(145px, .66fr) minmax(220px, 1fr) 38px;
    height: calc(100dvh - 70px);
  }

  .launcher-nav { height: 70px; }
  .launcher-hero__copy > p { display: none; }
  .launcher-hero h1 { font-size: clamp(42px, 5.2vw, 64px); }
  .launcher-section-head { margin-bottom: 12px; }
  .agent-card { padding: 13px; }
  .agent-card__visual { min-height: 52px; }
  .agent-card__meta { padding-top: 8px; padding-bottom: 8px; }
  .launcher-footer { min-height: 38px; }
}

@media (min-height: 681px) and (max-height: 850px) and (min-width: 701px) {
  .agent-card { padding: 13px; }
  .agent-card__visual { min-height: 58px; }
  .agent-card__meta { padding-top: 8px; padding-bottom: 8px; }
  .agent-card__pulse { width: 96px; height: 58px; }
  .agent-card__pulse--second { width: 124px; height: 72px; }
  .agent-card__platform { width: 64px; height: 49px; }
}

@media (max-height: 610px) and (max-width: 700px) {
  .launcher-shell { grid-template-rows: 132px minmax(0, 1fr); }
  .launcher-hero { padding-top: 15px; padding-bottom: 12px; }
  .launcher-kicker { margin-bottom: 10px; }
  .launcher-hero h1 { font-size: clamp(34px, 9.8vw, 42px); }
  .launcher-hero__copy > p { display: none; }
  .agent-card__visual { min-height: 55px; }
  .agent-card__meta { padding-top: 7px; padding-bottom: 7px; }
}

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