
    .layer-main {
      min-width: 0;
      display: grid;
      gap: 6px;
    }

    .layer-name {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      min-width: 0;
    }

    .layer-name button {
      min-height: 24px;
      padding: 2px 6px;
      font-size: 11px;
    }

    .layer-title {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 13px;
      font-weight: 700;
    }

    .layer-meta {
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--muted);
      font-size: 11px;
      min-width: 0;
    }

    .layer-context-menu {
      position: fixed;
      z-index: 80;
      display: none;
      width: 276px;
      border: 1px solid #1d1d1d;
      border-radius: 8px;
      background: rgba(58, 56, 59, .98);
      box-shadow: 0 18px 38px rgba(0, 0, 0, .48);
      color: #f1f1f1;
      overflow: hidden;
      padding: 7px 0;
    }

    .layer-context-menu.open { display: block; }

    .layer-context-menu button {
      width: 100%;
      min-height: 30px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      border: 0;
      border-radius: 0;
      background: transparent;
      color: inherit;
      padding: 4px 16px;
      text-align: left;
      font-size: 14px;
    }

    .layer-context-menu button:hover {
      background: rgba(255, 255, 255, .12);
    }

    .layer-context-menu button:disabled {
      color: rgba(255, 255, 255, .38);
      background: transparent;
    }

    .layer-context-menu .shortcut {
      color: rgba(255, 255, 255, .72);
      font-size: 12px;
    }

    .layer-context-sep {
      height: 1px;
      margin: 7px 16px;
      background: rgba(255, 255, 255, .16);
    }

    .field-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }

    .field {
      display: grid;
      gap: 5px;
      color: var(--muted);
      font-size: 12px;
      min-width: 0;
    }

    .field.full { grid-column: 1 / -1; }
    .field-grid > .full { grid-column: 1 / -1; }
    .field[hidden],
    .panel-empty-note[hidden] { display: none; }

    .field input,
    .field select,
    .field textarea {
      width: 100%;
    }

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

    .button-row button {
      flex: 1 1 auto;
      min-width: 76px;
    }

    .danger { border-color: rgba(242, 92, 84, .58); color: #ffd2ce; }
    .primary { border-color: rgba(34, 166, 153, .65); background: rgba(34, 166, 153, .2); }
    .warn { border-color: rgba(247, 179, 43, .65); color: #ffe1a0; }

    .history-list {
      display: grid;
      gap: 6px;
      margin: 0;
      padding: 0;
      list-style: none;
      color: var(--muted);
      font-size: 12px;
    }

    .history-list li {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 8px;
      background: #282725;
    }

    .statusbar {
      grid-area: status;
      justify-content: space-between;
      gap: 10px;
      border-top: 1px solid var(--line);
      background: #1f1f1f;
      padding: 0 8px;
      color: var(--muted);
      font-size: 12px;
      overflow-x: auto;
      overflow-y: hidden;
      scrollbar-width: none;
    }

    .statusbar::-webkit-scrollbar { width: 0; height: 0; }

    .status-left,
    .status-right {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .status-left {
      flex: 1 1 auto;
    }

    .status-right {
      flex: 0 0 auto;
    }

    .status-pill {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .status-pill.warning {
      color: #ffdf9b;
      border-color: rgba(239, 176, 71, .55);
      background: rgba(112, 73, 15, .3);
      cursor: help;
    }

    .status-pill[hidden] { display: none; }

    .statusbar .menu-actions,
    .statusbar .doc-actions {
      flex: 0 0 auto;
      gap: 5px;
    }

    .statusbar .menu-actions {
      padding-right: 8px;
      border-right: 1px solid rgba(255, 255, 255, .16);
    }

    .statusbar .doc-actions {
      padding-left: 8px;
      border-left: 1px solid rgba(255, 255, 255, .16);
    }

    .statusbar .menu-actions button,
    .statusbar .doc-actions button {
      min-height: 25px;
      padding: 2px 7px;
      font-size: 12px;
      line-height: 1;
    }

    @media (max-width: 920px) {
      :root {
        --toolbar: 48px;
        --right: 280px;
      }

      .brand { min-width: 0; }
      .brand span:last-child { display: none; }
      .doc-actions { gap: 5px; }
      .doc-actions button { padding: 5px 7px; }
      .control input[type="range"] { width: 96px; }
      .context-taskbar button { padding-inline: 7px; }
      .context-taskbar input[type="range"] { width: 78px; }
    }

    @media (max-width: 720px) {
      html, body { overflow: auto; }

      .app {
        min-height: 100vh;
        height: auto;
        grid-template-columns: 48px minmax(0, 1fr);
        grid-template-rows: var(--top) var(--context) 58vh auto var(--status);
        grid-template-areas:
          "menubar menubar"
          "toolbar context"
          "toolbar stage"
          "right right"
          "status status";
      }

      body.electron-shell .app {
        grid-template-rows: var(--context) 58vh auto var(--status);
        grid-template-areas:
          "toolbar context"
          "toolbar stage"
          "right right"
          "status status";
      }

      .rightbar {
        min-height: 360px;
        border-left: 0;
        border-top: 1px solid var(--line);
      }

      .rightbar-resize-handle,
      .dock-resize-handle {
        display: none;
      }

      .menubar {
        padding: 0 8px;
      }

      .menu-actions {
        display: flex;
      }
    }

    /* Graphite Tech Design System (mtips5s_motions) */
    button {
      min-height: 26px;
      border: 1px solid var(--line-2);
      border-radius: 7px;
      background: rgba(255, 255, 255, 0.04);
      color: var(--ink);
      padding: 3px 10px;
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    }

    button:hover:not(:disabled) {
      border-color: rgba(255, 255, 255, 0.24);
      background: rgba(255, 255, 255, 0.08);
      color: var(--ink);
    }

    button:active:not(:disabled) {
      transform: scale(0.97);
    }

    button.active {
      border-color: rgba(94, 106, 210, 0.6);
      background: rgba(94, 106, 210, 0.16);
      color: #9AA2F2;
      box-shadow: 0 0 12px rgba(94, 106, 210, 0.25);
    }

    button.primary,
    button.lq-primary {
      background: linear-gradient(180deg, #6B76E5 0%, #5E6AD2 100%);
      border-color: rgba(255, 255, 255, 0.14);
      color: #fff;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), var(--shadow-pill);
    }

    button.primary:hover:not(:disabled) {
      background: linear-gradient(180deg, #7883EE 0%, #6B76E5 100%);
    }

    input[type="range"] {
      accent-color: var(--primary);
    }

    input[type="number"],
    input[type="text"],
    input[type="search"],
    select,
    textarea {
      min-height: 28px;
      border: 1px solid var(--line-2);
      border-radius: 7px;
      background: rgba(255, 255, 255, 0.04);
      color: var(--ink);
      padding: 4px 8px;
      font-size: 12px;
      outline: none;
      transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    }

    input:focus,
    select:focus,
    textarea:focus {
      border-color: var(--primary);
      background: rgba(255, 255, 255, 0.06);
      box-shadow: 0 0 0 3px rgba(94, 106, 210, 0.22);
    }

    .menubar {
      flex-direction: column;
      align-items: stretch;
      justify-content: flex-start;
      gap: 0;
      border-bottom: 1px solid var(--line);
      background: var(--surface);
      padding: 0;
      box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
    }

    .menuline {
      height: 44px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 0 8px;
    }

    .brand {
      min-width: 0;
      gap: 7px;
      font-weight: 600;
    }

    .brand-mark {
      width: 30px;
      height: 30px;
      border: 0;
      border-radius: 6px;
      background: linear-gradient(135deg, rgba(94, 106, 210, 0.3), rgba(94, 106, 210, 0.1));
      color: #9AA2F2;
      font-size: 19px;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    .brand span:last-child { display: none; }

    .app-menu {
      display: flex;
      align-items: center;
      gap: 2px;
      min-width: 0;
    }

    body.electron-shell .app-menu {
      display: none;
    }

    .menu-item {
      position: relative;
      min-height: 26px;
      border: 0;
      border-radius: 6px;
      background: transparent;
      padding: 3px 8px;
      color: var(--ink-2);
      font-size: 13px;
      white-space: nowrap;
      transition: background 0.15s ease, color 0.15s ease;
    }

    .menu-item:hover,
    .menu-item:focus-within {
      background: rgba(255, 255, 255, 0.08);
      color: var(--ink);
    }

    .menu-flyout {
      position: absolute;
      z-index: 20;
      display: none;
      top: 28px;
      left: 0;
      min-width: 275px;
      padding: 6px;
      border: 1px solid var(--line-2);
      border-radius: 12px;
      background: var(--glass-bg-solid);
      backdrop-filter: blur(28px) saturate(160%);
      -webkit-backdrop-filter: blur(28px) saturate(160%);
      box-shadow: var(--glass-edge), var(--shadow-dropdown);
    }

    .menu-item:hover .menu-flyout,
    .menu-item:focus-within .menu-flyout { display: block; }

    .menu-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      min-height: 28px;
      padding: 4px 12px;
      color: var(--ink);
      font-size: 13px;
      text-align: left;
      white-space: nowrap;
      border-radius: 7px;
      transition: background 0.15s ease, color 0.15s ease;
    }

    .menu-row[data-app-command],
    .menu-row[data-prop-panel-link],
    .menu-row[data-layer-panel-link],
    .menu-row[data-window-panel] {
      cursor: pointer;
    }

    .menu-row[data-app-command]:hover,
    .menu-row[data-prop-panel-link]:hover,
    .menu-row[data-layer-panel-link]:hover,
    .menu-row[data-window-panel]:hover {
      background: rgba(94, 106, 210, 0.18);
      color: #9AA2F2;
    }

    .menu-row[data-window-panel]::before,
    .menu-row[data-precision-menu]::before {
      content: "";
      width: 14px;
      min-width: 14px;
      color: #fff;
      text-align: center;
    }
