:root {
    --accent: #58c3a5;
    --accent-deep: #36a98c;
    --ink: #111827;
    --muted: #7a7f88;
    --link: #071f83;
    --warn: #b92320;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: #fff;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

a {
    color: inherit;
}

.download-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.app-panel {
    width: 100%;
    min-height: 584px;
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 40px 18px 28px;
}

.top-ribbons {
    position: absolute;
    inset: 0 0 auto;
    height: 155px;
    pointer-events: none;
    z-index: 0;
}

.ribbon {
    position: absolute;
    display: block;
    height: 102px;
    border-radius: 0 0 68px 68px;
    transform-origin: center top;
}

.ribbon-blue {
    width: 700px;
    left: 50%;
    top: -24px;
    margin-left: -435px;
    background: rgba(49, 103, 230, .78);
    transform: rotate(8deg);
}

.ribbon-green {
    width: 420px;
    left: 50%;
    top: 24px;
    margin-left: -30px;
    background: rgba(174, 223, 129, .58);
    border-radius: 0 0 76px 76px;
}

.ribbon-pink {
    width: 70px;
    right: calc(50% - 345px);
    top: -12px;
    background: rgba(242, 137, 157, .62);
    border-radius: 0 0 34px 34px;
    transform: rotate(-6deg);
}

.app-icon-wrap,
.app-panel h1,
.meta,
.notice,
.help-links,
.actions,
.qr-block {
    position: relative;
    z-index: 1;
}

.app-icon-wrap {
    width: 128px;
    height: 128px;
    margin: 0 auto 15px;
    padding: 12px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(33, 38, 47, .20);
}

.app-icon {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.app-panel h1 {
    margin: 0;
    font-size: 26px;
    line-height: 1.35;
    font-weight: 500;
    letter-spacing: 0;
}

.meta {
    margin: 10px 0 0;
    color: #8c8c8c;
    font-size: 14px;
}

.notice {
    max-width: 1120px;
    margin: 15px auto 8px;
    color: var(--warn);
    font-size: 12px;
    line-height: 1.7;
}

.help-links {
    display: grid;
    gap: 12px;
    justify-items: center;
    margin: 8px 0 12px;
    font-size: 16px;
    font-weight: 700;
}

.help-links a {
    color: var(--link);
    text-decoration: none;
}

.help-links a:hover {
    text-decoration: underline;
}

.actions {
    display: grid;
    gap: 12px;
    justify-items: center;
    margin-top: 8px;
}

.download-btn {
    width: min(240px, 84vw);
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .06);
    transition: background .18s ease, transform .18s ease;
}

.download-btn:hover {
    background: var(--accent-deep);
    transform: translateY(-1px);
}

.qr-block {
    margin-top: 32px;
}

.qr {
    width: 150px;
    height: 150px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.qr-block p {
    margin: 6px 0 0;
    color: #707070;
    font-size: 14px;
}

.site-footer {
    width: 100%;
    margin-top: auto;
    padding: 34px 0 18px;
    text-align: center;
    color: #555;
    font-size: 14px;
    line-height: 1.45;
}

.site-footer p {
    width: min(1280px, calc(100vw - 28px));
    margin: 0 auto 10px;
}

.footer-links {
    color: var(--link);
    font-weight: 700;
}

.footer-links a {
    color: var(--link);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-links span {
    color: #777;
    padding: 0 4px;
}

.empty-state {
    min-height: 100vh;
    display: grid;
    place-content: center;
    gap: 14px;
    padding: 24px;
    text-align: center;
}

.empty-state h1 {
    margin: 0;
    font-size: 24px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.empty-state a {
    color: var(--accent-deep);
    font-weight: 700;
}

.download-state {
    max-width: 620px;
    margin: 0 auto;
}

.state-actions {
    display: none;
}

.open-guide {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0, 0, 0, .58);
    color: #fff;
    cursor: pointer;
}

.guide-open,
.guide-open body {
    overflow: hidden;
}

.guide-copy {
    position: absolute;
    top: 120px;
    left: 36px;
    right: 24px;
    text-align: left;
    font-family: "Arial Black", "Microsoft YaHei", Arial, sans-serif;
    text-shadow:
        2px 2px 0 #000,
        -2px 2px 0 #000,
        2px -2px 0 #000,
        -2px -2px 0 #000,
        0 4px 8px rgba(0, 0, 0, .35);
}

.guide-copy p {
    margin: 0 0 54px;
    font-size: clamp(28px, 5.6vw, 58px);
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: 0;
}

.guide-copy span {
    padding-right: 10px;
}

.guide-copy b {
    display: inline-flex;
    min-width: 110px;
    height: 72px;
    align-items: center;
    justify-content: center;
    margin: 0 14px;
    border-radius: 28px;
    background: rgba(90, 90, 90, .82);
    font-size: 58px;
    line-height: .6;
    vertical-align: middle;
}

.guide-second {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.guide-second strong {
    display: block;
}

.guide-second em {
    display: inline-block;
    margin-left: 8px;
    font-style: normal;
}

.safari-mark {
    width: 84px;
    height: 84px;
    display: inline-block;
    flex: 0 0 auto;
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% 50%, #fff 0 30%, transparent 31%),
        conic-gradient(from -35deg, #f04b4b 0 8%, #1c87ef 8% 100%);
    box-shadow:
        0 0 0 12px #fff,
        0 8px 18px rgba(0, 0, 0, .28);
    position: relative;
}

.safari-mark::before {
    content: "";
    position: absolute;
    left: 35px;
    top: 12px;
    width: 13px;
    height: 60px;
    background: linear-gradient(#e43e42 0 50%, #0f80e8 50% 100%);
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    transform: rotate(40deg);
}

.guide-arrow {
    position: absolute;
    top: 38px;
    right: 70px;
    width: 74px;
    height: 150px;
    border-right: 8px solid #fff;
    border-top: 8px solid #fff;
    border-radius: 0 54px 0 0;
    transform: rotate(23deg);
    filter:
        drop-shadow(2px 2px 0 #000)
        drop-shadow(-1px -1px 0 #000);
}

.guide-arrow::before,
.guide-arrow::after {
    content: "";
    position: absolute;
    top: -18px;
    right: -13px;
    width: 34px;
    height: 8px;
    background: #fff;
    border-radius: 999px;
    transform-origin: right center;
}

.guide-arrow::before {
    transform: rotate(44deg);
}

.guide-arrow::after {
    transform: rotate(-44deg);
}

[hidden] {
    display: none !important;
}

@media (max-width: 680px) {
    .app-panel {
        min-height: auto;
        padding-top: 34px;
    }

    .top-ribbons {
        height: 132px;
    }

    .ribbon-blue {
        width: 500px;
        margin-left: -315px;
    }

    .ribbon-green {
        width: 300px;
        margin-left: -8px;
    }

    .ribbon-pink {
        right: 14px;
    }

    .app-icon-wrap {
        width: 116px;
        height: 116px;
        padding: 10px;
    }

    .app-panel h1 {
        font-size: 23px;
    }

    .help-links {
        font-size: 15px;
        gap: 10px;
    }

    .site-footer {
        padding-top: 28px;
        font-size: 13px;
    }

    .guide-copy {
        top: 108px;
        left: 28px;
        right: 18px;
    }

    .guide-copy p {
        margin-bottom: 44px;
        font-size: clamp(26px, 8.2vw, 42px);
    }

    .guide-copy b {
        min-width: 76px;
        height: 52px;
        margin: 0 8px;
        border-radius: 20px;
        font-size: 42px;
    }

    .safari-mark {
        width: 58px;
        height: 58px;
        border-radius: 15px;
        box-shadow:
            0 0 0 8px #fff,
            0 6px 14px rgba(0, 0, 0, .26);
    }

    .safari-mark::before {
        left: 24px;
        top: 8px;
        width: 9px;
        height: 42px;
    }

    .guide-arrow {
        top: 34px;
        right: 46px;
        width: 48px;
        height: 106px;
        border-right-width: 6px;
        border-top-width: 6px;
    }
}
