:root {
    color-scheme: light;
    --canvas-w: 852;
    --canvas-h: 1846;
    --shell-w: min(100vw, 852px, calc(100dvh * 852 / 1846));
    --shell-edge: calc((100vw - var(--shell-w)) / 2);
    --focus: rgba(36, 119, 255, 0.52);
    --email: #ed3392;
    --toast-bg: rgba(13, 29, 63, 0.92);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
}

body {
    position: relative;
    isolation: isolate;
    min-height: 100dvh;
    overflow: hidden;
    color: #0a1835;
    background: #fff;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

body::before,
body::after {
    position: fixed;
    inset: 0;
    z-index: -2;
    content: "";
    pointer-events: none;
}

body::before {
    background: url("./vv-light-template-bg.png") center / var(--shell-w) auto no-repeat;
    filter: blur(34px) saturate(0.8);
    opacity: 0.68;
    transform: scale(1.025);
}

body::after {
    z-index: -1;
    background: linear-gradient(90deg,
            #fff 0,
            rgba(255, 255, 255, 0.86) calc(var(--shell-edge) / 2),
            rgba(255, 255, 255, 0) var(--shell-edge),
            rgba(255, 255, 255, 0) calc(100% - var(--shell-edge)),
            rgba(255, 255, 255, 0.86) calc(100% - var(--shell-edge) / 2),
            #fff 100%);
}

button,
a {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    position: relative;
    width: var(--shell-w);
    aspect-ratio: var(--canvas-w) / var(--canvas-h);
    min-height: 0;
    max-height: 100dvh;
    margin: auto;
    overflow: hidden;
    background: transparent;
    box-shadow: none;
    container-type: inline-size;
    isolation: isolate;
}

.template-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.screen-hotspot {
    position: absolute;
    z-index: 2;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 24px;
    background: transparent;
    color: transparent;
    font-size: 0;
    line-height: 0;
    text-indent: -9999px;
    appearance: none;
    -webkit-tap-highlight-color: rgba(38, 125, 255, 0.12);
}

.screen-hotspot:hover {
    background: rgba(255, 255, 255, 0.06);
}

.screen-hotspot:active {
    background: rgba(35, 114, 255, 0.08);
}

.screen-hotspot:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: -4px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.62);
}

.screen-hotspot[disabled] {
    cursor: not-allowed;
    opacity: 0.35;
}

.line-hotspot {
    left: 6.1%;
    width: 87.8%;
    height: 9.5%;
}

.line-hotspot-layer .line-hotspot:nth-child(1),
.line-hotspot-1 {
    top: 33.95%;
}

.line-hotspot-layer .line-hotspot:nth-child(2),
.line-hotspot-2 {
    top: 44.25%;
}

.line-hotspot-layer .line-hotspot:nth-child(3),
.line-hotspot-3 {
    top: 54.5%;
}

.line-hotspot-layer .line-hotspot:nth-child(n+4) {
    display: none;
}

.notification-hotspot {
    left: 6.1%;
    top: 64.8%;
    width: 87.8%;
    height: 8.6%;
    border-radius: 24px;
}

.email-display {
    position: absolute;
    left: 24.7%;
    top: 69.22%;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 59.5%;
    height: 2.05%;
    min-width: 0;
    overflow: hidden;
    color: var(--email);
    font-size: clamp(10px, 2.95cqw, 22px);
    font-weight: 800;
    line-height: 1;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.82);
}

.email-display:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
    border-radius: 999px;
}

.quick-hotspot {
    top: 73.98%;
    height: 8.65%;
    border-radius: 28px;
}

.home-hotspot {
    left: 6.1%;
    width: 28.8%;
}

.mail-hotspot {
    left: 35.0%;
    width: 30.0%;
}

.service-hotspot {
    left: 65.0%;
    width: 28.9%;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 50;
    min-width: 220px;
    max-width: calc(100% - 32px);
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--toast-bg);
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 18px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    box-shadow: 0 14px 30px rgba(20, 70, 120, 0.24);
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (min-width: 853px) {
    .page-shell {
        margin-top: 0;
        margin-bottom: 0;
    }

    .template-bg {
        -webkit-mask-image: linear-gradient(90deg,
                transparent 0,
                rgba(0, 0, 0, 0.22) 2%,
                rgba(0, 0, 0, 0.58) 5%,
                #000 9%,
                #000 91%,
                rgba(0, 0, 0, 0.58) 95%,
                rgba(0, 0, 0, 0.22) 98%,
                transparent 100%);
        mask-image: linear-gradient(90deg,
                transparent 0,
                rgba(0, 0, 0, 0.22) 2%,
                rgba(0, 0, 0, 0.58) 5%,
                #000 9%,
                #000 91%,
                rgba(0, 0, 0, 0.58) 95%,
                rgba(0, 0, 0, 0.22) 98%,
                transparent 100%);
    }
}

@media (max-width: 430px) {
    .page-shell {
        box-shadow: none;
    }

    .email-display {
        font-size: clamp(10px, 2.95cqw, 14px);
    }

    .line-hotspot,
    .quick-hotspot,
    .notification-hotspot {
        border-radius: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
