
    .preset-group-title {
      display: flex;
      align-items: center;
      gap: 10px;
      color: #fff;
      font-size: 15px;
      font-weight: 800;
      margin: 0 0 10px;
    }

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

    .preset-card {
      min-height: 54px;
      border: 2px solid transparent;
      border-radius: 5px;
      padding: 0;
      overflow: hidden;
      background: #777;
      position: relative;
    }

    .preset-card.active,
    .preset-card:hover {
      border-color: #168cff;
    }

    .preset-card::before {
      content: "";
      position: absolute;
      inset: 0;
      background:
        radial-gradient(circle at 50% 36%, rgba(255, 219, 172, .95) 0 16%, transparent 17%),
        linear-gradient(90deg, rgba(35, 35, 35, .75) 0 34%, transparent 35% 65%, rgba(35, 35, 35, .65) 66%),
        var(--preset-bg, linear-gradient(135deg, #d98a8a, #f2c0a4));
    }

    .preset-card.has-preview::before {
      display: none;
    }

    .preset-card canvas {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      display: block;
    }

    .preset-card span {
      position: absolute;
      left: 6px;
      right: 6px;
      bottom: 5px;
      color: #fff;
      text-shadow: 0 1px 3px #000;
      font-size: 10px;
      font-weight: 800;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      z-index: 1;
    }

    .field { color: #ddd; font-size: 12px; }
    .field-grid { gap: 7px; }

    .layers-toolbar {
      display: grid;
      grid-template-columns: minmax(0, 1fr) repeat(4, 28px);
      gap: 5px;
      padding: 8px;
      border-bottom: 1px solid #3d3d3d;
    }

    .layers-toolbar input { min-height: 27px; background: #404040; }
    .blend-row,
    .lock-row {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 5px 8px;
      border-bottom: 1px solid #3d3d3d;
      color: #ddd;
      font-size: 12px;
    }

    .blend-row select { flex: 1; min-height: 27px; background: #444; }
    .blend-row input[type="range"] { flex: 0 0 80px; }
    .blend-row .opacity-mini { width: 42px; text-align: right; color: #f1f1f1; }
    .lock-icon { width: 18px; height: 18px; display: grid; place-items: center; color: #f0f0f0; }
    .dock-actions { display: flex; gap: 6px; padding: 8px; border-top: 1px solid #3a3a3a; }
    .dock-actions button { flex: 1; min-height: 25px; padding: 2px 6px; font-size: 12px; }
    .layer-comp-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) repeat(3, auto);
      gap: 6px;
      padding: 8px;
      border-top: 1px solid #3a3a3a;
      background: #484848;
    }
    .layer-comp-row select {
      min-width: 0;
      min-height: 25px;
      background: #3f3f3f;
      font-size: 12px;
    }
    .layer-comp-row button {
      min-height: 25px;
      padding: 2px 7px;
      font-size: 12px;
    }

    .layer-panel-summary {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 6px;
      align-items: center;
      min-height: 32px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      background: #232429;
      padding: 4px 8px;
    }

    .layer-summary-kicker {
      display: none;
    }

    .layer-summary-name {
      overflow: hidden;
      color: #fff;
      font-size: 12px;
      font-weight: 700;
      line-height: 1.2;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .layer-status-chips {
      display: flex;
      justify-content: flex-end;
      flex-wrap: wrap;
      gap: 4px;
      max-width: 120px;
    }

    .layer-status-chip {
      min-width: 22px;
      border: 1px solid #6a6a6a;
      border-radius: 3px;
      background: #3f3f3f;
      color: #ececec;
      padding: 2px 5px;
      font-size: 10px;
      font-weight: 800;
      line-height: 1.2;
      text-align: center;
    }

    .layer-status-chip.is-warning {
      border-color: rgba(247, 179, 43, .7);
      color: #ffe1a0;
    }

    .layer-status-chip.is-accent {
      border-color: rgba(34, 166, 153, .85);
      color: #d9fffb;
    }

    .layer-filter-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 4px;
      padding: 4px 8px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .layer-filter-row input {
      min-width: 0;
      min-height: 24px;
      background: rgba(0, 0, 0, 0.25);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 4px;
      font-size: 11px;
      padding: 0 6px;
    }

    .layer-filter-count {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 42px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 3px;
      background: rgba(255, 255, 255, 0.05);
      color: #9d9ea8;
      font-size: 10px;
      font-weight: 800;
      padding: 0 4px;
      white-space: nowrap;
    }

    .layer-kind-row {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 3px;
      padding: 3px 8px 4px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .layer-kind-row button {
      min-width: 0;
      min-height: 22px;
      padding: 1px 2px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 3px;
      background: rgba(255, 255, 255, 0.04);
      color: #c0c0c8;
      font-size: 10px;
      font-weight: 700;
    }

    .layer-kind-row button.active {
      border-color: rgba(34, 166, 153, .9);
      background: rgba(34, 166, 153, .28);
      color: #fff;
    }

    .blend-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto minmax(68px, 82px) 42px;
    }

    .blend-row select,
    .blend-row input[type="range"] {
      min-width: 0;
    }

    .lock-row {
      min-height: 32px;
    }

    .lock-row .lock-icon {
      border: 1px solid transparent;
      border-radius: 3px;
      background: rgba(255, 255, 255, .04);
      color: #e7e7e7;
      font-size: 11px;
      font-weight: 800;
      width: auto;
      min-width: 22px;
      height: 18px;
      min-height: 18px;
      padding: 0 4px;
    }

    .lock-row .lock-fill {
      margin-left: auto;
      color: #d6d6d6;
      white-space: nowrap;
    }

    .layer-list {
      flex: 1 1 180px;
      background: var(--surface);
    }

    .layer-row {
      position: relative;
      grid-template-columns: 24px 36px 36px minmax(0, 1fr);
      min-height: 48px;
      padding: 6px 8px;
    }

    .layer-row.active::before {
      content: "";
      position: absolute;
      inset: 0 auto 0 0;
      width: 3px;
      background: var(--primary);
    }

    .layer-row[aria-hidden="true"],
    .group-folder-row[aria-hidden="true"] {
      display: none;
    }

    .layer-row.is-filtered,
    .group-folder-row.is-filtered {
      display: none;
    }

    .group-folder-row {
      grid-template-columns: 18px minmax(0, 1fr) auto;
      min-height: 36px;
      background: #505050;
    }

    .group-folder-row.active {
      background: #606060;
    }

    .group-folder-count {
      min-width: 28px;
      border: 1px solid #636363;
      border-radius: 3px;
      padding: 1px 5px;
      background: rgba(0, 0, 0, .12);
    }

    .eye-btn {
      border-radius: 3px;
    }

    .eye-btn:hover {
      background: rgba(255, 255, 255, .08);
    }

    .thumb,
    .mask-thumb {
      width: 34px;
      height: 34px;
      min-height: 34px;
    }

    .mask-thumb {
      border-style: dashed;
      background-color: #737373;
      color: #f1f1f1;
    }

    .mask-thumb.has-mask {
      border-style: solid;
    }

    .layer-title-row {
      display: flex;
      min-width: 0;
      align-items: center;
      gap: 6px;
    }

    .layer-type-badge {
      flex: 0 0 auto;
      min-width: 22px;
      border: 1px solid #696969;
      border-radius: 3px;
      background: #4d4d4d;
      color: #ededed;
      padding: 1px 4px;
      font-size: 9px;
      font-weight: 900;
      line-height: 1.2;
      text-align: center;
      text-transform: uppercase;
    }

    .layer-lock-pill {
      flex: 0 0 auto;
      min-width: 18px;
      border-color: rgba(247, 179, 43, .7);
      color: #ffe1a0;
    }

    .layer-meta {
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      gap: 4px;
      overflow: hidden;
      max-height: 20px;
    }

    .layer-meta span {
      overflow: hidden;
      max-width: 100%;
      border: 1px solid var(--line);
      border-radius: 3px;
      background: rgba(255, 255, 255, 0.05);
      padding: 1px 4px;
      font-size: 9.5px;
      line-height: 1.3;
      color: var(--ink-2);
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .layer-meta .layer-warning-chip {
      border-color: rgba(247, 179, 43, .65);
      color: #ffe1a0;
    }

    .dock-actions.layer-icon-actions {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 4px;
      padding: 3px 8px 5px;
      flex-shrink: 0;
    }

    .dock-actions.layer-icon-actions button {
      min-width: 0;
      min-height: 25px;
      padding: 2px 3px;
      font-size: 10.5px;
      font-weight: 700;
    }

    .layer-panel-view {
      display: none;
      min-height: 0;
      flex: 1;
      flex-direction: column;
      overflow-y: auto;
      overflow-x: hidden;
    }

    .layer-panel-view.active { display: flex; }

    .layer-list {
      gap: 0;
      overflow-y: auto;
      overflow-x: hidden;
      flex: 1 1 auto;
      min-height: 60px;
    }

    .layer-row {
      display: grid;
      grid-template-columns: 22px 36px 36px minmax(0, 1fr) auto;
      align-items: center;
      gap: 7px;
      min-height: 52px;
      border: 1px solid transparent;
      border-radius: 8px;
      margin: 2px 4px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.04);
      background: rgba(255, 255, 255, 0.02);
      padding: 6px 8px;
      transition: background 0.15s var(--spring), transform 0.1s var(--spring), border-color 0.15s ease;
      cursor: pointer;
    }

    .layer-row:hover {
      background: rgba(255, 255, 255, 0.06);
      border-color: rgba(255, 255, 255, 0.1);
    }

    .layer-row:active {
      transform: scale(0.99);
    }

    .layer-row.active {
      border-color: rgba(94, 106, 210, 0.5);
      background: rgba(94, 106, 210, 0.14);
      box-shadow: inset 3px 0 0 var(--primary), 0 2px 8px rgba(0, 0, 0, 0.25);
    }

    .layer-row.selected-layer {
      background: rgba(94, 106, 210, 0.18);
      border-color: rgba(94, 106, 210, 0.55);
      box-shadow: inset 3px 0 0 var(--primary), 0 2px 10px rgba(0, 0, 0, 0.35);
    }

    .thumb,
    .mask-thumb {
      width: 36px !important;
      height: 36px !important;
      min-height: 36px !important;
      border: 1px solid var(--line-2) !important;
      border-radius: 6px !important;
      background: #0f1013 !important;
      overflow: hidden !important;
      display: grid !important;
      place-items: center !important;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
      transition: border-color 0.15s ease !important;
    }

    .thumb:hover,
    .mask-thumb:hover {
      border-color: var(--primary) !important;
    }

    .mask-thumb.editing-mask {
      border-color: var(--primary) !important;
      box-shadow: 0 0 0 2px rgba(94, 106, 210, 0.35) !important;
    }

    .layer-type-badge {
      flex: 0 0 auto;
      min-width: 24px;
      border: 1px solid var(--line-2);
      border-radius: 4px;
      background: rgba(255, 255, 255, 0.08);
      color: var(--ink);
      padding: 1px 5px;
      font-size: 9px;
      font-weight: 700;
      line-height: 1.2;
      text-align: center;
      text-transform: uppercase;
      letter-spacing: 0.03em;
    }

    .layer-type-badge.is-pixel {
      border-color: rgba(59, 130, 246, 0.4);
      background: rgba(59, 130, 246, 0.15);
      color: #93c5fd;
    }

    .layer-type-badge.is-text {
      border-color: rgba(245, 158, 11, 0.45);
      background: rgba(245, 158, 11, 0.15);
      color: #fcd34d;
    }

    .layer-type-badge.is-shape {
      border-color: rgba(168, 85, 247, 0.45);
      background: rgba(168, 85, 247, 0.15);
      color: #d8b4fe;
    }

    .layer-type-badge.is-adjustment {
      border-color: rgba(16, 185, 129, 0.45);
      background: rgba(16, 185, 129, 0.15);
      color: #6ee7b7;
    }

    .layer-type-badge.is-smart {
      border-color: rgba(94, 106, 210, 0.55);
      background: rgba(94, 106, 210, 0.2);
      color: #b4bcff;
    }

    .layer-inline-actions {
      display: flex;
      align-items: center;
      gap: 3px;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.15s ease;
    }

    .layer-row:hover .layer-inline-actions,
    .layer-row:focus-within .layer-inline-actions {
      opacity: 1;
      pointer-events: auto;
    }

    .layer-inline-btn {
      width: 22px;
      height: 22px;
      min-height: 22px;
      padding: 0;
      border: 1px solid transparent;
      border-radius: 4px;
      background: rgba(255, 255, 255, 0.08);
      color: var(--ink-2);
      font-size: 11px;
      display: grid;
      place-items: center;
      cursor: pointer;
      transition: all 0.12s ease;
    }

    .layer-inline-btn:hover {
      background: rgba(255, 255, 255, 0.16);
      color: #fff;
      border-color: rgba(255, 255, 255, 0.2);
    }

    .layer-inline-btn.is-locked {
      background: rgba(245, 158, 11, 0.2);
      border-color: rgba(245, 158, 11, 0.5);
      color: #fcd34d;
    }

    .layer-inline-btn.is-danger:hover {
      background: rgba(235, 87, 87, 0.2);
      border-color: rgba(235, 87, 87, 0.5);
      color: #fca5a5;
    }

    .layers-header-controls {
      display: flex;
      flex-direction: column;
      gap: 5px;
      padding: 6px 8px 8px;
      border-bottom: 1px solid var(--line);
      background: var(--surface);
    }

    .blend-row {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      color: var(--ink-2);
    }

    .blend-row select {
      flex: 1;
      min-width: 0;
      height: 25px;
      border: 1px solid var(--line);
      border-radius: 5px;
      background: var(--surface-2);
      color: var(--ink);
      font-size: 11.5px;
      padding: 0 6px;
    }

    .blend-row input[type="range"] {
      width: 64px;
      accent-color: var(--primary);
    }

    .opacity-mini {
      font-size: 11px;
      font-weight: 700;
      color: var(--ink);
      min-width: 32px;
      text-align: right;
    }

    .lock-row {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 11px;
      color: var(--ink-3);
    }

    .lock-row .lock-icon {
      font-size: 10px;
      font-weight: 700;
      padding: 2px 5px;
      border-radius: 4px;
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.04);
      color: var(--ink-2);
      cursor: pointer;
      transition: all 0.12s ease;
      width: auto;
      min-width: 22px;
      height: 18px;
      min-height: 18px;
    }

    .lock-row .lock-icon:hover {
      background: rgba(255, 255, 255, 0.12);
      color: #fff;
    }

    .lock-row .lock-icon.is-active {
      background: rgba(94, 106, 210, 0.28);
      border-color: rgba(94, 106, 210, 0.7);
      color: #fff;
    }

    .lock-fill {
      margin-left: auto;
      font-size: 10px;
      font-weight: 700;
      padding: 1px 6px;
      border-radius: 999px;
      background: rgba(94, 106, 210, 0.15);
      border: 1px solid rgba(94, 106, 210, 0.4);
      color: #b4bcff;
    }

    .layer-toolbar-strip {
      display: grid !important;
      grid-template-columns: repeat(8, 1fr) !important;
      gap: 3px !important;
      padding: 5px 6px !important;
      border-top: 1px solid var(--line) !important;
      background: var(--surface) !important;
    }

    .layer-strip-btn {
      height: 28px !important;
      min-height: 28px !important;
      padding: 0 !important;
      border: 1px solid var(--line) !important;
      border-radius: 6px !important;
      background: rgba(255, 255, 255, 0.04) !important;
      color: var(--ink-2) !important;
      font-size: 12px !important;
      line-height: 1 !important;
      display: grid !important;
      place-items: center !important;
      cursor: pointer !important;
      transition: all 0.15s ease !important;
    }

    .layer-strip-btn:hover {
      background: rgba(255, 255, 255, 0.12) !important;
      color: #fff !important;
      border-color: rgba(255, 255, 255, 0.2) !important;
    }

    .layer-strip-btn.primary {
      background: rgba(94, 106, 210, 0.15) !important;
      border-color: rgba(94, 106, 210, 0.5) !important;
      color: #b4bcff !important;
    }

    .layer-strip-btn.primary:hover {
      background: var(--primary) !important;
      color: #fff !important;
    }

    .layer-strip-btn.warn:hover {
      background: rgba(245, 158, 11, 0.2) !important;
      color: #fcd34d !important;
      border-color: rgba(245, 158, 11, 0.5) !important;
    }

    .layer-strip-btn.danger:hover {
      background: rgba(235, 87, 87, 0.2) !important;
      color: #fca5a5 !important;
      border-color: rgba(235, 87, 87, 0.5) !important;
    }

    .layer-rename-input {
      width: 100%;
      min-width: 0;
      height: 22px;
      border: 1px solid var(--primary);
      border-radius: 4px;
      background: var(--surface-2);
      color: #fff;
      font: inherit;
      font-weight: 700;
      padding: 0 5px;
      outline: none;
      box-shadow: 0 0 0 2px rgba(94, 106, 210, 0.25);
    }
