* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Pretendard, "Noto Sans KR", Arial, sans-serif;
  background: #f4f7fb;
  color: #1f2937;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.header {
  margin-bottom: 24px;
}

.header h1 {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 800;
}

.header p {
  margin: 0;
  color: #6b7280;
  font-size: 15px;
}

.card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  padding: 24px;
  margin-bottom: 20px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 14px;
  font-weight: 700;
  color: #374151;
}

.field select,
.field button {
  height: 48px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  padding: 0 14px;
  font-size: 15px;
  background: #fff;
}

.field select:focus,
.field button:focus {
  outline: none;
  border-color: #2563eb;
}

.button-field button {
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.button-field button:hover {
  background: #1d4ed8;
}

.hidden {
  display: none !important;
}

.message {
  padding: 16px 18px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.6;
}

.message.info {
  background: #eff6ff;
  color: #1d4ed8;
}

.message.error {
  background: #fef2f2;
  color: #dc2626;
}

.result-title {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 800;
}

.result-subtitle {
  margin: 0 0 18px;
  color: #6b7280;
  font-size: 15px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.meta span {
  background: #eef2ff;
  color: #3730a3;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.answer-section h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.answer-table-wrap {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  border: 1px solid #d1d5db;
  text-align: center;
  padding: 10px 6px;
  font-size: 14px;
}

th {
  background: #e5edff;
  font-weight: 800;
}

td {
  background: #fff;
  font-weight: 700;
}

.admin-box {
  margin-top: 20px;
  padding: 16px;
  background: #f9fafb;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
}

.admin-box h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.admin-box pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
}

@media (max-width: 980px) {
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .header h1 {
    font-size: 28px;
  }

  .result-title {
    font-size: 22px;
  }
}
.seo-card {
  padding-top: 20px;
  padding-bottom: 20px;
}

.seo-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
}

.seo-desc {
  margin: 0 0 14px;
  color: #6b7280;
  font-size: 14px;
}

.share-box {
  display: flex;
  gap: 10px;
  align-items: center;
}

.share-box input {
  flex: 1;
  height: 46px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  padding: 0 14px;
  font-size: 14px;
  background: #fff;
}

.share-box button {
  height: 46px;
  border: none;
  border-radius: 12px;
  padding: 0 16px;
  background: #111827;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.share-box button:hover {
  opacity: 0.92;
}

@media (max-width: 640px) {
  .share-box {
    flex-direction: column;
    align-items: stretch;
  }

  .share-box button {
    width: 100%;
  }
}

.exam-badge{
  color:#e53935;
  font-weight:700;
  margin-left:10px;
  font-size:0.9em;
}

.exam-badge-red {
  color: #e53935;
  font-weight: 600;
  margin-left: 6px;
}
/*¿©±âºÎÅÍ ½Ï´Ù ÀüÃ¼¸ñ·Ï*/
.layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.main-content {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  min-width: 0;
}

.sidebar-title {
  margin-top: 0;
  margin-bottom: 16px;
}

#examTree details {
  margin-bottom: 8px;
}

#examTree summary {
  cursor: pointer;
  font-weight: 600;
  padding: 6px 0;
}

.tree-links {
  padding-left: 12px;
}

.tree-subject { /*Á»´õ º¸±âÁÁ°Ô*/
  margin-left: 8px; /*Á»´õ º¸±âÁÁ°Ô*/
} /*Á»´õ º¸±âÁÁ°Ô*/

.tree-link-item {
  margin: 6px 0;
  line-height: 1.45;
  word-break: keep-all;
}

.tree-link-item a {
  text-decoration: none;
}

.tree-link-item a:hover {
  text-decoration: underline;
}

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

  .sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
}