* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #1f2933;
    background: #f4f7f5;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    line-height: 1.6;
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.query-panel,
.result-header,
.student-info {
    width: min(100%, 640px);
    background: #ffffff;
    border: 1px solid #d8e2dc;
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(31, 41, 51, 0.08);
    padding: 28px;
}

.result-page {
    flex-direction: column;
    gap: 16px;
}

.brand {
    margin-bottom: 8px;
    color: #7c2d12;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
}

h1 {
    margin: 0 0 20px;
    color: #102a43;
    font-size: 30px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: 0;
}

.result-header h1 {
    margin-bottom: 10px;
}

.result-header p {
    margin: 0;
    color: #52606d;
}

.query-form {
    display: grid;
    gap: 10px;
}

.query-form label {
    color: #334e68;
    font-weight: 700;
}

.query-form input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #bcccdc;
    border-radius: 6px;
    padding: 10px 12px;
    color: #102a43;
    background: #ffffff;
    font: inherit;
}

.query-form input:focus {
    border-color: #7c2d12;
    box-shadow: 0 0 0 3px rgba(124, 45, 18, 0.14);
    outline: none;
}

.alert {
    margin-bottom: 18px;
    border: 1px solid #f5c2c0;
    border-radius: 6px;
    padding: 12px 14px;
    color: #8a1f11;
    background: #fff1f0;
    overflow-wrap: anywhere;
}

.student-info dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.student-info dl > div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #eef2f0;
}

.student-info dl > div:first-child {
    padding-top: 0;
}

.student-info dl > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

dt {
    color: #52606d;
    font-weight: 700;
}

dd {
    margin: 0;
    color: #102a43;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.actions {
    width: min(100%, 640px);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid #9fb3c8;
    border-radius: 6px;
    padding: 10px 18px;
    color: #102a43;
    background: #ffffff;
    font: inherit;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button:hover,
.button:focus {
    border-color: #627d98;
    background: #f0f4f8;
    outline: none;
}

.button.primary {
    border-color: #7c2d12;
    color: #ffffff;
    background: #7c2d12;
}

.button.primary:hover,
.button.primary:focus {
    border-color: #5f2110;
    background: #5f2110;
}

.query-form .button {
    width: 100%;
    margin-top: 10px;
}

@media (max-width: 520px) {
    .page {
        align-items: flex-start;
        padding: 20px 12px;
    }

    .query-panel,
    .result-header,
    .student-info {
        padding: 22px 18px;
    }

    h1 {
        font-size: 26px;
    }

    .student-info dl > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .actions {
        flex-direction: column;
    }

    .actions .button {
        width: 100%;
    }
}
