/* Tool: svg-editor */
:where(body[data-tool="svg-editor"]) .container {
    display: flex;
    flex-direction: column;
    padding: 20px;
}
:where(body[data-tool="svg-editor"]) .head-tools {
    display: flex;
    flex-shrink: 0;
    margin-bottom: 20px;
}
:where(body[data-tool="svg-editor"]) .head-family {
    display: flex;
    align-items: center;
}
:where(body[data-tool="svg-editor"]) .back-btn {
    background: #3a3a3a;
    color: white;
    border: 0px solid var(--border-color);
    padding: 13px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
    display: flex;
    gap: 10px;
    margin: 0;
}
:where(body[data-tool="svg-editor"]) .back-btn:hover {
    background: #4a4a4a;
}
:where(body[data-tool="svg-editor"]) .search-container {
    padding: 0 20px;
    min-width: 500px;
}
:where(body[data-tool="svg-editor"]) .search-wrapper {
    position: relative;
}
:where(body[data-tool="svg-editor"]) .search-input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    background: var(--bg-secondary);
    border: 0px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: YekanBakh;
    font-weight: 300;
    direction: rtl;
}
:where(body[data-tool="svg-editor"]) .search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(72, 73, 232, 0.2);
}
:where(body[data-tool="svg-editor"]) .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 20px;
    display: flex;
}
:where(body[data-tool="svg-editor"]) .content-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 0;
}
:where(body[data-tool="svg-editor"]) .slides-container {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    margin-bottom: 100px;
}
:where(body[data-tool="svg-editor"]) .slides-container::-webkit-scrollbar {
    display: none;
}
:where(body[data-tool="svg-editor"]) .slide {
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}
:where(body[data-tool="svg-editor"]) .slide-navigation {
    position: fixed;
    right: 30px;
    bottom: 30px;
    display: flex;
    flex-direction: row;
    gap: 12px;
    z-index: 50;
    background: rgb(16 16 16 / 80%);
    backdrop-filter: blur(8px);
    padding: 16px;
    border-radius: 40px;
    box-shadow: var(--shadow-lg);
}
:where(body[data-tool="svg-editor"]) .nav-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}
:where(body[data-tool="svg-editor"]) .nav-dot:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-light);
    color: var(--primary-light);
}
:where(body[data-tool="svg-editor"]) .nav-dot.active {
    background: var(--primary);
    border-color: var(--primary-light);
    color: white;
}
:where(body[data-tool="svg-editor"]) .families-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    width: 100%;
    height: fit-content;
}
:where(body[data-tool="svg-editor"]) .icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    width: 100%;
    height: fit-content;
}
:where(body[data-tool="svg-editor"]) .family-card {
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}
:where(body[data-tool="svg-editor"]) .family-card:hover {
    transform: translateY(-5px);
    border-color: #304FFF;
}
:where(body[data-tool="svg-editor"]) .family-preview {
    height: 120px;
    background: #171717;
    display: grid;
    align-items: center;
    justify-content: center;
    padding: 10px;
    grid-template-columns: 1fr 1fr 1fr;
    justify-items: center;
}
:where(body[data-tool="svg-editor"]) .family-preview svg {
    width: 35px;
    height: 35px;
    margin: 0 5px;
}
:where(body[data-tool="svg-editor"]) .family-name {
    padding: 15px;
    text-align: center;
    font-size: 16px;
    color: #ffffff;
    font-weight: 500;
}
:where(body[data-tool="svg-editor"]) .icon-card {
    border-radius: var(--radius-md);
    padding: 10px;
    cursor: pointer;
    transition: transform 0.2s;
    text-align: center;
    border: 2px solid transparent;
    display: flex;
}
:where(body[data-tool="svg-editor"]) .icon-card svg {
    width: 50px;
    height: 50px;
}
:where(body[data-tool="svg-editor"]) .icon-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}
:where(body[data-tool="svg-editor"]) .icon-card.active {
    border-color: var(--primary);
    background: var(--bg-tertiary);
}
:where(body[data-tool="svg-editor"]) .icon-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
:where(body[data-tool="svg-editor"]) .family-info {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
    display: none;
}
:where(body[data-tool="svg-editor"]) .search-no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 16px;
    grid-column: 1 / -1;
}
:where(body[data-tool="svg-editor"]) .slide-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    display: none;
    flex-direction: column;
}
:where(body[data-tool="svg-editor"]) .slide-loading.active {
    display: flex;
}
:where(body[data-tool="svg-editor"]) .loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-light);
    border-radius: 50%;
    animation: svg-editor-spin 1s linear infinite;
}
@keyframes svg-editor-spin {
    to {
        transform: rotate(360deg);
    }
}
:where(body[data-tool="svg-editor"]) .editor-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-tertiary);
    border-top: 2px solid var(--primary);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s;
    z-index: 200;
    max-height: 70vh;
    overflow-y: auto;
    min-height: 450px;
}
:where(body[data-tool="svg-editor"]) .editor-panel.active {
    transform: translateY(0);
    box-shadow: var(--shadow-lg);
}
:where(body[data-tool="svg-editor"]) .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}
:where(body[data-tool="svg-editor"]) .panel-title {
    font-size: 18px;
    font-weight: 600;
}
:where(body[data-tool="svg-editor"]) .close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
:where(body[data-tool="svg-editor"]) .close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}
:where(body[data-tool="svg-editor"]) .editor-content {
    display: flex;
    gap: 20px;
}
:where(body[data-tool="svg-editor"]) .preview-section {
    text-align: center;
}
:where(body[data-tool="svg-editor"]) .preview-box {
    width: 150px;
    height: 150px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background-color: #0a0a0a;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 15px 15px;
}
:where(body[data-tool="svg-editor"]) .controls-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}
:where(body[data-tool="svg-editor"]) .control-group {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: var(--radius-md);
}
:where(body[data-tool="svg-editor"]) .group-title {
    margin-bottom: 15px;
    color: var(--primary-light);
    font-size: 16px;
}
:where(body[data-tool="svg-editor"]) .control-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
:where(body[data-tool="svg-editor"]) .control-row:last-child {
    margin-bottom: 0;
}
:where(body[data-tool="svg-editor"]) .control-label {
    width: 120px;
    font-size: 14px;
    color: var(--text-secondary);
}
:where(body[data-tool="svg-editor"]) .color-input {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: none;
}
:where(body[data-tool="svg-editor"]) .slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: linear-gradient(to right, #666, var(--primary));
    border-radius: 3px;
    margin: 0 15px;
}
:where(body[data-tool="svg-editor"]) .slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-light);
    cursor: pointer;
}
:where(body[data-tool="svg-editor"]) .value-display {
    width: 50px;
    text-align: center;
    font-size: 14px;
    background: var(--bg-primary);
    padding: 5px;
    border-radius: 4px;
}
:where(body[data-tool="svg-editor"]) .code-section {
    grid-column: 1 / -1;
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: var(--radius-md);
}
:where(body[data-tool="svg-editor"]) .code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
:where(body[data-tool="svg-editor"]) .code-title {
    font-size: 16px;
}
:where(body[data-tool="svg-editor"]) .code-actions {
    display: flex;
    gap: 8px;
}
:where(body[data-tool="svg-editor"]) .action-code-btn {
    background: var(--primary);
    border-radius: 4px;
    padding: 6px 12px;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
}
:where(body[data-tool="svg-editor"]) .action-code-btn:hover {
    background: var(--primary-dark);
}
:where(body[data-tool="svg-editor"]) .code-box {
    background: var(--bg-primary);
    padding: 15px;
    border-radius: var(--radius-md);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre-wrap;
}
:where(body[data-tool="svg-editor"]) .loading-text {
    margin-top: 15px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}
:where(body[data-tool="svg-editor"]) .loading-progress-container {
    width: 200px;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    margin-top: 10px;
    overflow: hidden;
}
:where(body[data-tool="svg-editor"]) .loading-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}
:where(body[data-tool="svg-editor"]) .nav-input {
    width: 80px !important;
    text-align: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    outline: none;
    -moz-appearance: textfield;
}
:where(body[data-tool="svg-editor"]) .nav-input::-webkit-outer-svg-editor-spin-button,
:where(body[data-tool="svg-editor"]) .nav-input::-webkit-inner-svg-editor-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
:where(body[data-tool="svg-editor"]) .nav-input:focus {
    border-color: var(--primary);
}
:where(body[data-tool="svg-editor"]) .nav-ellipsis {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    padding: 0 5px;
}
:where(body[data-tool="svg-editor"]) .color-control-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}
:where(body[data-tool="svg-editor"]) .color-input-field {
    width: 100px;
    height: 41px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'YekanBakh', monospace;
    font-size: 13px;
    padding: 0 8px;
    text-align: center;
    direction: ltr;
    transition: all 0.2s ease;
}
:where(body[data-tool="svg-editor"]) .color-input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(72, 73, 232, 0.2);
}
:where(body[data-tool="svg-editor"]) .color-input-field:hover {
    border-color: var(--primary-light);
}
:where(body[data-tool="svg-editor"]) .editor-header-with-reset {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
:where(body[data-tool="svg-editor"]) .reset-btn {
    background: #4a4a4a;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s;
    margin-right: 10px;
}
:where(body[data-tool="svg-editor"]) .reset-btn:hover {
    background: #5a5a5a;
}
:where(body[data-tool="svg-editor"]) .reset-btn svg {
    width: 14px;
    height: 14px;
}
:where(body[data-tool="svg-editor"]) .panel-title {
    display: flex;
    align-items: center;
}
@media (max-width: 768px) {:where(body[data-tool="svg-editor"]) .editor-content {
        flex-direction: column;
    }
:where(body[data-tool="svg-editor"]) .search-container {
        padding: 0px;
        min-width: 100%;
    }
:where(body[data-tool="svg-editor"]) .head-family {
        align-items: flex-start;
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
:where(body[data-tool="svg-editor"]) .search-input {
        padding: 12px 20px 12px 50px;
    }
:where(body[data-tool="svg-editor"]) .families-grid {
        justify-content: center;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
:where(body[data-tool="svg-editor"]) .slide-navigation {
        right: 15px;
        padding: 12px 6px;
    }

}
:where(body[data-tool="svg-editor"]) .editor-header-with-reset {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
        }
:where(body[data-tool="svg-editor"]) .reset-btn {
            background: #4a4a4a;
            color: white;
            border: none;
            border-radius: 4px;
            padding: 4px 10px;
            font-size: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 5px;
            transition: background-color 0.2s;
            margin-right: 10px;
        }
:where(body[data-tool="svg-editor"]) .reset-btn:hover {
            background: #5a5a5a;
        }
:where(body[data-tool="svg-editor"]) .reset-btn svg {
            width: 14px;
            height: 14px;
        }
:where(body[data-tool="svg-editor"]) .panel-title {
            display: flex;
            align-items: center;
        }
:where(body[data-tool="svg-editor"]) .color-control-wrapper {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 1;
        }
:where(body[data-tool="svg-editor"]) .color-input-field {
            width: 100px;
            height: 41px;
            background: var(--bg-primary);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            color: var(--text-primary);
            font-family: 'YekanBakh', monospace;
            font-size: 13px;
            padding: 0 8px;
            text-align: center;
            direction: ltr;
            transition: all 0.2s ease;
        }
:where(body[data-tool="svg-editor"]) .color-input-field:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(72, 73, 232, 0.2);
        }
:where(body[data-tool="svg-editor"]) .color-input-field:hover {
            border-color: var(--primary-light);
        }
:where(body[data-tool="svg-editor"]) .color-picker {
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            background: none;
            padding: 0;
            transition: all 0.2s ease;
        }
:where(body[data-tool="svg-editor"]) .color-picker:hover {
            border-color: var(--primary-light);
            transform: scale(1.05);
        }
:where(body[data-tool="svg-editor"]) .color-picker::-webkit-color-swatch-wrapper {
            padding: 0;
        }
:where(body[data-tool="svg-editor"]) .color-picker::-webkit-color-swatch {
            border: none;
            border-radius: 4px;
        }
:where(body[data-tool="svg-editor"]) .loading-text {
    margin-top: 15px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}
:where(body[data-tool="svg-editor"]) .loading-progress-container {
    width: 200px;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    margin-top: 10px;
    overflow: hidden;
}
:where(body[data-tool="svg-editor"]) .loading-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}
:where(body[data-tool="svg-editor"]) .nav-input {
    width: 120px !important;
    text-align: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    outline: none;
    -moz-appearance: textfield;
    border-radius: 50px !important;
}
:where(body[data-tool="svg-editor"]) .nav-input::-webkit-outer-svg-editor-spin-button,
:where(body[data-tool="svg-editor"]) .nav-input::-webkit-inner-svg-editor-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
:where(body[data-tool="svg-editor"]) .nav-input:focus {
    border-color: var(--primary);
}
:where(body[data-tool="svg-editor"]) .nav-ellipsis {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    padding: 0 5px;
}


/* Desktop editor aside keeps the header, icon area and pagination in the remaining column. */
:where(body[data-tool="svg-editor"]) { --svg-editor-panel-width: min(430px, 42vw); }
:where(body[data-tool="svg-editor"]) .container {
    display: grid;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    grid-template-columns: 0 minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    transition: grid-template-columns .32s ease;
}
:where(body[data-tool="svg-editor"]) .head-tools {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}
:where(body[data-tool="svg-editor"]) .content-area {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    min-height: 0;
    flex: initial;
}
:where(body[data-tool="svg-editor"]) .editor-panel {
    position: relative;
    inset: auto;
    grid-column: 1;
    grid-row: 1 / 3;
    width: 0;
    min-width: 0;
    height: auto;
    min-height: 0;
    max-height: none;
    box-sizing: border-box;
    padding: 0;
    border: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: none;
    transition: opacity .2s ease, padding .32s ease, border-color .32s ease;
}
:where(body[data-tool="svg-editor"]) .editor-panel.active {
    width: auto;
    padding: 20px;
    border-left: 2px solid var(--primary);
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: var(--shadow-lg);
}
:where(body[data-tool="svg-editor"]) .container:has(.editor-panel.active) {
    grid-template-columns: var(--svg-editor-panel-width) minmax(0, 1fr);
}
:where(body[data-tool="svg-editor"]) .editor-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
}
:where(body[data-tool="svg-editor"]) .controls-section { flex: none; min-width: 0; }
:where(body[data-tool="svg-editor"]) .code-section { width: 100%; box-sizing: border-box; }
:where(body[data-tool="svg-editor"]) .slide-navigation {
    position: absolute;
    right: 30px;
    bottom: 30px;
}
@media (max-width: 768px) {
    :where(body[data-tool="svg-editor"]) { --svg-editor-panel-width: min(420px, 92vw); }
    :where(body[data-tool="svg-editor"]) .container {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
        transition: none;
    }
    :where(body[data-tool="svg-editor"]) .head-tools,
    :where(body[data-tool="svg-editor"]) .content-area { grid-column: auto; grid-row: auto; }
    :where(body[data-tool="svg-editor"]) .editor-panel {
        position: fixed;
        inset: 0 0 0 auto;
        z-index: 200;
        width: var(--svg-editor-panel-width);
        height: 100vh;
        height: 100dvh;
        padding: 20px;
        border: 0;
        border-left: 2px solid var(--primary);
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform .3s ease, opacity .2s ease;
    }
    :where(body[data-tool="svg-editor"]) .editor-panel.active {
        width: var(--svg-editor-panel-width);
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }
    :where(body[data-tool="svg-editor"]) .slide-navigation {
        position: fixed;
        right: 15px;
        bottom: 15px;
    }
}

/* Keep the first paint styled before the shared deferred script sets data-tool. */
:where(body:has([data-tool-root][data-tool="svg-editor"])) .search-container {
    width: min(520px, 100%);
    min-width: 0;
    padding: 0 20px;
}
:where(body:has([data-tool-root][data-tool="svg-editor"])) .search-wrapper { position: relative; }
:where(body:has([data-tool-root][data-tool="svg-editor"])) .search-input {
    display: block; width: 100%; appearance: none; -webkit-appearance: none;
    padding: 12px 50px 12px 20px; background: var(--bg-secondary);
    border: 0; border-radius: 8px; color: var(--text-primary);
    font: 300 16px YekanBakh, sans-serif; direction: rtl;
}
:where(body:has([data-tool-root][data-tool="svg-editor"])) .search-input:focus {
    outline: none; box-shadow: 0 0 0 2px rgba(72,73,232,.2);
}
@media (max-width: 768px) {
    :where(body:has([data-tool-root][data-tool="svg-editor"])) .search-container {
        width: min(420px, 100%);
        min-width: 0;
        padding: 0;
    }
    :where(body:has([data-tool-root][data-tool="svg-editor"])) .search-input { padding: 12px 20px 12px 50px; }
}


/* SVG editor interaction polish */
:where(body[data-tool="svg-editor"], body:has([data-tool-root][data-tool="svg-editor"])) .search-container {
    flex: 0 0 400px;
    width: 400px;
    min-width: 400px;
    max-width: 400px;
    box-sizing: border-box;
    padding: 0 20px;
}
:where(body[data-tool="svg-editor"]) .container {
    transition: grid-template-columns .42s cubic-bezier(.22,.8,.25,1);
}
:where(body[data-tool="svg-editor"]) .editor-panel,
:where(body[data-tool="svg-editor"]) .editor-panel.active {
    border: 0;
    border-radius: 20px;
    background: var(--bg-tertiary);
}
:where(body[data-tool="svg-editor"]) .editor-panel {
    transition: opacity .24s ease, padding .36s cubic-bezier(.22,.8,.25,1), visibility 0s linear .36s;
}
:where(body[data-tool="svg-editor"]) .editor-panel.active {
    transition: opacity .24s ease, padding .36s cubic-bezier(.22,.8,.25,1), visibility 0s;
}
:where(body[data-tool="svg-editor"]) .slide {
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: opacity .16s ease, transform .16s ease;
    will-change: opacity, transform;
}
:where(body[data-tool="svg-editor"]) .slide::-webkit-scrollbar { display: none; }
:where(body[data-tool="svg-editor"]) .slide.is-leaving {
    opacity: 0;
    transform: translateY(8px) scale(.995);
    pointer-events: none;
}
:where(body[data-tool="svg-editor"]) .slide.is-entering {
    animation: svg-editor-page-enter .34s cubic-bezier(.2,.75,.25,1) both;
}
@keyframes svg-editor-page-enter {
    from { opacity: 0; transform: translateY(10px) scale(.995); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
:where(body[data-tool="svg-editor"]) .icon-card,
:where(body[data-tool="svg-editor"]) .family-card {
    transition: transform .26s cubic-bezier(.2,.75,.25,1), opacity .22s ease, box-shadow .26s ease;
}
:where(body[data-tool="svg-editor"]) .icon-card { user-select: none; -webkit-user-drag: none; }
:where(body[data-tool="svg-editor"]) .preview-nav-row {
    display: grid;
    grid-template-columns: 40px 150px 40px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    direction: ltr;
}
:where(body[data-tool="svg-editor"]) .preview-box {
    width: 150px;
    height: 150px;
    margin: 0;
}
:where(body[data-tool="svg-editor"]) .preview-nav-button {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease, transform .2s ease;
}
:where(body[data-tool="svg-editor"]) .preview-nav-button:hover {
    color: #fff;
    background: var(--primary);
    transform: scale(1.08);
}
:where(body[data-tool="svg-editor"]) .preview-nav-button:active { transform: scale(.94); }
:where(body[data-tool="svg-editor"]) .preview-nav-button:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 3px;
}
:where(body[data-tool="svg-editor"]) .preview-nav-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
:where(body[data-tool="svg-editor"]) .preview-box.icon-changing #previewSvg {
    animation: svg-editor-icon-swap .28s cubic-bezier(.2,.75,.25,1) both;
}
@keyframes svg-editor-icon-swap {
    from { opacity: .25; transform: scale(.86); }
    to { opacity: 1; transform: scale(1); }
}
@media (max-width: 900px) {
    :where(body[data-tool="svg-editor"]) .container {
        display: flex;
        flex-direction: column;
        transition: none;
    }
    :where(body[data-tool="svg-editor"]) .head-tools,
    :where(body[data-tool="svg-editor"]) .content-area { grid-column: auto; grid-row: auto; }
    :where(body[data-tool="svg-editor"]) .editor-panel {
        position: fixed;
        inset: 0 0 0 auto;
        z-index: 200;
        width: min(420px, 92vw);
        height: 100vh;
        height: 100dvh;
        padding: 20px;
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateX(100%);
        transition: transform .34s cubic-bezier(.22,.8,.25,1), opacity .24s ease, visibility 0s linear .34s;
    }
    :where(body[data-tool="svg-editor"]) .editor-panel.active {
        width: min(420px, 92vw);
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        transition-delay: 0s;
    }
    :where(body[data-tool="svg-editor"]) .slide-navigation {
        position: fixed;
        right: 15px;
        bottom: 15px;
    }
}
@media (prefers-reduced-motion: reduce) {
    :where(body[data-tool="svg-editor"]) .container,
    :where(body[data-tool="svg-editor"]) .editor-panel,
    :where(body[data-tool="svg-editor"]) .preview-nav-button { transition-duration: .01ms !important; }
    :where(body[data-tool="svg-editor"]) .slide.is-entering,
    :where(body[data-tool="svg-editor"]) .preview-box.icon-changing #previewSvg { animation-duration: .01ms !important; }
}

/* Keep pagination and plain page arrows in the icon viewport. */
:where(body[data-tool="svg-editor"]) .slide-navigation-shell {
    position: absolute;
    z-index: 60;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
:where(body[data-tool="svg-editor"]) .slide-navigation-shell .slide-navigation,
:where(body[data-tool="svg-editor"]) .slide-step-capsule {
    position: static;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px;
    border: 0;
    border-radius: 40px;
    background: rgb(16 16 16 / 80%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: var(--shadow-lg);
}
:where(body[data-tool="svg-editor"]) .slide-navigation-shell .slide-navigation,
:where(body[data-tool="svg-editor"]) .slide-step-capsule { z-index: auto; }
:where(body[data-tool="svg-editor"]) .slide-step-button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--text-secondary);
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    margin: 0 !important;
}
:where(body[data-tool="svg-editor"]) .slide-step-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

:where(body[data-tool="svg-editor"]) .slide-step-button:hover {
    background: none; box-shadow: none;
}
:where(body[data-tool="svg-editor"]) .slide-step-button:hover:not(:disabled) { color: var(--primary-light); }
:where(body[data-tool="svg-editor"]) .slide-step-button:disabled { opacity: .38; cursor: default; }
:where(body[data-tool="svg-editor"]) .slide-step-button:focus-visible { outline: 1px solid var(--primary-light); outline-offset: 2px; }
:where(body[data-tool="svg-editor"]) .editor-panel.active {
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
:where(body[data-tool="svg-editor"]) .editor-panel.active::-webkit-scrollbar { display: none; }
:where(body[data-tool="svg-editor"]) .icon-card.active,
:where(body[data-tool="svg-editor"]) .icon-card.active:hover {
    border-color: #7771ff;
    box-shadow: 0 0 0 1px rgba(119,113,255,.32), 0 0 14px rgba(119,113,255,.2);
}
@media (max-width: 900px) {
    :where(body[data-tool="svg-editor"]) .slide-navigation-shell { right: 12px; bottom: 12px; gap: 6px; }
    :where(body[data-tool="svg-editor"]) .slide-navigation-shell .slide-navigation,
    :where(body[data-tool="svg-editor"]) .slide-step-capsule { gap: 5px; padding: 6px; }
}
:where(body[data-tool="svg-editor"]) .slide-navigation-shell { direction: rtl; justify-content: center; }
:where(body[data-tool="svg-editor"]) .slide-step-capsule { direction: rtl; justify-content: center; }
/* Keep the panel full-sized and slide it outside the tool viewport when closed. */
:where(body[data-tool="svg-editor"]) .container { position: relative; }
:where(body[data-tool="svg-editor"]) .editor-panel,
:where(body[data-tool="svg-editor"]) .editor-panel.active {
    position: absolute;
    z-index: 200;
    inset-block: 0;
    inset-inline-start: 0;
    width: var(--svg-editor-panel-width);
    min-width: var(--svg-editor-panel-width);
    height: 100%;
    box-sizing: border-box;
    padding: 20px;
    overflow-x: hidden;
    border: 0;
    border-radius: 20px;
    background: var(--bg-tertiary);
    opacity: 0;
    visibility: hidden;
    transform: translateX(105%);
    box-shadow: none;
    transition: transform .48s cubic-bezier(.22,.8,.25,1), opacity .3s ease, visibility 0s linear .48s;
}
:where(body[data-tool="svg-editor"]) .editor-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transition: transform .48s cubic-bezier(.22,.8,.25,1), opacity .3s ease, visibility 0s;
}

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

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
@media (max-width: 900px) {
    :where(body[data-tool="svg-editor"]) { --svg-editor-panel-width: min(420px, 92vw); }
    :where(body[data-tool="svg-editor"]) .editor-panel,
    :where(body[data-tool="svg-editor"]) .editor-panel.active {
        position: fixed;
        inset: 0 0 0 auto;
        width: var(--svg-editor-panel-width);
        min-width: var(--svg-editor-panel-width);
        height: 100vh;
        height: 100dvh;
        transform: translateX(105%);
        transition: transform .38s cubic-bezier(.22,.8,.25,1), opacity .28s ease, visibility 0s linear .38s;
    }
    :where(body[data-tool="svg-editor"]) .editor-panel.active {
        transform: translateX(0);
        transition-delay: 0s;
    }
}
@media (prefers-reduced-motion: reduce) {
    :where(body[data-tool="svg-editor"]) .editor-panel,
    :where(body[data-tool="svg-editor"]) .editor-panel.active { transition-duration: .01ms !important; }
}