:root {
    --teal: #12a79b;
    --teal-dark: #087f76;
    --green: #119447;
    --green-dark: #067536;
    --lime: #d7f51a;
    --red: #ed1c24;
    --white: #fff;
    --ink: #123b35;
    --soft: #f4fffb;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(145deg, #0d9eaa 0%, #16b08c 45%, #62d14c 100%);
    color: var(--white);
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.page {
    width: min(100%, 480px);
    margin: 0 auto;
    padding: 14px 15px 22px;
    overflow: hidden;
    position: relative;
}

.page::before,
.page::after {
    content: '';
    position: absolute;
    pointer-events: none;
    opacity: .13;
}
.page::before {
    width: 180px;
    height: 180px;
    border: 2px solid #fff;
    transform: rotate(45deg);
    top: 115px;
    left: -100px;
}
.page::after {
    width: 240px;
    height: 240px;
    border: 2px solid #fff;
    transform: rotate(45deg);
    right: -150px;
    top: 260px;
}

.brand,
.hero,
.quota-banner,
.status-card,
.form-card,
.result-card,
footer { position: relative; z-index: 1; }

.brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 62px;
    border-bottom: 1px solid rgba(255,255,255,.25);
}
.brand-school { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand-mark {
    width: 39px; height: 39px; flex: 0 0 39px;
    display: grid; place-items: center;
    border: 2px solid #fff; border-radius: 50%;
    font-weight: 900; font-size: 12px;
    background: rgba(0,85,70,.28);
}
.brand-school strong,
.brand-school span,
.brand-school small { display: block; line-height: 1.08; }
.brand-school strong { font-size: 12px; letter-spacing: .3px; }
.brand-school span { font-size: 9px; font-weight: 700; margin-top: 2px; }
.brand-school small { font-size: 8px; margin-top: 2px; opacity: .8; }
.brand-stem { font-weight: 800; font-size: 14px; line-height: .95; text-align: right; }

.hero { text-align: center; padding: 22px 0 14px; }
.eyebrow {
    display: inline-block;
    margin: 0 0 12px;
    padding: 7px 13px;
    border-radius: 999px;
    background: linear-gradient(180deg, #159a70, #087b62);
    border: 1px solid rgba(255,255,255,.85);
    box-shadow: 0 3px 0 rgba(0,0,0,.12);
    font-size: 11px;
    font-weight: 900;
}
h1 { margin: 0; text-shadow: 0 3px 0 rgba(0,0,0,.22); line-height: .9; }
h1 span { display: block; font-size: clamp(46px, 14vw, 70px); font-weight: 1000; letter-spacing: -3px; }
h1 span::first-letter { color: var(--lime); }
h1 b { display: block; font-size: clamp(34px, 10vw, 48px); margin-top: 9px; }
.school-name { margin: 12px 0 0; color: var(--lime); font-weight: 800; font-size: 16px; line-height: 1.25; text-shadow: 0 2px 0 rgba(0,0,0,.18); }

.quota-banner {
    margin: 8px 0 14px;
    padding: 13px 12px;
    text-align: center;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(231,255,241,.96));
    color: var(--green-dark);
    border-radius: 14px;
    box-shadow: 0 7px 0 rgba(0,91,61,.2);
    border: 2px solid rgba(255,255,255,.9);
}
.quota-title { display: block; font-size: 22px; font-weight: 1000; line-height: 1; }
.quota-banner strong {
    display: inline-block;
    margin-top: 6px;
    padding: 5px 13px;
    background: var(--red);
    color: #fff;
    border-radius: 7px;
    font-size: 18px;
    box-shadow: 0 3px 0 #a50e13;
}
.quota-banner small { display: block; margin-top: 6px; color: #4c741a; font-weight: 900; font-size: 14px; }

.status-card,
.form-card,
.result-card {
    background: rgba(255,255,255,.97);
    color: var(--ink);
    border-radius: 18px;
    padding: 20px 17px;
    box-shadow: 0 10px 25px rgba(0,61,50,.18);
}
.status-card { text-align: center; }
.status-pill,
.open-badge {
    display: inline-block;
    background: linear-gradient(180deg, #11a04d, #067c38);
    color: #fff;
    padding: 7px 25px;
    border-radius: 999px;
    font-weight: 1000;
    font-size: 14px;
}
.status-card > p { margin: 13px 0 15px; line-height: 1.35; color: #31645a; }
.status-card > p strong { color: var(--green-dark); font-size: 18px; }
.countdown { display: flex; align-items: center; justify-content: center; gap: 7px; }
.countdown div { min-width: 74px; padding: 10px 6px 8px; border-radius: 10px; background: #eafff3; border: 1px solid #c5ead7; }
.countdown b { display: block; font-size: 32px; line-height: 1; color: var(--green-dark); font-variant-numeric: tabular-nums; }
.countdown span { display: block; margin-top: 5px; font-size: 8px; font-weight: 900; color: #6b8e82; }
.countdown i { color: var(--green-dark); font-size: 23px; font-weight: 900; font-style: normal; }
.waiting-note { font-size: 12px !important; margin-bottom: 0 !important; }
.waiting-note strong { font-size: 12px !important; }

.hidden { display: none !important; }
.form-card h2,
.result-card h2 { margin: 12px 0 5px; color: var(--green-dark); font-size: 25px; }
.form-note { margin: 0 0 17px; color: #658177; font-size: 13px; line-height: 1.4; }
form label { display: block; margin: 13px 0 6px; font-size: 13px; font-weight: 800; color: #275d50; }
input,
textarea {
    width: 100%;
    border: 1.5px solid #c9ded7;
    border-radius: 10px;
    padding: 13px 12px;
    font: inherit;
    font-size: 16px;
    color: #183f38;
    background: #fbfffd;
    outline: none;
}
textarea { resize: vertical; min-height: 86px; }
input:focus,
textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(18,167,155,.12); }
button {
    width: 100%;
    min-height: 54px;
    margin-top: 18px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(180deg, #159c4e, #057435);
    color: #fff;
    font: inherit;
    font-weight: 1000;
    font-size: 16px;
    letter-spacing: .2px;
    box-shadow: 0 4px 0 #045b2a;
    cursor: pointer;
    touch-action: manipulation;
}
button:active { transform: translateY(2px); box-shadow: 0 2px 0 #045b2a; }
button:disabled { opacity: .65; cursor: wait; }
.form-footnote { margin: 10px 0 0; text-align: center; color: #799188; font-size: 11px; }
.message { min-height: 18px; margin-top: 10px; font-size: 12px; text-align: center; font-weight: 700; }
.message.error { color: #c51b24; }

.result-card { text-align: center; padding: 30px 18px; }
.result-icon {
    width: 65px; height: 65px; margin: 0 auto 12px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: #e3faea;
    color: var(--green-dark);
    font-size: 35px; font-weight: 1000;
}
.result-card p { color: #607c73; line-height: 1.45; margin: 8px 0 14px; }
.result-card strong { color: var(--green-dark); font-size: 13px; line-height: 1.4; }
.sold-out .result-icon { background: #fff1e2; color: #db6a00; }
.sold-out h2 { color: #b75000; }
.sold-out strong { color: #a54b00; }

footer { display: flex; justify-content: space-between; gap: 12px; padding: 18px 2px 0; color: rgba(255,255,255,.86); font-size: 8px; font-weight: 700; }
footer span:last-child { text-align: right; }

@media (min-width: 481px) {
    body { padding: 14px 0; }
    .page { border-radius: 18px; min-height: calc(100vh - 28px); }
}

@media (max-width: 360px) {
    .page { padding-left: 11px; padding-right: 11px; }
    .countdown { gap: 4px; }
    .countdown div { min-width: 67px; }
    .countdown b { font-size: 29px; }
    h1 span { letter-spacing: -2px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
