:root {
    --sg-bg: #f3f5f8;
    --sg-panel: #ffffff;
    --sg-top: #0b1530;
    --sg-border: #e2e8f0;
    --sg-text: #111827;
    --sg-muted: #64748b;
    --sg-primary: #2563eb;
    --sg-primary-hover: #1d4ed8;
    --sg-danger: #ef4444;
    --sg-radius: 14px;
    --sg-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

/* WICHTIG: alten Header/Footer im Editor ausblenden */
body.editor-page-active .site-header,
body.editor-page-active .site-footer,
body.editor-page-active > header:not(.sg-topbar),
body.editor-page-active > footer:not(.sg-pricebar) {
    display: none !important;
}

body.editor-page-active {
    margin: 0;
    overflow: hidden;
    background: var(--sg-bg);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--sg-text);
}

.sg-editor,
.sg-editor * {
    box-sizing: border-box;
}

.sg-editor {
    height: 100vh;
    display: grid;
    grid-template-rows: 72px 1fr 88px;
    background: var(--sg-bg);
    overflow: hidden;
}

/* TOPBAR */

.sg-topbar {
    height: 72px;
    background: linear-gradient(135deg, #08142f, #111827);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,.18);
    z-index: 50;
}

.sg-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 230px;
}

.sg-brand img {
    height: 46px;
    width: auto;
}

.sg-brand strong {
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.sg-design-name {
    width: min(420px, 32vw);
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.92);
    color: #111827;
    padding: 0 14px;
    font-weight: 700;
}

.sg-top-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sg-icon-btn,
.sg-zoom button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: rgba(255,255,255,.10);
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}

.sg-icon-btn:hover,
.sg-zoom button:hover {
    background: rgba(255,255,255,.18);
}

.sg-zoom {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 8px;
    border-radius: 12px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-weight: 800;
}

.sg-save-state {
    color: #86efac;
    font-size: 14px;
    font-weight: 800;
}

/* BUTTONS */

.sg-btn {
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    padding: 0 18px;
    font-weight: 800;
    cursor: pointer;
    font: inherit;
}

.sg-btn-primary {
    background: var(--sg-primary);
    color: #fff;
    box-shadow: 0 8px 20px rgba(37,99,235,.25);
}

.sg-btn-primary:hover {
    background: var(--sg-primary-hover);
}

.sg-btn-secondary {
    background: rgba(255,255,255,.14);
    color: #fff;
}

.sg-btn-panel,
.sg-upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #111827;
    border-radius: 12px;
    min-height: 42px;
    padding: 0 16px;
    font-weight: 800;
    cursor: pointer;
    border: 1px solid transparent;
}

.sg-btn-panel:hover,
.sg-upload-btn:hover {
    background: #e2e8f0;
}

.sg-btn-danger {
    background: #fee2e2;
    color: #991b1b;
}

.sg-btn-full {
    width: 100%;
}

/* LAYOUT */

.sg-layout {
    min-height: 0;
    display: grid;
    grid-template-columns: 78px 280px minmax(420px, 1fr) 340px;
    gap: 16px;
    padding: 16px;
    overflow: hidden;
}

/* TOOLRAIL */

.sg-toolrail {
    background: var(--sg-panel);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow);
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}

.sg-tool {
    height: 72px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--sg-muted);
    font-size: 12px;
    font-weight: 800;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sg-tool span {
    font-size: 24px;
    line-height: 1;
}

.sg-tool:hover,
.sg-tool.active {
    background: #eff6ff;
    color: var(--sg-primary);
}

/* PANELS */

.sg-left-panel,
.sg-right-panel {
    background: var(--sg-panel);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow);
    overflow: auto;
    min-height: 0;
}

.sg-tab-panel {
    display: none !important;
}

.sg-tab-panel.active {
    display: block !important;
}

.sg-panel-section {
    padding: 18px;
    border-bottom: 1px solid var(--sg-border);
}

.sg-panel-section:last-child {
    border-bottom: 0;
}

.sg-panel-section h3 {
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 900;
}

.sg-panel-section label {
    display: block;
    margin: 14px 0 7px;
    font-size: 13px;
    font-weight: 800;
    color: #334155;
}

.sg-panel-section textarea,
.sg-panel-section select,
.sg-panel-section input {
    width: 100%;
    border: 1px solid var(--sg-border);
    border-radius: 10px;
    background: #fff;
    min-height: 40px;
    padding: 10px 12px;
    font: inherit;
}

.sg-panel-section textarea {
    min-height: 92px;
    resize: vertical;
}

.sg-panel-section input:focus,
.sg-panel-section textarea:focus,
.sg-panel-section select:focus {
    outline: 2px solid rgba(37,99,235,.15);
    border-color: var(--sg-primary);
}

.sg-check {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sg-check input {
    width: 22px;
    min-height: 22px;
}

/* COLOR / VIEW BUTTONS */

.color-tabs,
.view-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-option {
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--sg-border);
    background: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    cursor: pointer;
}

.color-option.active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--sg-primary);
}

.editor-color-swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
}

.view-tab {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--sg-border);
    background: #f8fafc;
    border-radius: 12px;
    font-weight: 900;
    cursor: pointer;
}

.view-tab.active {
    background: #e2e8f0;
    color: #1e293b;
}

/* STAGE - NICHT PER CSS SKALIEREN, NUR PER JS transform: scale() */

.sg-stage-wrap {
    position: relative;
    min-width: 0;
    min-height: 0;
    background: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 70%);
    border-radius: var(--sg-radius);
    border: 1px solid var(--sg-border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.sg-stage-status {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    pointer-events: none;
}

#canvasStage,
.sg-stage {
    position: relative;
    width: 820px !important;
    height: 860px !important;
    flex: 0 0 auto;
    transform-origin: center center;
}

.product-base {
    position: absolute;
    inset: 0;
    width: 820px !important;
    height: 860px !important;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

.print-area,
.editor-grid {
    position: absolute;
    pointer-events: none;
}

.print-area {
    border: 1px dashed rgba(37, 99, 235, .25);
    background: rgba(37, 99, 235, .025);
    z-index: 2;
}

.editor-grid {
    z-index: 3;
    background-image:
        linear-gradient(to right, rgba(15,23,42,.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15,23,42,.05) 1px, transparent 1px);
    background-size: 10px 10px;
}

.center-line {
    position: absolute;
    background: rgba(37,99,235,.25);
}

.center-line-v {
    top: 0;
    bottom: 0;
    width: 1px;
}

.center-line-h {
    left: 0;
    right: 0;
    height: 1px;
}

.design-item {
    position: absolute;
    min-width: 40px;
    min-height: 30px;
    transform-origin: center center;
    cursor: move;
    user-select: none;
    overflow: visible !important;
    z-index: 10;
}

.design-item.selected {
    outline: 2px dashed var(--sg-primary);
    box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

.design-item-inner {
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.text-content {
    pointer-events: none;
}

.uploaded-design-image {
    display: block;
}

.handle {
    position: absolute;
    width: 13px;
    height: 13px;
    background: var(--sg-primary);
    border: 2px solid #fff;
    border-radius: 999px;
    z-index: 20;
}

.handle.rotate {
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    cursor: grab;
}

.handle.scale {
    right: -7px;
    bottom: -7px;
    cursor: nwse-resize;
}

.sg-floating-toolbar {
    position: absolute;
    bottom: 22px;
    z-index: 10;
    display: flex;
    gap: 8px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--sg-border);
    border-radius: 14px;
    box-shadow: var(--sg-shadow);
}

.sg-floating-toolbar button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
}

.sg-floating-toolbar button:hover {
    background: #eff6ff;
}

/* LAYERS */

.layer-list,
.sg-layer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.layer-list li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    min-height: 44px;
    border: 1px solid var(--sg-border);
    border-radius: 10px;
    padding: 6px;
    margin-bottom: 8px;
    background: #fff;
}

.layer-list li.active {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.layer-select {
    border: 0;
    background: transparent;
    text-align: left;
    font-weight: 800;
    cursor: pointer;
}

.layer-actions {
    display: flex;
    gap: 4px;
}

.layer-actions button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--sg-border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

/* PRICEBAR */

.sg-pricebar {
    height: 88px;
    background: #fff;
    border-top: 1px solid var(--sg-border);
    display: grid;
    grid-template-columns: 1.3fr repeat(5, 1fr) 240px;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    box-shadow: 0 -8px 26px rgba(15,23,42,.06);
    z-index: 40;
}

.sg-pricebar small {
    display: block;
    color: var(--sg-muted);
    margin-bottom: 4px;
    font-weight: 700;
}

.sg-pricebar strong {
    font-size: 18px;
}

.sg-total strong {
    font-size: 24px;
}

/* RESPONSIVE DESKTOP */

@media (max-width: 1280px) {
    .sg-layout {
        grid-template-columns: 70px 260px minmax(360px, 1fr) 300px;
    }
}

@media (max-width: 980px) {
    body.editor-page-active {
        overflow: auto;
    }

    .sg-editor {
        height: auto;
        min-height: 100vh;
        grid-template-rows: auto auto auto;
    }

    .sg-topbar {
        height: auto;
        flex-wrap: wrap;
        padding: 12px;
    }

    .sg-layout {
        grid-template-columns: 1fr;
    }

    .sg-toolrail {
        flex-direction: row;
    }

    .sg-right-panel {
        display: block;
    }

    .sg-pricebar {
        grid-template-columns: 1fr 1fr;
        height: auto;
        padding: 14px;
    }

    .sg-pricebar > div:not(:first-child):not(.sg-total) {
        display: none;
    }
}

/* LOGIN BUTTON */

.sg-top-actions a.sg-editor-login-btn,
.sg-top-actions a.sg-editor-login-btn:link,
.sg-top-actions a.sg-editor-login-btn:visited {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 52px !important;
    padding: 0 28px !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%) !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    font-size: 16px !important;
    text-decoration: none !important;
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.35) !important;
    border: 0 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.sg-top-actions a.sg-editor-login-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

/* TEXTILE PICKER */

.textile-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 12px;
}

.textile-card {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid #d7dbe0;
    border-radius: 16px;
    background: #fff;
    color: #263a5c;
    text-decoration: none;
    transition: .15s ease;
}

.textile-card:hover {
    transform: translateY(-1px);
    border-color: #263a5c;
}

.textile-card.is-active {
    border-color: #263a5c;
    box-shadow: 0 0 0 2px rgba(38, 58, 92, .14);
}

.textile-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.textile-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.textile-no-image {
    font-size: 11px;
    color: #7a8798;
    font-weight: 800;
    text-align: center;
}

.textile-info strong {
    display: block;
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
}

/* UPLOAD */

.upload-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.upload-rights-check {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    margin: 0 0 14px !important;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 13px !important;
    line-height: 1.4;
}

.upload-rights-check input {
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    margin-top: 2px;
}

.upload-hints,
.upload-accordion-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upload-hints {
    margin-bottom: 18px;
}

.upload-accordion-content {
    display: none;
    margin-top: 10px;
}

.upload-accordion-content.active {
    display: flex;
}

.upload-accordion-toggle {
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--sg-border);
    background: #f1f5f9;
    font-weight: 900;
    cursor: pointer;
}

.upload-accordion-toggle:hover {
    background: #e2e8f0;
}

.upload-hint-block {
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
}

.upload-hint-block strong {
    display: block;
    margin-bottom: 6px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
}

.upload-hint-block p {
    margin: 0 0 8px;
}

.upload-hint-block p:last-child {
    margin-bottom: 0;
}

.upload-hint-block a {
    font-weight: 900;
    color: #2563eb;
    text-decoration: none;
}

.upload-hint-block a:hover {
    text-decoration: underline;
}

.upload-hint-warning {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #7c2d12;
}

.upload-hint-warning strong {
    color: #9a3412;
}

.upload-quality-warning {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #7f1d1d;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

.upload-quality-warning ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

/* MOBILE */

@media (max-width: 1023px) {
    html,
    body.editor-page-active {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        background: var(--sg-bg);
    }

    body.editor-page-active {
        position: relative;
        padding: 0 !important;
    }

    body.editor-page-active .sg-editor {
        min-height: 100dvh;
        height: auto;
        display: flex;
        flex-direction: column;
        overflow: visible;
        padding-bottom: 78px;
    }

    body.editor-page-active .sg-topbar {
        position: sticky;
        top: 0;
        z-index: 9000;
        height: 54px !important;
        min-height: 54px !important;
        padding: 6px 10px !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 8px !important;
        box-shadow: 0 6px 18px rgba(0,0,0,.16);
    }

    body.editor-page-active .sg-brand {
        min-width: 0 !important;
        flex: 1 1 auto;
        gap: 8px;
    }

    body.editor-page-active .sg-brand img {
        height: 34px !important;
        max-height: 34px !important;
    }

    body.editor-page-active .sg-brand strong {
        font-size: 13px !important;
        line-height: 1;
        white-space: nowrap;
    }

    body.editor-page-active .sg-design-name,
    body.editor-page-active .sg-save-state,
    body.editor-page-active .sg-zoom,
    body.editor-page-active .sg-top-actions > .sg-icon-btn {
        display: none !important;
    }

    body.editor-page-active .sg-top-actions {
        margin-left: auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 0 !important;
        flex: 0 0 auto;
    }

    body.editor-page-active .sg-top-actions a.sg-editor-login-btn {
        min-height: 36px !important;
        height: 36px !important;
        padding: 0 15px !important;
        font-size: 13px !important;
        border-radius: 999px !important;
        box-shadow: 0 6px 16px rgba(99,102,241,.28) !important;
    }

    body.editor-page-active .sg-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        padding: 8px !important;
        overflow: visible !important;
        min-height: 0 !important;
    }

    body.editor-page-active .sg-stage-wrap {
        order: 1;
        width: 100%;
        min-height: calc(100dvh - 165px);
        height: calc(100dvh - 165px);
        max-height: 620px;
        border-radius: 14px;
        overflow: hidden;
        align-items: center;
        justify-content: center;
        padding: 8px;
    }

    body.editor-page-active #canvasStage,
    body.editor-page-active .sg-stage {
        width: 820px !important;
        height: 860px !important;
        transform-origin: center center !important;
    }

    body.editor-page-active .product-base {
        width: 820px !important;
        height: 860px !important;
        object-fit: contain !important;
    }

    body.editor-page-active .sg-stage-status {
        top: 8px;
        left: 8px;
        right: 8px;
        gap: 5px;
        font-size: 10px;
        opacity: .72;
    }

    body.editor-page-active .sg-toolrail {
        order: 2;
        position: sticky;
        top: 58px;
        z-index: 8000;
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
        padding: 7px;
        border-radius: 14px;
        overflow: hidden;
    }

    body.editor-page-active .sg-tool {
        height: 54px !important;
        min-height: 54px !important;
        padding: 4px 2px;
        font-size: 10px;
        border-radius: 10px;
    }

    body.editor-page-active .sg-tool span {
        font-size: 18px;
    }

    body.editor-page-active .sg-left-panel {
        order: 3;
    }

    body.editor-page-active .sg-right-panel {
        order: 4;
    }

    body.editor-page-active .sg-left-panel,
    body.editor-page-active .sg-right-panel {
        width: 100%;
        max-height: 42dvh;
        overflow-y: auto;
        border-radius: 14px;
        -webkit-overflow-scrolling: touch;
    }

    body.editor-page-active .sg-panel-section {
        padding: 12px;
    }

    body.editor-page-active .sg-panel-section h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    body.editor-page-active .sg-panel-section label {
        margin: 9px 0 5px;
        font-size: 11px;
    }

    body.editor-page-active .sg-panel-section textarea {
        min-height: 70px;
    }

    body.editor-page-active .sg-panel-section input,
    body.editor-page-active .sg-panel-section textarea,
    body.editor-page-active .sg-panel-section select,
    body.editor-page-active .sg-btn,
    body.editor-page-active .sg-btn-panel,
    body.editor-page-active .sg-upload-btn {
        min-height: 44px;
        font-size: 13px;
    }

    body.editor-page-active input[type="range"] {
        min-height: 30px;
    }

    body.editor-page-active .color-tabs,
    body.editor-page-active .view-tabs {
        display: flex;
        flex-wrap: nowrap;
        gap: 7px;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    body.editor-page-active .color-option,
    body.editor-page-active .view-tab {
        flex: 0 0 auto;
        min-height: 42px;
        white-space: nowrap;
    }

    body.editor-page-active .sg-floating-toolbar {
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        padding: 6px;
        gap: 6px;
        border-radius: 999px;
    }

    body.editor-page-active .sg-floating-toolbar button {
        width: 42px;
        height: 42px;
    }

    body.editor-page-active .sg-pricebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9500;
        height: 68px !important;
        display: grid !important;
        grid-template-columns: 1fr auto;
        gap: 10px;
        padding: 8px 10px;
        box-shadow: 0 -8px 24px rgba(15,23,42,.14);
    }

    body.editor-page-active .sg-pricebar > div:not(.sg-total):not(:last-child) {
        display: none !important;
    }

    body.editor-page-active .sg-pricebar .sg-total {
        display: block !important;
    }

    body.editor-page-active .sg-pricebar small {
        font-size: 10px;
        margin-bottom: 2px;
    }

    body.editor-page-active .sg-pricebar strong,
    body.editor-page-active .sg-total strong {
        font-size: 17px;
        line-height: 1;
    }

    body.editor-page-active .sg-pricebar .sg-btn,
    body.editor-page-active .sg-pricebar a,
    body.editor-page-active .sg-pricebar button {
        min-height: 46px;
        border-radius: 12px;
        padding: 0 14px;
        font-size: 13px;
    }

    .textile-picker {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .textile-card {
        padding: 8px;
        border-radius: 12px;
    }

    .textile-info strong {
        font-size: 11px;
    }
}

@media (max-width: 640px) {
    body.editor-page-active .sg-stage-wrap {
        min-height: calc(100dvh - 152px);
        height: calc(100dvh - 152px);
    }

    body.editor-page-active .sg-left-panel,
    body.editor-page-active .sg-right-panel {
        max-height: 38dvh;
    }
}

@media (max-width: 480px) {
    body.editor-page-active .sg-layout {
        padding: 6px;
        gap: 8px;
    }

    body.editor-page-active .sg-stage-wrap {
        min-height: 54dvh;
        height: 54dvh;
    }

    body.editor-page-active .sg-brand strong {
        font-size: 12px !important;
    }

    body.editor-page-active .sg-tool {
        height: 50px !important;
        min-height: 50px !important;
        font-size: 9px;
    }

    body.editor-page-active .sg-tool span {
        font-size: 16px;
    }
}