.sbst-wrap {
    --sbst-blue: #11a6d8;
    --sbst-blue-dark: #0d8db8;
    --sbst-pink: #ec2dad;
    --sbst-pink-dark: #c82395;
    --sbst-text: #172033;
    --sbst-muted: #526070;
    --sbst-panel: #fff6fc;
    max-width: 1080px;
    margin: 28px auto;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--sbst-text);
}

.sbst-card {
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(17, 166, 216, 0.24);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.sbst-header {
    position: relative;
    text-align: center;
    padding: 42px 22px 38px;
    color: #ffffff;
    background: linear-gradient(180deg, #10a6d8 0%, #ec2dad 100%);
    overflow: hidden;
}

.sbst-header:before {
    content: "";
    position: absolute;
    inset: -80px;
    background: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.25), transparent 34%), radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.18), transparent 28%);
    pointer-events: none;
}

.sbst-header > * {
    position: relative;
}

.sbst-header h2 {
    margin: 0;
    font-size: 44px;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #ffffff;
}

.sbst-header p {
    margin: 14px auto 0;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.96);
    font-size: 21px;
    line-height: 1.35;
}

.sbst-body {
    padding: 26px;
    background: linear-gradient(180deg, #ffffff 0%, #fff6fc 100%);
}

.sbst-intro {
    max-width: 840px;
    margin: 0 auto 22px;
    text-align: center;
    font-size: 20px;
    line-height: 1.45;
    color: var(--sbst-text);
}

.sbst-mode-box {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

.sbst-mode {
    border: 1px solid rgba(17, 166, 216, 0.22);
    border-radius: 999px;
    background: #ffffff;
    color: var(--sbst-text);
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 900;
    font-size: 17px;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.05);
}

.sbst-mode:hover,
.sbst-mode:focus {
    border-color: rgba(234, 42, 174, 0.42);
}

.sbst-mode.is-active {
    background: var(--sbst-blue);
    color: #ffffff;
    border-color: var(--sbst-blue);
    box-shadow: 0 8px 18px rgba(17, 166, 216, 0.24);
}

.sbst-help,
.sbst-camera-instructions {
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(17, 166, 216, 0.10), rgba(234, 42, 174, 0.08));
    border: 1px solid rgba(17, 166, 216, 0.20);
    line-height: 1.45;
    margin-bottom: 16px;
    color: var(--sbst-text);
}

.sbst-camera-box {
    margin: 0 0 18px;
    padding: 20px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(17, 166, 216, 0.22);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
}

.sbst-camera-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.sbst-camera-stage {
    margin: 0 0 14px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--sbst-text);
    border: 2px solid rgba(17, 166, 216, 0.22);
}

.sbst-camera-video {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    background: var(--sbst-text);
}

.sbst-camera-canvas {
    display: none;
}

.sbst-fallback-line {
    margin: 0;
    color: var(--sbst-muted);
    font-size: 15px;
    line-height: 1.4;
    text-align: center;
}

.sbst-file-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    border-radius: 999px;
    background: #172033;
    color: #ffffff;
    text-align: center;
    cursor: pointer;
    font-weight: 900;
    text-decoration: none;
}

.sbst-file-label:hover,
.sbst-file-label:focus-within {
    background: #101828;
    color: #ffffff;
}

.sbst-file-title {
    display: block;
    font-weight: 900;
    color: inherit;
    font-size: 17px;
}

.sbst-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
    padding: 0;
    margin: -1px;
}

.sbst-preview {
    margin: 0 0 18px;
    border-radius: 20px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(17, 166, 216, 0.22);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
}

.sbst-preview img {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    background: #ffffff;
}

.sbst-btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 900;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.12s ease, opacity 0.12s ease, background 0.12s ease;
}

.sbst-btn:active {
    transform: translateY(1px);
}

.sbst-btn[disabled] {
    opacity: 0.62;
    cursor: wait;
}

.sbst-btn-primary {
    width: 100%;
    min-height: 54px;
    padding: 14px 22px;
    background: var(--sbst-blue);
    color: #ffffff;
    font-size: 17px;
    box-shadow: 0 8px 18px rgba(17, 166, 216, 0.24);
}

.sbst-btn-primary:hover,
.sbst-btn-primary:focus {
    background: var(--sbst-blue-dark);
    color: #ffffff;
}

.sbst-btn-secondary {
    min-height: 42px;
    padding: 10px 16px;
    background: #172033;
    color: #ffffff;
    font-size: 15px;
}

.sbst-btn-secondary:hover,
.sbst-btn-secondary:focus {
    background: #101828;
    color: #ffffff;
}

.sbst-btn-light {
    min-height: 42px;
    padding: 10px 16px;
    background: #edf0f6;
    color: #667085;
    font-size: 15px;
    box-shadow: none;
}

.sbst-btn-light:hover,
.sbst-btn-light:focus {
    background: #e4e7ee;
    color: #4b5565;
}

.sbst-status {
    min-height: 24px;
    margin: 14px 0;
    font-weight: 800;
    color: var(--sbst-text);
    text-align: center;
}

.sbst-status.is-error {
    color: var(--sbst-pink-dark);
}

.sbst-result {
    margin-top: 18px;
    padding: 22px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(17, 166, 216, 0.22);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
}

.sbst-result-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.sbst-result h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1.12;
    color: #101828;
    letter-spacing: -0.02em;
}

.sbst-result-text {
    font-size: 18px;
    line-height: 1.62;
    color: var(--sbst-text);
    margin-bottom: 18px;
}

.sbst-disclaimer {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 16px;
    color: var(--sbst-text);
    background: #fff0fa;
    border: 1px solid rgba(234, 42, 174, 0.18);
    font-size: 15px;
    line-height: 1.45;
}

.sbst-locked {
    text-align: center;
    padding: 20px 10px;
}

.sbst-locked h3 {
    margin: 0 0 8px;
    font-size: 24px;
    color: #101828;
}

.sbst-locked p {
    margin: 0 0 18px;
    line-height: 1.5;
    color: var(--sbst-muted);
}

@media (max-width: 900px) {
    .sbst-header h2 {
        font-size: 38px;
    }
}

@media (max-width: 640px) {
    .sbst-wrap {
        margin: 14px auto;
    }

    .sbst-card {
        border-radius: 0;
    }

    .sbst-header {
        padding: 34px 16px 30px;
    }

    .sbst-header h2 {
        font-size: 36px;
    }

    .sbst-header p {
        font-size: 18px;
    }

    .sbst-body {
        padding: 18px 14px 24px;
    }

    .sbst-intro {
        font-size: 17px;
        text-align: left;
    }

    .sbst-mode-box,
    .sbst-camera-actions {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .sbst-mode {
        font-size: 17px;
        min-height: 50px;
    }

    .sbst-camera-box,
    .sbst-result {
        padding: 18px;
    }

    .sbst-result-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .sbst-btn-primary,
    .sbst-file-label {
        min-height: 54px;
        font-size: 17px;
    }
}
