﻿    :root {
      --bg: #0b1116;
      --panel: #121a22;
      --panel-2: #18222b;
      --panel-3: #0f171d;
      --line: rgba(255, 255, 255, 0.08);
      --line-2: rgba(255, 255, 255, 0.16);
      --text: #e7eff6;
      --muted: #8ea3b3;
      --accent: #ff9a4d;
      --accent-2: #34c78c;
      --accent-3: #59aaff;
      --packml: #f2ca58;
      --logic: #4a84ff;
      --comm: #34c78c;
      --signal: #8a63ff;
      --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
    }

    * {
      box-sizing: border-box;
    }

    html,
    body {
      margin: 0;
      min-height: 100%;
      font-family: "Bahnschrift", "Segoe UI", sans-serif;
      color: var(--text);
      background:
        radial-gradient(circle at top left, rgba(89, 170, 255, 0.12), transparent 24%),
        radial-gradient(circle at top right, rgba(255, 154, 77, 0.14), transparent 28%),
        linear-gradient(180deg, #0a1014 0%, var(--bg) 100%);
    }

    body {
      padding: 86px 14px 14px;
    }

    body.overview-mode {
      padding-top: 14px;
    }

    button,
    input,
    select,
    textarea {
      font: inherit;
    }

    button {
      cursor: pointer;
    }

    .app {
      min-height: calc(100vh - 28px);
      display: grid;
      grid-template-rows: 1fr auto;
      gap: 14px;
    }

    .fixed-toolline {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 60;
      display: grid;
      gap: 6px;
      padding: 7px 14px 8px;
      border-bottom: 1px solid var(--line);
      background: rgba(10, 16, 21, 0.94);
      backdrop-filter: blur(10px);
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    }

    .fixed-toolline-location {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      min-width: 0;
    }

    .fixed-toolline-top {
      display: grid;
      grid-template-columns: auto auto minmax(0, 1fr);
      justify-content: stretch;
    }

    .fixed-toolline-label {
      color: var(--muted);
      font-size: 0.72rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .fixed-toolline-state {
      color: #ffeeb1;
      font-size: 0.94rem;
      font-weight: 800;
      text-align: right;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 14px 16px;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: rgba(18, 26, 34, 0.92);
      box-shadow: var(--shadow);
      backdrop-filter: blur(8px);
    }

    .icon-badge {
      width: 28px;
      height: 28px;
      display: inline-grid;
      place-items: center;
      border-radius: 10px;
      font-size: 0.86rem;
      font-weight: 800;
      line-height: 1;
      flex: 0 0 auto;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    .icon-packml {
      background: linear-gradient(135deg, rgba(242, 202, 88, 0.34), rgba(242, 202, 88, 0.14));
      color: #ffeeb1;
    }

    .icon-logic {
      background: linear-gradient(135deg, rgba(74, 132, 255, 0.34), rgba(74, 132, 255, 0.14));
      color: #d7e5ff;
    }

    .icon-comm {
      background: linear-gradient(135deg, rgba(52, 199, 140, 0.34), rgba(52, 199, 140, 0.14));
      color: #d4ffec;
    }

    .icon-signal {
      background: linear-gradient(135deg, rgba(138, 99, 255, 0.34), rgba(138, 99, 255, 0.14));
      color: #e6dbff;
    }

    .icon-project {
      background: linear-gradient(135deg, rgba(255, 154, 77, 0.34), rgba(255, 154, 77, 0.14));
      color: #ffe0c7;
    }

    .title-row {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 8px;
    }

    .tone-packml {
      background:
        linear-gradient(180deg, rgba(242, 202, 88, 0.06), transparent 42%),
        rgba(20, 29, 37, 0.96);
      border-color: rgba(242, 202, 88, 0.18);
    }

    .tone-logic {
      background:
        linear-gradient(180deg, rgba(74, 132, 255, 0.07), transparent 42%),
        rgba(20, 29, 37, 0.96);
      border-color: rgba(74, 132, 255, 0.2);
    }

    .tone-comm {
      background:
        linear-gradient(180deg, rgba(52, 199, 140, 0.07), transparent 42%),
        rgba(20, 29, 37, 0.96);
      border-color: rgba(52, 199, 140, 0.2);
    }

    .tone-signal {
      background:
        linear-gradient(180deg, rgba(138, 99, 255, 0.07), transparent 42%),
        rgba(20, 29, 37, 0.96);
      border-color: rgba(138, 99, 255, 0.2);
    }

    .tone-project {
      background:
        linear-gradient(180deg, rgba(255, 154, 77, 0.08), transparent 42%),
        rgba(20, 29, 37, 0.96);
      border-color: rgba(255, 154, 77, 0.2);
    }

    .chips,
    .actions,
    .footer-left {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .chip,
    .btn,
    .field,
    .field-small {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #18232d;
      color: var(--text);
    }

    .chip,
    .btn {
      padding: 10px 14px;
    }

    .chip {
      color: var(--muted);
      font-size: 0.84rem;
    }

    .btn:hover {
      border-color: var(--line-2);
      background: #21303e;
    }

    .btn.primary {
      background: linear-gradient(135deg, var(--accent), #f35f41);
      color: #081117;
      border-color: transparent;
      font-weight: 700;
    }

    .btn.secondary {
      background: linear-gradient(135deg, rgba(52, 199, 140, 0.18), rgba(52, 199, 140, 0.08));
      border-color: rgba(52, 199, 140, 0.28);
    }

    .btn.ghost {
      background: transparent;
    }

    .btn.mini {
      padding: 8px 10px;
      font-size: 0.8rem;
    }

    .main {
      min-height: 0;
      display: grid;
      grid-template-columns: 1fr;
      gap: 14px;
    }

    .main > aside.panel {
      display: none;
    }

    .panel {
      min-height: 0;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 22px;
      background: rgba(18, 26, 34, 0.94);
      box-shadow: var(--shadow);
      display: grid;
      grid-template-rows: auto 1fr;
    }

    .panel-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 16px 18px;
      border-bottom: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.02);
    }

    .panel-head h2 {
      margin: 0;
      font-size: 0.88rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .panel-body {
      min-height: 0;
      overflow: auto;
      padding: 16px;
    }

    .section + .section {
      margin-top: 18px;
    }

    .label {
      margin: 0 0 10px;
      color: var(--muted);
      font-size: 0.74rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .tree,
    .list,
    .stack,
    .form-stack,
    .logic-stack {
      display: grid;
      gap: 10px;
    }

    .tree-button,
    .mini-card,
    .tool-item,
    .workspace-card,
    .state-card,
    .channel-card,
    .logic-card,
    .editor-card,
    .empty {
      border: 1px solid var(--line);
      border-radius: 16px;
      background: var(--panel-2);
    }

    .tree-button,
    .tool-item {
      width: 100%;
      text-align: left;
      padding: 12px 14px;
    }

    .tree-button strong,
    .mini-card strong,
    .tool-item strong {
      display: block;
      margin-bottom: 4px;
      color: var(--text);
      font-size: 0.9rem;
    }

    .tree-button small,
    .mini-card span,
    .tool-item small {
      color: var(--muted);
      line-height: 1.4;
      font-size: 0.8rem;
    }

    .tree-button.active {
      border-color: rgba(89, 170, 255, 0.35);
      background: rgba(89, 170, 255, 0.12);
    }

    .signal-tree details {
      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--panel-3);
      padding: 10px 12px;
    }

    .signal-tree details + details {
      margin-top: 10px;
    }

    .signal-tree summary {
      cursor: pointer;
      font-weight: 700;
    }

    .signal-node {
      margin-top: 10px;
      padding: 10px 12px;
      border-radius: 12px;
      background: rgba(138, 99, 255, 0.08);
      color: var(--muted);
      font-size: 0.82rem;
      line-height: 1.45;
    }

    .workspace-shell {
      min-height: 0;
      display: grid;
      grid-template-rows: 1fr;
      background:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(180deg, #0f171d 0%, #0b1217 100%);
      background-size: 28px 28px, 28px 28px, auto;
    }

    .workspace-body {
      min-height: 0;
      overflow: auto;
      padding: 22px;
    }

    .menu-wrap {
      position: relative;
    }

    .menu-toggle {
      min-width: 0;
      text-align: left;
      font-weight: 700;
      padding: 8px 10px;
    }

    .menu-panel {
      position: absolute;
      top: calc(100% + 8px);
      left: 0;
      width: min(560px, calc(100vw - 40px));
      border: 1px solid var(--line);
      border-radius: 16px;
      background: rgba(17, 25, 33, 0.98);
      box-shadow: var(--shadow);
      padding: 12px;
      z-index: 80;
      display: grid;
      gap: 10px;
    }

    .menu-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
      gap: 8px;
    }

    .menu-actions {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
      gap: 8px;
    }

    .menu-actions .btn {
      width: 100%;
    }

    .project-list {
      display: grid;
      gap: 8px;
      max-height: 220px;
      overflow: auto;
    }

    .project-list .mini-card {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 8px;
      align-items: center;
    }

    .level-canvas {
      display: grid;
      gap: 14px;
      min-height: 100%;
      align-content: start;
    }

    .level-banner {
      padding: 14px 16px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: rgba(12, 19, 26, 0.92);
    }

    .level-banner h3 {
      margin: 0 0 6px;
      font-size: 1rem;
    }

    .level-banner p {
      margin: 0;
      color: var(--muted);
      font-size: 0.85rem;
    }

    .line-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 12px;
    }

    .line-card,
    .operator-card,
    .state-map-card,
    .code-stage {
      border: 1px solid var(--line);
      border-radius: 16px;
      background: rgba(15, 24, 32, 0.95);
      padding: 14px;
      box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
    }

    .line-card {
      cursor: pointer;
      transition: border-color 0.16s ease, transform 0.16s ease;
    }

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

    .line-scene {
      position: relative;
      min-height: clamp(520px, 68vh, 760px);
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 16px;
      background:
        linear-gradient(135deg, rgba(89, 170, 255, 0.09), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 45%),
        #0c141b;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), var(--shadow);
      perspective: 1100px;
      user-select: none;
    }

    .floor-world {
      position: absolute;
      inset: 0;
      transform: translate(calc(50% - var(--camera-x, 50%)), calc(50% - var(--camera-y, 50%)));
      transform-origin: center;
    }

    .floor-zoom-world {
      position: absolute;
      inset: 0;
      transform: scale(var(--floor-zoom, 1));
      transform-origin: var(--camera-x, 50%) var(--camera-y, 50%);
    }

    .line-floor {
      position: absolute;
      left: 50%;
      top: 54%;
      width: 118%;
      height: 76%;
      transform: translate(-50%, -50%) rotateX(var(--camera-tilt, 62deg)) rotateZ(-34deg);
      transform-origin: center;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(135deg, rgba(52, 199, 140, 0.08), rgba(89, 170, 255, 0.06));
      background-size: 44px 44px, 44px 44px, auto;
      box-shadow: 0 34px 70px rgba(0, 0, 0, 0.28);
    }

    .line-machine {
      position: absolute;
      width: min(260px, 33vw);
      min-width: 210px;
      transform: translate(-50%, -50%);
      z-index: 2;
    }

    .line-machine.editing {
      cursor: grab;
      z-index: 4;
    }

    .line-machine.dragging {
      cursor: grabbing;
      z-index: 8;
    }

    .line-machine-shadow {
      position: absolute;
      left: 22%;
      right: 8%;
      bottom: -18px;
      height: 28px;
      transform: skewX(-34deg);
      border-radius: 50%;
      background: rgba(0, 0, 0, 0.34);
      filter: blur(6px);
      pointer-events: none;
    }

    .line-machine-body {
      position: relative;
      display: grid;
      gap: 9px;
      padding: 12px;
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 12px;
      background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 38%),
        rgba(15, 24, 32, 0.96);
      box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32);
    }

    .line-machine.editing .line-machine-body {
      border-color: rgba(255, 154, 77, 0.62);
      box-shadow: 0 0 0 3px rgba(255, 154, 77, 0.12), 0 22px 42px rgba(0, 0, 0, 0.36);
    }

    .line-machine-top,
    .line-machine-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      min-width: 0;
    }

    .line-machine h4 {
      margin: 3px 0 0;
      font-size: 0.98rem;
      overflow-wrap: anywhere;
    }

    .line-edit-toggle.active {
      border-color: rgba(255, 154, 77, 0.58);
      color: #ffe0c7;
      background: rgba(255, 154, 77, 0.16);
    }

    .line-machine-core {
      position: relative;
      min-height: 86px;
      cursor: pointer;
      transform: rotateX(54deg) rotateZ(-32deg);
      transform-style: preserve-3d;
    }

    .line-machine.editing .line-machine-core {
      cursor: grab;
    }

    .machine-block {
      position: absolute;
      display: block;
      border: 1px solid rgba(255, 255, 255, 0.16);
      box-shadow: 12px 14px 0 rgba(0, 0, 0, 0.2);
    }

    .machine-block-main {
      left: 42px;
      top: 10px;
      width: 118px;
      height: 58px;
      background: linear-gradient(135deg, #59aaff, #24568a);
    }

    .machine-block-side {
      left: 112px;
      top: 36px;
      width: 82px;
      height: 38px;
      background: linear-gradient(135deg, #34c78c, #176449);
    }

    .machine-block-feed {
      left: 12px;
      top: 50px;
      width: 82px;
      height: 22px;
      background: linear-gradient(135deg, #f2ca58, #856a1c);
    }

    .line-machine-meta {
      color: var(--muted);
      font-size: 0.78rem;
    }

    .line-field {
      width: 100%;
      padding: 7px 8px;
      border-radius: 8px;
    }

    .line-comment {
      min-height: 58px;
      resize: vertical;
    }

    .line-comment-preview,
    .line-impact {
      margin: 0;
      color: var(--muted);
      font-size: 0.78rem;
      line-height: 1.35;
    }

    .line-comment-preview {
      color: #d4ffec;
    }

    .overview-shell {
      min-height: calc(100vh - 170px);
      display: grid;
      grid-template-columns: 220px minmax(0, 1fr) 250px;
      gap: 12px;
      align-items: stretch;
    }

    .floor-palette,
    .floor-help,
    .floor-workspace,
    .report-main {
      min-width: 0;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: rgba(12, 19, 26, 0.92);
      padding: 12px;
    }

    .floor-palette {
      display: grid;
      align-content: start;
      gap: 8px;
    }

    .floor-palette-item {
      min-height: 46px;
      display: grid;
      grid-template-columns: 34px 1fr;
      align-items: center;
      gap: 8px;
      padding: 8px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.04);
      color: var(--text);
      text-align: left;
      cursor: grab;
    }

    .floor-palette-item span {
      display: grid;
      place-items: center;
      width: 32px;
      height: 28px;
      border-radius: 7px;
      background: rgba(255, 255, 255, 0.08);
      font-size: 0.74rem;
      font-weight: 800;
    }

    .floor-palette-item strong {
      font-size: 0.8rem;
      line-height: 1.2;
    }

    .floor-workspace {
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      gap: 10px;
    }

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

    .floor-camera-control {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 8px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.04);
      color: var(--muted);
      font-size: 0.76rem;
    }

    .floor-camera-control input {
      width: 118px;
    }

    .floor-scene {
      min-height: clamp(620px, 72vh, 900px);
      cursor: move;
    }

    .floor-scene.panning {
      cursor: move;
    }

    .floor-scene.drag-over {
      border-color: rgba(52, 199, 140, 0.58);
      box-shadow: inset 0 0 0 3px rgba(52, 199, 140, 0.12), var(--shadow);
    }

    .floor-asset {
      position: absolute;
      width: 210px;
      min-width: 150px;
      min-height: 90px;
      transform: translate(-50%, -50%) translateY(calc(var(--asset-z, 0px) * -1));
      z-index: 20;
      cursor: grab;
    }

    .floor-asset.dragging {
      cursor: grabbing;
      z-index: 80;
    }

    .floor-asset:has(.floor-asset-panel:not(.hidden)) {
      z-index: 100;
    }

    .floor-asset-shape {
      position: relative;
      height: 68px;
      transform: rotateX(56deg) rotateZ(calc(-32deg + var(--asset-yaw, 0deg)));
      transform-origin: center;
      border: 1px solid rgba(255, 255, 255, 0.18);
      background: var(--packml-color);
      box-shadow: 14px 16px 0 rgba(0, 0, 0, 0.22);
    }

    .floor-info-toggle {
      z-index: 130;
      background: rgba(15, 24, 32, 0.96);
      flex: 0 0 auto;
    }

    .floor-info-link {
      position: absolute;
      left: 50%;
      top: 50%;
      width: var(--link-length);
      height: 1px;
      transform: translate(var(--link-x), var(--link-y)) rotate(var(--link-angle));
      transform-origin: 0 50%;
      background: rgba(255, 154, 77, 0.94);
      box-shadow: 0 0 8px rgba(255, 154, 77, 0.24);
      pointer-events: none;
      z-index: 110;
    }

    .floor-asset-shape span {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%) rotateZ(32deg) rotateX(-56deg);
      color: #071016;
      font-weight: 900;
      font-size: 0.82rem;
    }

    .floor-asset-conveyor .floor-asset-shape {
      height: 32px;
      border-radius: 999px;
      background: linear-gradient(90deg, #f2ca58, #34c78c);
    }

    .floor-asset-pipe .floor-asset-shape,
    .floor-asset-valve-pipe .floor-asset-shape {
      height: 24px;
      border-radius: 999px;
      background: linear-gradient(90deg, #59aaff, #34c78c);
    }

    .floor-asset-pump .floor-asset-shape {
      width: 92px;
      border-radius: 50%;
      background: #34c78c;
    }

    .floor-asset-valve-pipe .floor-asset-shape::after {
      content: "";
      position: absolute;
      left: 50%;
      top: -18px;
      width: 34px;
      height: 34px;
      transform: translateX(-50%) rotate(45deg);
      border: 1px solid rgba(255, 255, 255, 0.18);
      background: #8a63ff;
    }

    .floor-asset[class*="sensor-"] .floor-asset-shape {
      width: 72px;
      height: 72px;
      border-radius: 50%;
      background: #ff9a4d;
    }

    .floor-asset-panel {
      position: absolute;
      left: 50%;
      top: 50%;
      width: min(150px, 50vw);
      transform: translate(var(--info-x, 0px), var(--info-y, 86px));
      display: grid;
      gap: 4px;
      padding: 5px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(15, 24, 32, 0.95);
      box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
      cursor: grab;
      z-index: 120;
    }

    .floor-asset-panel.dragging {
      cursor: grabbing;
      z-index: 160;
    }

    .floor-asset-head,
    .floor-readouts {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      flex-wrap: wrap;
      min-width: 0;
    }

    .floor-asset-head strong {
      overflow-wrap: anywhere;
      font-size: 0.7rem;
    }

    .floor-asset-head span,
    .floor-readouts span {
      color: var(--muted);
      font-size: 0.62rem;
    }

    .hold-popup {
      position: fixed;
      inset: 0;
      z-index: 5000;
      display: grid;
      place-items: stretch;
      padding: clamp(18px, 4vw, 48px);
      background: rgba(6, 12, 18, 0.94);
      backdrop-filter: blur(12px);
      cursor: pointer;
    }

    .hold-popup-content {
      width: 100%;
      height: 100%;
      display: grid;
      grid-template-rows: auto auto minmax(0, 1fr);
      gap: 18px;
      overflow: auto;
    }

    .hold-title {
      display: grid;
      gap: 4px;
    }

    .hold-title span {
      color: var(--accent-2);
      font-size: 0.78rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-weight: 800;
    }

    .hold-title h2 {
      margin: 0;
      font-size: clamp(2rem, 5vw, 4.8rem);
      line-height: 1;
    }

    .hold-title p {
      margin: 0;
      color: var(--muted);
      font-size: clamp(1rem, 2vw, 1.3rem);
    }

    .hold-action-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 14px;
    }

    .hold-action,
    .hold-tree-row {
      border: 1px solid rgba(255, 255, 255, 0.16);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.07);
      color: var(--text);
      text-align: left;
      cursor: pointer;
    }

    .hold-action {
      min-height: 132px;
      padding: 22px;
      display: grid;
      align-content: center;
      gap: 8px;
    }

    .hold-action.primary {
      border-color: rgba(52, 199, 140, 0.55);
      background: rgba(52, 199, 140, 0.14);
    }

    .hold-action strong {
      font-size: clamp(1.4rem, 3vw, 2.8rem);
    }

    .hold-action span,
    .hold-list span,
    .hold-tree-row small,
    .hold-tree-row em {
      color: var(--muted);
    }

    .hold-popup section {
      display: grid;
      gap: 10px;
      min-height: 0;
    }

    .hold-popup h3 {
      margin: 0;
      font-size: 0.9rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--muted);
    }

    .hold-list,
    .hold-tree {
      display: grid;
      gap: 8px;
    }

    .hold-list div,
    .hold-tree-row {
      padding: 12px 14px;
    }

    .hold-list div {
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.05);
      display: grid;
      gap: 4px;
    }

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

    .hold-tree-row span {
      display: grid;
      gap: 3px;
    }

    .floor-field {
      width: 100%;
      padding: 3px 5px;
      border-radius: 6px;
      font-size: 0.66rem;
    }

    .floor-note {
      min-height: 28px;
      resize: vertical;
    }

    .floor-input-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
      gap: 3px;
    }

    .floor-input-grid label {
      display: grid;
      gap: 2px;
      color: var(--muted);
      font-size: 0.56rem;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

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

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

    .report-main {
      display: grid;
      gap: 12px;
    }

    .report-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 12px;
    }

    .report-card {
      display: grid;
      gap: 10px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(15, 24, 32, 0.95);
    }

    .report-card h4 {
      margin: 0;
    }

    .report-bar-row {
      display: grid;
      grid-template-columns: 92px 1fr 78px;
      align-items: center;
      gap: 8px;
      color: var(--muted);
      font-size: 0.78rem;
    }

    .report-bar-track {
      height: 12px;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.07);
    }

    .report-bar {
      height: 100%;
      border-radius: inherit;
      background: var(--accent-3);
    }

    .report-bar.source {
      background: var(--comm);
    }

    .report-bar.energy {
      background: var(--packml);
    }

    .report-bar.output {
      background: var(--accent);
    }

    .line-step {
      color: var(--muted);
      font-size: 0.76rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }

    .line-card h4,
    .operator-card h4,
    .state-map-card h4 {
      margin: 8px 0 8px;
      font-size: 1rem;
    }

    .line-card p,
    .operator-card p,
    .state-map-card p {
      margin: 0;
      color: var(--muted);
      font-size: 0.82rem;
      line-height: 1.45;
    }

    .operator-grid {
      display: grid;
      grid-template-columns: 1fr 1.2fr 1fr;
      gap: 12px;
    }

    .operator-card.active {
      border-color: rgba(52, 199, 140, 0.42);
      background:
        linear-gradient(180deg, rgba(52, 199, 140, 0.14), transparent 60%),
        rgba(15, 24, 32, 0.95);
    }

    .operator-card.dim {
      opacity: 0.82;
    }

    .metric-grid {
      margin-top: 12px;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
      gap: 8px;
    }

    .metric {
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 12px;
      padding: 8px 10px;
      background: rgba(255, 255, 255, 0.03);
    }

    .metric span {
      display: block;
      color: var(--muted);
      font-size: 0.74rem;
      margin-bottom: 3px;
    }

    .metric strong {
      color: var(--text);
      font-size: 0.9rem;
    }

    .packml-map {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
      gap: 10px;
    }

    .packml-node {
      border: 1px solid rgba(242, 202, 88, 0.48);
      border-radius: 12px;
      background: rgba(242, 202, 88, 0.8);
      color: #302507;
      font-weight: 700;
      min-height: 64px;
      padding: 10px;
      text-align: left;
      cursor: pointer;
    }

    .packml-node.active {
      border-color: rgba(52, 199, 140, 0.62);
      background: rgba(52, 199, 140, 0.92);
      color: #072216;
    }

    .packml-node small {
      display: block;
      font-weight: 600;
      opacity: 0.82;
      margin-top: 4px;
    }

    .code-stage {
      display: grid;
      gap: 12px;
      min-height: 0;
    }

    .logic-toolbar {
      display: flex;
      gap: 6px;
      align-items: center;
      flex-wrap: wrap;
    }

    .logic-tool-btn {
      width: 38px;
      height: 38px;
      display: grid;
      place-items: center;
      padding: 0;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #18232d;
      color: var(--text);
      cursor: grab;
      position: relative;
      transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
    }

    .logic-tool-btn:hover,
    .logic-tool-btn:focus-visible {
      border-color: var(--line-2);
      background: #21303e;
      transform: translateY(-1px);
      outline: 0;
    }

    .logic-tool-btn:active {
      cursor: grabbing;
      transform: translateY(0);
    }

    .logic-tool-icon {
      display: grid;
      place-items: center;
      width: 28px;
      height: 28px;
      border-radius: 7px;
      font-size: 0.72rem;
      font-weight: 800;
      line-height: 1;
      color: #e7eff6;
      background: rgba(255, 255, 255, 0.06);
    }

    .logic-tool-if .logic-tool-icon {
      color: #d7e5ff;
      background: rgba(74, 132, 255, 0.18);
    }

    .logic-tool-elseif .logic-tool-icon {
      color: #d6fbff;
      background: rgba(89, 170, 255, 0.18);
    }

    .logic-tool-else .logic-tool-icon {
      color: #ffe0c7;
      background: rgba(255, 154, 77, 0.18);
    }

    .logic-tool-assign .logic-tool-icon {
      color: #d4ffec;
      background: rgba(52, 199, 140, 0.18);
    }

    .logic-tool-and-condition .logic-tool-icon,
    .logic-tool-or-condition .logic-tool-icon {
      color: #e6dbff;
      background: rgba(138, 99, 255, 0.18);
    }

    .logic-tool-timer .logic-tool-icon {
      color: #fff0bf;
      background: rgba(242, 202, 88, 0.18);
    }

    .logic-tool-case .logic-tool-icon {
      color: #ffd7dc;
      background: rgba(255, 100, 130, 0.18);
    }

    .logic-tool-while .logic-tool-icon,
    .logic-tool-for .logic-tool-icon {
      color: #c9f7ff;
      background: rgba(67, 190, 218, 0.18);
    }

    .logic-tool-try .logic-tool-icon,
    .logic-tool-catch .logic-tool-icon {
      color: #f1ddff;
      background: rgba(184, 111, 255, 0.18);
    }

    .logic-tool-return .logic-tool-icon {
      color: #d7ffe5;
      background: rgba(62, 214, 133, 0.18);
    }

    .logic-tool-sequence .logic-tool-icon {
      color: #fff5d6;
      background: rgba(230, 171, 56, 0.2);
    }

    .logic-tool-step .logic-tool-icon {
      color: #fff9bf;
      background: rgba(255, 215, 75, 0.2);
    }

    .code-pane {
      min-height: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 300px;
      gap: 12px;
    }

    .code-editor {
      min-height: 62vh;
      transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    }

    .code-editor.drag-over {
      border-color: rgba(89, 170, 255, 0.72);
      background: rgba(12, 25, 38, 0.98);
      box-shadow: 0 0 0 3px rgba(89, 170, 255, 0.12);
    }

    .visual-code-editor {
      min-height: 62vh;
      display: grid;
      align-content: start;
      gap: 4px;
      padding: 6px;
      border: 1px solid rgba(74, 132, 255, 0.28);
      border-radius: 12px;
      background: #0c1319;
      overflow: auto;
      transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    }

    .visual-code-editor.drag-over,
    .condition-slot.drag-over {
      border-color: rgba(89, 170, 255, 0.72);
      background: rgba(89, 170, 255, 0.12);
      box-shadow: 0 0 0 3px rgba(89, 170, 255, 0.12);
    }

    .visual-node {
      border: 1px solid var(--line);
      border-radius: 7px;
      background: rgba(255, 255, 255, 0.035);
      padding: 4px 6px;
      display: grid;
      gap: 3px;
      font-size: 0.82rem;
    }

    .visual-node-head {
      justify-content: space-between;
    }

    .visual-node-head,
    .visual-row {
      display: flex;
      align-items: center;
      gap: 4px;
      flex-wrap: wrap;
      min-height: 24px;
    }

    .visual-node-main {
      display: flex;
      align-items: center;
      gap: 4px;
      flex-wrap: wrap;
    }

    .sequence-comment {
      min-width: 160px;
      max-width: 280px;
      flex: 1 1 160px;
    }

    .next-step-group {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .sequence-step-row {
      display: grid;
      grid-template-columns: auto 76px minmax(180px, 1fr);
      align-items: center;
      gap: 4px;
      min-width: 0;
      flex: 1 1 auto;
    }

    .icon-btn {
      width: 22px;
      height: 22px;
      display: inline-grid;
      place-items: center;
      padding: 0;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: rgba(255, 255, 255, 0.04);
      color: var(--muted);
      cursor: pointer;
    }

    .icon-btn:hover {
      border-color: rgba(255, 154, 77, 0.42);
      color: #ffe0c7;
      background: rgba(255, 154, 77, 0.12);
    }

    .visual-keyword {
      min-width: 40px;
      padding: 3px 5px;
      border-radius: 6px;
      background: rgba(74, 132, 255, 0.18);
      color: #d7e5ff;
      font-weight: 800;
      font-size: 0.66rem;
      text-align: center;
    }

    .condition-slot {
      min-width: 94px;
      min-height: 20px;
      display: inline-flex;
      align-items: center;
      gap: 3px;
      padding: 2px 5px;
      border: 1px dashed rgba(89, 170, 255, 0.44);
      border-radius: 6px;
      background: rgba(89, 170, 255, 0.08);
      color: var(--text);
      cursor: copy;
      font-size: 0.66rem;
      font-weight: 700;
    }

    .condition-object {
      display: inline-grid;
      grid-template-columns: minmax(120px, auto) minmax(72px, auto) minmax(86px, auto);
      gap: 6px;
      align-items: center;
    }

    .condition-object .field-small {
      padding: 3px 5px;
      min-height: 22px;
      font-size: 0.68rem;
    }

    .condition-object select[data-visual-condition-field="operator"] {
      appearance: none;
      -webkit-appearance: none;
      -moz-appearance: none;
      min-width: 58px;
      padding-right: 8px;
      text-align: center;
      text-align-last: center;
      cursor: pointer;
    }

    .condition-object select[data-visual-condition-field="operator"]::-ms-expand {
      display: none;
    }

    .condition-value-target {
      min-width: 86px;
      border-radius: 8px;
      border: 1px dashed transparent;
      display: grid;
    }

    .condition-value-target.drag-over {
      border-color: rgba(89, 170, 255, 0.72);
      background: rgba(89, 170, 255, 0.12);
      box-shadow: 0 0 0 3px rgba(89, 170, 255, 0.12);
    }

    .variable-value-chip {
      min-height: 22px;
      display: inline-flex;
      align-items: center;
      padding: 3px 5px;
      border-radius: 6px;
      background: rgba(138, 99, 255, 0.14);
      color: #e6dbff;
      font-size: 0.68rem;
    }

    .condition-slot.empty {
      color: var(--muted);
    }

    .action-chip {
      padding: 3px 5px;
      border-radius: 6px;
      background: rgba(52, 199, 140, 0.12);
      color: #d4ffec;
      font-size: 0.68rem;
    }

    .action-drop-zone {
      min-height: 8px;
      display: block;
      position: relative;
      margin: 2px 0;
      padding: 3px 0;
      border: 0;
      background: transparent;
    }

    .action-drop-zone::before {
      content: "";
      display: block;
      height: 1px;
      border-radius: 999px;
      background: rgba(52, 199, 140, 0.46);
    }

    .action-drop-zone.drag-over,
    .assignment-value-target.drag-over {
      border-color: rgba(52, 199, 140, 0.72);
      background: rgba(52, 199, 140, 0.08);
      box-shadow: 0 0 0 3px rgba(52, 199, 140, 0.1);
    }

    .action-drop-zone.drag-over::before {
      height: 3px;
      background: rgba(52, 199, 140, 0.92);
    }

    .assignment-object {
      display: inline-grid;
      grid-template-columns: minmax(120px, auto) auto minmax(96px, auto);
      gap: 4px;
      align-items: center;
    }

    .assignment-value-target {
      min-width: 76px;
      border: 1px dashed transparent;
      border-radius: 6px;
      display: grid;
    }

    .visual-branch {
      margin-left: 10px;
      padding-left: 6px;
      border-left: 1px solid rgba(255, 255, 255, 0.1);
      display: grid;
      gap: 2px;
    }

    .side-list {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.03);
      padding: 10px;
      overflow: auto;
    }

    .side-list h4 {
      margin: 0 0 8px;
      font-size: 0.84rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .side-list .mini-card + .mini-card {
      margin-top: 8px;
    }

    .hero-grid,
    .unit-grid,
    .state-grid,
    .channel-grid,
    .var-grid {
      display: grid;
      gap: 14px;
    }

    .hero-grid,
    .unit-grid {
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .state-grid {
      grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    }

    .channel-grid,
    .var-grid {
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .workspace-card,
    .state-card,
    .channel-card {
      padding: 16px;
      box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
    }

    .workspace-card,
    .state-card {
      cursor: pointer;
      transition: transform 0.18s ease, border-color 0.18s ease;
    }

    .workspace-card:hover,
    .state-card:hover,
    .workspace-card.active,
    .state-card.active {
      transform: translateY(-2px);
      border-color: var(--line-2);
    }

    .workspace-card h3,
    .state-card h3,
    .channel-card h3,
    .logic-card h3,
    .editor-card h3 {
      margin: 0 0 8px;
      font-size: 1rem;
    }

    .workspace-card p,
    .state-card p,
    .channel-card p,
    .logic-card p,
    .empty p {
      margin: 0;
      color: var(--muted);
      line-height: 1.5;
      font-size: 0.84rem;
    }

    .badge-row,
    .subhead {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .badge-row {
      margin-bottom: 10px;
    }

    .subhead {
      margin: 20px 0 12px;
    }

    .subhead h3 {
      margin: 0;
      font-size: 0.9rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .badge {
      padding: 6px 8px;
      border-radius: 999px;
      font-size: 0.72rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: #081117;
      font-weight: 700;
    }

    .packml {
      background: var(--packml);
    }

    .logic {
      background: var(--logic);
    }

    .comm {
      background: var(--comm);
    }

    .signal {
      background: var(--signal);
      color: #f0eaff;
    }

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

    .tag {
      padding: 6px 8px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.06);
      color: var(--muted);
      font-size: 0.74rem;
    }

    .logic-card {
      padding: 14px 16px;
      background: linear-gradient(180deg, rgba(18, 26, 34, 0.98), rgba(12, 19, 26, 0.98));
      box-shadow: 0 16px 30px rgba(0, 0, 0, 0.26);
    }

    .logic-card.if-card {
      border-color: rgba(74, 132, 255, 0.24);
      background:
        linear-gradient(180deg, rgba(74, 132, 255, 0.08), transparent 38%),
        linear-gradient(180deg, rgba(18, 26, 34, 0.98), rgba(12, 19, 26, 0.98));
    }

    .logic-card.comm-card {
      border-color: rgba(52, 199, 140, 0.24);
      background:
        linear-gradient(180deg, rgba(52, 199, 140, 0.08), transparent 38%),
        linear-gradient(180deg, rgba(18, 26, 34, 0.98), rgba(12, 19, 26, 0.98));
    }

    .logic-card.state-card-tone {
      border-color: rgba(138, 99, 255, 0.24);
      background:
        linear-gradient(180deg, rgba(138, 99, 255, 0.08), transparent 38%),
        linear-gradient(180deg, rgba(18, 26, 34, 0.98), rgba(12, 19, 26, 0.98));
    }

    .logic-card.selectable {
      cursor: pointer;
      transition: transform 0.18s ease, border-color 0.18s ease;
    }

    .logic-card.selectable:hover,
    .logic-card.selectable.active {
      transform: translateY(-2px);
      border-color: var(--line-2);
    }

    .logic-preview {
      margin-top: 10px;
      padding: 12px;
      border-radius: 12px;
      background: #0c1319;
      border: 1px solid rgba(255, 255, 255, 0.05);
      font-family: Consolas, monospace;
      font-size: 0.84rem;
      line-height: 1.55;
      white-space: pre-wrap;
      color: #d5e2ee;
    }

    .code-kind {
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-size: 0.72rem;
      margin-bottom: 6px;
    }

    .empty {
      padding: 20px;
      background: rgba(255, 255, 255, 0.02);
      border-style: dashed;
    }

    .hidden {
      display: none;
    }

    .inspect-grid,
    .console {
      display: grid;
      gap: 10px;
    }

    .mini-card,
    .editor-card {
      padding: 12px 14px;
    }

    .variable-card {
      cursor: grab;
    }

    .variable-card:active {
      cursor: grabbing;
    }

    .kv {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      padding: 8px 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
      color: var(--muted);
      font-size: 0.84rem;
    }

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

    .kv strong {
      color: var(--text);
    }

    .log-line {
      padding: 10px 12px;
      border-radius: 12px;
      background: var(--panel-3);
      border: 1px solid rgba(255, 255, 255, 0.05);
      color: #c8d4de;
      font-family: Consolas, monospace;
      font-size: 0.78rem;
    }

    .editor-card h3 {
      margin-bottom: 10px;
    }

    .editor-card p {
      margin: 0 0 12px;
      color: var(--muted);
      font-size: 0.82rem;
      line-height: 1.45;
    }

    .form-row {
      display: grid;
      grid-template-columns: 1.4fr 110px 1.2fr 90px auto;
      gap: 8px;
      align-items: center;
    }

    .action-row {
      display: grid;
      grid-template-columns: 1.4fr 70px 1.2fr auto;
      gap: 8px;
      align-items: center;
    }

    .field,
    .field-small {
      width: 100%;
      padding: 9px 10px;
    }

    .field-small {
      font-size: 0.84rem;
    }

    .visual-code-editor .field-small {
      min-height: 22px;
      padding: 3px 5px;
      border-radius: 6px;
      font-size: 0.7rem;
    }

    .editor-subsection {
      margin-top: 14px;
      padding-top: 14px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .editor-subsection:first-of-type {
      margin-top: 0;
      padding-top: 0;
      border-top: 0;
    }

    .editor-subsection h4 {
      margin: 0 0 10px;
      font-size: 0.82rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
    }

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

    .code-editor {
      width: 100%;
      min-height: 300px;
      padding: 12px;
      border-radius: 12px;
      border: 1px solid rgba(74, 132, 255, 0.28);
      background: #0c1319;
      color: #d5e2ee;
      font-family: Consolas, "Cascadia Mono", monospace;
      font-size: 0.84rem;
      line-height: 1.55;
      resize: vertical;
    }

    .editor-footnote {
      margin-top: 8px;
      color: var(--muted);
      font-size: 0.78rem;
    }

    .if-visual-board {
      border: 1px solid rgba(74, 132, 255, 0.24);
      border-radius: 14px;
      padding: 12px;
      background:
        linear-gradient(180deg, rgba(74, 132, 255, 0.08), transparent 45%),
        #101922;
    }

    .if-flow {
      display: grid;
      gap: 10px;
      position: relative;
      padding-left: 16px;
    }

    .if-flow::before {
      content: "";
      position: absolute;
      left: 4px;
      top: 6px;
      bottom: 6px;
      width: 2px;
      background: linear-gradient(180deg, rgba(89, 170, 255, 0.45), rgba(89, 170, 255, 0));
    }

    .if-branch {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(11, 18, 24, 0.94);
      padding: 10px;
      display: grid;
      gap: 8px;
      position: relative;
    }

    .if-branch::before {
      content: "";
      position: absolute;
      left: -14px;
      top: 18px;
      width: 10px;
      height: 2px;
      background: rgba(89, 170, 255, 0.45);
    }

    .if-branch.if-primary {
      border-color: rgba(74, 132, 255, 0.34);
      background:
        linear-gradient(180deg, rgba(74, 132, 255, 0.12), transparent 55%),
        rgba(11, 18, 24, 0.94);
    }

    .if-branch.if-elseif {
      border-color: rgba(52, 199, 140, 0.3);
      background:
        linear-gradient(180deg, rgba(52, 199, 140, 0.12), transparent 55%),
        rgba(11, 18, 24, 0.94);
    }

    .if-branch.if-else {
      border-color: rgba(255, 154, 77, 0.3);
      background:
        linear-gradient(180deg, rgba(255, 154, 77, 0.12), transparent 55%),
        rgba(11, 18, 24, 0.94);
    }

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

    .branch-tag {
      display: inline-block;
      padding: 5px 8px;
      border-radius: 999px;
      font-size: 0.72rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      font-weight: 700;
      background: rgba(89, 170, 255, 0.22);
      color: #d7e7ff;
    }

    .branch-row {
      display: grid;
      grid-template-columns: 54px 1fr;
      gap: 8px;
      align-items: start;
    }

    .branch-label {
      color: var(--muted);
      font-size: 0.74rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      padding-top: 5px;
    }

    .branch-pills {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      min-width: 0;
    }

    .pill {
      display: inline-flex;
      align-items: center;
      max-width: 100%;
      padding: 5px 8px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: rgba(255, 255, 255, 0.05);
      color: #d4e0ea;
      font-size: 0.76rem;
      line-height: 1.25;
      word-break: break-word;
    }

    .pill.condition {
      border-color: rgba(74, 132, 255, 0.34);
      background: rgba(74, 132, 255, 0.16);
    }

    .pill.join {
      border-color: rgba(255, 255, 255, 0.1);
      background: rgba(255, 255, 255, 0.04);
      color: var(--muted);
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .pill.action {
      border-color: rgba(52, 199, 140, 0.34);
      background: rgba(52, 199, 140, 0.16);
    }

    .pill.muted {
      border-style: dashed;
      color: var(--muted);
      background: rgba(255, 255, 255, 0.03);
    }

    .pulse {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--accent-2);
      box-shadow: 0 0 0 0 rgba(52, 199, 140, 0.5);
      animation: pulse 1.8s infinite;
    }

    @keyframes pulse {
      0% { box-shadow: 0 0 0 0 rgba(52, 199, 140, 0.5); }
      70% { box-shadow: 0 0 0 12px rgba(52, 199, 140, 0); }
      100% { box-shadow: 0 0 0 0 rgba(52, 199, 140, 0); }
    }

    @media (max-width: 1260px) {
      .code-pane {
        grid-template-columns: 1fr;
      }

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

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

      .floor-palette {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      }
    }

    @media (max-width: 920px) {
      body {
        padding: 10px;
      }

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

      .form-row,
      .action-row {
        grid-template-columns: 1fr;
      }

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

      .branch-label {
        padding-top: 0;
      }

      .line-scene {
        min-height: 780px;
      }

      .line-floor {
        width: 150%;
      }

      .line-machine {
        width: min(250px, 76vw);
        min-width: 190px;
      }
    }
