.simple-design-frame {
    position: absolute;
    box-sizing: border-box;
    border: calc(1px / var(--current-scale, 1)) solid rgba(17, 24, 39, 0.58);
    background-color: #f8fafc;
    background-image:
        linear-gradient(45deg, rgba(148, 163, 184, 0.20) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(148, 163, 184, 0.20) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, 0.20) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, 0.20) 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
    cursor: move;
    overflow: visible;
    user-select: none;
}

.simple-design-frame.is-drop-target {
    border-color: rgba(16, 185, 129, 0.95);
    outline: calc(2px / var(--current-scale, 1)) solid rgba(16, 185, 129, 0.24);
}

.simple-design-frame-resize-handles {
    position: absolute;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

.simple-design-frame-resize-handle {
    position: absolute;
    width: calc(12px / var(--current-scale, 1));
    height: calc(12px / var(--current-scale, 1));
    border: calc(1px / var(--current-scale, 1)) solid #111827;
    border-radius: 999px;
    background: #fff;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 calc(6px / var(--current-scale, 1)) rgba(255, 255, 255, 0.8), 0 calc(2px / var(--current-scale, 1)) calc(8px / var(--current-scale, 1)) rgba(15, 23, 42, 0.2);
}

.simple-design-frame.is-active .simple-design-frame-resize-handle {
    opacity: 1;
    pointer-events: auto;
}

.simple-design-frame-resize-handle[data-frame-handle="nw"] {
    left: 0;
    top: 0;
    cursor: nwse-resize;
}

.simple-design-frame-resize-handle[data-frame-handle="ne"] {
    left: 100%;
    top: 0;
    cursor: nesw-resize;
}

.simple-design-frame-resize-handle[data-frame-handle="sw"] {
    left: 0;
    top: 100%;
    cursor: nesw-resize;
}

.simple-design-frame-resize-handle[data-frame-handle="se"] {
    left: 100%;
    top: 100%;
    cursor: nwse-resize;
}

.simple-design-surface {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}

.simple-design-selection-layer {
    position: absolute;
    inset: 0;
    z-index: 10000;
    overflow: visible;
    pointer-events: none;
}

.simple-design-selection-layer:not(.is-visible) {
    display: none;
}

.simple-design-selection-box {
    position: absolute;
    box-sizing: border-box;
    transform-origin: center center;
    pointer-events: none;
}

.simple-design-selection-move {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    width: calc(18px / var(--current-scale, 1));
    height: calc(18px / var(--current-scale, 1));
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: calc(1px / var(--current-scale, 1)) solid rgba(15, 23, 42, 0.86);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #0f172a;
    cursor: move;
    pointer-events: auto;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 calc(6px / var(--current-scale, 1)) rgba(255, 255, 255, 0.74), 0 calc(2px / var(--current-scale, 1)) calc(8px / var(--current-scale, 1)) rgba(15, 23, 42, 0.24);
    user-select: none;
}

.simple-design-selection-move svg {
    width: calc(12px / var(--current-scale, 1));
    height: calc(12px / var(--current-scale, 1));
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
}

.simple-design-selection-move:active {
    cursor: grabbing;
}

.simple-design-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(15, 23, 42, 0.48);
    font-size: 13px;
    letter-spacing: 0;
    pointer-events: none;
    transform: scale(calc(1 / var(--current-scale, 1)));
    transform-origin: center;
}

.simple-design-frame.is-used .simple-design-empty {
    display: none;
}

.simple-design-frame-actions {
    position: absolute;
    left: 0;
    bottom: calc(100% + (10px / var(--current-scale, 1)));
    z-index: 20;
    display: none;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border: 0;
    border-radius: 999px;
    background-color: #e9e9eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: default;
    transform: scale(var(--simple-design-actions-scale, calc(1 / var(--current-scale, 1))));
    transform-origin: bottom left;
}

.simple-design-frame.is-used .simple-design-frame-actions,
.simple-design-frame.is-active .simple-design-frame-actions {
    display: flex;
}

.simple-design-action-btn {
    position: relative;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: #000;
    color: #fff;
    letter-spacing: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.simple-design-action-btn:hover {
    background: #333;
}

.simple-design-frame.is-lasso-tool [data-simple-design-lasso] {
    background: #333;
}

.simple-design-action-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #555;
}

.simple-design-action-btn:disabled:hover {
    background: #555;
}

.simple-design-action-btn.danger {
    background: #000;
}

.simple-design-action-btn.danger:hover {
    background: #333;
}

.simple-design-action-btn svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.simple-design-action-btn:disabled svg {
    stroke: rgba(255, 255, 255, 0.65);
}

.simple-design-tool-popover {
    position: absolute;
    bottom: calc(100% + 10px);
    z-index: 80;
    display: none;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    background: rgba(7, 10, 18, 0.94);
    color: #f8fafc;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
    cursor: default;
    transform: translateX(-50%);
    backdrop-filter: blur(12px);
}

.simple-design-frame.is-brush-tool .simple-design-brush-settings,
.simple-design-frame.is-text-tool .simple-design-text-settings {
    display: flex;
}

.simple-design-lasso-layer {
    position: absolute;
    inset: 0;
    z-index: 10002;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.simple-design-lasso-path {
    fill: rgba(59, 130, 246, 0.08);
    stroke: #111827;
    stroke-width: calc(1px / var(--current-scale, 1));
    stroke-dasharray: calc(6px / var(--current-scale, 1)) calc(4px / var(--current-scale, 1));
    vector-effect: non-scaling-stroke;
    animation: simple-design-lasso-march 0.7s linear infinite;
}

.simple-design-lasso-panel {
    position: absolute;
    z-index: 10003;
    display: none;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 4px 6px;
    border-radius: 6px;
    background: rgba(17, 24, 39, 0.88);
    box-shadow: 0 calc(4px / var(--current-scale, 1)) calc(12px / var(--current-scale, 1)) rgba(15, 23, 42, 0.22);
    transform: scale(calc(1 / var(--current-scale, 1)));
    transform-origin: top left;
    pointer-events: auto;
}

.simple-design-frame.has-lasso-path .simple-design-lasso-panel {
    display: flex;
}

.simple-design-lasso-panel input[type="color"] {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

.simple-design-lasso-fill-btn {
    height: 22px;
    padding: 0 8px;
    border: 0;
    border-radius: 4px;
    background: #fff;
    color: #111827;
    font-size: 12px;
    cursor: pointer;
}

@keyframes simple-design-lasso-march {
    to {
        stroke-dashoffset: calc(-10px / var(--current-scale, 1));
    }
}

.simple-design-tool-popover label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.simple-design-tool-popover input[type="range"] {
    width: 92px;
    accent-color: #f8fafc;
}

.simple-design-tool-popover input[type="color"] {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
}

.simple-design-tool-popover output {
    min-width: 22px;
    color: #fff;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.simple-design-font-picker {
    position: relative;
    width: 190px;
}

.simple-design-font-picker input {
    width: 100%;
    height: 28px;
    box-sizing: border-box;
    padding: 0 9px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    outline: none;
    font-size: 12px;
}

.simple-design-font-picker input:focus {
    border-color: rgba(148, 163, 184, 0.58);
    background: rgba(255, 255, 255, 0.12);
}

.simple-design-font-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 5px);
    height: 3px;
    display: none;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.24);
    overflow: hidden;
}

.simple-design-text-settings.is-font-loading .simple-design-font-progress {
    display: block;
}

.simple-design-font-progress-bar {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: #e5e7eb;
    transition: width 0.14s ease;
}

.simple-design-font-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 90;
    display: none;
    max-height: 220px;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
}

.simple-design-text-settings.is-font-picker-open .simple-design-font-results {
    display: block;
}

.simple-design-font-option {
    width: 100%;
    min-height: 30px;
    display: block;
    padding: 4px 8px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #f8fafc;
    font-size: 12px;
    line-height: 1.25;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.simple-design-font-option strong,
.simple-design-font-option span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.simple-design-font-option strong {
    font-weight: 500;
}

.simple-design-font-option span {
    margin-top: 2px;
    color: #94a3b8;
    font-size: 11px;
}

.simple-design-font-option:hover,
.simple-design-font-option.is-active {
    background: rgba(255, 255, 255, 0.12);
}

.simple-design-font-empty {
    padding: 7px 8px;
    color: #94a3b8;
    font-size: 12px;
}

.simple-design-action-tip {
    position: absolute;
    bottom: -34px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99;
    padding: 3px 9px;
    border-radius: 5px;
    background: #1a1a1a;
    color: #fff;
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: 0.2s ease;
}

.simple-design-action-btn:hover .simple-design-action-tip {
    opacity: 1;
    visibility: visible;
}

.simple-design-size-badge {
    position: absolute;
    left: 0;
    top: calc(100% + (6px / var(--current-scale, 1)));
    padding: 3px 7px;
    border-radius: 4px;
    background: rgba(17, 24, 39, 0.76);
    color: #fff;
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
    pointer-events: none;
    transform: scale(var(--simple-design-size-scale, calc(1 / var(--current-scale, 1))));
    transform-origin: top left;
}

.simple-design-frame.is-exporting .simple-design-size-badge {
    display: none;
}

.simple-design-export-progress {
    position: absolute;
    left: 0;
    top: calc(100% + (6px / var(--current-scale, 1)));
    width: min(260px, 100%);
    box-sizing: border-box;
    display: none;
    gap: 6px;
    padding: 7px 8px 8px;
    border-radius: 6px;
    background: rgba(7, 10, 18, 0.92);
    color: #f8fafc;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    pointer-events: none;
    transform: scale(var(--simple-design-progress-scale, calc(1 / var(--current-scale, 1))));
    transform-origin: top left;
}

.simple-design-frame.is-exporting .simple-design-export-progress {
    display: grid;
}

.simple-design-export-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
    line-height: 1;
}

.simple-design-export-progress-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #dbeafe;
}

.simple-design-export-progress-percent {
    flex-shrink: 0;
    color: #f8fafc;
    font-variant-numeric: tabular-nums;
}

.simple-design-export-progress-track {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.24);
}

.simple-design-export-progress-bar {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #60a5fa, #34d399);
    transition: width 0.16s ease;
}

.simple-design-layer {
    position: absolute;
    box-sizing: border-box;
    background: transparent;
    border: 0;
    box-shadow: none;
    cursor: move;
    overflow: visible;
    transform-origin: center center;
}

.simple-design-layer img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
    user-select: none;
}

.simple-design-layer-content {
    position: absolute;
    inset: 0;
    transform-origin: center center;
}

.simple-design-layer.is-empty {
    pointer-events: none;
}

.simple-design-frame.is-brush-tool .simple-design-layer,
.simple-design-frame.is-lasso-tool .simple-design-layer {
    pointer-events: none;
}

.simple-design-layer-paint,
.simple-design-layer-stroke,
.simple-design-layer-text {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.simple-design-layer-stroke {
    display: none;
    pointer-events: none;
    transform-origin: top left;
}

.simple-design-layer-paint {
    pointer-events: none;
}

.simple-design-layer-text {
    display: none;
    overflow: visible;
    padding: 0;
    line-height: 1.24;
    white-space: pre;
    word-break: normal;
    outline: none;
    cursor: move;
    user-select: none;
    transform-origin: top left;
    caret-color: currentColor;
}

.simple-design-layer-text[contenteditable="plaintext-only"],
.simple-design-layer-text[contenteditable="true"] {
    cursor: text;
    user-select: text;
}

.simple-design-layer-handle,
.simple-design-selection-handle {
    position: absolute;
    width: calc(10px / var(--current-scale, 1));
    height: calc(10px / var(--current-scale, 1));
    border: calc(1px / var(--current-scale, 1)) solid #111827;
    border-radius: calc(1px / var(--current-scale, 1));
    background: #fff;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 3;
}

.simple-design-layer-handle[data-layer-handle="nw"],
.simple-design-selection-handle[data-layer-handle="nw"] {
    left: 0;
    top: 0;
    cursor: nwse-resize;
}

.simple-design-layer-handle[data-layer-handle="n"],
.simple-design-selection-handle[data-layer-handle="n"] {
    left: 50%;
    top: 0;
    cursor: ns-resize;
}

.simple-design-layer-handle[data-layer-handle="ne"],
.simple-design-selection-handle[data-layer-handle="ne"] {
    left: 100%;
    top: 0;
    cursor: nesw-resize;
}

.simple-design-layer-handle[data-layer-handle="e"],
.simple-design-selection-handle[data-layer-handle="e"] {
    left: 100%;
    top: 50%;
    cursor: ew-resize;
}

.simple-design-layer-handle[data-layer-handle="se"],
.simple-design-selection-handle[data-layer-handle="se"] {
    left: 100%;
    top: 100%;
    cursor: nwse-resize;
}

.simple-design-layer-handle[data-layer-handle="s"],
.simple-design-selection-handle[data-layer-handle="s"] {
    left: 50%;
    top: 100%;
    cursor: ns-resize;
}

.simple-design-layer-handle[data-layer-handle="sw"],
.simple-design-selection-handle[data-layer-handle="sw"] {
    left: 0;
    top: 100%;
    cursor: nesw-resize;
}

.simple-design-layer-handle[data-layer-handle="w"],
.simple-design-selection-handle[data-layer-handle="w"] {
    left: 0;
    top: 50%;
    cursor: ew-resize;
}

.simple-design-selection-layer.is-visible .simple-design-selection-handle {
    opacity: 1;
    pointer-events: auto;
}

.simple-design-selection-layer.is-visible .simple-design-selection-move {
    display: flex;
}

.simple-design-selection-box.is-rotate-mode .simple-design-selection-handle {
    border-radius: 999px;
    border-color: #0f172a;
    background: #f8fafc;
    cursor: grab;
}

.simple-design-selection-box.is-rotate-mode .simple-design-selection-handle:active {
    cursor: grabbing;
}

.simple-design-context-menu {
    position: fixed;
    z-index: 10080;
    min-width: 148px;
    padding: 6px;
    border-radius: 8px;
    background: rgba(7, 10, 18, 0.96);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
    color: #f8fafc;
    cursor: default;
    user-select: none;
    backdrop-filter: blur(12px);
}

.simple-design-context-title {
    padding: 6px 8px 8px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.simple-design-context-separator {
    height: 1px;
    margin: 6px 4px;
    background: rgba(255, 255, 255, 0.10);
}

.simple-design-context-item,
.simple-design-overlap-main {
    width: 100%;
    box-sizing: border-box;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #e5e7eb;
    cursor: pointer;
    text-align: left;
}

.simple-design-context-item {
    display: block;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.15;
}

.simple-design-context-item:hover,
.simple-design-overlap-item:hover .simple-design-overlap-main,
.simple-design-overlap-main:hover,
.simple-design-overlap-submenu button:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
}

.simple-design-overlap-menu {
    min-width: 206px;
}

.simple-design-overlap-list {
    display: grid;
    gap: 2px;
}

.simple-design-overlap-item {
    position: relative;
}

.simple-design-overlap-item::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 0;
    width: 8px;
    height: 100%;
}

.simple-design-overlap-main {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 5px 8px;
}

.simple-design-overlap-submenu {
    position: absolute;
    left: calc(100% + 8px);
    top: 0;
    display: grid;
    min-width: 118px;
    padding: 6px;
    border-radius: 8px;
    background: rgba(7, 10, 18, 0.96);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    backdrop-filter: blur(12px);
}

.simple-design-overlap-item:hover .simple-design-overlap-submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.simple-design-overlap-submenu button {
    width: 100%;
    box-sizing: border-box;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #e5e7eb;
    cursor: pointer;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.15;
    text-align: left;
    white-space: nowrap;
}

.simple-design-overlap-thumb {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    background-color: #111827;
    background-image:
        linear-gradient(45deg, rgba(148, 163, 184, 0.20) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(148, 163, 184, 0.20) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, 0.20) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, 0.20) 75%);
    background-position: 0 0, 0 6px, 6px -6px, -6px 0;
    background-size: 12px 12px;
    object-fit: contain;
}

.simple-design-overlap-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: inherit;
}

.simple-design-layer-panel {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 10050;
    width: 268px;
    height: 100vh;
    box-sizing: border-box;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    background: rgba(7, 10, 18, 0.98);
    box-shadow: 18px 0 44px rgba(0, 0, 0, 0.32);
    overflow: hidden;
    cursor: default;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform 0.22s ease, opacity 0.18s ease, visibility 0.18s ease;
    backdrop-filter: blur(12px);
}

.simple-design-layer-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.simple-design-layer-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 46px;
    padding: 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    font-weight: 600;
    color: #f8fafc;
}

.simple-design-layer-panel-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.simple-design-layer-panel-add,
.simple-design-layer-panel-hide {
    position: relative;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    cursor: pointer;
    font-size: 16px;
    line-height: 28px;
}

.simple-design-layer-panel-add:hover,
.simple-design-layer-panel-hide:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.simple-design-layer-panel-add svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    pointer-events: none;
}

.simple-design-layer-panel-add span {
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    z-index: 5;
    padding: 4px 8px;
    border-radius: 5px;
    background: #111827;
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%);
    pointer-events: none;
    transition: 0.16s ease;
}

.simple-design-layer-panel-add:hover span {
    opacity: 1;
    visibility: visible;
}

.simple-design-layer-list {
    height: calc(100% - 46px);
    overflow: auto;
    padding: 8px;
    box-sizing: border-box;
}

.simple-design-layer-item {
    position: relative;
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 6px 8px;
    border-radius: 6px;
    color: #e5e7eb;
    cursor: grab;
    transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.simple-design-layer-item:hover,
.simple-design-layer-item.is-active {
    background: rgba(255, 255, 255, 0.10);
}

.simple-design-layer-item.is-dragging {
    z-index: 2;
    opacity: 0.88;
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
    cursor: grabbing;
}

.simple-design-layer-item.is-shift-up {
    transform: translateY(-8px);
}

.simple-design-layer-item.is-shift-down {
    transform: translateY(8px);
}

.simple-design-layer-item::before,
.simple-design-layer-item::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    border-radius: 999px;
    background: #34d399;
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.16), 0 0 12px rgba(52, 211, 153, 0.45);
    opacity: 0;
    pointer-events: none;
}

.simple-design-layer-item::before {
    top: -4px;
}

.simple-design-layer-item::after {
    bottom: -4px;
}

.simple-design-layer-item.is-drop-before::before,
.simple-design-layer-item.is-drop-after::after {
    opacity: 1;
}

.simple-design-layer-thumb-wrap {
    position: relative;
    display: block;
    width: 34px;
    height: 34px;
}

.simple-design-layer-thumb {
    width: 34px;
    height: 34px;
    display: block;
    border-radius: 4px;
    background-color: #111827;
    background-image:
        linear-gradient(45deg, rgba(148, 163, 184, 0.20) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(148, 163, 184, 0.20) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, 0.20) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, 0.20) 75%);
    background-position: 0 0, 0 6px, 6px -6px, -6px 0;
    background-size: 12px 12px;
    object-fit: contain;
}

.simple-design-layer-type-badge {
    position: absolute;
    right: -3px;
    bottom: -3px;
    display: none;
    width: 15px;
    height: 15px;
    border: 1px solid rgba(15, 23, 42, 0.72);
    border-radius: 4px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.24);
    pointer-events: none;
}

.simple-design-layer-item.is-text-layer .simple-design-layer-type-badge {
    display: block;
}

.simple-design-layer-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: #e5e7eb;
}

.simple-design-size-dialog {
    position: fixed;
    inset: 0;
    z-index: 10070;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.28);
}

.simple-design-size-panel {
    width: min(360px, calc(100vw - 32px));
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22);
    overflow: hidden;
}

.simple-design-stroke-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 2147483000;
    display: none;
    width: min(420px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    border-radius: 8px;
    background: #0f172a;
    color: #e5e7eb;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
    overflow: hidden;
    user-select: none;
}

.simple-design-stroke-panel.is-open {
    display: block;
}

.simple-design-stroke-head {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: move;
    font-size: 13px;
    font-weight: 700;
}

.simple-design-stroke-close {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.simple-design-stroke-close:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
}

.simple-design-stroke-body {
    max-height: calc(100vh - 68px);
    overflow: auto;
    padding: 12px;
    box-sizing: border-box;
}

.simple-design-stroke-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.simple-design-stroke-grid label,
.simple-design-stroke-check {
    min-width: 0;
    display: grid;
    gap: 5px;
    font-size: 12px;
    color: #94a3b8;
}

.simple-design-stroke-check {
    grid-template-columns: auto 1fr;
    align-items: center;
    margin-bottom: 10px;
    color: #e5e7eb;
}

.simple-design-stroke-grid input,
.simple-design-stroke-grid select {
    width: 100%;
    min-width: 0;
    height: 30px;
    box-sizing: border-box;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 5px;
    background: #111827;
    color: #f8fafc;
    padding: 0 7px;
}

.simple-design-stroke-grid input[type="range"] {
    padding: 0;
}

.simple-design-stroke-grid input[type="color"] {
    padding: 2px;
}

.simple-design-stroke-grid input[type="checkbox"],
.simple-design-stroke-check input {
    width: 15px;
    height: 15px;
}

.simple-design-stroke-panel[data-fill-type="color"] [data-stroke-fill-group="gradient"],
.simple-design-stroke-panel[data-fill-type="color"] [data-stroke-fill-group="pattern"],
.simple-design-stroke-panel[data-fill-type="gradient"] [data-stroke-fill-group="color"],
.simple-design-stroke-panel[data-fill-type="gradient"] [data-stroke-fill-group="pattern"],
.simple-design-stroke-panel[data-fill-type="pattern"] [data-stroke-fill-group="color"],
.simple-design-stroke-panel[data-fill-type="pattern"] [data-stroke-fill-group="gradient"] {
    display: none;
}

.simple-design-stroke-preview-wrap {
    margin-top: 12px;
    border-radius: 6px;
    overflow: hidden;
    background: #111827;
}

.simple-design-stroke-preview-wrap canvas {
    display: block;
    width: 100%;
    height: 150px;
}

.simple-design-stroke-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.simple-design-stroke-actions button {
    height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.10);
    color: #f8fafc;
    cursor: pointer;
}

.simple-design-stroke-actions button[data-stroke-apply] {
    background: #2563eb;
}

.simple-design-size-title {
    padding: 16px 18px 10px;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.simple-design-size-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 18px 14px;
}

.simple-design-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #64748b;
}

.simple-design-field input {
    width: 100%;
    height: 36px;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 14px;
    color: #111827;
    outline: none;
}

.simple-design-field input:focus {
    border-color: #111827;
}

.simple-design-field input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.simple-design-field input[type="number"]::-webkit-outer-spin-button,
.simple-design-field input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.simple-design-size-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px 16px;
    border-top: 1px solid #eef2f7;
}

.simple-design-dialog-btn {
    height: 34px;
    min-width: 64px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    cursor: pointer;
}

.simple-design-dialog-btn.primary {
    border-color: #111827;
    background: #111827;
    color: #fff;
}
