@font-face {
    font-family: "MapleMono";
    src:
        url("https://cdn.jsdmirror.cn/gh/360NENZ/Countdown@CollegeEntranceExam/assets/fonts/MapleMono-NF-CN/MapleMono-NF-CN-Regular.ttf") format("truetype"),
        url("../fonts/MapleMono-NF-CN/MapleMono-NF-CN-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

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

html {
    min-height: 100dvh;
}

body {
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 214, 92, 0.42), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(255, 103, 103, 0.22), transparent 30%),
        linear-gradient(135deg, #fff9e8 0%, #fff3d2 42%, #ffe6dc 100%);
    color: #1f2430;
    font-family: "MapleMono";
    overflow: hidden;
}

body * {
    font-family: "MapleMono";
}

main {
    position: relative;
    z-index: 1;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 3vh, 28px) 32px;
    text-align: center;
}

.panel {
    width: min(1180px, calc(100vw - 32px));
    padding: clamp(16px, 3.2vh, 34px) clamp(18px, 4vw, 36px);
    transition: transform 240ms ease;
}

body.exam-active .panel {
    transform: translateY(clamp(-48px, -5vh, -24px));
}

.kicker {
    margin: 0 0 clamp(10px, 2vh, 18px);
    color: #9d3a25;
    font-size: clamp(16px, 2vw, 22px);
    letter-spacing: 0.12em;
}

h1 {
    margin: 0 0 clamp(10px, 2vh, 18px);
    color: #28160d;
    font-size: clamp(34px, 6vw, 72px);
    line-height: 1.1;
}

.countdown {
    margin: clamp(12px, 2.2vh, 22px) auto;
    color: #8f4a19;
    font-size: clamp(28px, 7.4vw, 92px);
    font-weight: 400;
    line-height: 1.05;
    text-shadow: 0 10px 28px rgba(143, 74, 25, 0.16);
    white-space: nowrap;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.28em;
    width: 100%;
    transition: color 240ms ease, text-shadow 240ms ease;
}

.countdown-group {
    display: inline-flex;
    align-items: baseline;
    gap: 0.08em;
}

.countdown-number {
    display: block;
    width: 2ch;
    min-width: 0;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.countdown-days .countdown-number {
    width: 3ch;
}

.countdown-unit {
    display: block;
    color: #b86b2f;
    font-family: "MapleMono";
    font-size: 0.46em;
    line-height: 1;
    text-align: center;
    text-shadow: none;
    transition: color 240ms ease;
}

.countdown-urgent {
    color: #ff2d2d;
    text-shadow: 0 10px 28px rgba(255, 45, 45, 0.22);
}

.countdown-urgent .countdown-unit {
    color: #ff6b6b;
}

.countdown-ended {
    display: block;
    width: auto;
    text-align: center;
}

.ended-title {
    display: block;
}

.ended-blessing {
    display: block;
    margin-top: clamp(14px, 2.2vh, 22px);
    color: #c9161d;
    font-size: clamp(24px, 3.4vw, 46px);
    line-height: 1.25;
    text-shadow: 0 12px 30px rgba(201, 22, 29, 0.18);
}

.exam-panel {
    display: grid;
    gap: clamp(6px, 1vh, 10px);
    margin: clamp(12px, 2vh, 18px) auto 0;
    color: #7a3d18;
    font-size: clamp(16px, 2vw, 26px);
    line-height: 1.22;
}

.current-exam,
.next-exam,
.finished-exams {
    display: grid;
    gap: clamp(3px, 0.7vh, 6px);
}

.exam-subject {
    color: #c9161d;
    font-size: 1.18em;
}

.exam-label {
    color: #9d3a25;
    font-size: 0.72em;
    letter-spacing: 0.08em;
}

.exam-meta,
.exam-left,
.finished-list {
    font-size: 0.76em;
}

.finished-list {
    color: #8a6a56;
}

.slogan {
    margin: clamp(16px, 2.6vh, 26px) auto 0;
    padding: clamp(10px, 1.7vh, 14px) 22px;
    color: #9d3a25;
    font-size: clamp(20px, 3vw, 40px);
    line-height: 1.35;
    letter-spacing: 0.08em;
    text-shadow: 0 10px 24px rgba(157, 58, 37, 0.14);
    border-top: 1px solid rgba(157, 58, 37, 0.22);
    border-bottom: 1px solid rgba(157, 58, 37, 0.22);
}

.slogan-line {
    display: block;
}

.info {
    display: grid;
    gap: clamp(5px, 1vh, 9px);
    margin-top: clamp(14px, 2.4vh, 24px);
    color: #5d4636;
    font-size: clamp(14px, 1.8vw, 18px);
    line-height: 1.38;
}

.info a,
.info a:visited {
    color: #c9161d;
    text-decoration: none;
}

.status {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 1em;
    color: #8a6a56;
    font-size: clamp(13px, 1.6vw, 16px);
}

.status-source,
.status-refresh {
    display: inline-block;
}

.site-footer {
    position: fixed;
    right: clamp(14px, 3vw, 30px);
    bottom: clamp(10px, 2vh, 20px);
    left: clamp(14px, 3vw, 30px);
    z-index: 2;
    color: rgba(93, 70, 54, 0.72);
    font-size: clamp(11px, 1.2vw, 13px);
    line-height: 1.7;
    pointer-events: none;
}

.footer-inner {
    display: grid;
    gap: 3px;
    justify-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(157, 58, 37, 0.16);
    backdrop-filter: blur(4px);
}

.copyright {
    letter-spacing: 0.08em;
}

.beian-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 12px;
}

.beian-links a,
.beian-links a:visited {
    color: rgba(157, 58, 37, 0.78);
    text-decoration: none;
    pointer-events: auto;
    transition: color 180ms ease, text-shadow 180ms ease;
}

.beian-links a:hover {
    color: #c9161d;
    text-shadow: 0 6px 16px rgba(201, 22, 29, 0.16);
}

@media (max-height: 760px) {
    body.exam-active .panel {
        transform: translateY(clamp(-72px, -8vh, -36px));
    }

    .panel {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    h1 {
        font-size: clamp(30px, 5vw, 58px);
    }

    .countdown {
        font-size: clamp(26px, 6.4vw, 72px);
    }

    .ended-blessing {
        font-size: clamp(20px, 2.7vw, 34px);
    }

    .exam-panel {
        gap: 4px;
        font-size: clamp(15px, 1.8vw, 22px);
    }

    .slogan {
        font-size: clamp(18px, 2.4vw, 32px);
    }
}

@media (max-width: 640px) {
    body {
        overflow: auto;
    }

    main {
        min-height: 100dvh;
        padding: 14px 10px;
    }

    .panel {
        width: min(100%, calc(100vw - 20px));
        padding: 18px 8px 22px;
    }

    body.exam-active .panel {
        transform: none;
    }

    h1 {
        font-size: clamp(30px, 11vw, 48px);
    }

    .kicker {
        font-size: clamp(14px, 4.4vw, 18px);
        letter-spacing: 0.06em;
    }

    .countdown {
        flex-wrap: nowrap;
        gap: 0.12em;
        font-size: clamp(24px, 10vw, 44px);
        justify-content: center;
    }

    .countdown-group {
        gap: 0.04em;
    }

    .countdown-unit {
        font-size: 0.42em;
    }

    .ended-blessing {
        font-size: clamp(22px, 7vw, 32px);
    }

    .exam-panel {
        font-size: clamp(15px, 4.8vw, 22px);
        gap: 6px;
    }

    .slogan {
        margin-top: 16px;
        padding: 10px 8px;
        font-size: clamp(18px, 6.2vw, 28px);
        letter-spacing: 0.04em;
        line-height: 1.42;
    }

    .slogan-line + .slogan-line {
        margin-top: clamp(8px, 1.5vh, 12px);
    }

    .info {
        margin-top: 14px;
        gap: 6px;
        font-size: clamp(12px, 3.6vw, 15px);
        line-height: 1.32;
    }

    .status-refresh {
        display: block;
    }

    .site-footer {
        right: 10px;
        bottom: max(8px, env(safe-area-inset-bottom));
        left: 10px;
        font-size: 10px;
        line-height: 1.45;
    }

    .footer-inner {
        gap: 2px;
        padding-top: 7px;
    }

    .beian-links {
        gap: 1px 9px;
    }
}

@media (max-width: 380px) {
    .countdown {
        font-size: clamp(21px, 9.2vw, 34px);
        gap: 0.08em;
    }

    .slogan {
        font-size: clamp(16px, 5.8vw, 23px);
    }

    .info {
        font-size: 12px;
    }
}
