:root {
    color-scheme: light;
    --page: #F3F6FE;
    --surface: #FFFFFF;
    --ink: #1F2937;
    --muted: #667085;
    --hairline: #E4EAF5;
    --hm-blue: #0A59F7;
    --hm-blue-deep: #0043CE;
    --hm-sky: #EAF1FF;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--page);
}

body {
    min-width: 320px;
    min-height: 100dvh;
    margin: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow-x: hidden;
    color: var(--ink);
    background:
        radial-gradient(circle at 88% 0%, rgba(10, 89, 247, .08), transparent 26rem),
        var(--page);
}

a {
    color: var(--hm-blue);
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.site-header {
    width: min(1120px, calc(100% - 40px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .08em;
    text-decoration: none;
}

.brand-link img {
    width: 42px;
    height: 42px;
    border: 1px solid var(--hairline);
    border-radius: 50%;
}

main {
    width: min(680px, calc(100% - 40px));
    margin: 0 auto;
    padding: 40px 0 72px;
}

.guide-head {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 5vw, 44px);
    border-radius: 28px;
    color: #FFFFFF;
    background: linear-gradient(128deg, #0043CE 0%, #0A59F7 52%, #3E8BFF 100%);
    box-shadow: 0 24px 60px rgba(10, 89, 247, .28);
}

.guide-head::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -70px;
    width: 220px;
    height: 220px;
    border: 26px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
}

.guide-head h1 {
    position: relative;
    margin: 0;
    font-size: clamp(28px, 5vw, 38px);
    line-height: 1.15;
    letter-spacing: -.02em;
}

.guide-updated {
    position: relative;
    width: fit-content;
    margin: 14px 0 0;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 999px;
    color: #FFFFFF;
    background: rgba(255, 255, 255, .14);
    font-size: 13px;
    font-weight: 700;
}

.guide-intro {
    position: relative;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, .88);
    font-size: 15px;
    line-height: 1.8;
}

.guide-steps {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 14px;
}

.guide-step {
    padding: clamp(20px, 4vw, 28px);
    border: 1px solid var(--hairline);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 14px 40px rgba(31, 41, 55, .05);
}

.step-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-no {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #FFFFFF;
    background: linear-gradient(135deg, #0A59F7, #3E8BFF);
    box-shadow: 0 6px 16px rgba(10, 89, 247, .3);
    font-size: 15px;
    font-weight: 700;
}

.step-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 18px;
    line-height: 1.4;
}

.step-heading .step-badge {
    flex: 0 0 auto;
    margin-left: 2px;
    padding: 3px 9px;
    border-radius: 999px;
    color: #B54708;
    background: #FFF1E0;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.step-group {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid var(--hairline);
    border-radius: 16px;
    background: #F8FAFF;
}

.step-group-label {
    width: fit-content;
    margin: 0 0 10px;
    padding: 4px 11px;
    border-radius: 999px;
    color: var(--hm-blue-deep);
    background: var(--hm-sky);
    font-size: 13px;
    font-weight: 700;
}

.step-group .step-shots {
    margin-top: 12px;
}

.source-dialog {
    width: min(480px, calc(100% - 32px));
    max-height: min(680px, calc(100dvh - 32px));
    margin: auto;
    padding: 0;
    border: 1px solid var(--hairline);
    border-radius: 24px;
    color: var(--ink);
    background: var(--surface);
    box-shadow: 0 30px 100px rgba(17, 24, 39, .25);
    overflow: auto;
}

.source-dialog::backdrop {
    background: rgba(17, 24, 39, .42);
    backdrop-filter: blur(4px);
}

.dialog-shell {
    padding: 26px;
}

.dialog-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.dialog-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 22px;
}

.dialog-close {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--muted);
    background: var(--page);
    cursor: pointer;
}

.dialog-close svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.download-sources {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.source-item {
    border: 1px solid var(--hairline);
    border-radius: 16px;
    background: var(--surface);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.source-item:hover {
    border-color: rgba(10, 89, 247, .45);
    box-shadow: 0 12px 28px rgba(10, 89, 247, .12);
    transform: translateY(-1px);
}

.source-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: inherit;
    text-decoration: none;
}

.source-link::before {
    content: "";
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 12px;
    background: var(--hm-sky) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%230A59F7' d='M11 3h2v10.2l3.6-3.6L18 11l-6 6-6-6 1.4-1.4L11 13.2V3Zm-7 15h16v2H4v-2Z'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}

.source-link::after {
    content: "›";
    flex: 0 0 auto;
    color: #C9CDD6;
    font-size: 24px;
    line-height: 1;
    transition: color .18s ease;
}

.source-link:hover::after,
.source-link:focus-visible::after {
    color: var(--hm-blue);
}

.source-name {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
}

.source-empty {
    margin: 0;
    padding: 22px;
    border: 1px dashed var(--hairline);
    border-radius: 16px;
    color: var(--muted);
    text-align: center;
}

.step-text {
    margin: 10px 0 0;
    font-size: 15px;
    line-height: 1.8;
}

.step-text.muted,
.step-text .muted {
    color: var(--muted);
    font-size: 14px;
}

.apk-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 0;
    padding: 12px 20px;
    border: 0;
    border-radius: 14px;
    color: #FFFFFF;
    background: linear-gradient(135deg, #0A59F7, #3E8BFF);
    box-shadow: 0 12px 28px rgba(10, 89, 247, .3);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.apk-cta:disabled {
    cursor: not-allowed;
    opacity: .5;
    transform: none;
}

.apk-cta:hover,
.apk-cta:focus-visible {
    box-shadow: 0 16px 36px rgba(10, 89, 247, .38);
    transform: translateY(-1px);
}

.apk-cta svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.step-shots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
}

.step-shots img {
    width: 100%;
    max-width: min(240px, 72%);
    height: auto;
    display: block;
    border: 1px solid #E8EEFC;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 16px 36px rgba(10, 89, 247, .1);
    cursor: zoom-in;
}

.shot-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(17, 24, 39, .88);
    backdrop-filter: blur(6px);
}

.shot-lightbox[hidden] {
    display: none;
}

.shot-lightbox img {
    max-width: 94vw;
    max-height: 82dvh;
    border-radius: 12px;
    transition: transform .18s ease;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
}

.shot-lightbox-close {
    position: absolute;
    top: max(16px, env(safe-area-inset-top));
    right: 16px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #FFFFFF;
    background: rgba(255, 255, 255, .14);
    cursor: pointer;
}

.shot-lightbox-close svg {
    width: 20px;
    height: 20px;
}

.shot-lightbox-toolbar {
    position: absolute;
    bottom: max(18px, env(safe-area-inset-bottom));
    left: 50%;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    color: #FFFFFF;
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(8px);
    transform: translateX(-50%);
}

.shot-lightbox-toolbar button {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #FFFFFF;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
}

.shot-lightbox-toolbar button:hover {
    background: rgba(255, 255, 255, .15);
}

.shot-lightbox-toolbar span {
    min-width: 56px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.step-shots img:first-child:nth-last-child(2),
.step-shots img:first-child:nth-last-child(2) ~ img {
    max-width: calc(50% - 6px);
}

footer {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px 18px;
    border-top: 1px solid var(--hairline);
    color: var(--muted);
    font-size: 14px;
}

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

@media (max-width: 720px) {
    .site-header {
        width: min(100% - 32px, 620px);
        height: 68px;
    }

    .brand-link {
        font-size: 17px;
    }

    .brand-link img {
        width: 36px;
        height: 36px;
    }

    main {
        width: min(100% - 28px, 620px);
        padding: 26px 0 52px;
    }

    .guide-head {
        border-radius: 24px;
    }

    .guide-step {
        border-radius: 19px;
    }

    footer {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .apk-cta {
        transition: none;
    }
}
