:root {
        --bg: oklch(9% 0.026 265);
        --surface: oklch(14% 0.034 260);
        --surface-2: oklch(18% 0.046 260);
        --surface-3: oklch(22% 0.052 260);
        --fg: oklch(95% 0.012 230);
        --muted: oklch(70% 0.032 240);
        --soft: oklch(58% 0.04 245);
        --border: rgba(170, 235, 255, 0.16);
        --border-strong: rgba(180, 128, 255, 0.42);
        --accent: oklch(70% 0.23 310);
        --accent-cyan: oklch(78% 0.16 205);
        --success: oklch(73% 0.18 155);
        --warn: oklch(78% 0.16 92);
        --danger: oklch(66% 0.22 25);
        --shadow: 0 26px 80px rgba(0, 0, 0, 0.36);
        --radius: 8px;
        --font-display: "Space Grotesk", "Sohne", "Avenir Next", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
        --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
        --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, Menlo, monospace;
      }

      * {
        box-sizing: border-box;
      }

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

      html {
        background:
          radial-gradient(circle at 14% 0%, rgba(169, 74, 255, 0.19), transparent 26%),
          radial-gradient(circle at 90% 8%, rgba(0, 225, 255, 0.14), transparent 24%),
          linear-gradient(135deg, #05070d 0%, #0d101c 52%, #070811 100%);
        color: var(--fg);
      }

      body {
        font-family: var(--font-body);
        color: var(--fg);
        overflow: hidden;
        background: transparent;
        -webkit-font-smoothing: antialiased;
      }

      html:has(body.workflow-screen-page),
      body.workflow-screen-page {
        height: auto;
        min-height: 100%;
        overflow: auto;
      }

      body.workflow-screen-page .app-shell {
        height: auto;
        min-height: 100vh;
      }

      body::before {
        content: "";
        position: fixed;
        inset: 0;
        pointer-events: none;
        background-image:
          linear-gradient(rgba(141, 232, 255, 0.045) 1px, transparent 1px),
          linear-gradient(90deg, rgba(141, 232, 255, 0.04) 1px, transparent 1px);
        background-size: 44px 44px;
        mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .82), transparent 78%);
      }

      .app-shell {
        height: 100vh;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        gap: 8px;
      }

      .topbar {
        min-height: 74px;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 18px;
        padding: 14px 16px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: color-mix(in oklch, var(--surface) 88%, transparent);
        box-shadow: var(--shadow);
        backdrop-filter: blur(18px);
      }

      .brand-block {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 220px;
      }

      .brand-mark {
        width: 44px;
        height: 44px;
        border-radius: 6px;
        display: grid;
        place-items: center;
        border: 1px solid var(--border-strong);
        background: linear-gradient(145deg, rgba(19, 23, 38, .96), rgba(10, 12, 22, .96));
        box-shadow: 0 0 28px rgba(145, 74, 255, .24), inset 0 0 18px rgba(0, 225, 255, .09);
        position: relative;
        overflow: hidden;
      }

      .brand-mark::before {
        content: "A";
        font: 800 28px/1 var(--font-display);
        letter-spacing: -0.03em;
        background: linear-gradient(135deg, #f7fbff 10%, #7b8798 48%, #f4f7ff 100%);
        -webkit-background-clip: text;
        color: transparent;
        text-shadow: 0 0 18px rgba(149, 72, 255, .55);
      }

      .brand-mark::after {
        content: "";
        position: absolute;
        width: 56px;
        height: 5px;
        transform: rotate(-33deg);
        background: linear-gradient(90deg, var(--accent-cyan), #f7fbff 52%, var(--accent));
        box-shadow: 0 0 18px rgba(0, 230, 255, .75);
      }

      .brand-copy h1 {
        margin: 0;
        font: 800 18px/1 var(--font-display);
        letter-spacing: 0.09em;
        text-transform: uppercase;
      }

      .meta {
        color: var(--muted);
        font: 700 11px/1.45 var(--font-mono);
        letter-spacing: 0.12em;
        text-transform: uppercase;
      }

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

      .tabs {
        display: flex;
        align-items: center;
        gap: 6px;
        overflow-x: auto;
        padding: 4px;
        border: 1px solid var(--border);
        border-radius: 7px;
        background: rgba(7, 10, 18, .72);
      }

      .topbar-center .tabs {
        min-width: 0;
        flex: 1 1 auto;
      }

      .topbar-icon {
        width: 40px;
        height: 40px;
        flex: 0 0 auto;
        font-size: 16px;
      }

      .tab {
        min-height: 38px;
        border: 0;
        border-radius: 5px;
        padding: 0 13px;
        min-width: 120px;
        cursor: pointer;
        flex: 0 0 auto;
        color: var(--muted);
        background: transparent;
        font: 700 13px/1 var(--font-body);
        transition: transform 120ms ease, color 120ms ease, background 120ms ease;
      }

      .tab:hover {
        transform: translateY(-1px);
        color: var(--fg);
      }

      .tab.active {
        color: var(--fg);
        background: linear-gradient(180deg, rgba(154, 80, 255, .28), rgba(42, 24, 71, .52));
        box-shadow: inset 0 0 0 1px rgba(193, 143, 255, .28), 0 0 20px rgba(139, 72, 255, .22);
      }

      .tab-title {
        font-size: 13px;
        margin: 0;
      }

      .task-workflow-visual-builder-host {
        min-height: 520px;
      }

      .workflow-screen {
        min-height: 100vh;
        padding: 18px;
        display: grid;
        gap: 14px;
      }

      .workflow-screen-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: wrap;
        padding: 14px 16px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: color-mix(in oklch, var(--surface) 88%, transparent);
        box-shadow: var(--shadow);
      }

      .workflow-screen-title {
        margin: 4px 0 0;
        font: 800 36px/1 var(--font-display);
        letter-spacing: -0.04em;
      }

      .workflow-screen-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
      }

      .workflow-screen-grid {
        display: grid;
        gap: 14px;
      }

      details > summary.section-title {
        list-style: none;
      }

      details > summary.section-title::-webkit-details-marker {
        display: none;
      }

      .tab-add {
        min-width: 38px;
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        font-size: 18px;
        line-height: 1;
        padding: 0;
      }

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

      .workspace {
        height: 100%;
        min-height: 0;
        display: grid;
        grid-template-columns: 320px minmax(0, 1fr) 340px;
        gap: 8px;
        overflow: hidden;
      }

      .sidebar,
      .chat-column,
      .status-column {
        height: 100%;
        min-height: 0;
      }

      .sidebar,
      .status-column {
        background: color-mix(in oklch, var(--surface) 90%, transparent);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        backdrop-filter: blur(16px);
        overflow: auto;
      }

      .sidebar {
      }

      .chat-column {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        min-height: 0;
        border: 1px solid rgba(122, 232, 255, 0.14);
        border-radius: var(--radius);
        overflow: hidden;
        background:
          linear-gradient(180deg, rgba(10, 13, 24, 0.98) 0%, rgba(8, 11, 21, 0.96) 100%);
        box-shadow: var(--shadow);
      }

      .section {
        padding: 12px;
        border-bottom: 1px solid var(--border);
      }

      .section:last-child {
        border-bottom: 0;
      }

      .section-title {
        margin: 0 0 6px;
        font: 800 12px/1 var(--font-mono);
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--muted);
      }

      .stack {
        display: grid;
        gap: 5px;
      }

      .ui-card,
      .card {
        border: 1px solid var(--border);
        background: linear-gradient(180deg, rgba(20, 24, 40, .98), rgba(10, 14, 24, .96));
        border-radius: var(--radius);
        padding: 12px;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
      }

      .panel-card,
      .mini-card {
        border: 1px solid var(--border);
        background: linear-gradient(180deg, rgba(21, 26, 43, .92), rgba(11, 15, 27, .88));
        border-radius: 6px;
        padding: 10px;
      }

      .subnav {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
      }

      .subtab {
        min-height: 38px;
        border: 1px solid var(--border);
        background: rgba(7, 10, 18, .68);
        border-radius: 6px;
        padding: 5px 8px;
        font: 700 12px/1 var(--font-body);
        color: var(--muted);
        cursor: pointer;
      }

      .subtab.active {
        border-color: rgba(193, 143, 255, .28);
        color: var(--fg);
        background: linear-gradient(180deg, rgba(154, 80, 255, .22), rgba(42, 24, 71, .48));
      }

      .item {
        border: 1px solid var(--border);
        background: rgba(10, 14, 24, .82);
        border-radius: 6px;
        padding: 10px;
        cursor: pointer;
        transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
      }

      .item:hover {
        transform: translateY(-1px);
        border-color: rgba(126, 234, 255, .36);
      }

      .item.active {
        border-color: rgba(193, 143, 255, .28);
        background: linear-gradient(180deg, rgba(154, 80, 255, .18), rgba(13, 18, 31, .92));
        box-shadow: 0 0 24px rgba(139, 72, 255, .18);
      }

      .item-title {
        margin: 0 0 2px;
        font: 700 15px/1.35 var(--font-display);
      }

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

      .item-meta,
      .subtle,
      .hint,
      .empty {
        font-size: 12px;
        color: var(--muted);
        line-height: 1.5;
      }

      .ui-control,
      .field,
      .select,
      .textarea {
        width: 100%;
        min-height: 44px;
        border: 1px solid rgba(170, 235, 255, 0.18);
        border-radius: 6px;
        padding: 11px 12px;
        font: 500 14px/1.45 var(--font-body);
        color: var(--fg);
        background: rgba(7, 10, 18, .68);
      }

      .ui-control:focus,
      .field:focus,
      .select:focus,
      .textarea:focus {
        outline: none;
        border-color: rgba(0, 225, 255, .42);
        box-shadow: 0 0 0 3px rgba(0, 225, 255, .1);
      }

      .textarea {
        min-height: 108px;
        resize: vertical;
      }

      .form-grid {
        display: grid;
        gap: 5px;
      }

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

      .ui-btn,
      .btn {
        min-height: 44px;
        border: 1px solid var(--border);
        border-radius: 6px;
        padding: 0 15px;
        font: 800 13px/1 var(--font-body);
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background: linear-gradient(135deg, rgba(153, 68, 255, .95), rgba(51, 229, 255, .72));
        color: #fff;
        box-shadow: 0 0 24px rgba(148, 76, 255, .26);
        transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
      }

      .ui-btn:hover,
      .btn:hover {
        transform: translateY(-1px);
        border-color: rgba(205, 142, 255, .52);
      }

      .btn.small {
        min-height: 24px;
        padding: 0 9px;
        font-size: 11px;
        border-radius: 4px;
        gap: 5px;
      }

      .ui-btn--secondary,
      .btn.secondary {
        background: rgba(12, 18, 31, .82);
        color: var(--fg);
        box-shadow: none;
      }

      .ui-btn--secondary:hover,
      .btn.secondary:hover {
        border-color: rgba(126, 234, 255, .36);
        background: rgba(18, 25, 42, .92);
      }

      .hero {
        padding: 12px;
        border-bottom: 1px solid var(--border);
        background:
          linear-gradient(110deg, rgba(13, 17, 30, .96), rgba(18, 12, 31, .92)),
          linear-gradient(90deg, rgba(139, 72, 255, .2), transparent);
      }

      .hero h2 {
        margin: 0;
        font: 800 28px/1 var(--font-display);
        letter-spacing: -0.03em;
      }

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

      .modal-overlay {
        position: fixed;
        inset: 0;
        z-index: 60;
        background: rgba(3, 6, 14, .68);
        backdrop-filter: blur(8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 160ms ease;
      }

      .modal {
        position: fixed;
        top: 50%;
        left: 50%;
        z-index: 70;
        width: min(680px, calc(100vw - 32px));
        max-height: calc(100vh - 48px);
        transform: translate(-50%, -46%);
        opacity: 0;
        pointer-events: none;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: color-mix(in oklch, var(--surface) 96%, transparent);
        box-shadow: var(--shadow);
        backdrop-filter: blur(20px);
        overflow: hidden;
        transition: transform 180ms ease, opacity 180ms ease;
      }

      .modal-overlay.open,
      .modal.open {
        opacity: 1;
        pointer-events: auto;
      }

      .modal.open {
        transform: translate(-50%, -50%);
      }

      .modal-head,
      .modal-foot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 16px 18px;
        background: rgba(8, 11, 21, .9);
      }

      .modal-head {
        border-bottom: 1px solid var(--border);
      }

      .modal-foot {
        border-top: 1px solid var(--border);
      }

      .modal-body {
        min-height: 0;
        overflow: auto;
        padding: 18px;
        display: grid;
        gap: 16px;
      }

      .hero-row {
        display: flex;
        flex-wrap: nowrap;
        gap: 5px;
        margin-top: 0;
        min-width: 0;
        overflow-x: auto;
      }

      .pill {
        border: 1px solid var(--border);
        background: rgba(9, 13, 24, .82);
        border-radius: 6px;
        padding: 4px 8px;
        font: 700 11px/1.4 var(--font-mono);
        color: var(--muted);
        letter-spacing: 0.08em;
        text-transform: uppercase;
      }

      .messages {
        min-height: 0;
        overflow: auto;
        padding: 16px 18px;
        display: grid;
        gap: 12px;
        grid-auto-rows: max-content;
        align-content: start;
        justify-items: start;
      }

      .chat-message,
      .message {
        max-width: 82%;
        width: fit-content;
        height: auto;
        min-height: 0;
        display: inline-grid;
        grid-template-rows: auto auto;
        align-items: start;
        gap: 4px;
        padding: 8px 14px;
        border-radius: 8px;
        border: 1px solid var(--border);
        line-height: 1.55;
        white-space: pre-wrap;
        background: rgba(11, 15, 28, .9);
        align-self: start;
      }

      .message-body {
        margin: 0;
      }

      .chat-message.user,
      .message.user {
        margin-left: auto;
        background: linear-gradient(180deg, rgba(18, 26, 45, .96), rgba(12, 18, 31, .96));
        border-color: rgba(122, 232, 255, .22);
      }

      .chat-message.assistant,
      .message.assistant {
        margin-right: auto;
        background: linear-gradient(180deg, rgba(43, 24, 72, .88), rgba(16, 18, 34, .96));
        border-color: rgba(193, 143, 255, .22);
      }

      .chat-message.system,
      .message.system {
        margin-right: auto;
        background: rgba(30, 34, 50, .74);
        border-style: dashed;
      }

      .chat-message.validation,
      .message.validation {
        border-color: rgba(122, 232, 255, 0.26);
        box-shadow: inset 0 0 0 1px rgba(122, 232, 255, 0.08);
      }

      .message-footer {
        display: flex;
        align-items: center;
        gap: 8px;
        justify-content: space-between;
      }

      .message-meta {
        min-width: 0;
        font: 700 11px/1.4 var(--font-mono);
        color: var(--muted);
        letter-spacing: 0.08em;
        text-transform: uppercase;
        white-space: nowrap;
      }

      .message-actions {
        display: flex;
        gap: 4px;
        margin-left: auto;
        justify-content: flex-end;
        flex: 0 0 auto;
      }

      .icon-btn {
        width: 24px;
        height: 24px;
        border: 1px solid var(--border);
        background: rgba(7, 10, 18, .88);
        color: var(--accent-cyan);
        border-radius: 5px;
        padding: 0;
        font: 700 11px/1 var(--font-mono);
        cursor: pointer;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
      }

      .icon-btn svg {
        width: 13px;
        height: 13px;
        pointer-events: none;
      }

      .icon-btn:hover {
        border-color: var(--accent);
      }

      .icon-btn.copied {
        color: #4caf80;
        border-color: #4caf80;
      }

      .icon-btn.danger {
        color: #e05c5c;
        opacity: 0.6;
      }

      .icon-btn.danger:hover {
        opacity: 1;
        border-color: #e05c5c;
        background: rgba(224, 92, 92, 0.1);
      }

      .composer {
        z-index: 5;
        padding: 14px 18px 18px;
        border-top: 1px solid var(--border);
        background: rgba(8, 12, 23, .92);
        backdrop-filter: blur(18px);
      }

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

      .composer-actions {
        align-items: center;
      }

      .composer-plus {
        margin-left: auto;
        width: 44px;
        height: 44px;
        border-radius: 10px;
        font-size: 22px;
        line-height: 1;
      }

      .notice-banner,
      .banner {
        display: none;
        margin-bottom: 10px;
        padding: 10px 12px;
        border-radius: 6px;
        font-size: 14px;
        border: 1px solid var(--border);
      }

      .notice-banner.error,
      .banner.error {
        display: block;
        background: color-mix(in oklch, var(--danger) 14%, var(--surface));
        color: color-mix(in oklch, var(--danger), white 26%);
      }

      .notice-banner.success,
      .banner.success {
        display: block;
        background: color-mix(in oklch, var(--success) 12%, var(--surface));
        color: color-mix(in oklch, var(--success), white 22%);
      }

      .composer-status {
        display: flex;
        align-items: center;
        gap: 6px;
        min-height: 18px;
        font-size: 12px;
        color: var(--muted);
      }

      .status-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 5px;
      }

      .status-label {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-size: 12px;
        color: var(--muted);
      }

      .dot {
        width: 10px;
        height: 10px;
        border-radius: 999px;
        background: var(--soft);
      }

      .dot.running,
      .status-chip.running {
        background: var(--accent-cyan);
      }

      .dot.failed,
      .status-chip.failed {
        background: var(--danger);
      }

      .dot.paused,
      .status-chip.paused {
        background: var(--warn);
      }

      .status-chip {
        width: 10px;
        height: 10px;
        border-radius: 999px;
        background: var(--soft);
      }

      .state-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 20px;
        padding: 2px 8px;
        border-radius: 6px;
        border: 1px solid var(--border);
        background: rgba(9, 13, 24, .82);
        font: 700 11px/1 var(--font-mono);
        line-height: 1;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 0.08em;
      }

      .state-badge.paused {
        border-color: color-mix(in oklch, var(--warn), transparent 42%);
        color: color-mix(in oklch, var(--warn), white 20%);
      }

      .state-badge.planning {
        border-color: rgba(193, 143, 255, .32);
        color: color-mix(in oklch, var(--accent), white 18%);
      }

      .progress-shell {
        height: 8px;
        border-radius: 999px;
        overflow: hidden;
        background: rgba(255,255,255,.06);
      }

      .progress-bar {
        height: 100%;
        width: 0%;
        background: linear-gradient(90deg, var(--accent-cyan) 0%, var(--accent) 100%);
        transition: width 180ms ease;
      }

      .task-card,
      .run-card,
      .run {
        border: 1px solid rgba(122, 232, 255, 0.12);
        border-radius: 6px;
        padding: 10px;
        background: rgba(11, 15, 27, .82);
      }

      .run-title {
        margin: 0 0 3px;
        font: 700 14px/1.4 var(--font-display);
      }

      .run-meta {
        font: 700 11px/1.5 var(--font-mono);
        color: var(--muted);
        letter-spacing: 0.08em;
        text-transform: uppercase;
      }

      .kv-grid {
        display: grid;
        gap: 5px;
      }

      .kv-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        border-bottom: 1px dashed rgba(170, 235, 255, 0.12);
        padding-bottom: 4px;
      }

      .kv-row:last-child {
        border-bottom: 0;
        padding-bottom: 0;
      }

      .kv-label {
        font-size: 12px;
        color: var(--muted);
      }

      .kv-value {
        font-size: 12px;
        color: var(--fg);
        text-align: right;
      }

      .file-tree {
        display: grid;
        gap: 2px;
      }

      .file-node {
        display: grid;
        gap: 2px;
      }

      .tree-row {
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
        padding: 1px 0;
        cursor: pointer;
      }

      .tree-toggle {
        width: 10px;
        flex: 0 0 10px;
        text-align: center;
        color: var(--muted);
        font-size: 10px;
      }

      .tree-name {
        font-size: 13px;
        color: var(--fg);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
        flex: 1 1 0;
      }

      .tree-type {
        font-size: 11px;
        color: var(--muted);
        flex-shrink: 0;
      }

      .tree-row {
        border-radius: 4px;
        transition: background 0.1s;
        padding: 2px 4px;
        user-select: none;
      }

      .tree-row:hover {
        background: rgba(170, 235, 255, 0.06);
      }

      .tree-row:hover .tree-action {
        opacity: 1;
      }

      .tree-row.selected {
        background: rgba(100, 200, 255, 0.12);
        outline: 1px solid rgba(100, 200, 255, 0.3);
      }

      .tree-action {
        opacity: 0;
        transition: opacity 0.15s;
        flex-shrink: 0;
        width: 20px;
        height: 20px;
        border: none;
        background: transparent;
        color: var(--muted);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 3px;
        padding: 0;
      }

      .tree-action:hover {
        color: #e05c5c;
        background: rgba(224, 92, 92, 0.12);
      }

      .tree-action svg {
        width: 12px;
        height: 12px;
        pointer-events: none;
      }

      .tree-children {
        margin-left: 12px;
        padding-left: 8px;
        border-left: 1px solid rgba(170, 235, 255, 0.18);
      }

      .tree-children.collapsed {
        display: none;
      }

      .link-btn {
        border: 0;
        padding: 0;
        background: transparent;
        color: var(--accent-cyan);
        font: inherit;
        cursor: pointer;
        text-align: left;
      }

      .slide-panel-overlay {
        position: fixed;
        inset: 0;
        background: rgba(1, 3, 9, .72);
        backdrop-filter: blur(8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 140ms ease;
        z-index: 60;
      }

      .slide-panel-overlay.open {
        opacity: 1;
        pointer-events: auto;
      }

      .slide-panel {
        position: fixed;
        top: 0;
        right: 0;
        width: min(80vw, 1200px);
        height: 100vh;
        background: linear-gradient(180deg, rgba(12, 16, 28, .98), rgba(7, 11, 21, .98));
        border-left: 1px solid var(--border-strong);
        box-shadow: -18px 0 48px rgba(0, 0, 0, 0.36), 0 0 24px rgba(148, 76, 255, .14);
        transform: translateX(100%);
        transition: transform 180ms ease;
        z-index: 70;
        display: grid;
        grid-template-rows: auto 1fr auto;
      }

      .slide-panel.open {
        transform: translateX(0);
      }

      .slide-panel-head {
        padding: 14px 16px;
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
      }

      .slide-panel-title {
        margin: 0;
        font: 800 20px/1 var(--font-display);
      }

      .slide-panel-body {
        padding: 14px 16px;
        overflow: auto;
        display: grid;
        gap: 10px;
      }

      .slide-panel-foot {
        padding: 14px 16px;
        border-top: 1px solid var(--border);
        display: flex;
        justify-content: space-between;
        gap: 8px;
      }

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

      .panel-grid .textarea {
        min-height: 220px;
        font-family: "SFMono-Regular", "Menlo", monospace;
        font-size: 12px;
      }

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

      .mcp-server-card {
        display: grid;
        gap: 10px;
      }

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

      .mcp-server-meta {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
      }

      .mcp-server-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
      }

      .mcp-badge {
        display: inline-flex;
        align-items: center;
        min-height: 24px;
        padding: 0 8px;
        border: 1px solid var(--border);
        border-radius: 999px;
        background: rgba(9, 13, 24, .78);
        color: var(--muted);
        font: 700 11px/1 var(--font-mono);
        letter-spacing: 0.08em;
        text-transform: uppercase;
      }

      .mcp-badge.enabled {
        border-color: color-mix(in oklch, var(--success), transparent 46%);
        color: color-mix(in oklch, var(--success), white 18%);
      }

      .mcp-badge.disabled {
        border-color: color-mix(in oklch, var(--danger), transparent 58%);
        color: color-mix(in oklch, var(--danger), white 18%);
      }

      .mcp-badge.write {
        border-color: color-mix(in oklch, var(--warn), transparent 52%);
        color: color-mix(in oklch, var(--warn), white 20%);
      }

      .check-row {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 44px;
        padding: 0 2px;
        color: var(--fg);
      }

      .check-row input {
        width: 16px;
        height: 16px;
      }

      .json-textarea {
        min-height: 120px !important;
      }

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

      .mcp-capability-card {
        display: grid;
        gap: 6px;
      }

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

      .preview-box {
        border: 1px solid var(--border);
        border-radius: 6px;
        background: rgba(7, 10, 18, .78);
        padding: 10px;
        white-space: pre-wrap;
        overflow: auto;
        font-family: var(--font-mono);
        font-size: 12px;
        line-height: 1.5;
      }

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

        .workspace {
          grid-template-columns: 280px minmax(0, 1fr);
        }

        .status-column {
          display: none;
        }
      }

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

        .sidebar {
          border-bottom: 1px solid var(--border);
        }

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

        .composer-plus {
          margin-left: 0;
        }

        .message {
          max-width: 100%;
        }

        .hero-topline,
        .message-footer {
          align-items: flex-start;
        }

        .hero-row,
        .message-footer {
          flex-wrap: wrap;
        }

        .message-meta {
          white-space: normal;
        }

        .slide-panel {
          width: 100vw;
        }

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

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