/*
 * Страница входа «Студийный свет»: тёмная студия с циклорамой, рисующий свет на стойке за указателем,
 * тени от букв и карточки, студийные фильтры (CTO, CTB, цветные), камера на штативе с живым видом
 * на экране; «Войти» - спуск: полунажатие наводит фокус, нажатие делает кадр со вспышкой.
 * Всё украшение - aria-hidden; без JS и при prefers-reduced-motion остаётся обычная форма.
 */

:root {
    --st-text: #f3f1ec;
    --st-muted: rgba(243, 241, 236, .6);
    --st-subtle: rgba(243, 241, 236, .38);
    --st-line: rgba(255, 255, 255, .1);
    --st-ok: #5ef2a0;
    --st-warn: #ffb547;
    --st-err: #ff5d6c;
    --st-sans: "Manrope", system-ui, sans-serif;
    --st-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
    --st-display: "Unbounded", "Manrope", sans-serif;
    --st-ease: cubic-bezier(.2, .8, .2, 1);
    /* Свет: положение, цвет фильтра и мощность - задаёт скрипт */
    --lx: 30vw;
    --ly: 30vh;
    --gel: 255, 86, 196;
    --pow: 1;
    --floor: 64vh;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.st-auth {
    position: relative;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #0d0d10;
    color: var(--st-text);
    font-family: var(--st-sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ---------- Студия ---------- */

.st-studio {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    /* clip - чтобы сцену нельзя было прокрутить изнутри (поиск по странице, фокус) */
    overflow: clip;
    pointer-events: none;
}

/* Циклорама: стена плавно переходит в пол, по линии изгиба - мягкая тень */
.st-wall {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom,
            transparent calc(var(--floor) - 120px),
            rgba(255, 255, 255, .03) calc(var(--floor) - 14px),
            rgba(0, 0, 0, .32) calc(var(--floor) + 26px),
            rgba(0, 0, 0, .1) calc(var(--floor) + 120px),
            transparent calc(var(--floor) + 260px)),
        linear-gradient(to bottom, #1b1b20 0%, #16161a calc(var(--floor) - 1px), #121215 var(--floor), #18181c 100%);
}

.st-light {
    position: absolute;
    inset: 0;
    opacity: var(--pow);
    background: radial-gradient(circle 620px at var(--lx) var(--ly),
        rgba(var(--gel), .36) 0%,
        rgba(var(--gel), .15) 26%,
        rgba(var(--gel), .05) 50%,
        transparent 72%);
    mix-blend-mode: screen;
}

/* Пятно света на полу под светом */
.st-pool {
    position: absolute;
    inset: 0;
    opacity: var(--pow);
    background: radial-gradient(ellipse 420px 80px at var(--lx) calc(var(--floor) + 54px), rgba(var(--gel), .2), transparent 70%);
    mix-blend-mode: screen;
}

.st-dust {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.st-grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
    opacity: .06;
}

/* ---------- Буквы на полу ---------- */

.st-word {
    --sx: 0px;
    --sy: 0px;
    --sb: 6px;
    --so: .7;
    --ss: 1;
    --fx: 0px;
    --fs: 1;
    --hx: 30%;
    --hy: 0%;
    position: absolute;
    left: 7vw;
    bottom: 34vh;
    font: 800 clamp(88px, 12.4vw, 232px) / .8 var(--st-display);
    letter-spacing: -.02em;
    white-space: nowrap;
    animation: st-word-in 1.2s var(--st-ease) .2s both;
}

@keyframes st-word-in {
    from { opacity: 0; translate: 0 40px; }
}

.st-word__face {
    position: relative;
    display: block;
    color: transparent;
    background: radial-gradient(circle at var(--hx) var(--hy),
        rgb(var(--gel)) 0%,
        #a3a1a8 22%,
        #4a4950 52%,
        #1d1d22 82%);
    -webkit-background-clip: text;
    background-clip: text;
    /* Толщина букв - несколько сдвинутых теней */
    filter: drop-shadow(0 1px 0 #0d0d10) drop-shadow(0 1px 0 #0d0d10) drop-shadow(0 2px 0 #09090b) drop-shadow(0 3px 2px rgba(0, 0, 0, .5));
}

/* Тень на стене - отдельный слой той же формы, позади стойки; уходит от света,
   мягче и больше, когда свет далеко */
.st-word--shadow {
    color: transparent;
}

.st-word__shadow {
    display: block;
    color: rgba(0, 0, 0, .78);
    opacity: var(--so);
    filter: blur(var(--sb));
    transform: translate(var(--sx), var(--sy)) scale(var(--ss));
    transform-origin: 50% 100%;
}

/* Контактная тень на полу */
.st-word__floor {
    position: absolute;
    left: -4%;
    right: -4%;
    bottom: -.09em;
    height: .16em;
    background: radial-gradient(closest-side, rgba(0, 0, 0, .7), transparent);
    transform: translateX(var(--fx)) scaleX(var(--fs));
}

/* Отражение в глянцевом полу */
.st-word__reflect {
    position: absolute;
    left: 0;
    top: 100%;
    color: transparent;
    background: radial-gradient(circle at var(--hx) calc(100% - var(--hy)), rgb(var(--gel)) 0%, #6d6c73 25%, #2a2a30 60%);
    -webkit-background-clip: text;
    background-clip: text;
    opacity: .2;
    transform: scaleY(-1);
    -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 55%);
    mask-image: linear-gradient(to top, #000 0%, transparent 55%);
}

/* ---------- Софтбокс на стойке ---------- */

.st-softbox {
    --pole: 200px;
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    transform: translate3d(var(--lx), var(--ly), 0);
    animation: st-fade .8s .6s both;
}

.st-softbox__head {
    position: absolute;
    left: -48px;
    top: -34px;
    width: 96px;
    height: 68px;
    border-radius: 10px;
    background:
        linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 60%),
        radial-gradient(ellipse at 50% 50%, rgb(var(--gel)) 0%, rgba(var(--gel), .82) 70%, rgba(var(--gel), .6) 100%);
    box-shadow:
        0 0 0 3px #1f1f24,
        0 0 0 5px #2c2c33,
        0 0 calc(60px * var(--pow)) rgba(var(--gel), calc(.6 * var(--pow))),
        inset 0 0 0 7px rgba(255, 255, 255, .25);
    opacity: calc(.45 + .55 * var(--pow));
}

/* Шов рассеивателя */
.st-softbox__head::after {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 4px;
}

.st-softbox__lamp {
    position: absolute;
    right: -14px;
    top: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--st-ok);
    box-shadow: 0 0 8px var(--st-ok);
    transition: background-color .2s, box-shadow .2s;
}

.st-softbox__lamp[data-state="busy"] {
    background: var(--st-warn);
    box-shadow: 0 0 8px var(--st-warn);
    animation: st-blink .4s steps(2) infinite;
}

.st-softbox__lamp[data-state="error"] {
    background: var(--st-err);
    box-shadow: 0 0 8px var(--st-err);
}

.st-softbox__pole {
    position: absolute;
    left: -1.5px;
    top: 34px;
    width: 3px;
    height: var(--pole);
    background: linear-gradient(90deg, #44444c, #222227);
}

.st-softbox__legs {
    position: absolute;
    left: -30px;
    top: calc(34px + var(--pole) - 21px);
    width: 60px;
    height: 22px;
    fill: none;
    stroke: #303037;
    stroke-width: 2.6;
    stroke-linecap: round;
}

@keyframes st-blink {
    50% { opacity: .3; }
}

@keyframes st-fade {
    from { opacity: 0; }
}

/* ---------- Шапка ---------- */

.st-top {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 24px 40px 8px;
    animation: st-fade .8s .3s both;
}

.st-wordmark {
    display: inline-flex;
    color: var(--st-text);
}

.st-wordmark svg {
    display: block;
    height: 50px;
    width: auto;
    overflow: visible;
    fill: currentColor;
}

.st-wordmark__art {
    fill: none;
    stroke: currentColor;
    stroke-width: 4.4;
    stroke-linejoin: bevel;
}

.st-wordmark__sub {
    font: 600 14.6px var(--st-sans);
}

.st-report {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-height: 44px;
    padding: 0 1.15rem;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--st-text);
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .2s, border-color .2s;
}

.st-report svg {
    width: 18px;
    height: 18px;
}

.st-report:hover,
.st-report:focus-visible {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .5);
    color: var(--st-text);
}

.st-report:focus-visible,
.st-button:focus-visible,
.st-eye:focus-visible,
.st-gel:focus-visible {
    outline: 2px solid rgb(var(--gel));
    outline-offset: 3px;
}

/* ---------- Раскладка ---------- */

.st-layout {
    position: relative;
    z-index: 2;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
    grid-template-rows: 1fr auto;
    align-items: center;
    gap: 0 40px;
    padding: 8px 7vw 28px 40px;
}

/* Сенсорная область сцены нужна только на телефоне */
.st-touchpad {
    display: none;
}

.st-gels {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    animation: st-fade .8s 1.2s both;
}

.st-gels__label {
    margin-right: .25rem;
    color: var(--st-subtle);
    font: 500 .72rem/1 var(--st-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
}

.st-gel {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 40px;
    padding: 0 .85rem 0 .55rem;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .04);
    color: var(--st-muted);
    font: 600 .8rem/1 var(--st-sans);
    cursor: pointer;
    transition: border-color .2s, background-color .2s, color .2s;
}

.st-gel i {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgb(var(--g));
    box-shadow: 0 0 10px rgba(var(--g), .55), inset 0 0 0 2px rgba(255, 255, 255, .3);
}

.st-gel:hover {
    border-color: rgba(255, 255, 255, .3);
    color: var(--st-text);
}

.st-gel[aria-pressed="true"] {
    border-color: rgba(var(--g), .8);
    background: rgba(var(--g), .12);
    color: var(--st-text);
}

.st-main {
    grid-column: 2;
    grid-row: 1 / 3;
    min-width: 0;
}

/* ---------- Карточка ---------- */

.st-card {
    --ea: 0deg;
    --clx: 0px;
    --cly: 0px;
    --csx: 0px;
    --csy: 30px;
    position: relative;
    padding: 36px 32px 26px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 24px;
    background: rgba(15, 15, 18, .74);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    box-shadow: var(--csx) var(--csy) 80px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .05);
    animation: st-card-in 1s var(--st-ease) .45s both;
}

@keyframes st-card-in {
    from { opacity: 0; translate: 0 26px; }
}

/* Отсвет на лицевой стороне со стороны света */
.st-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(420px circle at var(--clx) var(--cly), rgba(var(--gel), calc(.11 * var(--pow))), transparent 65%);
    pointer-events: none;
}

/* Край, освещённый светом: яркая дуга поворачивается к источнику */
.st-card__edge {
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from calc(var(--ea) - 70deg), rgba(var(--gel), 0) 0deg, rgba(var(--gel), .9) 70deg, rgba(var(--gel), 0) 140deg, rgba(var(--gel), 0) 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    opacity: var(--pow);
    pointer-events: none;
}

/* После появления анимация снимается, чтобы тряска при ошибке не запускала появление заново */
.st-card.is-ready {
    animation: none;
}

.st-card.is-shake {
    animation: st-shake .5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes st-shake {
    20%, 80% { translate: 3px 0; }
    30%, 50%, 70% { translate: -7px 0; }
    40%, 60% { translate: 7px 0; }
}

.st-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 .9rem;
    color: var(--st-muted);
    font: 500 .72rem/1 var(--st-mono);
    letter-spacing: .16em;
    text-transform: uppercase;
}

.st-eyebrow i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgb(var(--gel));
    box-shadow: 0 0 10px rgb(var(--gel));
}

.st-title {
    margin: 0;
    font: 800 1.9rem/1.12 var(--st-sans);
    letter-spacing: -.02em;
}

.st-lead {
    margin: .6rem 0 1.6rem;
    color: var(--st-muted);
    font-size: .95rem;
    line-height: 1.5;
}

/* ---------- Поля ---------- */

.st-field {
    margin-bottom: 1rem;
}

.st-field__label {
    display: block;
    margin-bottom: .45rem;
    color: var(--st-muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.st-field__box {
    position: relative;
}

.st-field__icon {
    position: absolute;
    left: 15px;
    top: 50%;
    width: 20px;
    height: 20px;
    color: var(--st-subtle);
    transform: translateY(-50%);
    pointer-events: none;
    transition: color .2s;
}

.st-field__box:focus-within .st-field__icon {
    color: rgb(var(--gel));
}

.st-input {
    display: block;
    width: 100%;
    height: 54px;
    padding: 0 16px 0 46px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    background: rgba(255, 255, 255, .05);
    color: var(--st-text);
    font: 600 1rem/1.2 var(--st-sans);
    caret-color: rgb(var(--gel));
    transition: border-color .2s, background-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
}

.st-input::placeholder {
    color: rgba(243, 241, 236, .28);
    font-weight: 500;
}

.st-input:hover {
    border-color: rgba(255, 255, 255, .2);
}

.st-input:focus {
    outline: none;
    border-color: rgba(var(--gel), .75);
    background: rgba(255, 255, 255, .07);
    box-shadow: 0 0 0 4px rgba(var(--gel), .14);
}

.st-input:-webkit-autofill,
.st-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--st-text);
    -webkit-box-shadow: 0 0 0 100px #1c1c21 inset;
    transition: background-color 9999s;
}

.st-input.is-invalid {
    border-color: rgba(255, 93, 108, .75);
}

.st-field__error {
    display: none;
    margin-top: .45rem;
    color: var(--st-err);
    font-size: .82rem;
    font-weight: 700;
}

.st-field__error:not(:empty) {
    display: block;
}

.st-field--password .st-input {
    padding-right: 54px;
}

.st-eye {
    position: absolute;
    right: 5px;
    top: 5px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--st-muted);
    cursor: pointer;
}

.st-eye:hover {
    background: rgba(255, 255, 255, .08);
    color: var(--st-text);
}

.st-eye svg {
    width: 20px;
    height: 20px;
}

.st-eye .st-eye__shut,
.st-eye[aria-pressed="true"] .st-eye__open {
    display: none;
}

.st-eye[aria-pressed="true"] .st-eye__shut {
    display: block;
}

.st-caps {
    margin: .45rem 0 0;
    color: var(--st-warn);
    font-size: .8rem;
    font-weight: 700;
}

.st-remember {
    margin: .2rem 0 1.1rem;
}

.st-switch {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    min-height: 44px;
    color: var(--st-muted);
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.st-switch__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.st-switch__track {
    position: relative;
    flex: none;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    transition: background-color .25s;
}

.st-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform .3s var(--st-ease);
}

.st-switch__input:checked + .st-switch__track {
    background: rgb(var(--gel));
}

.st-switch__input:checked + .st-switch__track::after {
    transform: translateX(18px);
    background: #141417;
}

.st-switch__input:focus-visible + .st-switch__track {
    outline: 2px solid rgb(var(--gel));
    outline-offset: 3px;
}

/* ---------- Кнопка и индикатор вспышки ---------- */

.st-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    width: 100%;
    height: 58px;
    border: 0;
    border-radius: 16px;
    background: #f6f4ef;
    color: #121215;
    font: 800 1.05rem/1 var(--st-sans);
    cursor: pointer;
    transition: transform .2s var(--st-ease), box-shadow .3s, background-color .3s;
}

.st-button svg {
    width: 20px;
    height: 20px;
}

.st-button:hover {
    background: #fff;
    box-shadow: 0 0 0 1px rgba(var(--gel), .6), 0 12px 40px rgba(var(--gel), .35);
    transform: translateY(-2px);
}

.st-button:active {
    transform: translateY(0) scale(.985);
}

.st-button.is-busy {
    pointer-events: none;
    opacity: .85;
}

.st-ready {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin: .8rem 0 0;
    color: var(--st-subtle);
    font: 500 .7rem/1 var(--st-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.st-ready i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--st-ok);
    box-shadow: 0 0 8px var(--st-ok);
}

.st-ready[data-state="busy"] i {
    background: var(--st-warn);
    box-shadow: 0 0 8px var(--st-warn);
    animation: st-blink .4s steps(2) infinite;
}

.st-ready[data-state="error"] {
    color: var(--st-err);
}

.st-ready[data-state="error"] i {
    background: var(--st-err);
    box-shadow: 0 0 8px var(--st-err);
}

.st-hint-text {
    margin: 1.1rem 0 0;
    color: var(--st-subtle);
    font-size: .82rem;
    text-align: center;
}

/* Вспышка: белый всплеск от того места, где стоит свет */
.st-flash {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: radial-gradient(circle at var(--fx, 50%) var(--fy, 30%), #fff 0%, rgba(255, 255, 255, .92) 28%, rgba(255, 255, 255, .7) 100%);
    opacity: 0;
    pointer-events: none;
}

.st-flash.is-on {
    animation: st-flash .55s ease-out;
}

@keyframes st-flash {
    0% { opacity: 0; }
    10% { opacity: 1; }
    100% { opacity: 0; }
}

/* ---------- Камера на штативе ---------- */

/* Положение и ширину задаёт скрипт (--cam-x, --cam-y, --cam-w) - по буквам и полу;
   пропорции и место экрана - из camera-geom.json генератора рисунка */
.st-cam {
    --cam-rt: .4;
    --cam-rl: .2;
    position: absolute;
    left: var(--cam-x, 60%);
    top: var(--cam-y, 70%);
    width: var(--cam-w, 230px);
    aspect-ratio: 168.69 / 304.83;
    pointer-events: none;
    animation: st-cam-in 1.1s var(--st-ease) .5s both;
}

@keyframes st-cam-in {
    from { opacity: 0; translate: 0 30px; }
}

.st-cam__inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.st-cam.is-jolt .st-cam__inner {
    animation: st-cam-jolt .18s ease-out;
}

/* Зеркало и затвор чуть встряхивают камеру */
@keyframes st-cam-jolt {
    30% { translate: 0 1.5px; }
    60% { translate: 0 -.5px; }
}

.st-cam__svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Свет студии на камере: кромки и грани со стороны софтбокса подкрашиваются фильтром */
.st-cam__rim {
    fill: none;
    stroke: rgb(var(--gel));
    stroke-width: .7;
    stroke-linecap: round;
    opacity: calc(var(--cam-rt) * .55);
}

.st-cam__rim--left {
    opacity: calc(var(--cam-rl) * .6);
}

.st-cam__rim--back {
    stroke-width: .5;
    opacity: calc(var(--cam-rt) * .35);
}

@supports (color: color-mix(in srgb, red, blue)) {
    .st-cam__f--top {
        fill: color-mix(in srgb, var(--c), rgb(var(--gel)) calc(var(--cam-rt) * 20%));
        stroke: color-mix(in srgb, var(--c), rgb(var(--gel)) calc(var(--cam-rt) * 20%));
    }

    .st-cam__f--left {
        fill: color-mix(in srgb, var(--c), rgb(var(--gel)) calc(var(--cam-rl) * 16%));
        stroke: color-mix(in srgb, var(--c), rgb(var(--gel)) calc(var(--cam-rl) * 16%));
    }
}

.st-cam__ribs {
    stroke: #000;
    stroke-width: .55;
    opacity: .55;
}

/* Фокусировочное кольцо проворачивается при наводке */
.st-cam__ribs--focus {
    transform-box: view-box;
    transition: rotate .5s cubic-bezier(.3, 1.3, .5, 1);
}

.st-cam__leg-hl {
    fill: none;
    stroke: rgba(255, 255, 255, .1);
    stroke-width: .6;
}

.st-cam__trig-lcd {
    fill: #27434a;
}

.st-cam__led {
    fill: var(--st-ok);
    filter: drop-shadow(0 0 1.5px var(--st-ok));
    transition: fill .15s;
}

.st-cam__led[data-state="busy"] {
    fill: var(--st-warn);
    filter: drop-shadow(0 0 1.5px var(--st-warn));
    animation: st-blink .4s steps(2) infinite;
}

.st-cam__led[data-state="error"] {
    fill: var(--st-err);
    filter: drop-shadow(0 0 1.5px var(--st-err));
}

.st-cam__led[data-state="fire"] {
    fill: #fff;
    filter: drop-shadow(0 0 3px #ff4d5e);
}

/* Экран: живой вид сцены. Повёрнут вместе с задней стенкой камеры */
.st-cam__lcd {
    position: absolute;
    left: 19.649%;
    top: 31.087%;
    width: 50.146%;
    height: 18.25%;
    overflow: hidden;
    border-radius: 1px;
    background: #040405;
    transform: skewY(-6.131deg);
    transform-origin: 0 0;
}

/* Блик на стекле экрана */
.st-cam__lcd::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(255, 255, 255, .1) 0%, rgba(255, 255, 255, .02) 38%, transparent 40%);
    pointer-events: none;
}

.st-cam__live {
    display: block;
    width: 100%;
    height: 100%;
}

.st-cam.is-hunt .st-cam__live {
    animation: st-cam-hunt .42s ease-in-out;
}

/* Наводка: картинка «плавает» и встаёт в резкость */
@keyframes st-cam-hunt {
    0% { filter: blur(0); }
    35% { filter: blur(1.6px); }
    65% { filter: blur(.5px); }
    100% { filter: blur(0); }
}

.st-cam.is-nofocus .st-cam__live {
    filter: blur(1.4px);
    transition: filter .3s;
}

.st-cam.is-review .st-cam__live {
    animation: st-cam-review 1.6s ease-out;
}

@keyframes st-cam-review {
    0% { filter: brightness(2.4) saturate(.6); }
    20% { filter: brightness(1.15); }
    100% { filter: brightness(1); }
}

/* Рамка точки фокусировки: белая, при полунажатии - зелёная, нет фокуса - мигает красным */
.st-cam__af {
    position: absolute;
    left: 50%;
    top: 46%;
    width: 16%;
    height: 22%;
    translate: -50% -50%;
    transition: scale .25s var(--st-ease);
}

.st-cam__af i {
    position: absolute;
    width: 26%;
    height: 30%;
    border: 0 solid rgba(255, 255, 255, .85);
}

.st-cam__af i:nth-child(1) { left: 0; top: 0; border-width: 1px 0 0 1px; }
.st-cam__af i:nth-child(2) { right: 0; top: 0; border-width: 1px 1px 0 0; }
.st-cam__af i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 1px 1px; }
.st-cam__af i:nth-child(4) { right: 0; bottom: 0; border-width: 0 1px 1px 0; }

.st-cam.is-af .st-cam__af {
    scale: .82;
}

.st-cam.is-af .st-cam__af i {
    border-color: #5ef2a0;
}

.st-cam.is-nofocus .st-cam__af i {
    border-color: var(--st-err);
    animation: st-blink .3s steps(2) 5;
}

.st-cam.is-review .st-cam__af {
    opacity: 0;
}

.st-cam__info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1px 4% 2px;
    background: rgba(0, 0, 0, .45);
    color: rgba(255, 255, 255, .85);
    /* Размер - от ширины камеры, чтобы строка помещалась на экране любой камеры */
    font: 500 calc(var(--cam-w, 230px) * .027)/1.3 var(--st-mono);
    letter-spacing: .02em;
    white-space: nowrap;
    overflow: hidden;
}

/* Шторка затвора на время кадра */
.st-cam__curtain {
    position: absolute;
    inset: 0;
    background: #000;
    transform: scaleY(0);
    transform-origin: 50% 0;
}

.st-cam.is-shutter .st-cam__curtain {
    animation: st-cam-curtain .16s linear;
}

@keyframes st-cam-curtain {
    0% { transform: scaleY(0); transform-origin: 50% 0; }
    45% { transform: scaleY(1); transform-origin: 50% 0; }
    55% { transform: scaleY(1); transform-origin: 50% 100%; }
    100% { transform: scaleY(0); transform-origin: 50% 100%; }
}

/* Радиосигнал синхронизатора - в сторону софтбокса */
.st-cam__waves {
    position: absolute;
    left: 58.985%;
    top: 7.249%;
    width: 0;
    height: 0;
    rotate: var(--wa, -150deg);
}

.st-cam__waves i {
    position: absolute;
    left: -9px;
    top: -9px;
    width: 18px;
    height: 18px;
    border: 1.5px solid transparent;
    border-right-color: rgb(var(--gel));
    border-radius: 50%;
    opacity: 0;
}

.st-cam.is-firing .st-cam__waves i {
    animation: st-cam-wave .55s ease-out both;
}

.st-cam.is-firing .st-cam__waves i:nth-of-type(2) {
    animation-delay: .08s;
}

.st-cam.is-firing .st-cam__waves i:nth-of-type(3) {
    animation-delay: .16s;
}

/* Сам синхронизатор в момент срабатывания */
.st-cam__waves b {
    position: absolute;
    left: -5px;
    top: -5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px 4px rgba(255, 77, 94, .75);
    opacity: 0;
}

.st-cam.is-firing .st-cam__waves b {
    animation: st-cam-fire .35s ease-out;
}

@keyframes st-cam-fire {
    0% { opacity: 1; scale: 1.2; }
    100% { opacity: 0; scale: .4; }
}

@keyframes st-cam-wave {
    0% { opacity: 0; scale: .5; }
    20% { opacity: 1; }
    100% { opacity: 0; scale: 3.2; }
}

html.st-cam-hover,
html.st-cam-hover body {
    cursor: pointer;
}

/* ---------- Планшет и телефон ---------- */

@media (max-width: 899.98px) {
    /* На телефоне сцена прокручивается вместе со страницей, иначе подсказка и фильтры уезжают на буквы */
    .st-studio {
        position: absolute;
    }

    .st-word {
        left: 50%;
        bottom: auto;
        top: calc(env(safe-area-inset-top) + 150px);
        font-size: min(21vw, 140px);
        translate: -50% 0;
    }

    @keyframes st-word-in {
        from { opacity: 0; }
    }

    .st-softbox__head {
        left: -34px;
        top: -24px;
        width: 68px;
        height: 48px;
        border-radius: 8px;
    }

    .st-softbox__pole {
        top: 24px;
    }

    .st-softbox__legs {
        top: calc(24px + var(--pole) - 21px);
    }

    .st-top {
        padding: calc(14px + env(safe-area-inset-top)) 16px 4px;
    }

    .st-wordmark svg {
        height: 42px;
    }

    .st-report {
        padding: 0 .9rem;
        font-size: .82rem;
    }

    .st-layout {
        display: block;
        padding: 0 16px 24px;
    }

    /* Сцена над формой: коснитесь - и свет переедет туда. Высоту до «пола» под буквами
       задаёт скрипт */
    .st-touchpad {
        position: relative;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        height: 200px;
        padding-bottom: 10px;
        /* Вертикальный свайп прокручивает страницу, касание и горизонтальное ведение двигают свет */
        touch-action: pan-y;
        pointer-events: auto;
    }

    .st-gels {
        flex-wrap: nowrap;
        justify-content: flex-start;
        margin: 0 -16px 14px;
        padding: 4px 16px;
        overflow-x: auto;
        scrollbar-width: none;
        /* Затухание у краёв - видно, что полосу можно прокрутить */
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 32px), transparent);
        mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 32px), transparent);
    }

    .st-gels::-webkit-scrollbar {
        display: none;
    }

    .st-gel {
        flex: none;
    }

    .st-cam__info {
        display: none;
    }

    .st-cam__svg {
        -webkit-mask-image: linear-gradient(to bottom, #000 54%, transparent 60%);
        mask-image: linear-gradient(to bottom, #000 54%, transparent 60%);
    }

    .st-card {
        padding: 28px 20px 22px;
        border-radius: 22px;
    }

    .st-title {
        font-size: 1.6rem;
    }

    .st-lead {
        font-size: .9rem;
        margin-bottom: 1.3rem;
    }
}

@media (min-width: 600px) and (max-width: 899.98px) {
    .st-main {
        max-width: 460px;
        margin: 0 auto;
    }

    .st-gels {
        justify-content: center;
    }
}

@media (max-width: 359.98px) {
    .st-report span {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .st-word,
    .st-softbox,
    .st-cam,
    .st-cam *,
    .st-top,
    .st-gels,
    .st-card {
        animation: none !important;
    }

    .st-flash {
        display: none;
    }
}
