.editor-shell {
    --editor-accent: var(--blue);
    --editor-accent-soft: var(--blue-soft);
    --editor-panel: color-mix(in srgb, var(--surface) 94%, #111a27);
    --editor-panel-raised: color-mix(in srgb, var(--surface) 84%, #111a27);
    --editor-radius: 16px;
    width: min(calc(100% - 52px), 1360px);
    max-width: 1360px;
    margin: 0 auto;
    padding: 25px 0 48px;
}

.editor-shell [hidden] {
    display: none !important;
}

body.crosshair-editor-body {
    overflow-x: hidden;
    overflow-y: auto;
}

body.crosshair-editor-body.is-api-loading {
    overflow-y: auto;
}

.editor-heading {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 22px;
    padding: 0 0 19px;
    border-bottom: 1px solid var(--line);
    text-align: center;
}

.editor-heading h1 {
    justify-content: center;
}

.editor-heading-actions {
    position: absolute;
    right: 0;
    bottom: 19px;
}

.editor-heading h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 5px 0 4px;
    font-size: clamp(27px, 3.2vw, 38px);
    font-weight: 750;
    letter-spacing: -.065em;
}

.editor-heading h1 svg {
    width: 31px;
    height: 31px;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--editor-accent);
    stroke-linecap: round;
    stroke-width: 2.8;
}

.editor-heading > div > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.editor-heading-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.editor-heading-actions .button {
    min-height: 36px;
    padding: 7px 13px;
    border-radius: 9px;
    font-size: 11px;
}

.editor-layout {
    display: grid;
    grid-template-columns: minmax(330px, .43fr) minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

.editor-settings-column {
    grid-column: 1;
    grid-row: 1;
}

.editor-preview-column {
    grid-column: 2;
    grid-row: 1;
}

.editor-settings-column,
.editor-preview-column {
    display: grid;
    min-width: 0;
    gap: 12px;
}

.editor-controls,
.editor-preview-card,
.editor-code-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--editor-radius);
    background: var(--editor-panel);
    box-shadow: var(--shadow);
}

.editor-controls {
    display: flex;
    height: min(790px, calc(100vh - 150px));
    min-height: 480px;
    flex-direction: column;
    padding: 21px 19px 16px;
}

.editor-controls-heading,
.editor-card-heading,
.editor-profile-heading,
.editor-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.editor-index,
.editor-section-kicker {
    display: block;
    color: var(--editor-accent);
    font: 700 8px/1.3 var(--mono);
    letter-spacing: .14em;
    text-transform: uppercase;
}

.editor-controls h2,
.editor-preview-card h2,
.editor-code-card h2,
.editor-profile-heading h3,
.editor-section-heading h3 {
    margin: 4px 0 0;
    color: var(--text);
    letter-spacing: -.035em;
}

.editor-controls h2,
.editor-preview-card h2,
.editor-code-card h2 {
    font-size: 18px;
}

.editor-profile-heading h3,
.editor-section-heading h3 {
    font-size: 13px;
}

.editor-controls-intro {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.6;
}

.editor-undo,
.editor-profile-hint,
.editor-unit {
    padding: 0;
    border: 0;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: 10px;
}

.editor-undo {
    cursor: pointer;
}

.editor-undo:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.editor-controls-content {
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    margin: 14px -7px 0 0;
    padding: 0 7px 6px 0;
    overscroll-behavior: contain;
    scrollbar-color: color-mix(in srgb, var(--editor-accent) 46%, var(--line)) transparent;
    scrollbar-width: thin;
}

.editor-controls-content::-webkit-scrollbar {
    width: 5px;
}

.editor-controls-content::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: color-mix(in srgb, var(--editor-accent) 45%, var(--line));
}

.editor-profile-heading,
.editor-general,
.editor-profile-fields {
    margin-top: 15px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.editor-profile-heading {
    margin-top: 0;
}

.editor-profile-hint {
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--editor-accent);
    background: var(--editor-accent-soft);
}

.editor-profile-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-top: 11px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--editor-panel-raised);
}

.editor-settings-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-top: 14px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--editor-panel-raised);
}

.editor-profile-tabs button,
.editor-settings-tabs button,
.editor-zoom button {
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: 10px;
    cursor: pointer;
    transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.editor-profile-tabs button.active,
.editor-settings-tabs button.active,
.editor-zoom button.active {
    border-color: color-mix(in srgb, var(--editor-accent) 48%, transparent);
    color: var(--text);
    background: var(--editor-accent-soft);
}

.editor-settings-panel {
    min-width: 0;
    margin-top: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: color-mix(in srgb, var(--editor-panel-raised) 42%, transparent);
}

.editor-inherited-note {
    margin: 9px 0 0;
    padding: 8px 10px;
    border: 1px solid color-mix(in srgb, var(--editor-accent) 22%, var(--line));
    border-radius: 8px;
    color: var(--muted);
    background: var(--editor-accent-soft);
    font-size: 10px;
    line-height: 1.5;
}

.editor-section-heading {
    margin-bottom: 8px;
}

.editor-field-section + .editor-lines {
    margin-top: 16px;
    padding-top: 15px;
    border-top: 1px solid var(--line);
}

.editor-color-field {
    min-width: 0;
    margin: 7px 0 11px;
    padding: 0;
    border: 0;
}

.editor-color-field legend {
    padding: 0;
    color: var(--text);
    font-size: 10px;
    font-weight: 650;
}

.editor-color-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
}

.editor-color-swatch {
    position: relative;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--text) 22%, transparent);
    border-radius: 7px;
    background: var(--swatch-color);
    cursor: pointer;
    transition: transform .14s ease, box-shadow .14s ease;
}

.editor-color-swatch:hover {
    transform: translateY(-1px);
}

.editor-color-swatch.active {
    box-shadow: 0 0 0 2px var(--editor-panel), 0 0 0 3px var(--editor-accent);
}

.editor-color-swatch:focus-visible,
.editor-custom-color-button:focus-visible,
.editor-color-dialog button:focus-visible,
.editor-color-hex-field input:focus-visible,
.editor-profile-tabs button:focus-visible,
.editor-settings-tabs button:focus-visible,
.editor-zoom button:focus-visible,
.editor-preview-footer button:focus-visible,
.editor-undo:focus-visible,
.editor-scene-swatch:focus-visible {
    outline: 2px solid var(--editor-accent);
    outline-offset: 2px;
}

.editor-color-swatch:disabled,
.editor-custom-color-button:disabled {
    cursor: not-allowed;
    opacity: .42;
}

.editor-custom-color-button {
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    gap: 7px;
    padding: 3px 8px 3px 5px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--text);
    background: var(--editor-panel-raised);
    font: inherit;
    font-size: 9px;
    cursor: pointer;
}

.editor-custom-color-button.active {
    border-color: var(--editor-accent);
}

.editor-custom-color-chip {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
}

.editor-switch-row {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}

.editor-switch-row:last-child {
    border-bottom: 0;
}

.editor-switch-row > span {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.editor-switch-row strong {
    color: var(--text);
    font-size: 10px;
    font-weight: 600;
}

.editor-switch-row small,
.editor-line-card legend small,
.editor-code-label,
.editor-code-footnote {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}

.editor-switch-row input[type="checkbox"] {
    position: relative;
    align-self: center;
    width: 31px;
    height: 18px;
    min-height: 18px;
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0;
    border: 0;
    border-radius: 999px;
    outline: 0;
    background: var(--line);
    appearance: none;
    line-height: 18px;
    vertical-align: middle;
    cursor: pointer;
    transition: background .18s ease;
}

.editor-switch-row input[type="checkbox"]::after {
    position: absolute;
    top: 50%;
    left: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .24);
    content: '';
    transform: translateY(-50%);
    transition: transform .18s ease;
}

.editor-switch-row input[type="checkbox"]:checked {
    background: var(--editor-accent);
}

.editor-switch-row input[type="checkbox"]:checked::after {
    transform: translate(13px, -50%);
}

.editor-range-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    padding: 7px 0 3px;
}

.editor-range {
    display: grid;
    min-width: 0;
    gap: 6px;
    color: var(--muted);
    font-size: 9px;
}

.editor-range > span {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.editor-range output {
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.editor-range input[type="range"] {
    width: 100%;
    height: 3px;
    accent-color: var(--editor-accent);
    cursor: pointer;
}

.editor-range input[type="range"]:disabled {
    cursor: not-allowed;
    opacity: .35;
}

.editor-range-grid.is-disabled {
    opacity: .42;
}

.editor-line-card {
    min-width: 0;
    margin: 10px 0 0;
    padding: 9px 10px 7px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: color-mix(in srgb, var(--editor-panel-raised) 45%, transparent);
}

.editor-line-card legend {
    display: flex;
    max-width: 100%;
    align-items: baseline;
    gap: 7px;
    padding: 0 4px;
    color: var(--text);
    font-size: 10px;
    font-weight: 700;
}

.editor-line-card legend small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 400;
}

.editor-advanced-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
    margin-top: 5px;
    padding-top: 6px;
    border-top: 1px dashed var(--line);
}

.editor-preview-card,
.editor-code-card {
    padding: 20px;
}

.editor-card-heading {
    align-items: center;
}

.editor-preview-profile {
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--editor-accent);
    background: var(--editor-accent-soft);
    font-size: 10px;
}

.editor-preview-toolbar {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 13px;
}

.editor-preview-current {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.editor-preview-current i,
.editor-preview-footer i {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--editor-accent);
}

.editor-zoom {
    display: flex;
    flex: 0 0 auto;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--editor-panel-raised);
}

.editor-zoom button {
    padding: 5px 9px;
    font-size: 9px;
}

.editor-preview-stage {
    position: relative;
    height: clamp(260px, 34vh, 390px);
    min-height: 270px;
    margin-top: 11px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
    border-radius: 11px;
    background-color: #080a0e;
    background-position: center;
    background-size: cover;
    isolation: isolate;
}

.editor-preview-stage::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse at center, transparent 35%, rgba(4, 7, 12, .18) 100%);
    content: '';
    pointer-events: none;
}

.editor-preview-stage[data-scene="black"] {
    background-color: #080a0e;
    background-image: none;
}

.editor-preview-stage[data-scene="white"] {
    background-color: #f3f4f6;
    background-image: none;
}

.editor-preview-stage[data-scene="white"]::before {
    background: radial-gradient(ellipse at center, transparent 38%, rgba(22, 32, 47, .08) 100%);
}

.editor-preview-stage[data-scene="range"] {
    background-color: #33291e;
    background-image: url("Range.png");
}

.editor-preview-stage[data-scene="summit"] {
    background-color: #52686b;
    background-image: url("Summit1.png");
}

.editor-reticle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    overflow: visible;
    color: #fff;
    pointer-events: none;
    transform-origin: center;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .85));
}

.editor-preview-stage[data-scene="white"] .editor-reticle {
    filter: drop-shadow(0 1px 2px rgba(255, 255, 255, .95));
}

.editor-scene-picker {
    position: absolute;
    right: 12px;
    bottom: 11px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    max-width: calc(100% - 22px);
}

.editor-scene-swatch {
    display: inline-flex;
    width: 48px;
    height: 36px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.editor-scene-swatch:hover {
    transform: translateY(-1px);
}

.editor-scene-swatch.active {
    border-color: var(--editor-accent);
    box-shadow: 0 0 0 1px var(--editor-accent-soft);
}

.editor-scene-chip {
    display: block;
    width: 100%;
    height: 100%;
    border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
    border-radius: 4px;
    background-color: #080a0e;
    background-position: center;
    background-size: cover;
}

.editor-scene-swatch[data-scene="white"] .editor-scene-chip {
    background-color: #f3f4f6;
}

.editor-scene-swatch[data-scene="range"] .editor-scene-chip {
    background-image: url("Range.png");
}

.editor-scene-swatch[data-scene="summit"] .editor-scene-chip {
    background-image: url("Summit1.png");
}

.editor-preview-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 9px;
}

.editor-preview-footer > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.editor-preview-footer button {
    padding: 0;
    border: 0;
    color: var(--editor-accent);
    background: transparent;
    font: inherit;
    font-size: 9px;
    cursor: pointer;
}

.editor-code-heading .button {
    min-height: 32px;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 10px;
}

.editor-import {
    margin: 12px 0 0;
    padding: 0 0 12px;
    border: 0;
    border-bottom: 1px solid var(--line);
}

.editor-import summary {
    color: var(--text);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.editor-import textarea,
.editor-generated-code {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: var(--editor-panel-raised);
    font: 10px/1.55 var(--mono);
    resize: vertical;
}

.editor-import textarea {
    min-height: 52px;
    max-height: 140px;
    margin-top: 8px;
    padding: 8px 10px;
}

.editor-import-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 7px;
}

.editor-import-actions span {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.editor-import-actions span[data-state="success"] {
    color: var(--green);
}

.editor-import-actions span[data-state="error"] {
    color: var(--red);
}

.editor-import-actions .button {
    min-height: 30px;
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 7px;
    font-size: 9px;
}

.editor-code-label {
    display: block;
    margin-top: 11px;
}

.editor-generated-code {
    min-height: 50px;
    max-height: 100px;
    margin-top: 6px;
    padding: 9px 10px;
}

.editor-code-footnote {
    margin: 7px 0 0;
}

.editor-color-dialog {
    position: fixed;
    inset: auto;
    z-index: 1001;
    width: min(248px, calc(100vw - 24px));
    max-width: none;
    max-height: min(92dvh, 560px);
    overflow: visible;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 13px;
    color: var(--text);
    background: var(--surface);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .34);
}

.editor-color-dialog::backdrop {
    background: transparent;
}

.editor-color-dialog-card {
    padding: 11px;
}

.editor-color-dialog-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.editor-color-dialog-heading h2 {
    margin: 0;
    font-size: 13px;
    letter-spacing: -.02em;
}

.editor-color-dialog-close {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    color: var(--muted);
    background: var(--bg);
    font: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.editor-color-picker {
    display: grid;
    gap: 7px;
}

.editor-color-saturation {
    position: relative;
    height: 104px;
    overflow: hidden;
    border-radius: 7px;
    background-color: var(--picker-hue, #f00);
    background-image: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent);
    cursor: crosshair;
    touch-action: none;
}

.editor-color-saturation:focus-visible {
    outline: 2px solid var(--editor-accent);
    outline-offset: 3px;
}

.editor-color-marker {
    position: absolute;
    width: 11px;
    height: 11px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .65);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.editor-color-slider-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
}

.editor-color-slider-row input[type="range"] {
    width: 100%;
    height: 14px;
    min-height: 0;
    margin: 0;
    border: 0;
    border-radius: 999px;
    appearance: none;
    cursor: pointer;
}

.editor-color-slider-row input[type="range"]::-webkit-slider-thumb {
    width: 13px;
    height: 13px;
    border: 2px solid #fff;
    border-radius: 50%;
    appearance: none;
    background: #192331;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .35);
}

.editor-color-slider-row input[type="range"]::-moz-range-thumb {
    width: 9px;
    height: 9px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #192331;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .35);
}

.editor-color-hue {
    background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
}

.editor-color-values {
    display: flex;
    align-items: center;
    gap: 7px;
}

.editor-color-value-preview {
    position: relative;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 4px;
    background-image: conic-gradient(#bbb 25%, #fff 0 50%, #bbb 0 75%, #fff 0);
    background-size: 10px 10px;
}

.editor-color-value-preview::after {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--preview-color, #fff);
    content: '';
}

.editor-color-hex-field {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 9px;
}

.editor-color-hex-field input {
    width: 100%;
    min-width: 0;
    height: 26px;
    min-height: 26px;
    padding: 0 7px;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--text);
    background: var(--bg);
    font: 10px var(--mono);
}

.editor-color-hex-field input[aria-invalid="true"] {
    border-color: var(--red);
}

.editor-color-error {
    margin: 0;
    color: var(--red);
    font-size: 10px;
}

.editor-color-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 9px;
}

@media (max-width: 1050px) {
    .editor-heading {
        flex-direction: column;
        gap: 10px;
    }

    .editor-heading-actions {
        position: static;
    }

    .editor-layout {
        grid-template-columns: minmax(295px, .46fr) minmax(0, 1fr);
        gap: 14px;
    }

    .editor-heading-actions {
        right: 0;
    }

    .editor-controls {
        padding-right: 15px;
        padding-left: 15px;
    }

    .editor-preview-card,
    .editor-code-card {
        padding: 16px;
    }

}

@media (max-width: 780px) {
    .editor-shell.page-enter {
        animation: none;
        transform: none;
    }

    html {
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
    }

    body.crosshair-editor-body {
        display: block;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
    }

    body.crosshair-editor-body .site-header {
        position: sticky;
        top: 0;
        flex: none;
    }

    .editor-shell {
        display: block;
        width: auto;
        min-height: 0;
        margin: 0 18px;
        padding: 18px 0 calc(110px + env(safe-area-inset-bottom));
    }

    .editor-heading {
        display: block;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .editor-heading-actions {
        position: static;
        justify-content: center;
    }

    .editor-heading h1 {
        gap: 7px;
        font-size: 26px;
    }

    .editor-heading h1 svg {
        width: 25px;
        height: 25px;
    }

    .editor-heading-actions {
        gap: 7px;
        margin-top: 12px;
    }

    .editor-heading-actions .button {
        min-height: 32px;
        flex: 1;
        padding: 5px 8px;
        font-size: 10px;
    }

    .editor-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .editor-preview-column {
        grid-column: auto;
        grid-row: auto;
        order: 1;
    }

    .editor-settings-column {
        grid-column: auto;
        grid-row: auto;
        order: 2;
    }

    .editor-preview-card {
        display: block;
        padding: 12px;
        border-radius: 14px;
    }

    .editor-preview-stage {
        height: clamp(150px, 48vw, 200px);
        min-height: 150px;
        width: auto;
        max-width: none;
        margin: 8px 0 0;
        aspect-ratio: auto;
        border-radius: 10px;
    }

    .editor-preview-toolbar {
        margin-top: 8px;
    }

    .editor-preview-footer {
        margin-top: 7px;
    }

    .editor-scene-picker {
        right: 9px;
        bottom: 9px;
        gap: 5px;
    }

    .editor-scene-swatch {
        width: 40px;
        height: 31px;
        padding: 3px;
    }

    .editor-code-card {
        margin-top: 0;
    }

    .editor-controls {
        display: block;
        height: auto;
        min-height: 0;
        overflow: visible;
        padding: 15px;
    }

    .editor-controls-content {
        overflow: visible;
        margin: 13px 0 0;
        padding: 0 0 3px;
    }

    .editor-code-card {
        padding: 15px;
        border-radius: 14px;
    }

    .editor-code-heading .button {
        min-height: 30px;
        padding: 4px 8px;
    }

    .editor-profile-heading,
    .editor-general,
    .editor-profile-fields {
        margin-top: 13px;
        padding-top: 12px;
    }

    .editor-settings-tabs {
        margin-top: 12px;
    }

    .editor-settings-panel {
        margin-top: 10px;
        padding: 8px;
    }

    .editor-color-options {
        gap: 7px;
    }

    .editor-color-swatch {
        width: 25px;
        height: 25px;
    }

    .editor-range-grid,
    .editor-advanced-options {
        gap: 8px 11px;
    }

    .editor-line-card {
        padding-right: 8px;
        padding-left: 8px;
    }

    .editor-import-actions {
        align-items: flex-start;
    }

    .editor-import-actions span {
        white-space: normal;
    }

    .editor-color-dialog {
        width: min(248px, calc(100vw - 24px));
        max-height: calc(100dvh - 24px);
    }

    .editor-color-dialog-card {
        padding: 10px;
    }

    .editor-color-saturation {
        height: 96px;
        min-height: 0;
    }
}

@media (min-width: 781px) {
    body.crosshair-editor-body .site-footer {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .editor-switch-row input[type="checkbox"],
    .editor-switch-row input[type="checkbox"]::after,
    .editor-profile-tabs button,
    .editor-settings-tabs button,
    .editor-zoom button,
    .editor-scene-swatch {
        transition: none;
    }
}
