* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    color: #10231a;
    background: #eef7f0;
}

button,
input {
    font: inherit;
}

.trace-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
    background:
        radial-gradient(circle at 16% 0%, rgba(255,255,255,.35), transparent 26%),
        linear-gradient(180deg, #14623e 0%, #238954 42%, #eef7f0 42%, #eef7f0 100%);
}

.trace-header {
    padding: 8px 2px 22px;
    color: #fff;
}

.trace-badge {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    font-size: 12px;
    font-weight: 700;
}

.trace-header h1 {
    margin: 16px 0 7px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0;
}

.trace-header p {
    margin: 0;
    color: rgba(255,255,255,.84);
    font-size: 14px;
    line-height: 1.7;
}

.trace-card {
    width: 100%;
    margin-top: 4px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 18px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 18px 40px rgba(13, 68, 43, .2);
}

.trace-form {
    display: grid;
    gap: 14px;
}

.trace-field label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

.trace-field label span {
    color: #667085;
    font-size: 12px;
    font-weight: 500;
}

.trace-input {
    width: 100%;
    height: 52px;
    padding: 0 14px;
    border: 1px solid #cfddd5;
    border-radius: 12px;
    outline: none;
    background: #f8fbf9;
    color: #101828;
    font-size: 17px;
    font-weight: 650;
    letter-spacing: 0;
    box-shadow: none;
}

.trace-input::placeholder {
    color: #98a2b3;
    font-weight: 500;
}

.trace-input:focus {
    border-color: #2f9e62;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(47,158,98,.13);
}

.captcha-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 116px;
    gap: 10px;
    align-items: center;
}

.captcha-image {
    width: 116px;
    height: 52px;
    border: 1px solid #cfddd5;
    border-radius: 12px;
    background: #fff;
    object-fit: cover;
}

.trace-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.trace-btn {
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
}

.trace-btn.submit {
    background: #1f8f57;
    color: #fff;
    box-shadow: 0 10px 22px rgba(31,143,87,.24);
}

.trace-btn.scan {
    border: 1px solid #cfe7d8;
    background: #eef9f2;
    color: #1f7a4f;
}

.trace-notice {
    margin: 14px 0 0;
    padding: 12px;
    border-radius: 12px;
    background: #f7fbf8;
    color: #667085;
    font-size: 12px;
    line-height: 1.65;
}

.trace-notice p {
    margin: 0;
}

.trace-footer {
    margin-top: auto;
    padding-top: 18px;
    color: rgba(16,35,26,.58);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

@media (max-width: 360px) {
    .trace-page {
        padding-left: 12px;
        padding-right: 12px;
    }

    .trace-card {
        padding: 14px;
    }

    .trace-header h1 {
        font-size: 24px;
    }

    .captcha-row,
    .trace-actions {
        grid-template-columns: 1fr;
    }

    .captcha-image {
        width: 100%;
    }
}
