:root {
  --ink: #111426;
  --muted: #737b91;
  --paper: #f5f7fc;
  --white: #ffffff;
  --line: #e1e5ef;
  --blue: #3157f6;
  --blue-dark: #203fc5;
  --blue-soft: #e8edff;
  --green: #20a078;
  --red: #dc5366;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    "Pretendard Variable",
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans KR",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 16px;
  color: #fff;
  background: var(--ink);
  border-radius: 10px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(49, 87, 246, 0.25);
  outline-offset: 3px;
}

.auth-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 0 clamp(24px, 5vw, 76px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(225, 229, 239, 0.85);
  backdrop-filter: blur(18px);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -1px;
}

.auth-brand > span {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 11px;
  box-shadow: 0 9px 20px rgba(49, 87, 246, 0.25);
  transform: rotate(-4deg);
}

.auth-header nav {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #7b8398;
  font-size: 13px;
}

.auth-header nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 10px;
  font-weight: 800;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns:
    minmax(440px, 0.95fr)
    minmax(500px, 1.05fr);
  padding-top: 82px;
}

.auth-visual {
  position: relative;
  min-height: calc(100vh - 82px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding:
    clamp(48px, 7vw, 100px)
    clamp(40px, 6vw, 88px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(
      circle at 80% 18%,
      rgba(89, 117, 255, 0.5),
      transparent 28%
    ),
    linear-gradient(145deg, #151a30, #101426);
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.12) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.12) 1px,
      transparent 1px
    );
  background-size: 40px 40px;
}

.auth-visual::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -150px;
  width: 390px;
  height: 390px;
  border: 70px solid rgba(49, 87, 246, 0.14);
  border-radius: 50%;
}

.visual-copy,
.formula-card,
.learning-preview,
.visual-points {
  position: relative;
  z-index: 1;
}

.visual-copy > p,
.auth-heading > p {
  margin: 0 0 14px;
  color: #8fa3ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
}

.visual-copy h1 {
  margin: 0;
  font-size: clamp(40px, 4vw, 62px);
  line-height: 1.13;
  letter-spacing: -3px;
}

.visual-copy h1 strong {
  color: #6682ff;
}

.visual-copy > span {
  max-width: 500px;
  display: block;
  margin-top: 22px;
  color: #aeb5c9;
  font-size: 15px;
  line-height: 1.8;
}

.formula-card {
  width: min(100%, 490px);
  margin-top: 38px;
  padding: 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  box-shadow: 0 25px 65px rgba(3, 8, 28, 0.3);
}

.formula-card-head {
  display: flex;
  justify-content: space-between;
  color: #8b93a8;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 1px;
}

.formula-card-head > span {
  color: var(--blue);
}

.area-model {
  width: 175px;
  height: 175px;
  display: grid;
  grid-template-columns: 3fr 1fr;
  grid-template-rows: 3fr 1fr;
  gap: 3px;
  margin: 25px auto 18px;
}

.area-model i {
  display: grid;
  place-items: center;
  color: #33467f;
  background: #bec9fb;
  font-family: "SUIT Variable", "Pretendard Variable", Pretendard, sans-serif;
  font-style: normal;
}

.area-model i:first-child {
  color: #fff;
  background: var(--blue);
  font-size: 24px;
}

.area-model i:last-child {
  background: #cbbded;
}

.formula-card > strong {
  display: block;
  color: var(--blue);
  font-family: "SUIT Variable", "Pretendard Variable", Pretendard, sans-serif;
  text-align: center;
}

.visual-points {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 34px;
  color: #aeb5c9;
  font-size: 11px;
}

.visual-points span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.visual-points b {
  color: #6883ff;
  font-family: "SUIT Variable", "Pretendard Variable", Pretendard, sans-serif;
}

.learning-preview {
  width: min(100%, 500px);
  display: grid;
  gap: 9px;
  margin-top: 38px;
}

.learning-preview article {
  min-height: 70px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: #aeb5c9;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.learning-preview article.active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 14px 30px rgba(49, 87, 246, 0.25);
}

.learning-preview article > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-family: "SUIT Variable", "Pretendard Variable", Pretendard, sans-serif;
  font-size: 13px;
}

.learning-preview article > div {
  display: grid;
  gap: 5px;
}

.learning-preview small {
  color: #707a99;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
}

.learning-preview article.active small {
  color: #cbd5ff;
}

.learning-preview strong {
  font-size: 12px;
}

.auth-panel {
  min-height: calc(100vh - 82px);
  display: grid;
  place-items: center;
  padding: 48px 30px;
  background:
    radial-gradient(
      circle at 90% 4%,
      rgba(49, 87, 246, 0.08),
      transparent 27%
    ),
    var(--paper);
}

.auth-panel-inner {
  width: min(100%, 470px);
  padding: clamp(30px, 4vw, 48px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(29, 42, 103, 0.09);
}

.auth-heading h2 {
  margin: 0;
  font-size: clamp(27px, 3vw, 37px);
  letter-spacing: -1.5px;
}

.auth-heading > span {
  display: block;
  margin-top: 11px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.form-alert {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 12px;
  color: #a43646;
  background: #fff0f2;
  border: 1px solid #f5ccd2;
  border-radius: 11px;
}

.form-alert > span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--red);
  border-radius: 8px;
  font-family: "SUIT Variable", "Pretendard Variable", Pretendard, sans-serif;
  font-weight: 900;
}

.form-alert p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.form-alert-success {
  color: #167455;
  background: #e7f7f1;
  border-color: #a8dfcb;
}

.form-alert-success > span {
  color: #fff;
  background: #20a078;
}

.form-alert-preview {
  color: #6f551b;
  background: #fff8e6;
  border-color: #ead38f;
}

.form-alert-preview > span {
  color: #fff;
  background: #c88a19;
}

.reset-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.reset-steps span {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  padding: 18px;
  color: #8f98b4;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  font-size: 10px;
  font-weight: 750;
}

.reset-steps span.active {
  color: #fff;
  background: rgba(99, 126, 255, 0.18);
  border-color: rgba(150, 169, 255, 0.35);
}

.reset-steps b {
  color: #8da2ff;
  font-size: 11px;
}

.verification-code {
  text-align: center;
  font-size: 25px !important;
  font-weight: 900;
  letter-spacing: 8px;
}

.reset-resend {
  margin-top: 14px;
  text-align: center;
}

.reset-resend button {
  padding: 8px;
  color: #65708b;
  background: transparent;
  border: 0;
  font-size: 10px;
  font-weight: 750;
}

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label,
.field-label-row label {
  font-size: 12px;
  font-weight: 800;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.field-label-row a {
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
}

.form-field input,
.form-field select {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  color: var(--ink);
  background: #fafbfe;
  border: 1px solid #dfe3ed;
  border-radius: 11px;
  outline: none;
  transition: 0.18s ease;
}

.form-field input::placeholder {
  color: #adb3c2;
}

.form-field input:hover,
.form-field select:hover {
  border-color: #bdc7e8;
}

.form-field input:focus,
.form-field select:focus {
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(49, 87, 246, 0.09);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 62px;
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 8px;
  min-width: 45px;
  height: 34px;
  color: #7c8499;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  transform: translateY(-50%);
}

.password-field button:hover {
  color: var(--blue);
  background: var(--blue-soft);
}

.field-guide {
  min-height: 16px;
  color: #70788c;
  font-size: 11px;
  line-height: 1.6;
}

.field-guide.valid {
  color: var(--green);
}

.field-guide.invalid {
  color: var(--red);
}

.check-field {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 9px;
  color: #6e768c;
  font-size: 11px;
  cursor: pointer;
}

.check-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-field > span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #cfd5e2;
  border-radius: 6px;
}

.check-field input:checked + span {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.check-field input:checked + span::after {
  content: "✓";
  font-size: 10px;
  font-weight: 900;
}

.check-field input:focus-visible + span {
  outline: 3px solid rgba(49, 87, 246, 0.25);
  outline-offset: 3px;
}

.terms-field em {
  font-style: normal;
  line-height: 1.6;
}

.terms-field a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.submit-button {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(49, 87, 246, 0.23);
  font-size: 13px;
  font-weight: 850;
  transition: 0.18s ease;
}

.submit-button:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

.submit-button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.social-auth {
  display: grid;
  gap: 13px;
  margin-top: 20px;
}

.social-auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: #9aa2b5;
  font-size: 11px;
}

.social-auth-divider::before,
.social-auth-divider::after {
  content: "";
  height: 1px;
  background: #e8ebf2;
}

.social-auth-buttons {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.social-auth-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid #dfe3ec;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 850;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.social-auth-button:hover {
  border-color: #b8c1d5;
  box-shadow: 0 10px 24px rgba(17, 20, 38, 0.08);
  transform: translateY(-1px);
}

.social-auth-button.is-google {
  color: #303443;
  background: #fff;
}

.social-auth-mark {
  width: 26px;
  height: 26px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: #3157f6;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 5px 12px rgba(49, 87, 246, 0.2);
}

.social-auth-guide {
  color: #8991a4;
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.social-registration-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: #263459;
  background: linear-gradient(135deg, #eef2ff, #f7f9ff);
  border: 1px solid #d8e0ff;
  border-radius: 14px;
}

.social-registration-banner strong,
.social-registration-banner p {
  margin: 0;
}

.social-registration-banner strong {
  display: block;
  font-size: 12px;
  font-weight: 900;
}

.social-registration-banner p {
  margin-top: 4px;
  color: #69728a;
  font-size: 10px;
  line-height: 1.55;
}

.form-field input[readonly] {
  color: #4c5772;
  background: #eef1f7;
  border-color: #d9deea;
  cursor: not-allowed;
}

.social-email-guide {
  color: var(--blue);
  font-weight: 750;
}

.auth-switch {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 24px;
  color: #858da1;
  font-size: 11px;
}

.auth-switch a {
  color: var(--blue);
  font-weight: 850;
}

.auth-notice {
  margin: 24px 0 0;
  padding-top: 18px;
  color: #a0a6b6;
  border-top: 1px solid #edf0f5;
  font-size: 11px;
  line-height: 1.65;
  text-align: center;
}

@media (max-width: 980px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: auto;
    padding-block: 70px;
  }

  .auth-panel {
    min-height: auto;
    padding-block: 70px;
  }
}

@media (max-width: 640px) {
  .auth-header {
    height: 70px;
    padding-inline: 18px;
  }

  .auth-header nav > span {
    display: none;
  }

  .auth-layout {
    padding-top: 70px;
  }

  .auth-visual {
    display: none;
  }

  .auth-panel {
    min-height: calc(100vh - 70px);
    padding: 24px 16px;
  }

  .auth-panel-inner {
    padding: 28px 22px;
    border-radius: 18px;
  }

  .social-auth-buttons {
    grid-template-columns: 1fr;
  }
}

.school-selector {
  display: grid;
  gap: 18px;
  padding: 18px;
  background: #f7f9ff;
  border: 1px solid #e1e6f5;
  border-radius: 14px;
}

.school-selector[hidden] {
  display: none !important;
}

.university-selector {
  border-color: rgba(83, 101, 246, 0.2);
}

.school-selector legend {
  padding-inline: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.form-field input[type="date"] {
  min-width: 0;
  color-scheme: light;
}

.form-field input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.7;
}

.form-field input:disabled,
.form-field select:disabled {
  color: #a3a9b8;
  background: #f0f2f6;
  cursor: not-allowed;
  opacity: 0.8;
}

.school-result-count {
  color: #3157f6;
  font-weight: 750;
}

#schoolCode {
  text-overflow: ellipsis;
}
