:root {
  --edu-paper: #f7f2ea;
  --edu-paper-strong: #f0e8dd;
  --edu-ink: #1c1b19;
  --edu-border: #e2d9cd;
  --edu-shadow: 0 12px 30px rgba(29, 23, 17, 0.08);
  --edu-radius-xl: 22px;
}

body.edu-portal,
body.edu-yeonhwa {
  font-family: var(--font-family);
  background: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  --page-max: min(1440px, 96vw);
  --content-max: min(1200px, 92vw);
}

.edu-portal .text-sm,
.edu-portal .text-xs,
.edu-yeonhwa .text-sm,
.edu-yeonhwa .text-xs {
  font-size: 14px;
  line-height: 1.6;
}

.edu-portal .badge,
.edu-yeonhwa .badge {
  font-size: 14px;
}

.edu-portal .btn,
.edu-portal .btn-sm,
.edu-yeonhwa .btn,
.edu-yeonhwa .btn-sm {
  font-size: 14px;
}

body.edu-portal {
  --background: #f7f8fb;
  --foreground: #0f0f0f;
  --card: #ffffff;
  --card-foreground: #0f0f0f;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --primary: #0074ff;
  --primary-hover: #0857c3;
  --accent: #34a853;
  --ring: #0074ff;
}

body.edu-portal::before {
  content: none;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  background: var(--card);
  color: var(--foreground);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  z-index: 100;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.edu-header {
  background: rgba(255, 250, 244, 0.92);
  border-bottom: 1px solid var(--border);
}

.edu-header-portal {
  background: #ffffff;
}

.edu-header.center-logo .header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2);
}

.edu-header.center-logo .header-left,
.edu-header.center-logo .header-right {
  display: flex;
  align-items: center;
  min-height: 32px;
}

.edu-header.center-logo .header-left {
  justify-content: flex-start;
}

.edu-header.center-logo .header-right {
  justify-content: flex-end;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-decoration: none;
}

.logo-mark img {
  height: 16px;
  width: auto;
  display: block;
}

.edu-portal-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--foreground);
  text-decoration: none;
}

.edu-header .logo {
  font-weight: 600;
  gap: var(--space-2);
}

.edu-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.edu-brand-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.edu-brand-subtitle {
  font-size: 14px;
  color: var(--muted-foreground);
}

.edu-header .header-nav a {
  font-weight: 500;
}

.edu-header .header-right {
  gap: var(--space-2);
}

.edu-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted-foreground);
}

.edu-portal .content-wrapper,
.edu-yeonhwa .content-wrapper {
  padding-top: calc(var(--header-height) + 24px);
}

.edu-section {
  margin-bottom: 36px;
}

.edu-section:last-of-type {
  margin-bottom: 0;
}

.edu-portal .edu-section,
.edu-yeonhwa .edu-section {
  display: grid;
  gap: 16px;
}

.edu-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.edu-portal .edu-section-header,
.edu-yeonhwa .edu-section-header {
  margin-bottom: 0;
}

.edu-section-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.edu-section-subtitle {
  font-size: 14px;
  color: var(--muted-foreground);
  max-width: 520px;
}

.edu-portal .subsection,
.edu-yeonhwa .subsection {
  margin-top: 0;
}

.edu-portal .subsection-title,
.edu-yeonhwa .subsection-title {
  margin: 0;
}

.edu-hero {
  position: relative;
  border-radius: var(--edu-radius-xl);
  padding: 32px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(245, 238, 228, 0.92));
  box-shadow: var(--edu-shadow);
  overflow: hidden;
}

.edu-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.7), rgba(0, 0, 0, 0));
  opacity: 0.6;
  pointer-events: none;
}

.edu-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  z-index: 1;
}

.edu-hero h1 {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.edu-hero p {
  font-size: 15px;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.edu-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.edu-search {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.edu-search .input {
  flex: 1;
  min-width: 0;
}

.edu-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.edu-hero-art {
  display: grid;
  gap: 12px;
  align-content: center;
}

.edu-hero-panel {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 8px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.edu-hero-panel strong {
  font-size: 16px;
}

.edu-hero-panel span {
  font-size: 14px;
  color: var(--muted-foreground);
}

.edu-portal-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 20px;
}

.edu-filter-card {
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.edu-filter-list {
  display: grid;
  gap: 12px;
}

.edu-filter-group {
  display: grid;
  gap: 6px;
}

.edu-filter-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
}

.edu-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.edu-table {
  width: 100%;
}

.edu-table tbody tr:nth-child(even) td {
  background: rgba(248, 244, 238, 0.5);
}

.edu-table td,
.edu-table th {
  font-size: 14px;
}

.edu-table .badge {
  font-size: 14px;
}

.edu-density {
  display: grid;
  gap: 14px;
}

.edu-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.edu-stat {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 6px;
}

.edu-stat strong {
  font-size: 20px;
}

.edu-region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.edu-region-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  display: grid;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.edu-region-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.edu-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.edu-data-card .card-header {
  padding-bottom: 0;
}

.edu-data-card .card-content {
  display: grid;
  gap: 6px;
}

.edu-data-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.edu-data-meta {
  color: var(--muted-foreground);
}

.edu-portal .card-content {
  display: grid;
  gap: 10px;
}

.edu-portal .card-content > p {
  margin: 0;
}

.edu-region-card span {
  font-size: 14px;
  color: var(--muted-foreground);
}

.edu-list {
  display: grid;
  gap: 10px;
}

.edu-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
}

.edu-list-item strong {
  font-size: 15px;
}

.edu-list-item span {
  font-size: 14px;
  color: var(--muted-foreground);
}

.edu-footer {
  margin-top: 40px;
  padding: 20px 0 40px;
  font-size: 14px;
  color: var(--muted-foreground);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: edu-rise 0.7s ease forwards;
}

.reveal.delay-1 { animation-delay: 0.1s; }
.reveal.delay-2 { animation-delay: 0.2s; }
.reveal.delay-3 { animation-delay: 0.3s; }
.reveal.delay-4 { animation-delay: 0.4s; }

@keyframes edu-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .edu-portal-grid {
    grid-template-columns: 1fr;
  }

  .edu-filter-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .edu-hero {
    padding: 24px;
  }

  .edu-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .edu-search {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
