:root {
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: #111;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.viewer-shell,
.viewer-frame {
    width: 100%;
    height: 100%;
}

.viewer-shell {
    position: fixed;
    inset: 0;
}

.viewer-frame {
    display: block;
    border: 0;
    background: #fff;
}

.back-button {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid #171717;
    border-radius: 999px;
    background: #171717;
    color: #fff;
    box-shadow: 0 3px 8px rgba(23, 23, 23, 0.14);
    font-size: 0.76rem;
    text-decoration: none;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.back-button:hover,
.back-button:focus-visible {
    background: #d0342f;
    border-color: #d0342f;
    color: #fff;
    outline: none;
    transform: translateY(-1px);
}

.contact-back {
    width: 100%;
    justify-content: center;
}

.contact-float {
    position: fixed;
    z-index: 10;
    right: 50%;
    bottom: 34px;
    display: grid;
    gap: 10px;
    width: min(336px, calc(100vw - 44px));
    padding: 12px 14px 12px 12px;
    border: 1px solid rgba(23, 23, 23, 0.1);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 246, 242, 0.94));
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.22), 0 4px 14px rgba(0, 0, 0, 0.1);
    color: #171717;
    font-size: 0.76rem;
    line-height: 1.4;
    backdrop-filter: blur(16px);
    transform: translateX(50%);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.contact-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.contact-float:hover {
    border-color: rgba(208, 52, 47, 0.28);
    box-shadow: 0 24px 62px rgba(0, 0, 0, 0.28), 0 5px 16px rgba(0, 0, 0, 0.12);
}

.contact-qr {
    display: block;
    flex: 0 0 82px;
    width: 82px;
    height: 82px;
    border: 4px solid #fff;
    border-radius: 13px;
    box-shadow: 0 3px 12px rgba(23, 23, 23, 0.12), 0 0 0 1px rgba(23, 23, 23, 0.08);
    object-fit: cover;
}

.contact-copy {
    display: grid;
    align-items: start;
    min-width: 0;
    gap: 5px;
    padding-right: 2px;
}

.contact-offer {
    display: block;
    color: #d0342f;
    font-weight: 600;
    white-space: nowrap;
}

.contact-title {
    color: #171717;
    font-size: 1rem;
    font-weight: 600;
}

.contact-handle {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(23, 23, 23, 0.06);
    color: #686868;
    font-size: 0.73rem;
}

.contact-handle::before {
    width: 6px;
    height: 6px;
    margin-right: 5px;
    border-radius: 50%;
    background: #35a853;
    content: "";
}

@media (max-width: 560px) {
    .contact-float {
        right: 50%;
        bottom: 24px;
        width: min(336px, calc(100vw - 24px));
        gap: 8px;
        padding: 10px 11px 10px 10px;
    }

    .contact-main {
        gap: 10px;
    }

    .contact-qr {
        flex-basis: 70px;
        width: 70px;
        height: 70px;
    }
}
