/* Motion helpers kept outside Tailwind (keyframes / slider). */

.rv {
    opacity: 0;
    transform: translateY(18px);
}

.rv.in {
    opacity: 1;
    transform: none;
    transition: .45s cubic-bezier(.16, 1, .3, 1);
}

@keyframes tw-ping {
    0% {
        transform: scale(1);
        opacity: .9;
    }
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

@keyframes tw-float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.tw-ping::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: tw-ping 1.5s ease-out infinite;
}

.tw-float {
    animation: tw-float 7s ease-in-out infinite;
}

.tw-float-rev {
    animation: tw-float 9s ease-in-out infinite reverse;
}

.home-plans {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 12px;
}

.home-plans::-webkit-scrollbar {
    display: none;
}

.home-plans .plan {
    scroll-snap-align: center;
    min-width: min(78%, 280px);
    flex: 0 0 auto;
}

.pd {
    width: 7px;
    height: 7px;
    border-radius: 99px;
    background: #e2e8f0;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.pd.on {
    width: 18px;
    background: #4f46e5;
}

.fr-logo-fallback,
.fr-card-logo .fr-logo-fallback {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
    font-weight: 900;
}

.fr-brand-mark {
    position: relative;
}

.fr-brand-mark .fr-brand-logo-img,
.fr-brand-mark>img {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    background: #fff;
}

.fr-brand-mark:not(.is-fallback) .fr-logo-fallback {
    display: none;
}

.fr-brand-mark.is-fallback .fr-brand-logo-img,
.fr-brand-mark.is-fallback>img {
    display: none;
}

@keyframes tw-live {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.65);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

@keyframes tw-sheen {
    0%,
    100% {
        transform: translateX(-8%) rotate(0deg);
    }
    50% {
        transform: translateX(10%) rotate(4deg);
    }
}

@keyframes tw-ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes tw-orbit {
    to {
        transform: rotate(360deg);
    }
}

.tw-live-dot {
    animation: tw-live 1.6s ease-in-out infinite;
}

.tw-sheen::after {
    content: '';
    position: absolute;
    inset: -20% -30%;
    z-index: 1;
    background: linear-gradient(118deg, transparent 18%, rgba(255, 255, 255, .45) 38%, rgba(16, 185, 129, .08) 52%, transparent 72%);
    pointer-events: none;
    animation: tw-sheen 9s ease-in-out infinite;
}

.fr-ticker-track {
    display: inline-flex;
    width: max-content;
    animation: tw-ticker 28s linear infinite;
}

.fr-ticker-line {
    display: inline-block;
    padding-right: 3rem;
    font-size: 10px;
    font-weight: 600;
    color: #0f172a;
}

#balanceAmount.is-hidden {
    filter: blur(8px);
    user-select: none;
}

#balanceAmount.is-syncing {
    transform: scale(1.03);
    filter: brightness(1.15);
}

.fr-trend-up.down {
    color: #f87171;
}

.fr-save-micro {
    display: inline-block;
    font-size: 0.52em;
    font-weight: 700;
    color: #6366f1;
    letter-spacing: 0.06em;
    margin-left: 2px;
    vertical-align: 0.18em;
}

.dp-method.is-active {
    border-color: #4f46e5;
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.dp-err {
    display: none;
}

.dp-err.is-show {
    display: block;
}

.dp-copy-btn.is-ok {
    background: #16a34a !important;
}

.dp-field input.is-error {
    border-color: #ef4444;
    background: #fef2f2;
}

.dp-upload.is-error {
    border-color: #ef4444;
    background: #fef2f2;
}

.fr-save-modal.hidden {
    display: none !important;
}

.tw-orbit-ring {
    animation: tw-orbit 12s linear infinite;
}

.tw-spin-dash {
    animation: tw-orbit 14s linear infinite;
}

@keyframes tw-bolt {
    0%,
    100% {
        opacity: 0.85;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-50%) scale(1.06);
    }
}

.tw-bolt {
    animation: tw-bolt 2.4s ease-in-out infinite;
}

/* Saving Wallet â€” advanced fan + cool loop */

.sw-machine {
    padding-bottom: 0.4rem !important;
    --fan-duration: 0s;
    --fan-play: paused;
    --flow-dur: 1.6s;
}

.sw-xfer {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    padding: 6px 10px 6px 6px;
    border: 0;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(115deg, #4338ca 0%, #4f46e5 42%, #6366f1 100%);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.32), inset 0 1px 0 rgba(255, 255, 255, .22);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.sw-xfer:hover {
    filter: brightness(1.06);
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.4), inset 0 1px 0 rgba(255, 255, 255, .28);
}

.sw-xfer:active {
    transform: scale(0.97);
}

.sw-xfer-ico {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 7px;
    background: rgba(255, 255, 255, .18);
    font-size: 9px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}

.sw-xfer-txt {
    position: relative;
    z-index: 1;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.sw-xfer-sheen {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .28) 48%, transparent 62%);
    transform: translateX(-120%);
    animation: sw-xfer-shine 2.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sw-xfer-shine {
    0%,
    40% {
        transform: translateX(-120%);
    }
    70%,
    100% {
        transform: translateX(120%);
    }
}

.sw-rig {
    width: 118px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    pointer-events: none;
}

.sw-fan-row {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
}

.sw-fan-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sw-fan-wrap {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #e2e8f0, #94a3b8 55%, #64748b);
    box-shadow: inset 0 0 0 2px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(37, 99, 235, 0.2);
    display: grid;
    place-items: center;
}

.sw-grille {
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    border: 1.5px solid rgba(15, 23, 42, 0.18);
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.sw-fan {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    animation: sw-spin var(--fan-duration, 0s) linear infinite;
    animation-play-state: var(--fan-play, paused);
}

.sw-blade {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 7px;
    height: 12px;
    margin-left: -3.5px;
    margin-top: -12px;
    border-radius: 40% 40% 35% 35%;
    background: linear-gradient(180deg, #38bdf8, #2563eb 60%, #1e3a8a);
    transform-origin: 50% 100%;
}

.sw-blade:nth-child(1) {
    transform: rotate(0deg);
}

.sw-blade:nth-child(2) {
    transform: rotate(120deg);
}

.sw-blade:nth-child(3) {
    transform: rotate(240deg);
}

.sw-hub {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #f8fafc, #64748b);
    border: 1px solid rgba(15, 23, 42, 0.25);
    z-index: 2;
}

@keyframes sw-spin {
    to {
        transform: rotate(360deg);
    }
}

/* equipment â€” LEDs inside bay ports only */

.sw-equip {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 5px 4px;
    background: linear-gradient(145deg, #475569, #0f172a);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.28), inset 0 1px 0 rgba(255, 255, 255, .12);
}

.sw-bay {
    position: relative;
    display: block;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f1f5f9, #cbd5e1);
    box-shadow: inset 0 1px 1px rgba(15, 23, 42, .2);
}

.sw-port {
    position: absolute;
    top: 50%;
    right: 3px;
    width: 3.5px;
    height: 3.5px;
    margin-top: -1.75px;
    border-radius: 50%;
    animation: sw-blink 1.05s ease-in-out infinite;
}

.sw-port--red {
    background: #ef4444;
    box-shadow: 0 0 4px #ef4444, 0 0 1px #7f1d1d;
}

.sw-port--yellow {
    background: #facc15;
    box-shadow: 0 0 4px #facc15, 0 0 1px #854d0e;
    animation-delay: 0.48s;
}

.sw-equip--drive .sw-bay:last-child .sw-port {
    animation-delay: 0.25s;
}

.sw-equip--server .sw-bay:last-child .sw-port {
    animation-delay: 0.7s;
}

/* wires tucked behind fan */

.sw-wires {
    position: relative;
    z-index: 1;
    display: block;
    width: 108px;
    height: 28px;
    margin: -16px 0 -2px;
    overflow: visible;
}

.sw-wire {
    stroke-linecap: round;
    fill: none;
    stroke-width: 2.3;
}

.sw-wire--cold {
    stroke: #38bdf8;
    filter: drop-shadow(0 0 2px rgba(56, 189, 248, 0.7));
    opacity: 0.9;
}

.sw-wire--cold-2 {
    stroke: #67e8f9;
    stroke-width: 2.1;
}

.sw-wire--hot {
    stroke: #f97316;
    filter: drop-shadow(0 0 2px rgba(249, 115, 22, 0.7));
    opacity: 0.92;
}

.sw-wire--hot-2 {
    stroke: #ef4444;
    stroke-width: 2.1;
}

.sw-flow {
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-dasharray: 4 10;
    animation: sw-flow-dash var(--flow-dur, 1.6s) linear infinite;
    opacity: 0.95;
}

.sw-flow--cold {
    stroke: #a5f3fc;
    filter: drop-shadow(0 0 2px rgba(103, 232, 249, 0.95));
}

.sw-flow--cold-2 {
    stroke: #e0f2fe;
    stroke-dasharray: 3 11;
    animation-duration: calc(var(--flow-dur, 1.6s) * 1.1);
}

.sw-flow--hot {
    stroke: #fdba74;
    filter: drop-shadow(0 0 2px rgba(251, 146, 60, 0.95));
    stroke-dasharray: 3.5 9;
}

.sw-flow--hot-2 {
    stroke: #fca5a5;
    stroke-dasharray: 4 10;
    animation-duration: calc(var(--flow-dur, 1.6s) * 0.9);
}

.sw-fluid {
    opacity: 1;
}

.sw-fluid--cold {
    filter: drop-shadow(0 0 3px rgba(103, 232, 249, 0.95));
}

.sw-fluid--hot {
    filter: drop-shadow(0 0 3px rgba(251, 146, 60, 0.95));
}

@keyframes sw-flow-dash {
    to {
        stroke-dashoffset: -28;
    }
}

.sw-cool-unit {
    position: relative;
    z-index: 2;
    width: 100px;
    height: 22px;
    border-radius: 8px;
    background: linear-gradient(180deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 3px 8px rgba(15, 23, 42, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sw-cool-fins {
    position: absolute;
    inset: 3px 5px;
    display: flex;
    gap: 2px;
    opacity: 0.38;
}

.sw-cool-fins i {
    flex: 1;
    border-radius: 1px;
    background: linear-gradient(180deg, #38bdf8, #0ea5e9 60%, #0369a1);
}

.sw-ice {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.sw-ice span {
    position: absolute;
    width: 7px;
    height: 7px;
    background: linear-gradient(135deg, rgba(224, 242, 254, .95), rgba(125, 211, 252, .55));
    clip-path: polygon(50% 0%, 80% 35%, 100% 50%, 80% 65%, 50% 100%, 20% 65%, 0% 50%, 20% 35%);
    box-shadow: 0 0 4px rgba(125, 211, 252, 0.55);
    animation: sw-ice-twinkle 2.2s ease-in-out infinite;
}

.sw-ice span:nth-child(1) {
    left: 8px;
    top: 4px;
    transform: scale(0.85);
}

.sw-ice span:nth-child(2) {
    right: 10px;
    top: 3px;
    animation-delay: 0.5s;
}

.sw-ice span:nth-child(3) {
    left: 22px;
    bottom: 2px;
    transform: scale(0.7);
    animation-delay: 1s;
}

@keyframes sw-ice-twinkle {
    0%,
    100% {
        opacity: 0.45;
        filter: brightness(0.95);
    }
    50% {
        opacity: 1;
        filter: brightness(1.25);
    }
}

.sw-cool-chip {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.92);
    color: #082f49;
    font-size: 6.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.sw-cool-chip i {
    font-size: 6px;
}

.sw-cool-pulse {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(186, 230, 253, .4), transparent);
    animation: sw-cool-shine 1.5s ease-in-out infinite;
}

@keyframes sw-cool-shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes sw-blink {
    0%,
    100% {
        opacity: 0.28;
        transform: scale(0.85);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* speed tiers only â€” design always on */

#savingWalletCard[data-fan="off"] .sw-fan {
    --fan-play: paused;
    filter: grayscale(0.65) brightness(0.88);
}

#savingWalletCard[data-fan="off"] .sw-fluid,
#savingWalletCard[data-fan="off"] .sw-flow {
    opacity: 0.12;
}

#savingWalletCard[data-fan="off"] .sw-flow {
    animation-play-state: paused;
}

#savingWalletCard[data-fan="off"] .sw-port {
    animation: none;
    opacity: 0.25;
}

#savingWalletCard[data-fan="off"] .sw-cool-pulse,
#savingWalletCard[data-fan="off"] .sw-ice span {
    opacity: 0.2;
    animation-play-state: paused;
}

#savingWalletCard[data-fan="slow"] {
    --fan-duration: 2.4s;
    --flow-dur: 2.2s;
}

#savingWalletCard[data-fan="slow"] .sw-fan {
    --fan-play: running;
}

#savingWalletCard[data-fan="mid"] {
    --fan-duration: 1.15s;
    --flow-dur: 1.45s;
}

#savingWalletCard[data-fan="mid"] .sw-fan {
    --fan-play: running;
}

#savingWalletCard[data-fan="fast"] {
    --fan-duration: 0.5s;
    --flow-dur: 0.9s;
}

#savingWalletCard[data-fan="fast"] .sw-fan {
    --fan-play: running;
}

#savingWalletCard[data-fan="fast"] .sw-fan-wrap {
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.28), 0 0 12px rgba(37, 99, 235, 0.35);
}

#savingWalletCard[data-fan="turbo"] {
    --fan-duration: 0.26s;
    --flow-dur: 0.55s;
}

#savingWalletCard[data-fan="turbo"] .sw-fan {
    --fan-play: running;
}

#savingWalletCard[data-fan="turbo"] .sw-fan-wrap {
    box-shadow: inset 0 0 0 2px rgba(14, 165, 233, 0.4), 0 0 16px rgba(14, 165, 233, 0.5);
}

#rxToast {
    position: fixed;
    left: 50%;
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0));
    transform: translateX(-50%);
    padding: 10px 18px;
    border-radius: 10px;
    background: #0f172a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
    z-index: 10200;
}

#rxToast.is-show {
    opacity: 1;
}