.rp-sync-floating {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    pointer-events: none;
}

.rp-sync-button {
    pointer-events: auto;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 30px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 10px 30px -16px rgba(37, 99, 235, 0.65);
    backdrop-filter: blur(12px);
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.rp-sync-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px -16px rgba(37, 99, 235, 0.8);
}

.rp-sync-button.is-dirty {
    color: #c2410c;
    border-color: rgba(234, 88, 12, 0.24);
    background: rgba(255, 247, 237, 0.98);
}

.rp-sync-button.is-syncing {
    color: #1d4ed8;
    background: rgba(239, 246, 255, 0.98);
}

.rp-sync-button__label {
    letter-spacing: 0.02em;
}

.rp-sync-button__dot {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f97316;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
}

.rp-sync-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.rp-sync-modal.is-open {
    display: block;
}

.rp-sync-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(8px);
}

.rp-sync-modal__panel {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(92vw, 460px);
    transform: translate(-50%, -50%);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    box-shadow: 0 36px 80px -28px rgba(15, 23, 42, 0.45);
    padding: 22px 22px 18px;
}

.rp-sync-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.rp-sync-modal__eyebrow {
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rp-sync-modal__title {
    margin: 4px 0 0;
    font-size: 22px;
    line-height: 1.15;
    color: #0f172a;
    font-weight: 800;
}

.rp-sync-modal__close {
    border: none;
    background: rgba(241, 245, 249, 0.9);
    color: #475569;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    font-size: 20px;
    cursor: pointer;
}

.rp-sync-modal__status {
    margin: 18px 0 12px;
    color: #334155;
    font-size: 14px;
    line-height: 1.6;
}

.rp-sync-modal__intro {
    margin: 18px 0 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.65;
}

.rp-sync-progress {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.rp-sync-progress__bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    transition: width 0.28s ease;
}

.rp-sync-progress__value {
    margin-top: 8px;
    text-align: right;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
}

.rp-sync-modal__keybox {
    margin-top: 16px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.rp-sync-modal__label {
    display: block;
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
}

.rp-sync-modal__input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 14px;
    padding: 11px 12px;
    font-size: 13px;
    color: #0f172a;
    background: white;
    outline: none;
}

.rp-sync-modal__input:focus {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.rp-sync-modal__hint {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.55;
}

.rp-sync-choice-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.rp-sync-choice {
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(248, 250, 252, 0.92);
    border-radius: 18px;
    padding: 14px;
}

.rp-sync-choice__title {
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
}

.rp-sync-choice__desc {
    margin: 8px 0 12px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.6;
}

.rp-sync-modal__actions {
    margin-top: 18px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.rp-sync-modal__button {
    min-width: 92px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: white;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 16px;
    cursor: pointer;
}

.rp-sync-modal__button.is-primary {
    border-color: rgba(37, 99, 235, 0.16);
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: white;
}

.rp-sync-modal__button:disabled {
    opacity: 0.65;
    cursor: wait;
}

@media (max-width: 640px) {
    .rp-sync-floating {
        right: -2px;
    }

    .rp-sync-button {
        min-width: 54px;
        height: 28px;
        font-size: 11px;
    }

    .rp-sync-modal__panel {
        width: min(94vw, 420px);
        border-radius: 20px;
        padding: 18px;
    }
}
