:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #000000;
  --muted: #555555;
  --line: #8f8f8f;
  --input-line: #8a8a8a;
  --button: #050505;
  --latest: #fff1a8;
  --latest-head: #ffe680;
  --latest-line: #d6b800;
  --error: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

.page {
  padding: 26px 28px 42px;
}

.lookup-panel {
  width: min(100%, 980px);
}

h1 {
  margin: 0 0 28px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 800;
}

.lookup-form {
  display: grid;
  gap: 20px 16px;
}

.field-full {
  width: min(100%, 652px);
}

.field-row {
  display: grid;
  grid-template-columns: 318px 318px;
  gap: 16px;
  align-items: end;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

select,
input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--input-line);
  border-radius: 0;
  background: #fff;
  color: #000;
  padding: 0 16px;
  font-size: 18px;
}

button {
  width: 108px;
  height: 64px;
  border: 0;
  border-radius: 8px;
  background: var(--button);
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.status {
  min-height: 24px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 15px;
}

.status.error {
  color: var(--error);
  font-weight: 700;
}

.result {
  margin-top: 22px;
}

.result-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.result-title h2 {
  margin: 0;
  font-size: 22px;
}

.result-title span {
  color: var(--muted);
  font-size: 14px;
}

.subject-list {
  display: grid;
  gap: 14px;
}

.subject-card {
  border: 1px solid var(--line);
  background: #fff;
}

.subject-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f5f5f5;
}

.subject-card-header h3 {
  margin: 0;
  font-size: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

th,
td {
  border: 1px solid #c9c9c9;
  padding: 12px 8px;
  text-align: center;
  word-break: keep-all;
}

thead th {
  background: #efefef;
  font-weight: 800;
}

tbody th {
  background: #fafafa;
  font-weight: 800;
}

.latest-row th,
.latest-row td {
  background: var(--latest);
  border-color: var(--latest-line);
  font-weight: 800;
}

@media (max-width: 720px) {
  .page {
    padding: 24px 18px 36px;
  }

  h1 {
    font-size: 26px;
  }

  .field-full,
  .field-row {
    width: 100%;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .lookup-form {
    gap: 16px;
  }

  select,
  input {
    font-size: 17px;
  }

  button {
    width: 100%;
    height: 56px;
    font-size: 26px;
  }

  .result-title {
    display: block;
  }

  .result-title h2 {
    margin-bottom: 4px;
    font-size: 20px;
  }

  .subject-card-header h3 {
    font-size: 17px;
  }

  table {
    font-size: 14px;
  }

  th,
  td {
    padding: 10px 4px;
  }
}
