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

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

body.page-home {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: "PingFang SC", "Microsoft YaHei", "Roboto", BlinkMacSystemFont, -apple-system, sans-serif;
    font-weight: 400;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #f1f6fd;
    color: #474157;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

a {
    -webkit-transition: opacity 0.2s;
    transition: opacity 0.2s;
    color: #474157;
}

a:hover,
a:focus {
    color: #474157;
    opacity: 0.9;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    letter-spacing: 0.5px;
    margin: 0;
}

p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

#mainbody {
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 16px 24px;
}

#mainbody > .container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.hero {
    text-align: center;
    padding: 12px 0;
}

.site-title {
    font-size: clamp(22px, 5vw, 36px);
    font-weight: 700;
    color: #171347;
    line-height: 1.3;
    word-break: break-word;
}

.dzc-panel {
    margin-top: 20px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(23, 19, 71, 0.08);
    text-align: left;
}

.dzc-label {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.dzc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    flex: 1 1 120px;
    max-width: 100%;
    -webkit-tap-highlight-color: transparent;
}

.btn-download {
    background: linear-gradient(#3cba5a, #0f9d4e);
    color: #fff !important;
}

.btn-copy {
    background: #eef2f7;
    color: #333;
}

.btn-copy.is-done {
    background: #d1fae5;
    color: #0f9d4e;
}

.dzc-url {
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.45;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 8px;
    word-break: break-all;
    max-height: 72px;
    overflow-y: auto;
}

.links-wrap {
    margin-top: 16px;
}

.btn-member {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 28px;
    border-radius: 999px;
    font-size: 14px;
    background: linear-gradient(#fdcc52, #fdc539);
    text-decoration: none;
}

.footer {
    flex-shrink: 0;
    background-color: #222222;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
}

.footer p {
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
    word-break: break-word;
}

.footer a {
    color: rgba(255, 255, 255, 0.55);
}

/* 电子秤等矮屏横屏：压缩间距，保证一屏能看完主内容 */
@media (max-height: 480px) {
    #mainbody {
        align-items: flex-start;
        padding-top: 8px;
        padding-bottom: 12px;
    }

    .hero {
        padding: 4px 0;
    }

    .site-title {
        font-size: 20px;
    }

    .dzc-panel {
        margin-top: 12px;
        padding: 12px;
    }

    .btn {
        min-height: 44px;
        font-size: 15px;
    }

    .dzc-url {
        max-height: 48px;
        margin-top: 8px;
    }

    .links-wrap {
        margin-top: 10px;
    }

    .footer {
        padding: 8px 12px;
    }
}

@media (max-width: 360px) {
    .dzc-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        flex: 1 1 auto;
    }
}
