:root {
  color: #222;
  background: #fff;
  font-family: Arial, "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #fff;
}

button, input { font: inherit; }

.page-wrap {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 42px 0 28px;
}

.page-header {
  padding: 0 0 24px;
  border-bottom: 1px solid #d6d6d6;
  text-align: center;
}

.university {
  margin: 0 0 14px;
  color: #9b1c2d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
}

h1 {
  margin: 0;
  color: #202020;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  line-height: 1.45;
  word-break: keep-all;
}

.lookup-form {
  width: min(100%, 430px);
  margin: 34px auto 0;
}

.form-field + .form-field { margin-top: 18px; }

label {
  display: block;
  margin-bottom: 7px;
  color: #333;
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid #bdbdbd;
  border-radius: 2px;
  outline: none;
  color: #222;
  background: #fff;
}

input:focus {
  border-color: #9b1c2d;
  box-shadow: 0 0 0 2px rgba(155, 28, 45, .12);
}

input::placeholder { color: #999; }

.check-button,
.download-button {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid #9b1c2d;
  border-radius: 2px;
  color: #fff;
  background: #9b1c2d;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.check-button { margin-top: 24px; }
.check-button:hover, .download-button:hover { background: #7f1423; }
.check-button:disabled { opacity: .6; cursor: wait; }

.spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.check-button.loading .button-label { display: none; }
.check-button.loading .spinner { display: block; }

.message {
  width: min(100%, 430px);
  margin: 18px auto 0;
  padding: 12px;
  border: 1px solid #e3b9bf;
  color: #8a1728;
  background: #fff7f8;
  font-size: 14px;
  line-height: 1.5;
}

.message p { margin: 0; }
.message[hidden], .result-panel[hidden] { display: none; }

.result-panel {
  width: min(100%, 520px);
  margin: 32px auto 0;
  padding: 20px 0 0;
  border-top: 3px solid #9b1c2d;
}

.result-panel h2 {
  margin: 0 0 14px;
  color: #333;
  font-size: 20px;
  text-align: center;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid #ccc;
  border-left: 3px solid #9b1c2d;
  text-align: left;
  line-height: 1.5;
}

.result-table th,
.result-table td {
  padding: 11px 12px;
  border-right: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  font-size: 16px;
  font-weight: 400;
}

.result-table th {
  width: 120px;
  background: #fafafa;
  font-weight: 700;
}

.download-button { margin-top: 18px; }

.download-button.disabled {
  border-color: #aaa;
  color: #777;
  background: #eee;
  pointer-events: none;
}

.countdown {
  margin: 10px 0 0;
  color: #777;
  font-size: 13px;
  text-align: center;
}

.countdown strong { color: #9b1c2d; }

.notice {
  margin: 38px 0 0;
  padding: 18px 18px 8px;
  border-top: 1px solid #ccc;
  color: #555;
  font-size: 12px;
  line-height: 1.65;
}

.notice p { margin: 0 0 8px; }

footer {
  margin-top: 30px;
  color: #999;
  font-size: 11px;
  text-align: center;
}

.mobile-break { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
  .page-wrap { width: min(100% - 24px, 760px); padding-top: 28px; }
  .mobile-break { display: block; }
  h1 { font-size: 22px; }
  .notice { padding-left: 8px; padding-right: 8px; }
}
