/* Phase 05X.14: site-wide Go to Top; follows Queensirikit gold/ivory palette. */
.qs-go-to-top {
    position: fixed;
    z-index: 1050;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(22px, env(safe-area-inset-bottom));
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid #c79e42;
    border-radius: 13px;
    background: #fffdf8;
    color: #a67b28;
    box-shadow: 0 3px 14px rgba(48, 37, 14, 0.17);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease,
                background-color .2s ease, color .2s ease;
}
.qs-go-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
.qs-go-to-top svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.qs-go-to-top:hover {
    background: #c79e42;
    color: #ffffff;
}
.qs-go-to-top:focus-visible {
    outline: 3px solid #32617c;
    outline-offset: 3px;
}
@media screen and (max-width: 576px) {
    .qs-go-to-top {
        right: max(12px, env(safe-area-inset-right));
        bottom: max(16px, env(safe-area-inset-bottom));
        width: 44px;
        height: 44px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .qs-go-to-top { transition: none; }
}
@media print {
    .qs-go-to-top { display: none !important; }
}
