.fpe-root {
    direction: rtl;
    font-family: system-ui,-apple-system,"Segoe UI",Tahoma,sans-serif
}

.fpe-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 10px
}

.fpe-group {
    display: flex;
    gap: 6px
}

.fpe-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    touch-action: manipulation
}

    .fpe-btn:hover:not(:disabled) {
        background: #273449
    }

    .fpe-btn:disabled {
        opacity: .4;
        cursor: not-allowed
    }

    .fpe-btn.on {
        background: #2563eb;
        border-color: #93c5fd;
        color: #fff;
        box-shadow: 0 0 0 3px rgba(59,130,246,.28)
    }

    .fpe-btn.primary {
        background: #059669;
        border-color: #34d399;
        color: #fff
    }

.fpe-field {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #94a3b8
}

    .fpe-field input {
        width: 74px;
        padding: 6px 8px;
        border-radius: 8px;
        background: #0b1220;
        border: 1px solid #334155;
        color: #e2e8f0;
        font-size: 14px;
        text-align: center;
        direction: ltr
    }

.fpe-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 800/500;
    line-height: 0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.45);
    overflow: hidden;
    background: #f8fafc;
    touch-action: none
}

.fpe-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none
}

.fpe-panel {
    margin-top: 12px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit,minmax(140px,1fr))
}

.fpe-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 10px 14px
}

    .fpe-card .k {
        font-size: 12px;
        color: #94a3b8;
        margin-bottom: 4px
    }

    .fpe-card .v {
        font-size: 20px;
        font-weight: 700;
        direction: ltr;
        text-align: right
    }
