:root {
    --pix-red: #eb0c27;
    --pix-red-dark: #c90018;
    --pix-black: #111111;
    --pix-muted: #5f6368;
    --pix-line: #d8d8d8;
    --pix-line-dark: #111111;
    --pix-bg: #ffffff;
    --pix-work: #f6f6f6;
    --pix-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html,
body.pixplet-editor-body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    background: #ffffff !important;
    color: var(--pix-black) !important;
    font-family: var(--pix-font) !important;
    font-size: 14px;
    line-height: 1.4;
}

body.pixplet-editor-body * {
    box-sizing: border-box;
}

body.pixplet-editor-body a {
    color: inherit;
}

body.pixplet-editor-body button,
body.pixplet-editor-body input,
body.pixplet-editor-body select,
body.pixplet-editor-body textarea {
    font: inherit;
}

.screen-reader-text,
.pix-file-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

[hidden] { display: none !important; }

.pix-app {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-rows: 58px minmax(0, 1fr) auto;
    background: #ffffff;
    color: var(--pix-black);
    font-family: var(--pix-font);
}

.pix-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.pix-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pix-appbar {
    min-width: 0;
    height: 58px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #ffffff;
    border-bottom: 1px solid var(--pix-line);
}

.pix-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    text-decoration: none;
}

.pix-brand img {
    width: 118px;
    height: auto;
    display: block;
}

.pix-app-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.pix-button,
.pix-mini,
.pix-quick button,
.pix-tabs button,
.pix-choice,
.pix-position button,
.pix-shapes button,
.pix-layer-actions button,
.pix-background button,
.pix-preset,
.pix-lock,
.pix-history button,
.pix-preview-zoom button,
.pix-modal-head button {
    appearance: none;
    border-radius: 0;
    cursor: pointer;
    background: #ffffff;
    color: var(--pix-black);
    border: 1px solid var(--pix-line);
    text-decoration: none;
    user-select: none;
}

.pix-button {
    min-height: 38px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
}

.pix-button-wide { width: 100%; }
.pix-button-primary { background: var(--pix-red); border-color: var(--pix-red); color: #ffffff; }
.pix-button-primary:hover:not(:disabled) { background: var(--pix-red-dark); border-color: var(--pix-red-dark); }
.pix-button-secondary { background: #ffffff; border-color: var(--pix-line); }
.pix-button-ghost { color: var(--pix-muted); border-color: transparent; }

button:disabled,
.pix-button:disabled,
.pix-mini:disabled,
.pix-preset:disabled {
    cursor: not-allowed;
    opacity: .42;
}

.pix-button:hover:not(:disabled),
.pix-mini:hover:not(:disabled),
.pix-quick button:hover:not(:disabled),
.pix-tabs button:hover:not(:disabled),
.pix-choice:hover:not(:disabled),
.pix-position button:hover:not(:disabled),
.pix-shapes button:hover:not(:disabled),
.pix-layer-actions button:hover:not(:disabled),
.pix-background button:hover:not(:disabled),
.pix-preset:hover:not(:disabled),
.pix-lock:hover:not(:disabled),
.pix-history button:hover:not(:disabled),
.pix-preview-zoom button:hover:not(:disabled) {
    border-color: var(--pix-line-dark);
}

.pix-main {
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    border-bottom: 1px solid var(--pix-line);
}

.pix-stage-card {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto auto 32px;
    background: #ffffff;
}

.pix-stage-head {
    min-width: 0;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--pix-line);
    background: #ffffff;
}

.pix-file-summary {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.pix-file-summary strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 800;
}

.pix-file-summary span,
.pix-stage-status,
.pix-help,
.pix-empty p,
.pix-empty small {
    color: var(--pix-muted);
}

.pix-quick {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.pix-quick button {
    min-height: 36px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 650;
}

.pix-quick .is-active,
.pix-tabs .is-active,
.pix-background .is-active,
.pix-choice.is-active,
.pix-lock.is-active {
    color: #ffffff;
    background: var(--pix-red);
    border-color: var(--pix-red);
}

.pix-choice.is-active strong,
.pix-choice.is-active span {
    color: #ffffff;
}

.pix-stage {
    min-height: 0;
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 20px;
    background: var(--pix-work);
}

.pix-canvas-viewport {
    position: absolute;
    inset: 0;
    z-index: 1;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 20px;
    background: transparent;
    pointer-events: none;
}

.pix-app.has-image .pix-canvas-viewport {
    pointer-events: auto;
}

.pix-canvas-wrap {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    box-sizing: border-box;
    display: grid;
    place-items: center;
    padding: 20px;
}

.pix-app.is-empty .pix-canvas-viewport {
    display: none;
}

.pix-history {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid var(--pix-line);
}

.pix-history button {
    width: 38px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-right: 1px solid var(--pix-line);
    background: #ffffff;
    color: var(--pix-black);
}

.pix-history button:last-child {
    border-right: 0;
}

.pix-history button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.pix-history button:not(:disabled):active,
.pix-preview-zoom button:not(:disabled):active,
.pix-preview-zoom button.is-active {
    color: #ffffff;
    background: var(--pix-red);
}

.pix-preview-zoom {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid var(--pix-line);
}

.pix-preview-zoom button {
    min-width: 38px;
    height: 34px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-right: 1px solid var(--pix-line);
    background: #ffffff;
    color: var(--pix-black);
}

.pix-preview-zoom button:last-child {
    border-right: 0;
}

.pix-preview-zoom button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.pix-preview-zoom-label {
    min-width: 58px !important;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.pix-app.is-empty .pix-preview-zoom {
    display: none;
}

.pix-canvas {
    display: block;
    max-width: none;
    max-height: none;
    border: 1px solid var(--pix-black);
    background: #ffffff;
    touch-action: none;
    image-rendering: auto;
}

.pix-empty {
    position: relative;
    z-index: 2;
    width: min(460px, 94%);
    padding: 28px;
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
    border: 1px solid var(--pix-line);
    background: #ffffff;
}

.pix-empty-icon {
    color: var(--pix-red);
}

.pix-empty strong {
    font-size: 22px;
    font-weight: 850;
}

.pix-canvas-note {
    display: none !important;
}

.pix-stage-status {
    min-width: 0;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--pix-line);
    background: #ffffff;
    font-size: 12px;
}

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

.pix-panel {
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    display: grid;
    grid-template-rows: 52px minmax(0, 1fr);
    border-left: 1px solid var(--pix-line);
    background: #ffffff;
}

.pix-tabs {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--pix-line);
}

.pix-tabs button {
    min-width: 0;
    border: 0;
    border-right: 1px solid var(--pix-line);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
}

.pix-tabs button:last-child { border-right: 0; }

.pix-panel-body {
    min-height: 0;
    height: 100%;
    overflow: hidden;
    background: #ffffff;
}

.pix-panel-section {
    min-height: 0;
    height: 100%;
    padding: 18px 16px 20px;
    overflow: auto;
}

.pix-panel-section[data-panel="resize"] {
    display: grid;
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    overflow: hidden;
}

.pix-section-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
}

.pix-section-head p {
    margin: 0 0 4px;
    color: var(--pix-red);
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.pix-section-head h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.08;
    font-weight: 900;
    color: var(--pix-black);
}

.pix-mini {
    min-height: 36px;
    padding: 0 12px;
    font-weight: 650;
}

.pix-size-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
    gap: 8px;
    align-items: end;
    margin-bottom: 10px;
}

.pix-field {
    min-width: 0;
    display: grid;
    gap: 6px;
    color: var(--pix-muted);
    font-weight: 750;
}

.pix-field span,
.pix-field input,
.pix-field select {
    width: 100%;
}

.pix-field span {
    min-height: 44px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--pix-line);
    color: var(--pix-muted);
}

.pix-field input,
.pix-field select {
    min-width: 0;
    height: 42px;
    border: 1px solid var(--pix-line);
    background: #ffffff;
    color: var(--pix-black);
    padding: 0 10px;
    font-weight: 700;
}

.pix-field span input {
    height: 40px;
    padding: 0;
    border: 0;
}

.pix-field-full { margin-bottom: 12px; }

.pix-lock {
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pix-filter-select {
    margin: 14px 0 12px;
    display: grid;
    gap: 6px;
    color: var(--pix-muted);
    font-size: 12px;
    font-weight: 800;
}

.pix-filter-select select {
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--pix-line);
    border-radius: 0;
    background: #ffffff;
    color: var(--pix-black);
    font-weight: 800;
    appearance: auto;
}

.pix-filter-select select:focus {
    outline: 2px solid rgba(235, 12, 39, .18);
    outline-offset: 1px;
    border-color: var(--pix-red);
}

.pix-presets {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 8px;
    padding: 0 6px 4px 0;
}

.pix-preset {
    min-width: 0;
    min-height: 112px;
    padding: 12px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    overflow: hidden;
    align-content: start;
}

.pix-preset span {
    display: block;
    color: var(--pix-muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pix-preset strong {
    display: block;
    color: var(--pix-black);
    font-size: 14px;
    font-weight: 850;
    line-height: 1.25;
    min-height: 34px;
    max-height: 54px;
    overflow: hidden;
    word-break: normal;
}

.pix-preset em {
    display: block;
    margin-top: auto;
    color: var(--pix-muted);
    font-size: 12px;
    font-weight: 750;
    font-style: normal;
    line-height: 1.2;
}

.pix-preset.is-selected {
    border-color: var(--pix-red);
    box-shadow: inset 3px 0 0 var(--pix-red);
}

.pix-choice-grid,
.pix-shapes,
.pix-layer-actions,
.pix-position {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.pix-choice {
    min-height: 88px;
    padding: 13px;
    display: grid;
    gap: 4px;
    text-align: left;
}

.pix-choice strong { font-weight: 850; }
.pix-choice span { color: var(--pix-muted); font-size: 12px; }

.pix-control {
    display: grid;
    gap: 8px;
    margin: 18px 0;
}

.pix-control label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--pix-muted);
    font-weight: 800;
}

.pix-control strong { color: var(--pix-black); }
input[type="range"] {
    width: 100%;
    accent-color: var(--pix-red);
}

.pix-position { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pix-position button,
.pix-shapes button,
.pix-layer-actions button,
.pix-background button {
    min-height: 42px;
    padding: 0 10px;
    font-weight: 700;
}

.pix-shapes {
    margin: 12px 0 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pix-layer-box {
    border-top: 1px solid var(--pix-line);
    padding-top: 16px;
    margin-top: 16px;
}

.pix-layer-title {
    margin: 0 0 12px;
    font-weight: 900;
    color: var(--pix-red);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 12px;
}

.pix-help {
    margin: 14px 0 0;
    font-size: 13px;
}

.pix-footer {
    min-width: 0;
    display: grid;
    gap: 8px;
    align-content: center;
    justify-items: center;
    padding: 10px 16px 9px;
    background: #ffffff;
    border-top: 1px solid var(--pix-line);
    font-size: 12px;
}

.pix-footer-tools,
.pix-footer-pages {
    min-width: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pix-footer-tools {
    gap: 6px 8px;
    flex-wrap: wrap;
}

.pix-footer-pages {
    gap: 8px 22px;
    flex-wrap: wrap;
}

.pix-footer-tool {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 5px 9px;
    color: var(--pix-black);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.pix-footer-tool:hover,
.pix-footer-tool:focus-visible {
    color: var(--pix-red);
    background: #fff5f6;
    outline: none;
}

.pix-footer-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    display: inline-grid;
    place-items: center;
    color: var(--pix-red);
}

.pix-footer-icon svg {
    width: 17px;
    height: 17px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pix-footer-pages a {
    color: #334155;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
}

.pix-footer-pages a:hover,
.pix-footer-pages a:focus-visible {
    color: var(--pix-red);
    outline: none;
}

.pix-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: 20px;
}

.pix-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.pix-modal-card {
    position: relative;
    width: min(430px, 100%);
    background: #ffffff;
    border: 1px solid var(--pix-black);
}

.pix-modal-head {
    min-height: 54px;
    padding: 0 14px;
    border-bottom: 1px solid var(--pix-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pix-modal-head h2 { margin: 0; font-size: 20px; font-weight: 900; }
.pix-history button,
.pix-preview-zoom button,
.pix-modal-head button { width: 36px; height: 36px; display: grid; place-items: center; }
.pix-modal-body { padding: 16px; }

.pix-background {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 14px 0;
}

.pix-background p { grid-column: 1 / -1; margin: 0; color: var(--pix-muted); font-weight: 800; }

.pix-toast {
    position: fixed;
    left: 50%;
    bottom: 46px;
    transform: translateX(-50%);
    z-index: 1000000;
    max-width: min(520px, calc(100vw - 28px));
    padding: 10px 12px;
    border: 1px solid var(--pix-black);
    background: #ffffff;
    color: var(--pix-black);
    font-weight: 800;
}

@media (max-width: 1180px) {
    .pix-main { grid-template-columns: minmax(0, 1fr) 340px; }
    .pix-panel-section { padding: 16px 12px 18px; }
    .pix-presets { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    html,
    body.pixplet-editor-body {
        height: auto;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
    }
    .pix-app {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        display: block;
    }
    .pix-appbar {
        min-height: 58px;
        height: auto;
        padding: 10px 12px;
    }
    .pix-app-actions { gap: 6px; }
    .pix-button { min-height: 36px; padding: 0 10px; }
    .pix-main {
        display: block;
        overflow: visible;
        border-bottom: 0;
    }
    .pix-stage-card {
        height: 62vh;
        min-height: 420px;
        border-bottom: 1px solid var(--pix-line);
    }
    .pix-panel {
        display: block;
        height: auto;
        overflow: visible;
        border-left: 0;
        border-bottom: 1px solid var(--pix-line);
    }
    .pix-tabs {
        position: sticky;
        top: 0;
        z-index: 3;
        height: 52px;
        background: #ffffff;
    }
    .pix-panel-body {
        height: auto;
        max-height: none;
        overflow: visible;
    }
    .pix-panel-section {
        height: auto;
        min-height: 0;
        overflow: visible;
    }
    .pix-panel-section[data-panel="resize"] {
        display: block;
    }
    .pix-presets {
        max-height: 54vh;
        overflow-y: auto;
    }
    .pix-presets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .pix-stage-head {
        padding: 8px 10px;
        align-items: stretch;
        flex-direction: column;
    }
    .pix-quick {
        width: 100%;
        overflow-x: auto;
    }
    .pix-quick button { flex: 1 0 auto; }
}

@media (max-width: 600px) {
    .pix-appbar {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }
    .pix-brand {
        width: 100%;
        justify-content: center;
    }
    .pix-app-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
    }
    .pix-app-actions .pix-button { width: 100%; }
    .pix-stage-card { height: 58vh; min-height: 360px; }
    .pix-stage { padding: 12px; }
    .pix-history { top: 10px; right: 10px; }
    .pix-history button { width: 34px; height: 32px; }
    .pix-section-head h2 { font-size: 21px; }
    .pix-tabs button { font-size: 0; }
    .pix-tabs .pix-icon { width: 18px; height: 18px; }
    .pix-presets { grid-template-columns: 1fr; }
    .pix-size-grid { grid-template-columns: 1fr 42px 1fr; }
    .pix-shapes { grid-template-columns: 1fr; }
    .pix-layer-actions { grid-template-columns: 1fr 1fr; }
    .pix-footer { padding: 10px 8px 11px; gap: 7px; }
    .pix-footer-tools {
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: 2px;
    }
    .pix-footer-tool {
        flex: 0 0 auto;
        min-height: 32px;
        padding: 5px 8px;
        font-size: 11px;
    }
    .pix-footer-pages { gap: 8px 14px; }
    .pix-footer-pages a { font-size: 12px; }
}

.pix-layer-actions button[data-layer-delete] {
    grid-column: 1 / -1;
}

/* v1.7 text-layer controls */
.pix-text-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 14px;
}

.pix-text-options button {
    min-height: 40px;
    padding: 0 8px;
    appearance: none;
    border-radius: 0;
    border: 1px solid var(--pix-line);
    background: #ffffff;
    color: var(--pix-black);
    cursor: pointer;
    font-weight: 800;
}

.pix-text-options button:hover:not(:disabled) {
    border-color: var(--pix-line-dark);
}

.pix-text-options button.is-active {
    color: #ffffff;
    background: var(--pix-red);
    border-color: var(--pix-red);
}

.pix-text-options button:focus-visible,
.pix-field select:focus-visible {
    outline: 2px solid rgba(235, 12, 39, .18);
    outline-offset: 1px;
    border-color: var(--pix-red);
}

@media (max-width: 600px) {
    .pix-text-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* v1.9 polish: export filename, shortcuts and cleaner mobile actions */
.pix-estimate {
    margin: 10px 0 14px;
    padding: 10px 12px;
    border: 1px solid var(--pix-line);
    color: var(--pix-muted);
    font-size: 12px;
    font-weight: 800;
    background: #fafafa;
}

.pix-background {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pix-background input[type="color"] {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 40px;
    padding: 2px;
    border: 1px solid var(--pix-line);
    background: #ffffff;
}

.pix-background button.is-active {
    color: #ffffff;
    background: var(--pix-red);
    border-color: var(--pix-red);
}

.pix-shortcuts-card {
    width: min(560px, 100%);
}

.pix-shortcuts-list {
    margin: 0;
    display: grid;
    gap: 0;
    border: 1px solid var(--pix-line);
}

.pix-shortcuts-list div {
    display: grid;
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--pix-line);
}

.pix-shortcuts-list div:last-child {
    border-bottom: 0;
}

.pix-shortcuts-list dt,
.pix-shortcuts-list dd {
    margin: 0;
}

.pix-shortcuts-list dt {
    color: var(--pix-black);
    font-weight: 900;
}

.pix-shortcuts-list dd {
    color: var(--pix-muted);
    font-weight: 700;
}

@media (max-width: 600px) {
    .pix-app-actions {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .pix-app-actions .pix-button {
        min-width: 0;
        padding: 0 6px;
        gap: 4px;
        font-size: 11px;
        white-space: nowrap;
    }
    .pix-shortcuts-open {
        font-size: 0 !important;
    }
    .pix-shortcuts-open .pix-icon {
        width: 18px;
        height: 18px;
    }
    .pix-shortcuts-list div {
        grid-template-columns: 1fr;
        gap: 3px;
    }
    .pix-background {
        grid-template-columns: 1fr;
    }
}

/* Simple content pages when WordPress pages are used */
body.pixplet-simple-page{margin:0;background:#fff;color:#111;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;line-height:1.6}.pixplet-page-header,.pixplet-page-footer{padding:18px 24px;border-bottom:1px solid #d8d8d8}.pixplet-page-footer{border-top:1px solid #d8d8d8;border-bottom:0}.pixplet-page-header a,.pixplet-page-footer a{color:#eb0c27;font-weight:800;text-decoration:none}.pixplet-page-main{max-width:920px;margin:0 auto;padding:48px 24px}.pixplet-page-content h1{font-size:clamp(34px,5vw,58px);line-height:1.04;margin:0 0 24px}.pixplet-page-content a{color:#eb0c27}.pixplet-page-content p{font-size:18px;color:#333}

/* v1.1 product UX improvements */
.pix-empty-trust {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 2px;
}

.pix-empty-trust span {
    min-height: 26px;
    padding: 5px 9px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #f1c4ca;
    background: #fff5f6;
    color: var(--pix-red-dark);
    font-size: 12px;
    font-weight: 800;
}

.pix-preset-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin: 14px 0 8px;
}

.pix-preset-tools .pix-filter-select {
    margin: 0;
}

.pix-preset-search {
    display: grid;
    gap: 6px;
    color: var(--pix-muted);
    font-size: 12px;
    font-weight: 800;
}

.pix-preset-search input {
    width: 100%;
    min-height: 40px;
    min-width: 0;
    padding: 0 12px;
    border: 1px solid var(--pix-line);
    background: #ffffff;
    color: var(--pix-black);
    font-weight: 800;
}

.pix-preset-search input:focus,
.pix-preset-search input:focus-visible {
    outline: 2px solid rgba(235, 12, 39, .18);
    outline-offset: 1px;
    border-color: var(--pix-red);
}

.pix-preset-meta {
    min-height: 20px;
    margin: 0 0 8px;
    color: var(--pix-muted);
    font-size: 12px;
    font-weight: 800;
}

.pix-presets-empty {
    padding: 12px;
    border: 1px dashed var(--pix-line);
    color: var(--pix-muted);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.pix-text-templates {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 12px;
}

.pix-text-templates button {
    min-height: 40px;
    padding: 0 8px;
    appearance: none;
    border-radius: 0;
    border: 1px solid var(--pix-line);
    background: #ffffff;
    color: var(--pix-black);
    cursor: pointer;
    font-weight: 800;
}

.pix-text-templates button:hover:not(:disabled) {
    border-color: var(--pix-line-dark);
}

.pix-text-templates button:disabled {
    cursor: not-allowed;
    opacity: .42;
}

.pix-export-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pix-mobile-toolbar {
    display: none;
}

@media (min-width: 1181px) {
    .pix-panel-section[data-panel="resize"] {
        grid-template-rows: auto auto auto auto auto auto minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .pix-app {
        padding-bottom: 66px;
    }

    .pix-mobile-toolbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999998;
        min-height: 62px;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        border-top: 1px solid var(--pix-line);
        background: #ffffff;
        box-shadow: 0 -8px 22px rgba(15, 23, 42, .08);
    }

    .pix-mobile-toolbar button,
    .pix-mobile-toolbar label {
        min-width: 0;
        min-height: 62px;
        padding: 7px 4px 6px;
        display: grid;
        place-items: center;
        gap: 3px;
        appearance: none;
        border: 0;
        border-right: 1px solid var(--pix-line);
        background: #ffffff;
        color: var(--pix-muted);
        cursor: pointer;
        font-size: 11px;
        font-weight: 850;
        text-align: center;
    }

    .pix-mobile-toolbar button:last-child {
        border-right: 0;
    }

    .pix-mobile-toolbar .pix-icon {
        width: 19px;
        height: 19px;
    }

    .pix-mobile-toolbar .is-active,
    .pix-mobile-toolbar button[data-open-export]:not(:disabled) {
        color: var(--pix-red);
        background: #fff5f6;
    }

    .pix-mobile-toolbar button:disabled {
        opacity: .42;
        cursor: not-allowed;
    }

    .pix-shortcuts-open {
        display: none;
    }

    .pix-panel-section[data-panel="resize"] {
        display: block;
        overflow: visible;
    }

    .pix-preset-tools {
        grid-template-columns: 1fr 1fr;
        align-items: end;
    }
}

@media (max-width: 600px) {
    .pix-app-actions {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .pix-app-actions [data-open-shortcuts] {
        display: none;
    }

    .pix-preset-tools,
    .pix-export-grid {
        grid-template-columns: 1fr;
    }

    .pix-empty {
        width: min(360px, 94%);
        padding: 20px 16px;
    }

    .pix-empty strong {
        font-size: 20px;
    }

    .pix-empty-trust {
        gap: 5px;
    }

    .pix-empty-trust span {
        font-size: 11px;
        padding: 4px 7px;
    }

    .pix-text-templates {
        grid-template-columns: 1fr;
    }

    .pix-shapes {
        grid-template-columns: 1fr 1fr;
    }

    .pix-mobile-toolbar button,
    .pix-mobile-toolbar label {
        font-size: 10px;
    }
}

.pix-text-options button.is-active {
    color: #ffffff;
    background: var(--pix-red);
    border-color: var(--pix-red);
}

/* v1.2 Pixplet editor polish: stronger upload state, clean footer modals, safer mobile layout */
body.pixplet-editor-body,
body.pixplet-editor-body .pix-app {
    max-width: 100vw;
    overflow-x: hidden;
}

body.pixplet-editor-body img,
body.pixplet-editor-body canvas,
body.pixplet-editor-body svg {
    max-width: 100%;
}

.pix-stage.is-dragging .pix-empty {
    border-color: var(--pix-red);
    box-shadow: 0 22px 70px rgba(235, 12, 39, .16), inset 0 0 0 2px rgba(235, 12, 39, .08);
    transform: translateY(-2px);
}

.pix-empty {
    position: relative;
    width: min(520px, 94%);
    max-width: 100%;
    padding: 34px 30px 30px;
    gap: 13px;
    overflow: hidden;
    border: 2px dashed #f0a7b0;
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, rgba(235, 12, 39, .12), transparent 38%),
        linear-gradient(180deg, #ffffff 0%, #fff7f8 100%);
    box-shadow: 0 20px 60px rgba(15, 23, 42, .08);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.pix-empty-glow {
    position: absolute;
    inset: auto -38px -54px auto;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: rgba(235, 12, 39, .1);
    pointer-events: none;
}

.pix-empty-icon {
    position: relative;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: var(--pix-red);
    border-radius: 18px;
    box-shadow: 0 14px 28px rgba(235, 12, 39, .28);
}

.pix-empty-icon .pix-icon {
    width: 27px;
    height: 27px;
}

.pix-empty-kicker {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border: 1px solid #ffd7dd;
    border-radius: 999px;
    background: #ffffff;
    color: var(--pix-red-dark);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.pix-empty strong {
    position: relative;
    font-size: clamp(24px, 3.4vw, 34px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.pix-empty p {
    position: relative;
    max-width: 420px;
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 650;
}

.pix-empty-choose {
    position: relative;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    box-shadow: 0 12px 26px rgba(235, 12, 39, .24);
}

.pix-empty-actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
}

.pix-empty-actions span {
    min-height: 28px;
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 850;
}

.pix-empty-trust span {
    border-radius: 999px;
}

.pix-design-group {
    min-width: 0;
    padding: 13px;
    margin-bottom: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
}

.pix-design-group-text {
    background: linear-gradient(180deg, #ffffff 0%, #fff7f8 100%);
    border-color: #ffd7dd;
}

.pix-design-title {
    min-width: 0;
    display: grid;
    gap: 3px;
    margin-bottom: 10px;
}

.pix-design-title span {
    color: var(--pix-black);
    font-size: 14px;
    font-weight: 950;
}

.pix-design-title small {
    color: var(--pix-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.pix-text-templates {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pix-shapes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
}

.pix-color-panel {
    min-width: 0;
    margin: 0 0 14px;
    display: grid;
    gap: 9px;
}

.pix-color-panel p {
    margin: 0;
    color: var(--pix-muted);
    font-size: 12px;
    font-weight: 850;
}

.pix-color-swatches {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 7px;
}

.pix-color-swatches button {
    position: relative;
    min-width: 0;
    height: 38px;
    appearance: none;
    border: 1px solid #d8d8d8;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
}

.pix-color-swatches button::before {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 8px;
    background: var(--swatch, #eb0c27);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .14);
}

.pix-color-swatches button.is-active {
    border-color: var(--pix-red);
    box-shadow: 0 0 0 2px rgba(235, 12, 39, .15);
}

.pix-color-swatches span {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
}

.pix-color-custom {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(86px, .72fr) minmax(0, 1fr);
    gap: 8px;
    align-items: end;
}

.pix-color-picker,
.pix-color-hex {
    min-width: 0;
    display: grid;
    gap: 5px;
    color: var(--pix-muted);
    font-size: 12px;
    font-weight: 850;
}

.pix-color-picker input,
.pix-color-hex input {
    min-width: 0;
    width: 100%;
    height: 40px;
    border: 1px solid var(--pix-line);
    border-radius: 12px;
    padding: 0 10px;
    background: #ffffff;
    color: var(--pix-black);
    font-weight: 850;
}

.pix-color-picker input {
    padding: 3px;
    cursor: pointer;
}

.pix-color-hex input {
    text-transform: lowercase;
}

.pix-color-picker input:focus-visible,
.pix-color-hex input:focus-visible,
.pix-color-swatches button:focus-visible,
.pix-footer-pages button:focus-visible {
    outline: 2px solid rgba(235, 12, 39, .2);
    outline-offset: 2px;
    border-color: var(--pix-red);
}

.pix-export-note {
    margin: 2px 0 12px;
    padding: 10px 12px;
    border: 1px solid #ffd7dd;
    border-radius: 12px;
    background: #fff7f8;
    color: #7f1d1d;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.4;
}

.pix-footer {
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
}

.pix-footer-tools {
    display: none !important;
}

.pix-footer-pages {
    gap: 8px 18px;
}

.pix-footer-pages button {
    min-height: 30px;
    padding: 4px 2px;
    appearance: none;
    border: 0;
    background: transparent;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.pix-footer-pages button:hover,
.pix-footer-pages button:focus-visible {
    color: var(--pix-red);
}

.pix-page-modal-card {
    width: min(560px, 100%);
    border-radius: 18px;
    overflow: hidden;
}

.pix-page-modal-body {
    max-height: min(58vh, 520px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.pix-page-modal-body p {
    margin: 0 0 12px;
    color: #334155;
    font-size: 15px;
    line-height: 1.62;
    font-weight: 400;
}

.pix-page-modal-body p:last-child {
    margin-bottom: 0;
}

.pix-page-modal-body a {
    color: var(--pix-red);
    font-weight: 900;
    text-decoration: none;
}

@media (max-width: 900px) {
    .pix-app {
        padding-bottom: calc(66px + env(safe-area-inset-bottom));
    }

    .pix-mobile-toolbar {
        min-height: calc(62px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
    }

    .pix-stage-card,
    .pix-panel,
    .pix-footer,
    .pix-appbar,
    .pix-main {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .pix-modal {
        padding: 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .pix-modal-card {
        max-width: calc(100vw - 24px);
        max-height: calc(100dvh - 24px - env(safe-area-inset-bottom));
        overflow: hidden;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
    }

    .pix-modal-body {
        min-height: 0;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 600px) {
    .pix-appbar {
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
    }

    .pix-stage-card {
        height: 56vh;
        min-height: 360px;
    }

    .pix-empty {
        width: min(360px, 94%);
        padding: 24px 16px 21px;
        border-radius: 16px;
    }

    .pix-empty-icon {
        width: 54px;
        height: 54px;
        border-radius: 16px;
    }

    .pix-empty p {
        font-size: 13px;
    }

    .pix-empty-actions,
    .pix-empty-trust {
        gap: 5px;
    }

    .pix-empty-actions span,
    .pix-empty-trust span {
        max-width: 100%;
        font-size: 11px;
        padding: 4px 7px;
    }

    .pix-design-group {
        padding: 11px;
        border-radius: 12px;
    }

    .pix-text-templates {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pix-shapes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pix-color-swatches {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pix-footer-pages {
        gap: 5px 12px;
    }

    .pix-footer-pages button {
        font-size: 11px;
        min-height: 28px;
    }
}

@media (max-width: 380px) {
    .pix-app-actions .pix-button {
        font-size: 10px;
        padding-left: 4px;
        padding-right: 4px;
    }

    .pix-mobile-toolbar button,
    .pix-mobile-toolbar label {
        font-size: 9px;
        padding-left: 2px;
        padding-right: 2px;
    }

    .pix-empty strong {
        font-size: 22px;
    }

    .pix-position,
    .pix-layer-actions,
    .pix-shapes,
    .pix-text-options,
    .pix-text-templates {
        grid-template-columns: 1fr;
    }
}


/* v1.2.1 fixes: cleaner text template grid, refined arrow shape and WordPress page modal content */
.pix-text-templates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.pix-text-templates button,
.pix-shapes button {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
    box-sizing: border-box;
}

.pix-text-templates button {
    border-radius: 10px;
}

.pix-shapes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pix-page-modal-body h1,
.pix-page-modal-body h2,
.pix-page-modal-body h3,
.pix-page-modal-body h4 {
    margin: 0 0 12px;
    color: var(--pix-black);
    line-height: 1.16;
    font-weight: 950;
}

.pix-page-modal-body h1 { font-size: 26px; }
.pix-page-modal-body h2 { font-size: 22px; }
.pix-page-modal-body h3 { font-size: 18px; }

.pix-page-modal-body ul,
.pix-page-modal-body ol {
    margin: 0 0 14px 20px;
    padding: 0;
    color: #334155;
    font-size: 15px;
    line-height: 1.55;
    font-weight: 400;
}

.pix-page-modal-body li {
    margin: 0 0 7px;
}

.pix-page-modal-body .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--pix-red);
    color: #ffffff;
    font-weight: 900;
}

@media (max-width: 600px) {
    .pix-text-templates,
    .pix-shapes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 380px) {
    .pix-text-templates,
    .pix-shapes {
        grid-template-columns: 1fr;
    }
}


/* v1.2.2: lighter popup body text and quiet editor notifications */
.pix-page-modal-body,
.pix-page-modal-body p,
.pix-page-modal-body li {
    font-weight: 400;
}
.pix-page-modal-body strong,
.pix-page-modal-body b {
    font-weight: 700;
}
.pix-page-modal-body h1,
.pix-page-modal-body h2,
.pix-page-modal-body h3,
.pix-page-modal-body h4 {
    font-weight: 900;
}
.pix-toast {
    display: none !important;
}


/* v1.3.0 media tools, blank canvas CTA and QR modal */
.pix-empty-cta {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: min(100%, 420px);
}

.pix-empty-helper {
    position: relative;
    display: block;
    margin-top: -2px;
    color: var(--pix-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
}

.pix-empty-blank {
    min-height: 46px;
    border-radius: 999px;
}

.pix-design-group-media {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-color: #dbeafe;
}

.pix-media-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pix-field textarea {
    width: 100%;
    min-height: 112px;
    resize: vertical;
    border: 1px solid var(--pix-line);
    border-radius: 12px;
    padding: 12px 14px;
    background: #ffffff;
    color: var(--pix-black);
    font: inherit;
    line-height: 1.45;
    box-sizing: border-box;
}

.pix-field textarea:focus-visible {
    outline: 2px solid rgba(235, 12, 39, .16);
    outline-offset: 1px;
    border-color: var(--pix-red);
}

@media (max-width: 600px) {
    .pix-empty-cta,
    .pix-media-tools {
        grid-template-columns: 1fr;
    }
}


/* v1.3.2 mobile header cleanup and media layer polish */
@media (max-width: 900px) {
    .pix-appbar {
        min-height: 56px;
        height: 56px;
        padding: 8px 12px;
        justify-content: center;
        gap: 0;
    }

    .pix-brand {
        width: auto;
        justify-content: center;
    }

    .pix-brand img {
        width: 122px;
    }

    .pix-app-actions {
        display: none !important;
    }

    .pix-app {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }

    .pix-footer {
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 600px) {
    .pix-appbar {
        flex-direction: row;
        align-items: center;
    }

    .pix-stage-card {
        min-height: 420px;
    }

    .pix-empty {
        width: min(370px, 94%);
    }
}

.pix-qr-card .pix-export-note {
    margin-top: 10px;
}


/* v1.3.3 background generator and support button */
.pix-design-group-background {
    background: linear-gradient(180deg, #ffffff 0%, #fff7f8 100%);
    border-color: #ffd7dd;
}

.pix-background-presets {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 12px;
}

.pix-background-presets button {
    position: relative;
    min-width: 0;
    min-height: 48px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 13px;
    background: linear-gradient(135deg, var(--bg-a, #eb0c27), var(--bg-b, #111827));
    color: #ffffff;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}

.pix-background-presets button::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(15, 23, 42, .22));
    pointer-events: none;
}

.pix-background-presets button span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 900;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .28);
}

.pix-background-presets button:hover:not(:disabled),
.pix-background-presets button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .14), inset 0 0 0 1px rgba(255, 255, 255, .25);
}

.pix-background-presets button:disabled {
    cursor: not-allowed;
    opacity: .5;
    transform: none;
}

.pix-gradient-custom {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
}

.pix-gradient-custom label {
    min-width: 0;
    display: grid;
    gap: 5px;
    color: var(--pix-muted);
    font-size: 12px;
    font-weight: 850;
}

.pix-gradient-custom input[type="color"],
.pix-gradient-custom select {
    min-width: 0;
    width: 100%;
    height: 42px;
    border: 1px solid var(--pix-line);
    border-radius: 12px;
    background: #ffffff;
    color: var(--pix-black);
    font: inherit;
    font-weight: 850;
    box-sizing: border-box;
}

.pix-gradient-custom input[type="color"] {
    padding: 4px;
}

.pix-gradient-custom .pix-button {
    grid-column: 1 / -1;
    margin-top: 2px;
}

.pix-buy-coffee {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.pix-buy-coffee a {
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    background: #ffdd00;
    border: 1px solid #ffdd00;
    border-radius: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.pix-buy-coffee a:hover,
.pix-buy-coffee a:focus-visible {
    background: #ffdd00;
    border-color: #ffdd00;
    outline: none;
}

.pix-buy-coffee img {
    display: block;
    max-width: 100%;
}

@media (max-width: 600px) {
    .pix-background-presets,
    .pix-gradient-custom {
        grid-template-columns: 1fr;
    }
}


/* v1.3.4 mobile UX refinement: compact upload state, no nested preset scrolling, full-width gradient style field */
.pix-gradient-custom .pix-bg-style-field {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .pix-presets {
        max-height: none;
        overflow: visible;
        padding-right: 0;
        -webkit-overflow-scrolling: auto;
        overscroll-behavior: auto;
    }

    .pix-preset-tools {
        position: sticky;
        top: 52px;
        z-index: 4;
        margin: 10px -12px 8px;
        padding: 10px 12px 9px;
        background: #ffffff;
        border-bottom: 1px solid var(--pix-line);
        box-shadow: 0 10px 20px rgba(15, 23, 42, .04);
    }

    .pix-presets {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .pix-preset {
        min-height: 62px;
        padding: 9px 11px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "platform dim"
            "name dim";
        gap: 2px 10px;
        align-items: center;
    }

    .pix-preset span {
        grid-area: platform;
        font-size: 11px;
        min-width: 0;
    }

    .pix-preset strong {
        grid-area: name;
        min-height: 0;
        max-height: none;
        min-width: 0;
        font-size: 13px;
        line-height: 1.22;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .pix-preset em {
        grid-area: dim;
        margin-top: 0;
        align-self: center;
        justify-self: end;
        white-space: nowrap;
        font-size: 12px;
        color: #475569;
    }
}

@media (max-width: 600px) {
    .pix-stage-card {
        height: min(56vh, 390px);
        min-height: 350px;
        grid-template-rows: auto minmax(0, 1fr) 28px;
    }

    .pix-stage-head {
        padding: 7px 10px;
        gap: 7px;
    }

    .pix-stage {
        padding: 8px 10px;
    }

    .pix-history {
        top: 8px;
        right: 8px;
    }

    .pix-preview-zoom {
        top: 8px;
        left: 8px;
        gap: 4px;
    }

    .pix-history button,
    .pix-preview-zoom button {
        width: 32px;
        min-width: 32px;
        height: 30px;
        padding: 0 7px;
    }

    .pix-preview-zoom-label {
        min-width: 48px !important;
        font-size: 11px;
    }

    .pix-empty {
        width: min(352px, 94%);
        padding: 15px 14px 14px;
        gap: 7px;
        border-radius: 15px;
        box-shadow: 0 14px 36px rgba(15, 23, 42, .07);
    }

    .pix-empty-icon {
        width: 46px;
        height: 46px;
        border-radius: 14px;
        box-shadow: 0 10px 22px rgba(235, 12, 39, .22);
    }

    .pix-empty-icon .pix-icon {
        width: 21px;
        height: 21px;
    }

    .pix-empty-kicker {
        min-height: 22px;
        padding: 3px 8px;
        font-size: 10px;
        letter-spacing: .035em;
    }

    .pix-empty strong {
        font-size: clamp(20px, 6.1vw, 24px);
        line-height: 1.06;
        letter-spacing: -.035em;
    }

    .pix-empty p {
        max-width: 300px;
        font-size: 12px;
        line-height: 1.34;
        font-weight: 650;
    }

    .pix-empty-cta {
        width: min(100%, 330px);
        gap: 7px;
    }

    .pix-empty-choose,
    .pix-empty-blank {
        min-height: 40px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .pix-empty-helper {
        max-width: 300px;
        margin-top: 0;
        font-size: 11px;
        line-height: 1.35;
    }

    .pix-empty-actions,
    .pix-empty-trust {
        display: none !important;
    }

    .pix-preset-tools {
        grid-template-columns: 1fr;
        top: 52px;
        gap: 8px;
    }

    .pix-preset-meta {
        margin-bottom: 6px;
    }

    .pix-background-presets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pix-gradient-custom {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pix-gradient-custom .pix-bg-style-field,
    .pix-gradient-custom .pix-button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 380px) {
    .pix-stage-card {
        min-height: 330px;
    }

    .pix-empty {
        width: min(330px, 95%);
        padding: 13px 12px 12px;
        gap: 6px;
    }

    .pix-empty p,
    .pix-empty-helper {
        font-size: 10.8px;
    }

    .pix-empty-choose,
    .pix-empty-blank {
        min-height: 38px;
    }

    .pix-preset {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "platform"
            "name"
            "dim";
    }

    .pix-preset em {
        justify-self: start;
    }
}

/* v1.3.5 UX fixes: practical preview header, layer controls at panel top, iPhone-friendly mobile preview */
.pix-stage-actions {
    min-width: 0;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.pix-stage-actions .pix-button {
    min-height: 36px;
    padding: 0 12px;
    white-space: nowrap;
    text-align: center;
}

.pix-panel-body {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.pix-layer-box {
    min-width: 0;
    border: 1px solid #ffd7dd;
    border-radius: 14px;
    padding: 13px;
    margin: 14px 16px 0;
    background: linear-gradient(180deg, #ffffff 0%, #fff7f8 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

.pix-layer-box + .pix-panel-section {
    padding-top: 14px;
}

.pix-layer-box .pix-control {
    margin: 13px 0;
}

.pix-layer-box .pix-field-full:last-child,
.pix-layer-box .pix-layer-actions:last-child {
    margin-bottom: 0;
}

@media (max-width: 1180px) {
    .pix-layer-box {
        margin-left: 12px;
        margin-right: 12px;
    }
}

@media (max-width: 900px) {
    .pix-panel-body {
        display: block;
    }

    .pix-stage-head {
        align-items: stretch;
    }

    .pix-stage-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .pix-stage-actions .pix-button {
        width: 100%;
        min-width: 0;
        padding: 0 8px;
        font-size: 12px;
        gap: 5px;
    }

    .pix-layer-box {
        margin: 0;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        box-shadow: none;
    }
}

@media (max-width: 600px) {
    .pix-app.is-empty .pix-stage-card {
        height: auto !important;
        min-height: 0 !important;
        grid-template-rows: auto auto 28px;
    }

    .pix-app.is-empty .pix-stage {
        min-height: 0;
        height: auto;
        padding: 10px;
        overflow: visible;
    }

    .pix-app.has-image .pix-stage-card {
        height: min(54vh, 420px);
        min-height: 330px;
    }

    .pix-app.is-empty .pix-history,
    .pix-app.is-empty .pix-preview-zoom {
        display: none;
    }

    .pix-app.is-empty .pix-empty {
        width: min(340px, 94%);
        padding: 15px 14px;
        gap: 8px;
    }

    .pix-app.is-empty .pix-empty-icon,
    .pix-app.is-empty .pix-empty-kicker {
        display: none;
    }

    .pix-app.is-empty .pix-empty strong {
        font-size: 22px;
    }

    .pix-app.is-empty .pix-empty p {
        max-width: 300px;
        font-size: 12px;
        line-height: 1.35;
    }

    .pix-app.is-empty .pix-empty-helper {
        max-width: 300px;
        font-size: 11px;
        line-height: 1.3;
    }

    .pix-app.is-empty .pix-empty-choose,
    .pix-app.is-empty .pix-empty-blank {
        min-height: 39px;
    }

    .pix-stage-actions {
        gap: 6px;
    }

    .pix-stage-actions .pix-button {
        min-height: 35px;
        padding: 0 6px;
        font-size: 11px;
    }
}

@media (max-width: 380px) {
    .pix-stage-actions .pix-button {
        font-size: 10px;
        gap: 4px;
    }

    .pix-stage-actions .pix-icon {
        width: 14px;
        height: 14px;
    }
}

/* v1.3.6 mobile rhythm and smoother touch editing */
.pix-canvas {
    transform: translateZ(0);
    backface-visibility: hidden;
}

@media (max-width: 600px) {
    .pix-app.is-empty .pix-stage-card {
        grid-template-rows: auto auto 32px;
    }

    .pix-app.is-empty .pix-stage {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .pix-app.is-empty .pix-empty {
        margin-top: 8px;
        margin-bottom: 8px;
    }
}

@media (max-width: 380px) {
    .pix-app.is-empty .pix-stage {
        padding-top: 17px;
        padding-bottom: 17px;
    }

    .pix-app.is-empty .pix-empty {
        margin-top: 6px;
        margin-bottom: 6px;
    }
}



/* v1.4.0 preview zoom viewport, pan mode and layer color picker */
.pix-canvas {
    flex: 0 0 auto;
    cursor: default;
}

.pix-stage.is-preview-zoomed .pix-canvas-viewport {
    display: block;
    padding: 58px 28px 28px;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.pix-stage.is-preview-zoomed .pix-canvas {
    margin: 0 auto;
    cursor: default;
}

.pix-stage.is-pan-mode .pix-canvas {
    cursor: grab;
}

.pix-stage.is-pan-mode .pix-canvas:active {
    cursor: grabbing;
}

.pix-stage.is-preview-zoomed .pix-preview-zoom,
.pix-stage.is-preview-zoomed .pix-history {
    position: absolute;
}

@media (max-width: 600px) {
    .pix-stage.is-preview-zoomed .pix-canvas-viewport {
        padding: 54px 18px 24px;
    }
}

/* v1.3.8 preview zoom controls */
@media (max-width: 380px) {
    .pix-preview-zoom button {
        min-width: 30px;
        width: 30px;
        height: 28px;
        padding: 0 6px;
    }

    .pix-preview-zoom-label {
        min-width: 44px !important;
        font-size: 10px;
    }
}


@media (max-width: 420px) {
    .pix-color-custom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .pix-canvas-viewport {
        padding: 8px 10px;
    }
}


/* v1.4.2 fixed preview zoom as a centered scrollable viewport. Do not force canvas width/height in CSS because JS sets the working preview size. */
.pix-app .pix-canvas {
    max-width: none !important;
    max-height: none !important;
    flex: 0 0 auto !important;
}

.pix-canvas-viewport {
    padding: 0 !important;
}

.pix-stage.is-preview-zoomed .pix-canvas-viewport {
    display: block !important;
    padding: 0 !important;
    overflow: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.pix-stage.is-preview-zoomed .pix-canvas {
    max-width: none !important;
    max-height: none !important;
    margin: 0;
}

.pix-stage.is-preview-zoomed .pix-canvas-wrap,
.pix-canvas-wrap {
    display: grid;
    place-items: center;
    box-sizing: border-box;
}


/* v1.4.4 mobile zoom first-step fix: the zoomed canvas must not jump down at 125%. */
.pix-stage.is-preview-zoomed .pix-canvas-wrap,
.pix-canvas-wrap {
    align-items: center;
    justify-items: center;
}

.pix-stage.is-preview-zoomed .pix-canvas-viewport {
    scrollbar-width: thin;
}


/* v1.5.0 layer lock, clean single block */
.pix-layer-actions > .pix-layer-lock-action {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-height: 48px;
    padding: 0 14px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid #111827;
    background: #ffffff;
    color: #111827;
    font-weight: 900;
    text-align: center;
}

.pix-layer-actions > .pix-layer-lock-action:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #111827;
}

.pix-layer-actions > .pix-layer-lock-action.is-active {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}

.pix-layer-actions > .pix-layer-lock-action.is-active:hover:not(:disabled) {
    background: #0f172a;
}

.pix-layer-lock-icon,
.pix-layer-lock-icon .pix-icon {
    width: 17px;
    height: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pix-layer-lock-icon[hidden] {
    display: none !important;
}

.pix-layer-box.is-layer-locked .pix-layer-title {
    color: #111827;
}

.pix-layer-box.is-layer-locked [data-layer-edit] {
    opacity: .48;
}

.pix-layer-box.is-layer-locked [data-layer-edit],
.pix-layer-box.is-layer-locked [data-layer-edit] * {
    cursor: not-allowed !important;
}


/* v1.5.14 clean under-canvas ads and tablet fit.
   The large and compact ad areas are separate admin fields. The compact slot is a fixed 300 x 50 area and is clipped so an external ad cannot push into the canvas. */
.pix-ad-slot {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    overflow: hidden;
}

.pix-ad-slot-under-canvas {
    width: 100%;
    min-height: 106px;
    padding: 8px 16px;
    border-top: 1px solid var(--pix-line);
}

.pix-ad-frame {
    position: relative;
    flex: 0 0 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden !important;
    background: #ffffff;
    line-height: 1;
}

.pix-ad-frame-large {
    width: 728px;
    height: 90px;
    max-width: 100%;
}

.pix-ad-frame-compact {
    width: 300px;
    height: 50px;
    max-width: calc(100vw - 20px);
    display: none;
}

.pix-ad-frame > *,
.pix-ad-frame ins,
.pix-ad-frame iframe {
    max-width: 100% !important;
    max-height: 100% !important;
}

.pix-ad-frame ins.adsbygoogle,
.pix-ad-frame iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    display: block !important;
}

.pix-ad-inner {
    width: 100%;
    height: 100%;
    min-width: 0;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
    overflow: hidden;
}

.pix-ad-inner strong {
    color: #334155;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: none;
}

.pix-preview-zoom button[data-preview-pan]:disabled {
    opacity: .38;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .pix-ad-slot-under-canvas {
        min-height: 62px;
        height: 62px;
        padding: 6px 10px;
        box-sizing: border-box;
        flex: 0 0 62px;
    }

    .pix-ad-frame-large {
        display: none;
    }

    .pix-ad-frame-compact {
        display: flex;
    }
}

@media (min-width: 901px) and (max-width: 1600px), (min-width: 901px) and (max-height: 860px) {
    .pix-appbar {
        height: 54px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .pix-brand img {
        width: 108px;
    }

    .pix-app-actions .pix-button {
        min-height: 34px;
        padding-left: 11px;
        padding-right: 11px;
    }

    .pix-stage {
        padding: 12px;
    }

    .pix-canvas-viewport,
    .pix-canvas-wrap {
        padding: 12px;
    }

    .pix-app.is-empty .pix-empty {
        width: min(480px, 92%);
        padding: 22px 22px 20px;
        gap: 8px;
    }

    .pix-app.is-empty .pix-empty-icon {
        width: 50px;
        height: 50px;
        border-radius: 14px;
    }

    .pix-app.is-empty .pix-empty-icon .pix-icon {
        width: 22px;
        height: 22px;
    }

    .pix-app.is-empty .pix-empty strong {
        font-size: clamp(23px, 2.3vw, 29px);
    }

    .pix-app.is-empty .pix-empty p {
        max-width: 390px;
        font-size: 13px;
        line-height: 1.38;
    }

    .pix-app.is-empty .pix-empty-choose,
    .pix-app.is-empty .pix-empty-blank {
        min-height: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .pix-app.is-empty .pix-empty-helper {
        max-width: 390px;
        font-size: 11.5px;
        line-height: 1.35;
    }

    .pix-app.is-empty .pix-empty-actions,
    .pix-app.is-empty .pix-empty-trust {
        display: none !important;
    }
}

@media (min-width: 901px) and (max-width: 1180px), (min-width: 901px) and (max-height: 760px) {
    .pix-appbar {
        height: 50px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .pix-brand img {
        width: 100px;
    }

    .pix-app-actions {
        gap: 5px;
    }

    .pix-app-actions .pix-button {
        min-height: 32px;
        padding-left: 9px;
        padding-right: 9px;
        gap: 5px;
        font-size: 12px;
    }

    .pix-stage {
        padding: 8px;
    }

    .pix-canvas-viewport,
    .pix-canvas-wrap {
        padding: 8px;
    }

    .pix-app.is-empty .pix-empty {
        width: min(440px, 92%);
        padding: 18px 18px 17px;
        gap: 7px;
    }

    .pix-app.is-empty .pix-empty-icon,
    .pix-app.is-empty .pix-empty-kicker {
        display: none;
    }

    .pix-app.is-empty .pix-empty strong {
        font-size: 23px;
    }

    .pix-app.is-empty .pix-empty p {
        font-size: 12.5px;
        line-height: 1.32;
    }
}

@media (max-width: 900px) {
    .pix-app {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }

    .pix-mobile-toolbar {
        bottom: 0;
    }

    .pix-stage-card {
        grid-template-rows: auto minmax(0, 1fr) auto 32px;
    }

    .pix-app.has-image .pix-stage-head {
        min-height: 0;
        padding: 8px 10px;
    }

    .pix-app.has-image .pix-stage-head {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 7px;
    }

    .pix-app.has-image .pix-file-summary {
        display: grid;
        gap: 0;
        width: 100%;
        text-align: left;
    }

    .pix-app.has-image .pix-file-summary strong {
        display: block;
        font-size: 13px;
        line-height: 1.2;
    }

    .pix-app.has-image .pix-file-summary span {
        display: none;
    }

    .pix-app.has-image .pix-stage-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .pix-appbar {
        height: 54px;
        min-height: 54px;
        padding: 8px 14px;
    }

    .pix-brand img {
        width: 108px;
    }

    .pix-app-actions {
        gap: 6px;
    }

    .pix-app-actions .pix-button {
        min-height: 34px;
        padding: 0 9px;
        gap: 5px;
        font-size: 12px;
    }

    .pix-stage-card {
        height: calc(100dvh - 124px);
        min-height: 560px;
        max-height: 740px;
        grid-template-rows: auto minmax(365px, 1fr) 62px 32px;
    }

    .pix-stage-head {
        min-height: 54px;
        padding: 8px 12px;
        display: grid;
        grid-template-columns: minmax(150px, 230px) minmax(0, 1fr);
        align-items: center;
        gap: 10px;
    }

    .pix-app.has-image .pix-stage-head {
        display: grid;
        grid-template-columns: minmax(150px, 230px) minmax(0, 1fr);
        align-items: center;
        gap: 10px;
    }

    .pix-file-summary {
        gap: 0;
    }

    .pix-file-summary strong {
        font-size: 13px;
        line-height: 1.18;
    }

    .pix-file-summary span {
        font-size: 12px;
        line-height: 1.25;
    }

    .pix-stage-actions {
        min-width: 0;
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .pix-stage-actions .pix-button {
        width: 100%;
        min-height: 36px;
        padding: 0 8px;
        font-size: 12px;
    }

    .pix-stage {
        padding: 10px;
    }

    .pix-history {
        top: 10px;
        right: 10px;
    }

    .pix-preview-zoom {
        top: 10px;
        left: 10px;
    }

    .pix-app.is-empty .pix-empty {
        width: min(560px, 90%);
        padding: 20px 22px 18px;
        gap: 8px;
    }

    .pix-app.is-empty .pix-empty-icon,
    .pix-app.is-empty .pix-empty-actions,
    .pix-app.is-empty .pix-empty-trust {
        display: none !important;
    }

    .pix-app.is-empty .pix-empty strong {
        font-size: clamp(26px, 4vw, 32px);
    }

    .pix-app.is-empty .pix-empty p {
        max-width: 440px;
        font-size: 14px;
        line-height: 1.35;
    }

    .pix-app.is-empty .pix-empty-choose,
    .pix-app.is-empty .pix-empty-blank {
        min-height: 40px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .pix-app.is-empty .pix-empty-helper {
        max-width: 430px;
        font-size: 12px;
        line-height: 1.35;
    }
}

@media (max-width: 600px) {
    .pix-app.has-image .pix-stage-card {
        height: min(58vh, 450px);
        min-height: 360px;
    }

    .pix-app.has-image .pix-stage-actions .pix-button {
        min-height: 36px;
        padding: 0 6px;
        font-size: 11px;
    }
}


/* v1.5.14 fixes: desktop keeps the 728 x 90 ad, compact ad gets its own reserved row below 901px, and the real mobile layout starts at 600px. */
@media (min-width: 901px) {
    .pix-ad-slot-under-canvas {
        min-height: 106px;
        height: 106px;
        padding: 8px 16px;
        box-sizing: border-box;
        flex: 0 0 106px;
    }

    .pix-ad-frame-large {
        display: flex;
    }

    .pix-ad-frame-compact {
        display: none;
    }
}

/* v1.5.14: below 601px the editor now uses the same mobile layout instead of a separate 561-600px bridge state. */


@media (max-width: 600px) {
    .pix-ad-slot-under-canvas {
        width: 100%;
        min-height: 62px;
        height: 62px;
        padding: 6px 10px;
        box-sizing: border-box;
        flex: 0 0 62px;
        position: relative;
        z-index: 0;
        margin: 0;
    }

    .pix-app.is-empty .pix-stage-card {
        grid-template-rows: auto auto 62px 32px !important;
    }
}

/* v1.5.14 clean desktop toolbar. Old desktop toolbar overrides were removed so the panel has one source of truth. Mobile under 901px is intentionally kept on the original layer panel. */
@media (min-width: 901px) {
    .pix-stage-head {
        display: none;
    }

    .pix-stage-card {
        overflow: visible;
        grid-template-rows: 56px minmax(0, 1fr) auto 32px;
    }

    .pix-stage-layer-slot {
        position: relative;
        z-index: 50;
        display: block;
        height: 56px;
        min-height: 56px;
        overflow: visible;
        background: #ffffff;
        border-bottom: 1px solid var(--pix-line);
    }

    .pix-stage-layer-slot:empty {
        display: block;
    }

    .pix-stage-layer-slot .pix-layer-box[hidden] {
        display: flex !important;
    }

    .pix-panel-layer-slot {
        display: none;
    }

    .pix-stage-layer-slot .pix-layer-box {
        position: relative;
        width: 100%;
        height: 56px;
        min-height: 56px;
        max-height: 56px;
        margin: 0;
        padding: 8px 12px;
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        overflow: visible;
        white-space: nowrap;
        border: 0;
        border-radius: 0;
        background: #ffffff;
        box-shadow: none;
    }

    .pix-stage-layer-slot .pix-layer-box.is-empty-selection {
        background: linear-gradient(90deg, #ffffff 0%, #fff8f9 100%);
    }

    .pix-stage-layer-slot .pix-layer-title.pix-toolbar-status {
        flex: 1 1 auto;
        min-width: 86px;
        max-width: 220px;
        margin: 0 auto 0 0;
        padding: 0;
        display: block !important;
        overflow: hidden;
        color: var(--pix-black);
        font-size: 12px;
        font-weight: 850;
        line-height: 1.2;
        letter-spacing: 0;
        text-transform: none;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pix-stage-layer-slot .pix-layer-box.is-empty-selection .pix-layer-title.pix-toolbar-status {
        max-width: none;
        color: #64748b;
        font-weight: 800;
    }

    .pix-toolbar-menu {
        position: relative;
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        min-width: 0;
    }

    .pix-toolbar-menu-button {
        height: 38px;
        min-width: 38px;
        padding: 0 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        appearance: none;
        border: 1px solid #dfe4eb;
        border-radius: 11px;
        background: #ffffff;
        color: #101827;
        cursor: pointer;
        font-size: 13px;
        font-weight: 850;
        line-height: 1;
        box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
        transition: border-color .14s ease, background .14s ease, color .14s ease, box-shadow .14s ease, transform .14s ease;
    }

    .pix-toolbar-menu-button:hover:not(:disabled),
    .pix-toolbar-menu.is-open .pix-toolbar-menu-button {
        border-color: var(--pix-red);
        background: #fff5f6;
        color: var(--pix-red-dark);
        box-shadow: 0 8px 22px rgba(235, 12, 39, .10);
    }

    .pix-toolbar-menu-button:disabled {
        opacity: .38;
        cursor: not-allowed;
        background: #ffffff;
        color: #94a3b8;
        border-color: #e5e7eb;
        box-shadow: none;
    }

    .pix-toolbar-icon {
        width: 20px;
        height: 20px;
        flex: 0 0 20px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 7px;
        background: #fff1f3;
        color: var(--pix-red);
        font-size: 12px;
        font-weight: 950;
        line-height: 20px;
    }

    .pix-toolbar-menu-button:disabled .pix-toolbar-icon {
        background: #f3f4f6;
        color: #94a3b8;
    }

    .pix-toolbar-menu-label {
        height: 22px;
        display: inline-flex;
        align-items: center;
        line-height: 22px;
    }

    .pix-toolbar-menu-value {
        height: 22px;
        min-height: 22px;
        max-width: 82px;
        padding: 0 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        border: 1px solid transparent;
        border-radius: 999px;
        background: #f5f7fa;
        color: #64748b;
        box-sizing: border-box;
        font-size: 11px;
        font-weight: 850;
        line-height: 22px;
        text-overflow: ellipsis;
        white-space: nowrap;
        transform: none;
    }

    .pix-toolbar-menu-value:empty {
        display: none;
    }

    .pix-toolbar-menu-value.is-color-value {
        min-width: 74px;
        box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .10), 0 1px 0 rgba(15, 23, 42, .04);
    }

    .pix-toolbar-menu[data-toolbar-menu="color"] .pix-toolbar-icon {
        color: transparent;
        background: var(--pix-toolbar-current-color, #eb0c27);
        box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .14);
    }

    .pix-toolbar-menu[data-toolbar-menu="color"] .pix-toolbar-icon::after {
        content: "";
        width: 7px;
        height: 7px;
        display: block;
        border-radius: 999px;
        background: rgba(255, 255, 255, .92);
        box-shadow: 0 0 0 1px rgba(15, 23, 42, .12);
    }

    .pix-toolbar-menu-panel {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        z-index: 90;
        width: min(320px, calc(100vw - 32px));
        display: none;
        padding: 12px;
        border: 1px solid #dfe4eb;
        border-radius: 16px;
        background: #ffffff;
        box-shadow: 0 18px 44px rgba(15, 23, 42, .17);
        white-space: normal;
    }

    .pix-toolbar-menu.is-open .pix-toolbar-menu-panel {
        display: grid;
        gap: 10px;
    }

    .pix-toolbar-menu[data-toolbar-menu="color"] .pix-toolbar-menu-panel,
    .pix-toolbar-menu[data-toolbar-menu="size"] .pix-toolbar-menu-panel,
    .pix-toolbar-menu[data-toolbar-menu="opacity"] .pix-toolbar-menu-panel,
    .pix-toolbar-menu[data-toolbar-menu="layer"] .pix-toolbar-menu-panel {
        right: 0;
        left: auto;
    }

    .pix-toolbar-menu[data-toolbar-menu="text"] .pix-toolbar-menu-panel {
        width: min(330px, calc(100vw - 32px));
    }

    .pix-toolbar-menu[data-toolbar-menu="color"] .pix-toolbar-menu-panel {
        width: min(300px, calc(100vw - 32px));
    }

    .pix-toolbar-menu[data-toolbar-menu="size"] .pix-toolbar-menu-panel,
    .pix-toolbar-menu[data-toolbar-menu="opacity"] .pix-toolbar-menu-panel {
        width: min(260px, calc(100vw - 32px));
    }

    .pix-toolbar-menu[data-toolbar-menu="layer"] .pix-toolbar-menu-panel {
        width: min(258px, calc(100vw - 32px));
        padding: 12px;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-field,
    .pix-stage-layer-slot .pix-toolbar-menu-panel [data-text-field],
    .pix-stage-layer-slot .pix-toolbar-menu-panel [data-font-field] {
        width: 100%;
        max-width: none;
        flex: none;
        display: grid;
        gap: 5px;
        margin: 0;
        color: #64748b;
        font-size: 12px;
        font-weight: 850;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-field input,
    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-field select {
        width: 100%;
        height: 38px;
        min-height: 38px;
        padding: 0 10px;
        border: 1px solid #dfe4eb;
        border-radius: 9px;
        background: #ffffff;
        color: #101827;
        font-size: 13px;
        font-weight: 750;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-color-panel {
        width: 100%;
        flex: none;
        display: grid;
        grid-template-columns: 1fr;
        gap: 9px;
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-color-panel > p,
    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-control label {
        margin: 0;
        color: #64748b;
        font-size: 12px;
        line-height: 1.2;
        font-weight: 850;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-color-swatches {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 7px;
        margin: 0;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-color-swatches button {
        width: 100%;
        height: 34px;
        min-height: 34px;
        padding: 0;
        border-radius: 10px;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-color-swatches button span {
        display: none;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-color-custom {
        display: grid;
        grid-template-columns: 50px minmax(0, 1fr);
        gap: 8px;
        margin: 0;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-color-picker,
    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-color-hex {
        display: grid !important;
        gap: 4px;
        color: #64748b;
        font-size: 11px;
        font-weight: 850;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-color-picker input {
        width: 50px;
        height: 38px;
        min-height: 38px;
        padding: 2px;
        border-radius: 9px;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-color-hex input {
        width: 100%;
        height: 38px;
        min-height: 38px;
        padding: 0 10px;
        border-radius: 9px;
        font-size: 13px;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-text-options {
        width: 100%;
        flex: none;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 7px;
        margin: 0;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-text-options button {
        width: 100%;
        min-width: 0;
        min-height: 36px;
        padding: 0 8px;
        border-radius: 9px;
        font-size: 12px;
        font-weight: 850;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-text-options button::after {
        content: none !important;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-control {
        width: 100%;
        flex: none;
        display: grid;
        gap: 10px;
        margin: 0;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-control label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-control strong {
        color: #101827;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-control input[type="range"] {
        width: 100%;
        height: 24px;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-layer-actions {
        width: 100%;
        flex: none;
        display: grid;
        grid-template-columns: repeat(5, 38px);
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin: 0;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-layer-actions::before {
        content: "Arrange layer";
        grid-column: 1 / -1;
        margin: 0 0 2px;
        color: #475569;
        font-size: 12px;
        font-weight: 850;
        line-height: 1.2;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-layer-actions button {
        min-width: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        line-height: 1;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-layer-actions button:not([data-layer-lock]) {
        width: 38px;
        height: 38px;
        min-height: 38px;
        padding: 0;
        border-color: #dfe4eb;
        background: #ffffff;
        color: #111827;
        font-size: 0 !important;
        box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-layer-actions button:not([data-layer-lock])::before {
        content: "" !important;
        width: 18px;
        height: 18px;
        display: block;
        margin: 0;
        background-color: currentColor;
        -webkit-mask: var(--pix-layer-action-icon) center / 18px 18px no-repeat;
        mask: var(--pix-layer-action-icon) center / 18px 18px no-repeat;
        transform: none;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-layer-actions button[data-layer-up] {
        --pix-layer-action-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12%2019V5%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222.3%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22m6.5%2010.5%205.5-5.5%205.5%205.5%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222.3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-layer-actions button[data-layer-down] {
        --pix-layer-action-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12%205v14%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222.3%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22m17.5%2013.5-5.5%205.5-5.5-5.5%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222.3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-layer-actions button[data-layer-center] {
        --pix-layer-action-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12%204v3M12%2017v3M4%2012h3M17%2012h3%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222.2%22%20stroke-linecap%3D%22round%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%223%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222.2%22%2F%3E%3C%2Fsvg%3E");
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-layer-actions button[data-layer-duplicate] {
        --pix-layer-action-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Crect%20x%3D%228%22%20y%3D%228%22%20width%3D%2211%22%20height%3D%2211%22%20rx%3D%221.8%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222.2%22%2F%3E%3Crect%20x%3D%225%22%20y%3D%225%22%20width%3D%2211%22%20height%3D%2211%22%20rx%3D%221.8%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222.2%22%2F%3E%3C%2Fsvg%3E");
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-layer-actions button[data-layer-delete] {
        --pix-layer-action-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22m7%207%2010%2010M17%207%207%2017%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222.7%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E");
        grid-column: auto;
        border-color: #fecdd3;
        background: #fff7f8;
        color: var(--pix-red);
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-layer-actions button:not([data-layer-lock]):hover:not(:disabled) {
        border-color: var(--pix-red);
        background: #fff5f6;
        color: var(--pix-red-dark);
        transform: translateY(-1px);
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-layer-actions button[data-layer-lock] {
        grid-column: 1 / -1;
        width: 100%;
        height: 40px;
        min-height: 40px;
        margin-top: 4px;
        padding: 0 12px;
        gap: 8px;
        border-color: #dfe4eb;
        border-radius: 12px;
        background: #f8fafc;
        color: #111827;
        font-size: 12px;
        font-weight: 850;
        box-shadow: none;
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-layer-actions button[data-layer-lock]:hover:not(:disabled) {
        border-color: var(--pix-red);
        background: #fff5f6;
        color: var(--pix-red-dark);
    }

    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-layer-lock-icon,
    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-layer-lock-icon svg,
    .pix-stage-layer-slot .pix-toolbar-menu-panel .pix-layer-lock-icon .pix-icon {
        width: 14px;
        height: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .pix-layer-box.is-toolbar-compact .pix-layer-title.pix-toolbar-status {
        max-width: 170px;
        font-size: 11px;
    }

    .pix-layer-box.is-toolbar-compact .pix-toolbar-menu-value {
        display: none;
    }

    .pix-layer-box.is-toolbar-compact .pix-toolbar-menu-button {
        padding: 0 9px;
    }

    .pix-layer-box.is-toolbar-icons-only .pix-layer-title.pix-toolbar-status {
        max-width: 130px;
        font-size: 11px;
    }

    .pix-layer-box.is-toolbar-icons-only .pix-toolbar-menu-button {
        width: 38px;
        min-width: 38px;
        padding: 0;
        gap: 0;
    }

    .pix-layer-box.is-toolbar-icons-only .pix-toolbar-menu-label,
    .pix-layer-box.is-toolbar-icons-only .pix-toolbar-menu-value {
        display: none;
    }

    .pix-layer-box.is-toolbar-tiny .pix-layer-title.pix-toolbar-status {
        display: none !important;
    }
}

@media (max-width: 900px) {
    .pix-stage-layer-slot {
        display: none;
    }
}

/* v1.5.15 top action cleanup: remove preview text and use one framed action style across desktop, tablet and mobile. */
.pix-file-summary[hidden],
.pix-file-summary.is-hidden {
    display: none !important;
}

.pix-button {
    line-height: 1;
}

.pix-button .pix-icon {
    width: 17px;
    height: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 17px;
    margin: 0;
    transform: none;
}

.pix-button .pix-icon svg {
    display: block;
}

.pix-app-actions .pix-button:not(.pix-button-primary),
.pix-stage-actions .pix-button {
    min-height: 38px;
    border: 1px solid var(--pix-line);
    border-radius: 0 !important;
    background: #ffffff;
    color: var(--pix-black);
    box-shadow: none;
}

.pix-app-actions .pix-button-ghost,
.pix-stage-actions .pix-button-ghost,
.pix-app-actions [data-open-layer-image],
.pix-stage-actions [data-open-layer-image] {
    border-color: var(--pix-line) !important;
    background: #ffffff;
    color: var(--pix-black);
}

.pix-app-actions [data-create-blank] {
    min-height: 38px;
    border-radius: 0 !important;
}

.pix-app-actions .pix-button:not(.pix-button-primary):hover:not(:disabled),
.pix-stage-actions .pix-button:hover:not(:disabled) {
    border-color: var(--pix-line-dark);
    background: #fbfdff;
}

.pix-app-actions .pix-button:disabled,
.pix-stage-actions .pix-button:disabled {
    opacity: .42;
}

.pix-stage-head {
    justify-content: flex-end;
}

.pix-stage-actions {
    flex: 1 1 auto;
    justify-content: flex-end;
}

@media (min-width: 601px) and (max-width: 900px) {
    .pix-stage-head,
    .pix-app.has-image .pix-stage-head {
        min-height: 52px;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: center;
        gap: 0;
    }

    .pix-stage-actions,
    .pix-app.has-image .pix-stage-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .pix-stage-actions .pix-button {
        width: 100%;
        min-width: 0;
        min-height: 36px;
        padding: 0 8px;
        font-size: 12px;
        gap: 6px;
    }
}

@media (max-width: 600px) {
    .pix-stage-head,
    .pix-app.has-image .pix-stage-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: center;
        gap: 0;
    }

    .pix-stage-actions,
    .pix-app.has-image .pix-stage-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .pix-stage-actions .pix-button,
    .pix-app.has-image .pix-stage-actions .pix-button {
        width: 100%;
        min-width: 0;
        min-height: 35px;
        padding: 0 6px;
        font-size: 11px;
        gap: 5px;
    }

    .pix-stage-actions .pix-icon,
    .pix-app-actions .pix-icon {
        width: 17px;
        height: 17px;
        flex-basis: 17px;
    }
}

@media (max-width: 380px) {
    .pix-stage-actions .pix-icon,
    .pix-app-actions .pix-icon {
        width: 17px;
        height: 17px;
        flex-basis: 17px;
    }
}


/* v1.5.16 zoom-out cleanup and balanced design presets.
   Zooming below 100% keeps the preview centered without fake scrollbars.
   The Design panel now has even Text and Shapes grids. */
.pix-stage.is-preview-zoom-out .pix-canvas-viewport {
    overflow: hidden !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pix-stage.is-preview-zoom-out .pix-canvas-viewport::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.pix-stage.is-preview-zoom-out .pix-canvas-wrap {
    overflow: hidden !important;
}

.pix-text-templates,
.pix-shapes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}


/* v1.5.18 modal focus and empty-helper typography.
   The helper text wraps only at natural phrase boundaries, keeping 1600 × 900 together. */
.pix-empty-helper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0 4px;
    text-wrap: normal;
    user-select: none;
}

.pix-empty-helper span {
    display: inline-block;
}

.pix-empty-helper .pix-empty-keep {
    white-space: nowrap;
}

.pix-modal-card {
    box-shadow: 0 22px 70px rgba(15, 23, 42, .24);
}

/* v1.5.22 mobile bottom toolbar stability.
   Keep the fixed mobile icon bar pinned to the visual bottom and remove the old scrollable empty space that appeared after the footer. */
:root {
    --pix-mobile-toolbar-height: 62px;
}

@media (max-width: 900px) {
    html,
    body.pixplet-editor-body {
        overscroll-behavior-y: none;
    }

    .pix-app {
        padding-bottom: 0 !important;
    }

    .pix-mobile-toolbar {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        bottom: 0 !important;
        width: 100% !important;
        height: calc(var(--pix-mobile-toolbar-height) + env(safe-area-inset-bottom)) !important;
        min-height: calc(var(--pix-mobile-toolbar-height) + env(safe-area-inset-bottom)) !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
        transform: translate3d(0, 0, 0);
        backface-visibility: hidden;
        contain: layout paint;
    }

    .pix-mobile-toolbar button,
    .pix-mobile-toolbar label {
        min-height: var(--pix-mobile-toolbar-height) !important;
    }

    .pix-panel-section {
        padding-bottom: calc(20px + var(--pix-mobile-toolbar-height) + env(safe-area-inset-bottom)) !important;
    }

    .pix-footer {
        padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    }
}


/* v1.5.25 SEO landing pages */
body.pixplet-editor-body.pixplet-seo-landing-body {
    min-height: 100dvh;
    height: auto;
    overflow-y: auto;
    background: #f8fafc !important;
    color: #111827;
}

.pix-landing-page {
    min-height: 100dvh;
    background: #f8fafc;
    font-family: var(--pix-font);
}

.pix-landing-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 74px;
    padding: 10px 28px;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid #e2e8f0;
    backdrop-filter: blur(14px);
}

.pix-landing-logo {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.pix-landing-logo img {
    width: 168px;
    max-width: 42vw;
    height: auto;
    display: block;
}

.pix-landing-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.pix-landing-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 13px;
    border-radius: 999px;
    color: #334155 !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 750;
}

.pix-landing-nav a:hover,
.pix-landing-nav a:focus-visible {
    color: var(--pix-red) !important;
    background: #fff1f3;
}

.pix-landing-nav .pix-landing-nav-cta {
    background: var(--pix-red);
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(235, 12, 39, .18);
}

.pix-landing-nav .pix-landing-nav-cta:hover,
.pix-landing-nav .pix-landing-nav-cta:focus-visible {
    background: #c80a20;
    color: #fff !important;
}

.pix-seo-content {
    background: #f8fafc;
    color: #111827;
    font-family: var(--pix-font);
}

.pix-seo-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    gap: clamp(24px, 5vw, 56px);
    align-items: center;
    max-width: 1180px;
    margin: 0 auto;
    padding: clamp(48px, 7vw, 96px) 22px clamp(34px, 5vw, 72px);
}

.pix-seo-kicker {
    margin: 0 0 12px;
    color: var(--pix-red);
    font-weight: 850;
    letter-spacing: .055em;
    text-transform: uppercase;
    font-size: 12px;
}

.pix-seo-content h1 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: .98;
    letter-spacing: -.055em;
}

.pix-seo-lead {
    max-width: 760px;
    margin: 0 0 26px;
    font-size: clamp(17px, 1.8vw, 21px);
    line-height: 1.68;
    color: #334155;
}

.pix-seo-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 22px;
}

.pix-seo-actions a,
.pix-seo-card-action a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 850;
}

.pix-seo-primary,
.pix-seo-card-action a {
    background: var(--pix-red);
    color: #fff !important;
    box-shadow: 0 14px 30px rgba(235, 12, 39, .18);
}

.pix-seo-primary:hover,
.pix-seo-card-action a:hover {
    background: #c80a20;
    color: #fff !important;
}

.pix-seo-secondary {
    background: #fff;
    color: #111827 !important;
    border: 1px solid #e2e8f0;
}

.pix-seo-secondary:hover {
    border-color: var(--pix-red);
    color: var(--pix-red) !important;
}

.pix-seo-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 720px;
}

.pix-seo-metrics div {
    min-width: 0;
    padding: 14px 15px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .045);
}

.pix-seo-metrics span {
    display: block;
    margin: 0 0 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.pix-seo-metrics strong {
    display: block;
    color: #111827;
    font-size: 16px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.pix-seo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pix-seo-preview-card {
    width: min(100%, 470px);
    padding: 16px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .12);
    transform: rotate(1deg);
}

.pix-seo-preview-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 4px 12px 0;
    border-radius: 999px;
    background: #e2e8f0;
}

.pix-seo-preview-dot:first-child {
    background: var(--pix-red);
}

.pix-seo-preview-canvas {
    position: relative;
    overflow: hidden;
    min-height: 320px;
    border-radius: 16px;
    background:
        radial-gradient(circle at 24% 20%, rgba(235, 12, 39, .26), transparent 28%),
        linear-gradient(135deg, #111827, #334155 52%, #fff1f3);
}

.pix-seo-preview-image {
    position: absolute;
    inset: 44px 46px 70px;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.86), rgba(255,255,255,.38)),
        repeating-linear-gradient(45deg, rgba(255,255,255,.24), rgba(255,255,255,.24) 10px, rgba(255,255,255,.12) 10px, rgba(255,255,255,.12) 20px);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.65), 0 18px 45px rgba(15, 23, 42, .18);
}

.pix-seo-preview-label {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(255,255,255,.92);
    color: #111827;
    font-weight: 900;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .14);
}

.pix-seo-preview-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin: 14px 0 0;
}

.pix-seo-preview-controls span {
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
}

.pix-seo-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px 76px;
}

.pix-seo-body,
.pix-seo-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .06);
}

.pix-seo-body {
    padding: clamp(22px, 4vw, 34px);
}

.pix-seo-content h2 {
    margin: 0 0 14px;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.15;
    letter-spacing: -.03em;
}

.pix-seo-content h3 {
    margin: 28px 0 10px;
    font-size: 21px;
    line-height: 1.25;
}

.pix-seo-content p,
.pix-seo-content li {
    color: #334155;
    font-size: 16px;
    line-height: 1.76;
}

.pix-seo-content ul,
.pix-seo-content ol {
    margin: 12px 0 0;
    padding-left: 22px;
}

.pix-seo-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    gap: 18px;
    margin: 18px 0 38px;
}

.pix-seo-card {
    padding: clamp(20px, 3vw, 28px);
}

.pix-seo-card h2 {
    font-size: 23px;
}

.pix-seo-card-action {
    margin-top: 18px;
}

.pix-seo-popular h2 {
    margin-bottom: 16px;
}

.pix-seo-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.pix-seo-links a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 11px 13px;
    border-radius: 9px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #111827 !important;
    text-decoration: none;
    font-weight: 780;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .035);
}

.pix-seo-links a:hover {
    border-color: var(--pix-red);
    color: var(--pix-red) !important;
}

.pix-landing-footer {
    max-width: 1120px;
    margin: 0 auto;
    padding: 26px 20px 40px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 14px;
}

.pix-landing-footer p {
    margin: 0 0 8px;
}

.pix-landing-footer a {
    color: var(--pix-red) !important;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 900px) {
    .pix-landing-header {
        position: relative;
        align-items: flex-start;
        flex-direction: column;
        padding: 12px 16px;
    }

    .pix-landing-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .pix-landing-nav a {
        min-height: 34px;
        padding: 0 10px;
        font-size: 13px;
    }

    .pix-seo-hero {
        grid-template-columns: 1fr;
        padding: 40px 16px 32px;
    }

    .pix-seo-preview {
        order: -1;
    }

    .pix-seo-preview-card {
        transform: none;
    }

    .pix-seo-preview-canvas {
        min-height: 240px;
    }

    .pix-seo-metrics,
    .pix-seo-grid,
    .pix-seo-links {
        grid-template-columns: 1fr;
    }

    .pix-seo-inner {
        padding: 0 16px 58px;
    }

    .pix-seo-body,
    .pix-seo-card {
        padding: 20px;
    }
}


/* v1.5.25 landing page scroll and mobile centering fixes */
html.pixplet-seo-landing-html,
html.pixplet-seo-landing-html body.pixplet-editor-body.pixplet-seo-landing-body {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

html.pixplet-seo-landing-html body.pixplet-editor-body.pixplet-seo-landing-body {
    overscroll-behavior-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

html.pixplet-seo-landing-html .pix-landing-page {
    width: 100%;
    min-height: 100dvh;
    overflow: visible;
}

@media (max-width: 900px) {
    html.pixplet-seo-landing-html,
    html.pixplet-seo-landing-html body.pixplet-editor-body.pixplet-seo-landing-body {
        height: auto !important;
        overflow-y: auto !important;
        overscroll-behavior-y: auto !important;
    }

    html.pixplet-seo-landing-html .pix-landing-header {
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 14px 16px 16px;
    }

    html.pixplet-seo-landing-html .pix-landing-logo {
        justify-content: center;
    }

    html.pixplet-seo-landing-html .pix-landing-logo img {
        width: min(168px, 64vw);
        max-width: 64vw;
    }

    html.pixplet-seo-landing-html .pix-landing-nav {
        justify-content: center;
        text-align: center;
    }

    html.pixplet-seo-landing-html .pix-seo-hero {
        justify-items: center;
        text-align: center;
        gap: 26px;
        padding: 34px 16px 32px;
    }

    html.pixplet-seo-landing-html .pix-seo-hero-copy,
    html.pixplet-seo-landing-html .pix-seo-content h1,
    html.pixplet-seo-landing-html .pix-seo-lead {
        max-width: 760px;
        margin-left: auto;
        margin-right: auto;
    }

    html.pixplet-seo-landing-html .pix-seo-actions {
        justify-content: center;
    }

    html.pixplet-seo-landing-html .pix-seo-metrics {
        width: min(100%, 560px);
        margin-left: auto;
        margin-right: auto;
    }

    html.pixplet-seo-landing-html .pix-seo-preview {
        width: min(100%, 560px);
        margin-left: auto;
        margin-right: auto;
    }

    html.pixplet-seo-landing-html .pix-seo-preview-card {
        margin-left: auto;
        margin-right: auto;
    }

    html.pixplet-seo-landing-html .pix-seo-inner,
    html.pixplet-seo-landing-html .pix-landing-footer {
        text-align: center;
    }

    html.pixplet-seo-landing-html .pix-seo-body,
    html.pixplet-seo-landing-html .pix-seo-card {
        text-align: left;
    }

    html.pixplet-seo-landing-html .pix-seo-popular {
        text-align: center;
    }

    html.pixplet-seo-landing-html .pix-seo-links a {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 520px) {
    html.pixplet-seo-landing-html .pix-landing-nav a {
        flex: 1 1 calc(50% - 8px);
        min-width: 132px;
    }

    html.pixplet-seo-landing-html .pix-landing-nav .pix-landing-nav-cta {
        flex-basis: 100%;
    }

    html.pixplet-seo-landing-html .pix-seo-actions a {
        width: 100%;
    }

    html.pixplet-seo-landing-html .pix-seo-preview-canvas {
        min-height: 210px;
    }

    html.pixplet-seo-landing-html .pix-seo-preview-image {
        inset: 34px 28px 64px;
    }
}


/* v1.5.26 final SEO landing header and no-wrap dimension fixes */
html.pixplet-seo-landing-html .pix-landing-header {
    gap: 16px;
}

html.pixplet-seo-landing-html .pix-landing-nav {
    flex: 0 0 auto;
    flex-wrap: nowrap;
}

html.pixplet-seo-landing-html .pix-landing-nav .pix-landing-nav-cta {
    min-height: 44px;
    padding: 0 22px;
    white-space: nowrap;
}

html.pixplet-seo-landing-html .pix-seo-nowrap,
html.pixplet-seo-landing-html .pix-seo-preview-label,
html.pixplet-seo-landing-html .pix-seo-metric-value.pix-seo-nowrap {
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
}

@media (max-width: 900px) {
    html.pixplet-seo-landing-html .pix-landing-header {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 14px;
        padding: 14px 16px 18px;
    }

    html.pixplet-seo-landing-html .pix-landing-nav {
        width: 100%;
        justify-content: center;
    }

    html.pixplet-seo-landing-html .pix-landing-nav .pix-landing-nav-cta {
        flex: 0 1 320px;
        width: min(100%, 320px);
        min-width: 0;
    }
}

@media (max-width: 520px) {
    html.pixplet-seo-landing-html .pix-landing-nav a,
    html.pixplet-seo-landing-html .pix-landing-nav .pix-landing-nav-cta {
        flex: 0 1 320px;
        width: min(100%, 320px);
        min-width: 0;
    }
}

/* v1.5.27 mobile emulator scroll and preset-entry fixes.
   Chrome device emulation can keep the desktop overflow lock unless the mobile editor path explicitly wins at the end of the stylesheet. */
@media (max-width: 900px) {
    html:not(.pixplet-seo-landing-html),
    html:not(.pixplet-seo-landing-html) body.pixplet-editor-body:not(.pixplet-seo-landing-body) {
        height: auto !important;
        min-height: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior-y: auto !important;
    }

    body.pixplet-editor-body:not(.pixplet-seo-landing-body) {
        position: static !important;
        -webkit-overflow-scrolling: touch;
        touch-action: auto;
    }

    body.pixplet-editor-body:not(.pixplet-seo-landing-body) .pix-app {
        height: auto !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        overflow: visible !important;
    }

    body.pixplet-editor-body:not(.pixplet-seo-landing-body) .pix-main,
    body.pixplet-editor-body:not(.pixplet-seo-landing-body) .pix-panel,
    body.pixplet-editor-body:not(.pixplet-seo-landing-body) .pix-panel-body,
    body.pixplet-editor-body:not(.pixplet-seo-landing-body) .pix-panel-section,
    body.pixplet-editor-body:not(.pixplet-seo-landing-body) .pix-footer {
        height: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
    }

    body.pixplet-editor-body:not(.pixplet-seo-landing-body) .pix-stage-card {
        overflow-x: hidden !important;
    }

    body.pixplet-editor-body:not(.pixplet-seo-landing-body) .pix-empty-helper [data-empty-preset-size] {
        white-space: nowrap;
    }
}

@media (max-width: 900px) and (pointer: fine) {
    body.pixplet-editor-body:not(.pixplet-seo-landing-body) {
        overflow-y: scroll !important;
    }
}

.pix-preset.is-selected:disabled {
    opacity: 1;
    background: #fff7f8;
}

/* v1.5.29 landing header logo parity with the main editor header */
html.pixplet-seo-landing-html .pix-landing-header {
    min-height: 58px !important;
    height: 58px !important;
    padding: 0 20px !important;
    gap: 14px !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-align: left !important;
}

html.pixplet-seo-landing-html .pix-landing-logo {
    width: auto !important;
    justify-content: flex-start !important;
    flex: 0 0 auto !important;
}

html.pixplet-seo-landing-html .pix-landing-logo img {
    width: 118px !important;
    max-width: 38vw !important;
    height: auto !important;
    display: block !important;
}

html.pixplet-seo-landing-html .pix-landing-nav {
    width: auto !important;
    flex: 0 0 auto !important;
    justify-content: flex-end !important;
    text-align: right !important;
}

html.pixplet-seo-landing-html .pix-landing-nav .pix-landing-nav-cta {
    width: auto !important;
    flex: 0 0 auto !important;
}

@media (min-width: 901px) and (max-width: 1600px), (min-width: 901px) and (max-height: 860px) {
    html.pixplet-seo-landing-html .pix-landing-header {
        min-height: 54px !important;
        height: 54px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    html.pixplet-seo-landing-html .pix-landing-logo img {
        width: 108px !important;
    }
}

@media (min-width: 901px) and (max-width: 1180px), (min-width: 901px) and (max-height: 760px) {
    html.pixplet-seo-landing-html .pix-landing-header {
        min-height: 50px !important;
        height: 50px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    html.pixplet-seo-landing-html .pix-landing-logo img {
        width: 100px !important;
    }
}

@media (max-width: 900px) {
    html.pixplet-seo-landing-html .pix-landing-header {
        min-height: 56px !important;
        height: 56px !important;
        padding: 8px 12px !important;
        gap: 12px !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        text-align: left !important;
    }

    html.pixplet-seo-landing-html .pix-landing-logo {
        justify-content: flex-start !important;
    }

    html.pixplet-seo-landing-html .pix-landing-logo img {
        width: 122px !important;
        max-width: 42vw !important;
    }

    html.pixplet-seo-landing-html .pix-landing-nav {
        width: auto !important;
        justify-content: flex-end !important;
        text-align: right !important;
    }

    html.pixplet-seo-landing-html .pix-landing-nav .pix-landing-nav-cta {
        width: auto !important;
        max-width: none !important;
        min-height: 38px !important;
        padding: 0 14px !important;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    html.pixplet-seo-landing-html .pix-landing-header {
        min-height: 54px !important;
        height: 54px !important;
        padding: 8px 14px !important;
    }

    html.pixplet-seo-landing-html .pix-landing-logo img {
        width: 108px !important;
    }
}

@media (max-width: 380px) {
    html.pixplet-seo-landing-html .pix-landing-logo img {
        width: 108px !important;
        max-width: 40vw !important;
    }

    html.pixplet-seo-landing-html .pix-landing-nav .pix-landing-nav-cta {
        padding-left: 12px !important;
        padding-right: 12px !important;
        font-size: 12px !important;
    }
}

/* v1.5.30 landing header CTA polish
   Desktop keeps a compact Open editor button with comfortable breathing room.
   Mobile keeps the header minimal: centered logo only. */
@media (min-width: 901px) {
    html.pixplet-seo-landing-html .pix-landing-nav .pix-landing-nav-cta {
        min-height: 32px !important;
        height: 32px !important;
        padding: 0 14px !important;
        font-size: 13px !important;
        line-height: 32px !important;
        border-radius: 999px !important;
        box-shadow: 0 8px 18px rgba(235, 12, 39, .16) !important;
    }
}

@media (min-width: 901px) and (max-width: 1180px), (min-width: 901px) and (max-height: 760px) {
    html.pixplet-seo-landing-html .pix-landing-nav .pix-landing-nav-cta {
        min-height: 30px !important;
        height: 30px !important;
        padding: 0 12px !important;
        font-size: 12px !important;
        line-height: 30px !important;
    }
}

@media (max-width: 900px) {
    html.pixplet-seo-landing-html .pix-landing-header {
        justify-content: center !important;
        text-align: center !important;
    }

    html.pixplet-seo-landing-html .pix-landing-logo {
        justify-content: center !important;
        margin: 0 auto !important;
    }

    html.pixplet-seo-landing-html .pix-landing-nav {
        display: none !important;
    }
}

