.spektr-ai-scene {
    box-sizing: border-box;
    position: relative;
    width: 88%;
    max-width: 1000px;
    margin: 20px auto 24px;
    padding: 5px;
    background: linear-gradient(#f2d08866, #9c5c2d55), url('/images/bg.jpg') left top repeat #dfb76a;
    border: 3px double #704220;
    border-radius: 3px;
    box-shadow: inset 0 0 4px #7c461e8c, 0 2px 5px #4c2a1740;
}

.spektr-ai-scene img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 1px;
    outline: 1px solid #65401f;
}

.post-cont .spektr-ai-scene img {
    width: 100% !important;
}

@media (max-width: 767px) {
    .spektr-ai-scene {
        width: calc(100% - 24px);
    }
}

.spektr-ai-scene__slide {
    display: block;
    cursor: zoom-in;
}

.spektr-ai-scene__slide[hidden],
.spektr-ai-scene__controls[hidden] {
    display: none;
}

.spektr-ai-scene__controls {
    position: absolute;
    inset: 5px;
    pointer-events: none;
}

.spektr-ai-scene__controls button,
.spektr-scene-lightbox button {
    box-sizing: border-box;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff3d8;
    font: bold 36px/1 Arial, sans-serif;
    text-shadow: 1px 1px 1px #211711, -1px -1px 1px #211711, 0 0 5px #211711;
    cursor: pointer;
}

.spektr-ai-scene__controls button {
    position: absolute;
    pointer-events: auto;
}

.spektr-ai-scene__controls button[data-step] {
    top: 50%;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
}

.spektr-ai-scene__controls button[data-step] span {
    box-sizing: border-box;
    width: 24px;
    height: 24px;
    border: solid currentColor;
    border-width: 5px 5px 0 0;
    color: #86ffff;
    filter: drop-shadow(1px 0 0 #091322) drop-shadow(-1px 0 0 #091322)
        drop-shadow(0 1px 0 #091322) drop-shadow(0 -1px 0 #091322)
        drop-shadow(0 0 4px #0beeffaa);
    transform: rotate(45deg);
}

.spektr-ai-scene__controls button[data-step='-1'] { left: 4px; }
.spektr-ai-scene__controls button[data-step='-1'] span { transform: rotate(-135deg); }
.spektr-ai-scene__controls button[data-step='1'] { right: 4px; }

.spektr-ai-scene__controls button[data-rotation] {
    top: 4px;
    right: 4px;
    color: #ff87ec;
    font-size: 23px;
    text-shadow: 1px 1px 0 #251020, -1px -1px 0 #251020,
        1px -1px 0 #251020, -1px 1px 0 #251020, 0 0 6px #ff31cecc;
}

.spektr-ai-scene__controls button[data-rotation] span {
    color: inherit;
    font: inherit;
}

.spektr-ai-scene__controls button:focus-visible,
.spektr-scene-lightbox button:focus-visible,
.spektr-ai-scene__slide:focus-visible {
    outline: 2px solid #fff3d8;
    outline-offset: -3px;
    box-shadow: inset 0 0 0 5px #4c2a17;
}

.spektr-scene-lightbox {
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: 4px;
    border: 1px solid #ab7c50;
    background: #211711;
    color: #fff3d8;
    overflow: auto;
    box-sizing: border-box;
}

.spektr-scene-lightbox::backdrop { background: #100b08e8; }

html:has(.spektr-scene-lightbox[open]) { overflow: hidden; }

.spektr-scene-lightbox__bar {
    display: flex;
    justify-content: flex-end;
    padding-bottom: 4px;
}

.spektr-scene-lightbox__bar form { margin: 0; }
.spektr-scene-lightbox__bar button { font-size: 42px; }

.spektr-scene-lightbox img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100dvh - 72px);
    margin: auto;
}
