:root {
        --bg: #0a0e14;
        --surface: #13171f;
        --surface-2: #1b212e;
        --surface-3: #222938;
        --line: #252d3d;
        --line-strong: #2f3a52;
        --text: #eaf0ff;
        --muted: #8b92a8;
        --dim: #5a627a;
        --accent: #ff5a2b;
        --accent-2: #4f7dff;
        --lime: #d6ff2a;
        --radius: 14px;
      }
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }
      html,
      body {
        height: 100%;
      }
      body {
        font-family: "Space Grotesk", sans-serif;
        background: var(--bg);
        color: var(--text);
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }
      header {
        height: 58px;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 14px;
        gap: 16px;
        flex-shrink: 0;
      }
      .brand {
        display: flex;
        align-items: center;
        gap: 12px;
      }
      .mark {
        width: 38px;
        height: 38px;
        object-fit: contain;
        display: block;
        flex-shrink: 0;
      }
      .brand h1 {
        font-size: 19px;
        letter-spacing: -0.04em;
        line-height: 1;
        font-weight: 700;
      }
      .brand h1 em {
        font-style: normal;
        color: var(--accent);
      }
      .brand p {
        font-family: "JetBrains Mono", monospace;
        font-size: 10px;
        letter-spacing: 0.12em;
        color: var(--muted);
        text-transform: uppercase;
        margin-top: 2px;
      }
      .controls {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: flex-end;
      }
      .seg {
        display: flex;
        align-items: center;
        gap: 8px;
        background: var(--surface-2);
        border: 1px solid var(--line);
        border-radius: 999px;
        padding: 4px 10px;
      }
      .seg label {
        font-family: "JetBrains Mono", monospace;
        font-size: 11px;
        color: var(--muted);
        display: flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
      }
      .seg input {
        accent-color: var(--accent);
      }
      .btn {
        appearance: none;
        border: 1px solid var(--line);
        background: var(--surface-2);
        color: var(--text);
        padding: 8px 12px;
        border-radius: 999px;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        transition: 0.15s;
        white-space: nowrap;
      }
      .btn:hover {
        background: var(--surface-3);
        border-color: var(--line-strong);
        transform: translateY(-1px);
      }
      .btn-primary {
        background: var(--text);
        color: #0a0e14;
        border-color: var(--text);
        font-weight: 700;
      }
      .btn-accent {
        background: var(--accent);
        color: white;
        border-color: var(--accent);
        font-weight: 700;
      }
      .dropdown {
        position: relative;
      }
      .dropdown-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        background: #1c212e;
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 6px;
        min-width: 180px;
        display: none;
        z-index: 20;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
      }
      .dropdown-menu.open {
        display: block;
      }
      .dropdown-menu button {
        width: 100%;
        text-align: left;
        background: transparent;
        border: none;
        color: var(--text);
        padding: 10px 10px;
        border-radius: 8px;
        font-size: 13px;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
      }
      .dropdown-menu button:hover {
        background: var(--surface-3);
      }
      .stage {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        padding: 10px;
        gap: 10px;
        background:
          radial-gradient(
            800px 400px at 20% 0%,
            rgba(79, 125, 255, 0.08),
            transparent 60%
          ),
          radial-gradient(
            600px 400px at 90% 20%,
            rgba(255, 90, 43, 0.06),
            transparent 60%
          ),
          var(--bg);
      }
      .editors {
        display: flex;
        min-height: 180px;
        height: 42%;
        flex-shrink: 0;
        gap: 0;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        overflow: hidden;
      }
      .pane {
        flex: 1;
        min-width: 120px;
        display: flex;
        flex-direction: column;
        min-height: 0;
        background: var(--surface);
      }
      .pane-head {
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 10px;
        border-bottom: 1px solid var(--line);
        background: var(--surface-2);
        flex-shrink: 0;
      }
      .pane-head h3 {
        font-family: "JetBrains Mono", monospace;
        font-size: 11px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--muted);
        font-weight: 500;
      }
      .pane-head h3 b {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        display: inline-block;
      }
      .icon-btn {
        width: 24px;
        height: 24px;
        border-radius: 6px;
        border: 1px solid transparent;
        background: transparent;
        color: var(--dim);
        display: grid;
        place-items: center;
        cursor: pointer;
        font-size: 13px;
      }
      .icon-btn:hover {
        background: var(--surface-3);
        color: var(--text);
        border-color: var(--line);
      }
      .code-wrap {
        flex: 1;
        position: relative;
        display: flex;
        min-height: 0;
        background: #0f131b;
      }
      .lines {
        width: 38px;
        background: #0d1017;
        border-right: 1px solid var(--line);
        padding: 12px 0;
        text-align: center;
        font-family: "JetBrains Mono", monospace;
        font-size: 12px;
        line-height: 1.7;
        color: #3a4156;
        user-select: none;
        flex-shrink: 0;
      }
      textarea {
        flex: 1;
        width: 100%;
        background: transparent;
        border: none;
        outline: none;
        resize: none;
        padding: 12px;
        color: #d8e0f0;
        font-family: "JetBrains Mono", monospace;
        font-size: 13px;
        line-height: 1.7;
        tab-size: 2;
        white-space: pre;
      }
      .v-gutter {
        touch-action: none;
        width: 6px;
        background: var(--line);
        cursor: col-resize;
        display: grid;
        place-items: center;
        flex-shrink: 0;
      }
      .v-gutter:hover,
      .v-gutter.dragging {
        background: var(--line-strong);
      }
      .v-gutter::after {
        content: "";
        width: 2px;
        height: 20px;
        background: #3a4156;
        border-radius: 99px;
        opacity: 0.6;
      }
      .h-gutter {
        touch-action: none;
        height: 10px;
        background: transparent;
        cursor: row-resize;
        display: grid;
        place-items: center;
        flex-shrink: 0;
        position: relative;
      }
      .h-gutter::before {
        content: "";
        position: absolute;
        left: 10px;
        right: 10px;
        top: 4px;
        height: 6px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 999px;
      }
      .h-gutter::after {
        content: "⋯";
        font-size: 10px;
        color: var(--dim);
        position: relative;
        letter-spacing: 2px;
      }
      .output {
        flex: 1;
        min-height: 200px;
        display: flex;
        gap: 0;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        overflow: hidden;
      }
      .preview-pane {
        flex: 1.25;
        min-width: 200px;
        display: flex;
        flex-direction: column;
        min-height: 0;
        background: white;
      }
      .preview-bar {
        height: 36px;
        background: #f1f3f7;
        border-bottom: 1px solid #e2e6ef;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 10px;
        flex-shrink: 0;
      }
      .preview-bar span {
        font-family: "JetBrains Mono", monospace;
        font-size: 11px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #6b7280;
        font-weight: 500;
      }
      .traffic {
        display: flex;
        gap: 6px;
      }
      .traffic i {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        display: block;
      }
      .preview-frame {
        flex: 1;
        width: 100%;
        border: none;
        background: white;
      }
      .console-pane {
        flex: 0.85;
        min-width: 220px;
        display: flex;
        flex-direction: column;
        min-height: 0;
        background: #0f131b;
        border-left: 1px solid var(--line);
      }
      .console-head {
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 10px;
        background: var(--surface-2);
        border-bottom: 1px solid var(--line);
        flex-shrink: 0;
      }
      .console-head h3 {
        font-family: "JetBrains Mono", monospace;
        font-size: 11px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--muted);
        display: flex;
        align-items: center;
        gap: 8px;
      }
      .badge {
        font-family: "JetBrains Mono", monospace;
        font-size: 10px;
        background: var(--lime);
        color: #0a0e14;
        padding: 2px 6px;
        border-radius: 999px;
        font-weight: 700;
      }
      .console-log {
        flex: 1;
        overflow: auto;
        padding: 8px;
        font-family: "JetBrains Mono", monospace;
        font-size: 12px;
        line-height: 1.6;
      }
      .log-row {
        padding: 6px 8px;
        border-radius: 8px;
        display: flex;
        gap: 8px;
        align-items: flex-start;
        border-left: 2px solid transparent;
      }
      .log-row + .log-row {
        margin-top: 4px;
      }
      .log-time {
        color: var(--dim);
        flex-shrink: 0;
        font-size: 11px;
        margin-top: 1px;
      }
      .log-log {
        border-left-color: #3a4156;
        color: #d8e0f0;
        background: rgba(255, 255, 255, 0.03);
      }
      .log-warn {
        border-left-color: #f5b928;
        color: #ffe9a8;
        background: rgba(245, 185, 40, 0.08);
      }
      .log-error {
        border-left-color: var(--accent);
        color: #ffcfc2;
        background: rgba(255, 90, 43, 0.1);
      }
      .log-info {
        border-left-color: var(--accent-2);
        color: #c7d6ff;
        background: rgba(79, 125, 255, 0.08);
      }
      .empty {
        color: var(--dim);
        text-align: center;
        padding: 28px 12px;
        font-size: 12px;
      }
      .status {
        height: 26px;
        background: var(--surface);
        border-top: 1px solid var(--line);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 12px;
        font-family: "JetBrains Mono", monospace;
        font-size: 11px;
        color: var(--muted);
        flex-shrink: 0;
      }
      .status b {
        color: var(--lime);
        font-weight: 500;
      }
      @media (max-width: 900px) {
        .editors {
          flex-direction: column;
          height: auto;
          flex: 1;
        }
        .editors .v-gutter {
          width: 100%;
          height: 6px;
          cursor: row-resize;
        }
        .editors .v-gutter::after {
          width: 20px;
          height: 2px;
        }
        .output {
          flex-direction: column;
        }
        .console-pane {
          border-left: none;
          border-top: 1px solid var(--line);
        }
        header {
          height: auto;
          padding: 10px;
          flex-wrap: wrap;
        }
      }