.fsc-app {
    max-width: 980px;
    margin: 0 auto;
    padding: 18px 16px 42px;
    color: #101036;
    font-family: Arial, Helvetica, sans-serif;
}

.fsc-stage-wrap {
    max-width: 640px;
    margin: 0 auto 22px;
}

.fsc-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #f3f4f6;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(16, 16, 54, 0.08);
    touch-action: none;
}

.fsc-video,
.fsc-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.fsc-video {
    display: none;
}

.fsc-preview {
    display: block;
}

.fsc-guide-line {
    position: absolute;
    top: 10%;
    bottom: 10%;
    left: 50%;
    width: 2px;
    margin-left: -1px;
    border: 0;
    padding: 0;
    background: rgba(255, 77, 109, 0.92);
    cursor: ew-resize;
    box-shadow: 0 0 0 1px rgba(255, 77, 109, 0.15);
}

.fsc-guide-line::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    width: 18px;
    height: 18px;
    margin-left: -9px;
    border-radius: 999px;
    background: rgba(255, 77, 109, 0.95);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
}

.fsc-overlay-text {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.92);
    color: #475569;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 999px;
    max-width: calc(100% - 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fsc-status {
    margin: 12px 0 0;
    text-align: center;
    font-size: 15px;
    line-height: 1.5;
    color: #475569;
}

.fsc-controls,
.fsc-downloads {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.fsc-controls {
    margin: 0 auto 20px;
}

.fsc-btn {
    appearance: none;
    min-width: 170px;
    padding: 14px 22px;
    border: 1.5px solid #101036;
    border-radius: 999px;
    background: #ffffff;
    color: #101036;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.fsc-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(16, 16, 54, 0.1);
    background: #101036;
    color: #ffffff;
}

.fsc-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.fsc-hidden-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.fsc-adjustments {
    max-width: 760px;
    margin: 0 auto 28px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid rgba(16, 16, 54, 0.08);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(16, 16, 54, 0.05);
}

.fsc-adjustments.is-hidden,
.fsc-results.is-hidden,
.fsc-file-sheet.is-hidden {
    display: none;
}

.fsc-adjustments-head h3 {
    margin: 0 0 6px;
    font-size: 22px;
    color: #101036;
}

.fsc-adjustments-head p {
    margin: 0 0 16px;
    color: #475569;
    line-height: 1.5;
}

.fsc-adjustments-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.fsc-adjustment {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #101036;
    font-size: 15px;
}

.fsc-adjustment strong {
    font-weight: 700;
}

.fsc-adjustment input[type="range"] {
    width: 100%;
}

.fsc-results {
    margin-top: 20px;
}

.fsc-result-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.fsc-card {
    margin: 0;
    padding: 18px;
    background: #ffffff;
    border: 1px solid rgba(16, 16, 54, 0.08);
    border-radius: 18px;
    box-shadow: 0 12px 26px rgba(16, 16, 54, 0.05);
}

.fsc-card canvas {
    display: block;
    width: 100%;
    height: auto;
    background: #ffffff;
    border-radius: 12px;
}

.fsc-card figcaption {
    padding-top: 14px;
    text-align: center;
    color: #475569;
    font-size: 17px;
}

.fsc-downloads {
    margin-top: 20px;
}

.fsc-file-sheet {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.fsc-file-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 16, 54, 0.38);
}

.fsc-file-sheet-panel {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    width: min(460px, calc(100% - 24px));
    background: #ffffff;
    border-radius: 22px;
    padding: 14px;
    box-shadow: 0 22px 44px rgba(16, 16, 54, 0.22);
}

.fsc-file-sheet-btn {
    display: block;
    width: 100%;
    margin: 0;
    padding: 16px 18px;
    border: 1.5px solid #101036;
    border-radius: 999px;
    background: #ffffff;
    color: #101036;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.fsc-file-sheet-btn + .fsc-file-sheet-btn {
    margin-top: 10px;
}

.fsc-file-sheet-btn-cancel {
    background: #101036;
    color: #ffffff;
}

body.fsc-no-scroll {
    overflow: hidden;
}

@media (max-width: 900px) {
    .fsc-adjustments-grid,
    .fsc-result-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .fsc-app {
        padding: 14px 12px 32px;
    }

    .fsc-stage {
        border-radius: 14px;
    }

    .fsc-btn {
        width: 100%;
        min-width: 0;
    }

    .fsc-controls,
    .fsc-downloads {
        gap: 10px;
    }

    .fsc-adjustments {
        padding: 16px;
    }

    .fsc-overlay-text {
        font-size: 13px;
    }
}
