/* A compact violet dial; the inset fill and champagne rim track real scroll progress. */
.back-top {
    --back-top-fill: .4;
    --back-top-offset: 60;
    width: 64px;
    height: 64px;
    right: 24px;
    bottom: 24px;
    isolation: isolate;
    overflow: hidden;
    color: #fff9ef;
    background: radial-gradient(circle at 28% 10%, #6d3982, transparent 65%), #21112f;
    border: 1px solid #f3d9fd3d;
    box-shadow: 0 8px 24px #220c3433, 0 2px 6px #1c0c2926, inset 0 1px 1px #ffffff26;
    transition: opacity .24s ease, transform .3s cubic-bezier(.22, 1, .36, 1), visibility .24s;
    -webkit-tap-highlight-color: transparent;
}
.back-top-fill {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(0deg, #9b2cc6, #7d32a2b3 70%, #b276cf59);
    opacity: .72;
    transform: scaleY(var(--back-top-fill));
    transform-origin: center bottom;
    pointer-events: none;
}
.back-top-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    fill: none;
    stroke-width: 1.5;
    transform: rotate(-90deg);
    pointer-events: none;
}
.back-top-track { stroke: #edd7f526; }
.back-top-progress {
    stroke: url(#back-top-rim) #f6d27f;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: var(--back-top-offset);
}
.back-top-face {
    position: absolute;
    inset: 8px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 1px solid #f5dfff29;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffffff12, #210c2f59);
    box-shadow: inset 0 1px 0 #ffffff14, 0 2px 5px #16092221;
    pointer-events: none;
}
.back-top-face::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, #f2d5ff20, #efbe7221);
    opacity: 0;
    transition: opacity .3s ease;
}
.back-top-arrow {
    display: block;
    position: relative;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .3s cubic-bezier(.22, 1, .36, 1);
    pointer-events: none;
}
.back-top-label {
    position: relative;
    color: #f2d6a3;
    font-size: 7px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 1.4px;
    text-indent: 1.4px;
}
.back-top.is-scroll-ready:not(.is-visible) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
}
.back-top:focus-visible {
    outline: 3px solid #be59dc;
    outline-offset: 4px;
}
@media (hover: hover) and (pointer: fine) {
    body:not(.motion-paused) .back-top.is-visible:hover { transform: translateY(-3px); }
    body:not(.motion-paused) .back-top.is-visible:hover .back-top-arrow { transform: translateY(-1px); }
    .back-top.is-visible:hover .back-top-face::before { opacity: 1; }
}
body:not(.motion-paused) .back-top.is-visible:active { transform: scale(.96); }
.back-top:focus-visible .back-top-face::before { opacity: 1; }
@media (max-width: 600px) {
    .back-top { width: 54px; height: 54px; right: 14px; bottom: 14px; }
    .back-top-face { inset: 7px; gap: 1px; }
    .back-top-arrow { width: 20px; height: 20px; }
    .back-top-label { font-size: 6px; letter-spacing: 1.2px; text-indent: 1.2px; }
}
@supports (bottom: env(safe-area-inset-bottom)) {
    .back-top { bottom: calc(24px + env(safe-area-inset-bottom)); }
    @media (max-width: 600px) { .back-top { bottom: calc(14px + env(safe-area-inset-bottom)); } }
}
.motion-paused .back-top,
.motion-paused .back-top-arrow,
.motion-paused .back-top-face::before { transition: none; }
.motion-paused .back-top-arrow { transform: none; }
@media (prefers-reduced-motion: reduce) {
    .back-top, .back-top-arrow, .back-top-face::before { transition: none; }
    body:not(.motion-paused) .back-top.is-visible:hover,
    body:not(.motion-paused) .back-top.is-visible:active,
    body:not(.motion-paused) .back-top.is-visible:hover .back-top-arrow { transform: none; }
}
@media print { .back-top { display: none; } }
