.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.625rem 1.25rem;
  font-size: var(--font-size-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--c-brand-text);
}

.btn-primary:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-1px);
  box-shadow: none;
}

.btn-accent {
  background-color: var(--color-accent);
  color: var(--c-brand-text);
}

.btn-accent:hover {
  background-color: var(--c-brand);
  transform: translateY(-1px);
  box-shadow: none;
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-border);
  color: var(--color-text-main);
}

.btn-outline:hover {
  background-color: var(--c-bg-section);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-outline-primary {
  background-color: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-outline-primary:hover {
  background-color: var(--color-primary);
  color: var(--c-brand-text);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: var(--font-size-xs);
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: var(--font-size-base);
  border-radius: var(--radius-lg);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-list-xs);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.2px;
  box-sizing: border-box;
  white-space: nowrap;
  background: transparent !important;
  border: none !important;
  padding: 0 var(--s-1);
}

.badge-primary {
  color: var(--color-primary) !important;
}

.badge-accent {
  color: var(--c-text-muted) !important;
  font-weight: 800 !important;
}

.badge-sub {
  color: var(--color-sub) !important;
}

.badge-gray {
  color: var(--color-text-muted) !important;
}

.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: none;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: none;
  border-color: var(--c-line);
}

.card-body {
  padding: var(--space-6);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.tab-nav {
  display: flex;
  gap: var(--space-2);
  border-bottom: 2px solid var(--color-border);
  margin-bottom: var(--space-6);
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: none;
  border: none;
  padding: var(--space-3) var(--space-5);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--color-primary);
}

.tab-btn.active {
  color: var(--color-primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background-color: var(--color-primary);
}

.tab-btn[data-target="tab-notice"].active,
.tab-btn[data-target="tab-all"].active {
  color: var(--color-primary);
}
.tab-btn[data-target="tab-notice"].active::after,
.tab-btn[data-target="tab-all"].active::after {
  background-color: var(--color-primary); 
}

.tab-btn[data-target="tab-job"].active,
.tab-btn[data-target="tab-career"].active {
  color: var(--color-accent);
}
.tab-btn[data-target="tab-job"].active::after,
.tab-btn[data-target="tab-career"].active::after {
  background-color: var(--color-accent); 
}

.tab-btn[data-target="tab-news"].active {
  color: var(--c-brand);
}
.tab-btn[data-target="tab-news"].active::after {
  background-color: var(--color-sub); 
}

.tab-btn[data-target="tab-archive"].active,
.tab-btn[data-target="tab-download"].active {
  color: var(--color-primary-light);
}
.tab-btn[data-target="tab-archive"].active::after,
.tab-btn[data-target="tab-download"].active::after {
  background-color: var(--color-primary-light); 
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn var(--transition-fast) ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.table-responsive {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: none;
  cursor: grab;
  user-select: none;
}

.table-responsive.active-drag {
  cursor: grabbing;
}

.table-responsive::-webkit-scrollbar {
  height: 5px;
  display: block;
}

.table-responsive::-webkit-scrollbar-track {
  background: var(--c-bg-section);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--c-bg-section);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--font-size-sm);
}

.data-table th,
.data-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.data-table th {
  background-color: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-weight: 700;
  white-space: nowrap;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background-color: var(--c-bg-section);
}

.data-table .text-center {
  text-align: center;
}

.board-list-table th.col-num,
.board-list-table td.col-num,
.board-list-table th:nth-child(1),
.board-list-table td:nth-child(1) {
  width: 8%;
  text-align: center;
}

.board-list-table th.col-category,
.board-list-table td.col-category,
.board-list-table th:nth-child(2),
.board-list-table td:nth-child(2) {
  width: 10%;
  text-align: center;
  white-space: nowrap;
}

.board-list-table th.col-title,
.board-list-table td.col-title,
.board-list-table th:nth-child(3),
.board-list-table td:nth-child(3) {
  text-align: left;
  word-break: keep-all;
  line-height: 1.45;
}

.board-list-table td.col-title a,
.board-list-table td:nth-child(3) a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
  line-height: 1.45;
  color: var(--color-text-main);
  text-decoration: none;
}

.board-list-table td.col-title a:hover,
.board-list-table td:nth-child(3) a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.board-list-table th.col-author,
.board-list-table td.col-author,
.board-list-table th:nth-child(4),
.board-list-table td:nth-child(4) {
  width: 11%;
  text-align: center;
  white-space: nowrap;
}

.board-list-table th.col-date,
.board-list-table td.col-date,
.board-list-table th:nth-child(5),
.board-list-table td:nth-child(5) {
  width: 12%;
  text-align: center;
  white-space: nowrap;
}

.board-list-table th.col-views,
.board-list-table td.col-views,
.board-list-table th:nth-child(6),
.board-list-table td:nth-child(6) {
  width: 9%;
  text-align: center;
  white-space: nowrap;
}

.search-bar {
  display: flex;
  gap: var(--space-2);
  max-width: 420px;
}

.search-input {
  flex: 1;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  background-color: var(--color-surface);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
  border-color: var(--color-primary);
  box-shadow: none;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-8);
}

.page-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.page-item:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.page-item.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--c-brand-text);
}

.page-item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: none;
  background-color: var(--c-brand-strong);
  isolation: isolate;
}

.portal-hero .carousel-container .carousel-track {
  position: relative;
  height: 440px;
  flex: 0 0 440px;
}

.portal-hero .carousel-container .carousel-slide {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  user-select: none;
}

.portal-hero .carousel-container .carousel-slide[hidden] {
  display: none;
}

.portal-hero .carousel-container .carousel-slide-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 0;
  object-fit: cover;
  object-position: center;
}

.portal-hero .carousel-container .carousel-slide::after {
  position: absolute;
  inset: 28% 0 0;
  z-index: 1;
  background: linear-gradient(to bottom, transparent, rgb(0 0 0 / 82%));
  content: "";
  pointer-events: none;
}

.portal-hero .carousel-container .carousel-content {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  width: 100%;
  max-width: 800px;
  padding: var(--space-8) var(--space-8) calc(var(--space-8) + 32px);
  background: transparent;
  color: #fff;
  pointer-events: none;
}

.portal-hero .carousel-container .carousel-label {
  display: inline-block;
  margin-bottom: var(--space-3);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius);
  background: rgb(0 0 0 / 48%);
  color: #fff;
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.portal-hero .carousel-container .carousel-title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: var(--space-2);
  color: #fff;
}

.portal-hero .carousel-container .carousel-desc {
  font-size: var(--font-size-sm);
  line-height: 1.5;
  color: #fff;
}

.portal-hero .carousel-container .carousel-controls {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.portal-hero .carousel-container .carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 55%);
  background: rgb(0 0 0 / 42%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.68;
  transition: opacity var(--transition-fast), background-color var(--transition-fast);
  pointer-events: auto;
}

.portal-hero .carousel-container .carousel-nav-btn:hover,
.portal-hero .carousel-container .carousel-nav-btn:focus-visible {
  background: rgb(0 0 0 / 78%);
  opacity: 1;
}

.portal-hero .carousel-container .carousel-nav-btn:focus-visible,
.portal-hero .carousel-container .carousel-toggle:focus-visible,
.portal-hero .carousel-container .carousel-dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.portal-hero .carousel-container .carousel-prev {
  left: var(--space-3);
}

.portal-hero .carousel-container .carousel-next {
  right: var(--space-3);
}

.portal-hero .carousel-container .carousel-toggle {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  min-width: 36px;
  min-height: 36px;
  padding: var(--space-1) var(--space-2);
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: var(--radius);
  background: rgb(0 0 0 / 48%);
  color: #fff;
  font-size: var(--font-size-xs);
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
}

.portal-hero .carousel-container .carousel-indicators {
  position: absolute;
  bottom: var(--space-3);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.portal-hero .carousel-container .carousel-dot {
  width: 8px;
  height: 8px;
  min-width: 0;
  min-height: 0;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 55%);
  cursor: pointer;
  transition: width var(--transition-fast), background-color var(--transition-fast);
}

.portal-hero .carousel-container .carousel-dot.active {
  width: 20px;
  border-radius: var(--radius-full);
  background: #fff;
}

@media (max-width: 768px) {
  .portal-hero .carousel-container .carousel-track {
    height: 290px;
    flex-basis: 290px;
  }

  .portal-hero .carousel-container .carousel-title {
    font-size: var(--font-size-lg);
  }
  .portal-hero .carousel-container .carousel-content {
    padding: var(--space-4) var(--space-4) calc(var(--space-4) + 20px);
  }
  .portal-hero .carousel-container .carousel-nav-btn {
    top: var(--space-3);
    transform: none;
    width: 36px;
    height: 36px;
  }
  .portal-hero .carousel-container .carousel-prev {
    left: auto;
    right: calc(var(--space-3) + 84px);
  }
  .portal-hero .carousel-container .carousel-next {
    right: calc(var(--space-3) + 44px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-hero .carousel-container .carousel-nav-btn,
  .portal-hero .carousel-container .carousel-dot {
    transition: none;
  }
}

@media (max-width: 480px) {
  .portal-hero .carousel-container .carousel-track {
    height: 260px;
    flex-basis: 260px;
  }
}

.academic-board-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-top: 2px solid var(--color-primary);
}

.academic-board-table tr {
  border-bottom: 1px solid var(--color-border);
  height: 54px;
  transition: background-color var(--transition-fast);
}

.academic-board-table tr:hover {
  background-color: var(--c-bg);
}

.academic-board-table td {
  padding: var(--s-3) var(--s-4);
  vertical-align: middle;
}

.col-tag {
  width: 76px;
  text-align: center;
  padding-right: 0 !important;
}

.academic-tag {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-list-xs);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.2px;
  background: transparent;
  color: var(--c-text-muted);
  border: none;
  box-sizing: border-box;
  width: auto;
  height: auto;
  padding: 0;
}

.academic-tag.essential {
  color: var(--color-accent);
  background: transparent;
}

.academic-tag.primary {
  color: var(--color-primary);
  background: transparent;
}

.col-title {
  padding-left: var(--s-3) !important;
}

.academic-title-link {
  display: inline-block;
  color: var(--color-text-main);
  font-size: var(--fs-list-md);
  font-weight: 600;
  line-height: 1.5;
  transition: color var(--transition-fast);
}

.academic-title-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.col-date {
  width: 68px;
  text-align: right;
  font-size: var(--fs-list-xs);
  color: var(--c-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.quick-official-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-1);
  background: var(--color-border);
  border-top: 1px solid var(--color-border);
}

.quick-official-item {
  background: var(--color-surface);
  padding: var(--s-4) var(--s-3);
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--s-1);
  transition: all var(--transition-fast);
}

.quick-official-item:hover {
  background: var(--color-primary-soft);
}

.quick-official-title {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--color-text-main);
  letter-spacing: -0.2px;
}

.quick-official-item:hover .quick-official-title {
  color: var(--color-primary);
}

.quick-official-en {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bulletin-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  margin-bottom: var(--s-5);
}

.bulletin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-list-xs);
  text-align: left;
  letter-spacing: -0.2px;
}

.bulletin-table thead tr {
  background: var(--c-brand-strong);
  color: var(--c-brand-text);
}

.bulletin-table th {
  padding: var(--s-3) var(--s-3);
  font-weight: 700;
  font-size: var(--fs-list-xs);
  border: 1px solid var(--c-line-strong);
  text-align: center;
  white-space: nowrap;
}

.bulletin-table td {
  padding: var(--s-3) var(--s-3);
  border: 1px solid var(--c-line);
  color: var(--color-text-main);
  vertical-align: middle;
}

.bulletin-table tbody tr:nth-child(even) {
  background-color: var(--c-bg);
}

.bulletin-table tbody tr:hover {
  background-color: var(--c-bg-section);
}

.bulletin-table .col-sem {
  text-align: center;
  font-weight: 800;
  color: var(--color-primary);
  width: 8%;
  white-space: nowrap;
}

.bulletin-table .col-type {
  text-align: center;
  width: 11%;
  white-space: nowrap;
}

.bulletin-table .col-code {
  text-align: center;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  width: 10%;
  white-space: nowrap;
}

.bulletin-table .col-name {
  font-weight: 700;
}

.bulletin-table .col-name span.en {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--c-text-muted);
  margin-top: var(--s-1);
}

.bulletin-table .col-credit {
  text-align: center;
  width: 11%;
  font-weight: 600;
  white-space: nowrap;
}

.bulletin-table .col-design {
  text-align: center;
  width: 12%;
  white-space: nowrap;
}

.bulletin-table .col-note {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  width: 18%;
}

.curriculum-official-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-list-xs);
  background: var(--c-bg);
  text-align: left;
  border-top: 2.5px solid var(--color-primary);
}

.curriculum-official-table th,
.curriculum-official-table td {
  border: 1px solid var(--c-line);
  padding: var(--s-2) var(--s-3);
  vertical-align: middle;
  word-break: keep-all;
}

.curriculum-official-table th {
  white-space: nowrap;
  word-break: keep-all;
}

.curriculum-official-table thead tr:first-child th {
  background: var(--c-bg-section);
  color: var(--color-primary);
  font-weight: 700;
  text-align: center;
  font-size: var(--fs-list-xs);
  border: 1px solid var(--c-line);
}

.curriculum-official-table thead tr:nth-child(2) th {
  background: var(--c-bg);
  color: var(--c-text-muted);
  font-weight: 600;
  text-align: center;
  font-size: var(--fs-xs);
  border: 1px solid var(--c-line);
}

.curriculum-official-table th.cell-category,
.curriculum-official-table td.cell-category {
  background: var(--c-bg);
  font-weight: 700;
  text-align: center;
  color: var(--c-brand);
  white-space: nowrap;
}

.curriculum-official-table td.cell-code {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--c-brand);
  text-align: center;
  white-space: nowrap;
}

.curriculum-official-table td.cell-num {
  text-align: center;
  font-weight: 600;
  color: var(--c-text);
}

.curriculum-official-table td.cell-subject {
  min-width: 170px;
  font-weight: 700;
  color: var(--color-primary-dark);
  word-break: keep-all;
  white-space: normal;
  line-height: 1.45;
}

.curriculum-sw-badge {
  display: inline-block;
  margin-right: var(--s-1);
  padding: 0 var(--s-1);
  color: var(--c-notice);
  background: var(--c-graph-active-bg);
  border: 1px solid currentColor;
  border-radius: var(--radius);
  font-size: var(--fs-xs);
  line-height: 1.5;
  white-space: nowrap;
}

.curriculum-official-table td.cell-remark {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  line-height: 1.5;
  background: var(--c-bg);
}

.curriculum-official-table tr.total-row {
  background: var(--c-bg-section);
  font-weight: 800;
}

.curriculum-official-table tr.total-row th.row-title-total {
  background: var(--c-bg-section);
  color: var(--c-brand);
  text-align: center;
  font-weight: 800;
}

.curriculum-official-table tr.total-row td {
  color: var(--c-brand);
  font-weight: 800;
  text-align: center;
}

.curriculum-official-table tbody tr:hover td:not(.cell-remark) {
  background-color: var(--c-bg-section);
}

.table-scroll-badge {
  display: none;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--c-brand);
  background: var(--c-bg-section);
  padding: var(--s-1) var(--s-2);
  border-radius: 4px;
  border: 1px solid var(--c-line);
}

.summary-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-list-xs);
  text-align: center;
}

.summary-table th {
  background: var(--c-bg-section);
  color: var(--color-primary);
  padding: var(--s-3) var(--s-2);
  font-weight: 700;
  border: 1px solid var(--color-border);
}

.summary-table td {
  padding: var(--s-3) var(--s-2);
  border: 1px solid var(--color-border);
  font-weight: 600;
}

.summary-table tr.total-row td {
  background: var(--c-bg);
  font-weight: 800;
  color: var(--color-primary);
}

.sysgraph-official-board {
  border: 2.5px solid var(--c-line-strong);
  background: var(--c-bg);
  padding: var(--s-5) var(--s-5);
  position: relative;
  font-family: var(--font-sans);
  color: var(--c-text);
  overflow-x: auto;
  box-shadow: none;
  margin-bottom: var(--s-5);
}

.sg-top-bar {
  display: grid;
  grid-template-columns: 260px 1fr 280px;
  gap: var(--s-4);
  align-items: center;
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--c-line);
}

.sg-legend-box {
  border: 1.5px solid var(--c-line-strong);
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-xs);
  background: var(--c-bg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2) var(--s-3);
}

.sg-legend-item {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.sg-legend-sample {
  display: inline-block;
  width: 44px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  border: 1px solid var(--c-line);
  background: var(--c-bg);
}

.sg-title-center {
  text-align: center;
}

.sg-main-title {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--c-text);
  margin: 0 0 var(--s-1);
  letter-spacing: -0.5px;
}

.sg-sub-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-text-muted);
  margin: 0;
}

.sg-notice-box-top {
  border: 1.5px dashed var(--c-line-strong);
  background: var(--c-bg);
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-xs);
  color: var(--c-text);
  line-height: 1.45;
  font-weight: 600;
}

.sg-grid-8cols {
  display: grid;
  grid-template-columns: repeat(8, minmax(135px, 1fr));
  gap: var(--s-3);
  position: relative;
  min-width: 1100px;
}

.sg-column {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  border-right: 1px dashed var(--c-line);
  padding-right: var(--s-3);
}

.sg-column:last-child {
  border-right: none;
  padding-right: 0;
}

.sg-sem-header {
  background: var(--c-bg-section);
  border: 1px solid var(--c-line);
  padding: var(--s-2) var(--s-1);
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: var(--s-1);
}

.sg-course-node {
  background: var(--c-bg);
  border: 1px solid var(--c-line-strong);
  padding: var(--s-2) var(--s-2);
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.35;
  position: relative;
  transition: all var(--transition-fast);
  cursor: default;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.sg-course-node:hover {
  transform: translateY(-2px);
  box-shadow: none;
}

.sg-node-msc {
  border-left: 6px solid var(--c-line-strong);
}

.sg-node-major-req {
  background-color: var(--c-bg-section);
  border: 1.5px solid var(--c-line-strong);
  border-left: 6px solid var(--c-line-strong);
}

.sg-node-major-opt {
  border-left: 6px solid var(--c-line-strong);
}

.sg-node-design-elem {
  background-color: var(--c-bg-section);
  border: 1.5px solid var(--c-line-strong);
  border-left: 6px solid var(--c-line-strong);
}

.sg-node-capstone {
  background-color: var(--c-bg-section);
  border: 1.5px solid var(--c-line-strong);
  border-left: 6px solid var(--c-line-strong);
}

.sg-node-intro-design {
  border: 2.5px solid var(--c-line-strong);
  border-left: 6px solid var(--c-line-strong);
  background-color: var(--c-bg-section);
  box-shadow: none;
}

.sg-node-intro-design .star-badge {
  color: var(--c-text-muted);
  font-size: var(--fs-list-xs);
  margin-right: var(--s-1);
}

.sg-co-req-pill {
  background: var(--c-bg-section);
  color: var(--c-text-muted);
  border: 1px solid var(--c-line);
  font-size: var(--fs-xs);
  font-weight: 800;
  padding: var(--s-1) var(--s-2);
  border-radius: 3px;
  margin: var(--s-1) 0;
  text-align: center;
}

.sg-bottom-notice-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--s-5);
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px solid var(--c-line);
}

.sg-notice-box {
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  padding: var(--s-3) var(--s-4);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  line-height: 1.5;
}

.calendar-hub-card {
  background: var(--c-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  height: 440px;
  overflow: hidden;
}

.calendar-hub-card .calendar-section {
  flex: 1.35;
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
}

.calendar-hub-card .calendar-header {
  padding: var(--s-3) var(--s-4);
  background: var(--c-bg-section);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calendar-hub-card .calendar-header h3 {
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--color-primary);
  margin: 0;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.calendar-hub-card .calendar-header h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 14px;
  background: var(--color-accent);
  border-radius: 2px;
}

.calendar-hub-card .calendar-header-link {
  font-size: var(--fs-xs);
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--s-1);
  transition: transform var(--transition-fast);
}

.calendar-hub-card .calendar-header-link:hover {
  transform: translateX(2px);
  color: var(--color-primary);
}

.calendar-hub-card .calendar-list {
  padding: var(--s-2) var(--s-4);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex: 1;
}

.calendar-hub-card .calendar-item {
  display: flex;
  gap: var(--s-3);
  align-items: center;
  padding: var(--s-2) var(--s-2);
  border-radius: 4px;
  transition: background var(--transition-fast);
}

.calendar-hub-card .calendar-item:hover {
  background: var(--c-bg);
}

.calendar-hub-card .calendar-date-badge {
  width: 42px;
  height: 42px;
  background: var(--c-bg);
  color: var(--color-primary);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid var(--color-primary);
  box-shadow: none;
}

.calendar-hub-card .calendar-date-badge .badge-month {
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
  text-transform: uppercase;
}

.calendar-hub-card .calendar-date-badge .badge-day {
  font-size: var(--fs-list-md);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.1;
  margin-top: var(--s-1);
}

.calendar-hub-card .calendar-info {
  flex: 1;
  min-width: 0;
}

.calendar-hub-card .calendar-title {
  font-size: var(--fs-list-xs);
  font-weight: 700;
  color: var(--color-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.calendar-hub-card .calendar-desc {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: var(--s-1);
}

.calendar-hub-card .quick-hub-section {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  border-top: 1px solid var(--color-border);
  background: var(--c-bg);
}

.calendar-hub-card .quick-hub-tile {
  padding: var(--s-3) var(--s-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  border-right: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  background: var(--c-bg);
  position: relative;
  transition: all var(--transition-fast);
}

.calendar-hub-card .quick-hub-tile:nth-child(3n) {
  border-right: none;
}

.calendar-hub-card .quick-hub-tile:nth-child(n+4) {
  border-bottom: none;
}

.calendar-hub-card .quick-hub-tile:hover {
  background: var(--c-bg);
}

.calendar-hub-card .quick-hub-tile:hover .tile-title {
  color: var(--color-accent);
}

.calendar-hub-card .quick-hub-tile:hover .tile-arrow {
  color: var(--color-accent);
  transform: translate(2px, -2px);
}

.calendar-hub-card .quick-hub-tile .tile-title {
  font-size: var(--fs-list-xs);
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: var(--s-1);
  transition: color var(--transition-fast);
}

.calendar-hub-card .quick-hub-tile .tile-arrow {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  transition: all var(--transition-fast);
}

.calendar-hub-card .quick-hub-tile .tile-sub {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-text-muted);
  margin-top: var(--s-1);
  letter-spacing: 0.3px;
}

.split-dropdown {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.split-dropdown .btn {
  border-radius: 0;
  margin: 0;
}

.split-dropdown .split-btn-main {
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
  border-right: none;
}

.split-dropdown .split-btn-toggle {
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  padding: 0 var(--s-2);
  font-size: var(--fs-xs);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-left: 1px solid var(--c-line);
}

.split-dropdown.outline .split-btn-toggle {
  border-left: 1px solid var(--color-primary);
}

.split-dropdown .btn:hover {
  transform: none;
}

.split-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: var(--s-1);
  min-width: 195px;
  background: var(--c-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: none;
  padding: var(--s-2) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 1100;
}

.split-dropdown.open .split-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.split-dropdown-header {
  padding: var(--s-2) var(--s-4);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--c-text-muted);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--s-1);
  letter-spacing: -0.2px;
}

.split-dropdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-2) var(--s-4);
  font-size: var(--fs-list-xs);
  font-weight: 600;
  color: var(--color-text-main);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.split-dropdown-item:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.split-dropdown-item.active {
  color: var(--color-primary);
  font-weight: 700;
  background: var(--c-line);
}

.split-dropdown-item .badge-latest {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-accent);
}

.main-hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--s-6);
}

.main-board-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
}

.main-research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}

.bulletin-item {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bulletin-item:last-child {
  border-bottom: none;
}

@media (max-width: 992px) {
  .main-hero-grid {
    grid-template-columns: 1fr;
    gap: var(--s-5);
  }
  .main-board-grid {
    grid-template-columns: 1fr;
    gap: var(--s-5);
  }
  .main-research-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-4);
  }
}

@media (max-width: 768px) {
  .card-body {
    padding: var(--s-4) var(--s-4);
  }

  .main-hero-grid {
    gap: var(--s-4);
  }

  .main-board-grid {
    gap: var(--s-4);
  }

  .main-research-grid {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }

  .carousel-content {
    padding: var(--s-4) var(--s-8) calc(var(--s-4) + 28px);
  }

  .carousel-title {
    font-size: var(--fs-list-lg);
    line-height: 1.35;
    margin-bottom: var(--s-2);
  }

  .carousel-desc {
    font-size: var(--fs-list-xs);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .calendar-hub-card {
    height: auto;
  }

  .calendar-hub-card .calendar-section {
    flex: none;
  }

  .calendar-hub-card .calendar-list {
    gap: var(--s-2);
    padding: var(--s-3) var(--s-4);
  }

  .calendar-hub-card .calendar-item {
    gap: var(--s-3);
  }

  .calendar-hub-card .calendar-title {
    font-size: var(--fs-list-xs);
  }

  .calendar-hub-card .calendar-desc {
    font-size: var(--fs-xs);
  }

  .calendar-hub-card .quick-hub-section {
    grid-template-columns: repeat(3, 1fr);
  }

  .calendar-hub-card .quick-hub-tile {
    padding: var(--s-2) var(--s-1);
  }

  .calendar-hub-card .quick-hub-tile .tile-title {
    font-size: var(--fs-xs);
    letter-spacing: -0.4px;
  }

  .calendar-hub-card .quick-hub-tile .tile-sub {
    font-size: var(--fs-xs);
  }

  .curriculum-official-table {
    min-width: 520px;
  }

  .curriculum-year-block .curriculum-official-table {
    min-width: 860px !important;
  }

  .table-scroll-badge {
    display: inline-flex;
    align-items: center;
  }

  .bulletin-table-wrap, .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .academic-board-table td {
    padding: var(--s-2) var(--s-2);
  }

  .col-date {
    font-size: var(--fs-xs);
    width: 58px;
  }

  .col-tag {
    width: 58px;
  }

  .academic-tag {
    font-size: var(--fs-xs);
  }


  .split-dropdown-menu {
    max-width: 260px;
  }

  .board-list-table th.col-author,
  .board-list-table td.col-author,
  .board-list-table th:nth-child(4),
  .board-list-table td:nth-child(4),
  .board-list-table th.col-views,
  .board-list-table td.col-views,
  .board-list-table th:nth-child(6),
  .board-list-table td:nth-child(6) {
    display: none !important;
  }

  .board-list-table th.col-num,
  .board-list-table td.col-num,
  .board-list-table th:nth-child(1),
  .board-list-table td:nth-child(1) {
    width: 9%;
  }

  .board-list-table th.col-category,
  .board-list-table td.col-category,
  .board-list-table th:nth-child(2),
  .board-list-table td:nth-child(2) {
    width: 13%;
  }

  .board-list-table th.col-date,
  .board-list-table td.col-date,
  .board-list-table th:nth-child(5),
  .board-list-table td:nth-child(5) {
    width: 16%;
    font-size: var(--fs-xs);
  }
}

@media (max-width: 520px) {
  .board-list-table th.col-num,
  .board-list-table td.col-num,
  .board-list-table th:nth-child(1),
  .board-list-table td:nth-child(1) {
    display: none !important;
  }

  .board-list-table th.col-category,
  .board-list-table td.col-category,
  .board-list-table th:nth-child(2),
  .board-list-table td:nth-child(2) {
    width: 50px;
    padding: var(--s-3) var(--s-1);
  }

  .board-list-table th.col-title,
  .board-list-table td.col-title,
  .board-list-table th:nth-child(3),
  .board-list-table td:nth-child(3) {
    padding: var(--s-3) var(--s-2);
  }

  .board-list-table td.col-title a,
  .board-list-table td:nth-child(3) a {
    font-size: var(--fs-sm);
    line-height: 1.45;
  }

  .board-list-table th.col-date,
  .board-list-table td.col-date,
  .board-list-table th:nth-child(5),
  .board-list-table td:nth-child(5) {
    width: 76px;
    padding: var(--s-3) var(--s-1);
    font-size: var(--fs-xs);
  }
}

@media (max-width: 480px) {
  .card-body {
    padding: var(--s-4) var(--s-3);
  }

  .curriculum-official-table {
    min-width: 460px;
  }

  .curriculum-year-block .curriculum-official-table {
    min-width: 860px !important;
  }

  .curriculum-official-table th,
  .curriculum-official-table td {
    padding: var(--s-2) var(--s-2);
    font-size: var(--fs-xs);
  }

  .carousel-title {
    font-size: var(--fs-list-md);
  }

  .carousel-desc {
    font-size: var(--fs-xs);
  }

  .calendar-hub-card .quick-hub-tile {
    padding: var(--s-2) var(--s-1);
  }

  .calendar-hub-card .quick-hub-tile .tile-title {
    font-size: var(--fs-xs);
    letter-spacing: -0.6px;
  }

  .calendar-hub-card .quick-hub-tile .tile-sub {
    font-size: var(--fs-xs);
  }

}

.btn-global-search {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  background: var(--c-line);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-list-xs);
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-global-search:hover {
  background: var(--c-line);
  border-color: var(--color-primary);
}

.btn-global-search kbd {
  background: var(--c-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: var(--s-1) var(--s-1);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  box-shadow: none;
}

.global-search-overlay {
  position: fixed;
  inset: 0;
  background: var(--c-line);
  backdrop-filter: none;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.global-search-overlay.open {
  opacity: 1;
  visibility: visible;
}

.global-search-modal {
  width: 100%;
  max-width: 640px;
  background: var(--c-bg);
  border-radius: var(--radius);
  box-shadow: none;
  border: 1px solid var(--color-border);
  overflow: hidden;
  transform: translateY(-16px) scale(0.98);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.global-search-overlay.open .global-search-modal {
  transform: translateY(0) scale(1);
}

.global-search-header {
  display: flex;
  align-items: center;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--color-border);
  gap: var(--s-3);
}

.global-search-header svg {
  color: var(--color-primary);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.global-search-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: none;
  outline: none;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--color-text-main);
  background: transparent;
  font-family: var(--font-sans);
}

.global-search-input::placeholder {
  color: var(--c-text-muted);
  font-weight: 400;
  text-overflow: ellipsis;
}

.global-search-close-btn {
  background: none;
  border: none;
  color: var(--c-text-muted);
  font-size: var(--fs-lg);
  cursor: pointer;
  padding: var(--s-1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.global-search-close-btn:hover {
  color: var(--color-text-main);
}

.global-search-categories {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  background: var(--c-bg);
  border-bottom: 1px solid var(--color-border);
  overflow: visible;
}

.search-cat-pill {
  padding: var(--s-1) var(--s-3);
  border-radius: 9999px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-text-muted);
  background: var(--c-bg);
  border: 1px solid var(--color-border);
  cursor: pointer;
  white-space: nowrap;
}

.search-cat-pill.active {
  background: var(--color-primary);
  color: var(--c-brand-text);
  border-color: var(--color-primary);
}

.global-search-body {
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  padding: var(--s-2) var(--s-3);
  flex: 1;
}

.search-results-list {
  overflow: visible;
}

.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease;
  cursor: pointer;
}

.search-result-item:hover,
.search-result-item.selected {
  background: var(--c-line);
}

.search-result-badge {
  padding: var(--s-1) var(--s-2);
  border-radius: 4px;
  font-size: var(--fs-xs);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: var(--s-1);
}

.search-badge-prof {
  background: var(--c-bg-section);
  color: var(--c-text-muted);
}

.search-badge-curr {
  background: var(--c-bg-section);
  color: var(--c-text-muted);
}

.search-badge-comm {
  background: var(--c-bg-section);
  color: var(--c-text-muted);
}

.search-badge-dept {
  background: var(--c-bg);
  color: var(--c-text-muted);
}

.search-badge-fac {
  background: var(--c-bg-section);
  color: var(--c-text-muted);
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: var(--fs-list-md);
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: var(--s-1);
}

.search-result-desc {
  font-size: var(--fs-list-xs);
  color: var(--color-text-muted);
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-highlight {
  background: var(--c-bg-section);
  color: var(--c-text-muted);
  border-radius: 2px;
  padding: 0 var(--s-1);
  font-weight: 700;
}

.global-search-empty {
  padding: var(--s-7) var(--s-5);
  text-align: center;
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
}

.global-search-footer {
  padding: var(--s-3) var(--s-5);
  background: var(--c-bg);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}

.global-search-footer-shortcuts {
  display: flex;
  gap: var(--s-3);
}

.global-search-footer-shortcuts span {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
}

.global-search-footer-shortcuts kbd {
  background: var(--c-bg);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 0 var(--s-1);
  font-size: var(--fs-xs);
  font-weight: 700;
}

.btn-cal-export {
  background: none;
  border: 1px solid var(--c-line);
  border-radius: 4px;
  color: var(--color-primary);
  padding: var(--s-1) var(--s-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  margin-top: var(--s-1);
  transition: all var(--transition-fast);
}

.btn-cal-export:hover {
  background: var(--color-primary);
  color: var(--c-brand-text);
  border-color: var(--color-primary);
}

@media (max-width: 640px) {
  .global-search-modal {
    width: calc(100% - var(--s-4) * 2);
    margin: 0 var(--s-4);
    max-height: 85vh;
  }
  .global-search-header {
    padding: var(--s-3) var(--s-4);
  }
  .global-search-categories {
    padding: var(--s-2) var(--s-4);
    gap: var(--s-1);
  }
  .global-search-footer-shortcuts {
    display: none;
  }
  .btn-global-search kbd {
    display: none;
  }
}

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

.board-loading-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid var(--c-line);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: boardSpin 0.8s linear infinite;
}

.cal-header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.cal-view-toggle {
  display: inline-flex;
  background: var(--c-bg-section);
  border-radius: 4px;
  padding: var(--s-1);
  gap: var(--s-1);
}

.cal-toggle-btn {
  border: none;
  background: transparent;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--c-text-muted);
  padding: var(--s-1) var(--s-2);
  border-radius: 3px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cal-toggle-btn.active {
  background: var(--c-bg);
  color: var(--color-primary);
  box-shadow: none;
}

.cal-view-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.cal-month-nav-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-2) var(--s-4) var(--s-1);
  border-bottom: 1px solid var(--c-line);
}

.cal-nav-btn {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-text-main);
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cal-nav-btn:hover {
  background: var(--c-bg-section);
  color: var(--color-primary);
}

.cal-month-title {
  font-size: var(--fs-list-xs);
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.3px;
}

.cal-month-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
}

.cal-month-pill {
  border: none;
  background: transparent;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--c-text-muted);
  padding: var(--s-1) var(--s-1);
  border-radius: 3px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cal-month-pill.active {
  background: var(--color-primary);
  color: var(--c-brand-text);
}

.cal-weekday-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--c-text-muted);
  padding: var(--s-1) var(--s-3) var(--s-1);
  border-bottom: 1px solid var(--c-line);
}

.cal-weekday-grid span:first-child {
  color: var(--c-text-muted);
}

.cal-weekday-grid span:last-child {
  color: var(--c-text-muted);
}

.cal-matrix-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--s-1);
  padding: var(--s-1) var(--s-3);
  flex: 1;
  align-content: start;
}

.cal-day-cell {
  position: relative;
  height: 23px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.cal-day-cell:hover {
  background: var(--c-bg-section);
}

.cal-day-cell.other-month {
  color: var(--c-text-muted);
  opacity: 0.5;
  pointer-events: none;
}

.cal-day-cell.sunday {
  color: var(--c-text-muted);
}

.cal-day-cell.saturday {
  color: var(--c-text-muted);
}

.cal-day-cell.selected {
  background: var(--color-primary) !important;
  color: var(--c-brand-text) !important;
  font-weight: 800;
}

.cal-day-cell.has-event .cal-day-num {
  font-weight: 800;
}

.cal-event-dot {
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.cal-day-cell.selected .cal-event-dot {
  background-color: var(--c-bg-section) !important;
}

.cat-reg {
  background-color: var(--c-brand-strong);
}

.cat-class {
  background-color: var(--c-brand-strong);
}

.cat-exam {
  background-color: var(--c-bg-section);
}

.cat-capstone {
  background-color: var(--c-bg-section);
}

.cat-holiday {
  background-color: var(--c-bg-section);
}

.cat-general {
  background-color: var(--c-bg-section);
}

.cal-selected-brief {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  background: var(--c-bg);
  border-top: 1px solid var(--color-border);
  font-size: var(--fs-xs);
  min-height: 40px;
}

.cal-brief-badge {
  font-size: var(--fs-xs);
  font-weight: 800;
  padding: var(--s-1) var(--s-2);
  border-radius: 3px;
  color: var(--c-brand-text);
  white-space: nowrap;
  flex-shrink: 0;
}

.cal-brief-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.cal-brief-title {
  font-weight: 700;
  color: var(--color-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.cal-brief-sub {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.academic-calendar-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--c-line);
  backdrop-filter: none;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--s-4);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.academic-calendar-modal.visible {
  display: flex;
  opacity: 1;
}

.cal-modal-window {
  background: var(--c-bg);
  border-radius: var(--radius);
  max-width: 820px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: none;
  border: 1px solid var(--color-border);
}

.cal-modal-header {
  padding: var(--s-4) var(--s-5);
  background: var(--c-bg-section);
  color: var(--c-brand-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cal-modal-header h3 {
  font-size: var(--fs-md);
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--c-brand-text);
}

.cal-modal-close-btn {
  background: var(--c-line);
  border: none;
  color: var(--c-brand-text);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: var(--fs-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.cal-modal-close-btn:hover {
  background: var(--c-line);
}

.cal-modal-body {
  padding: var(--s-5) var(--s-5);
  overflow-y: auto;
  flex: 1;
}

.cal-modal-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
  flex-wrap: wrap;
}

.cal-sem-tabs {
  display: inline-flex;
  background: var(--c-bg-section);
  border-radius: var(--radius-md);
  padding: var(--s-1);
}

.cal-sem-tab {
  padding: var(--s-2) var(--s-4);
  font-size: var(--fs-list-xs);
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  transition: all 0.2s;
}

.cal-sem-tab.active {
  background: var(--c-bg);
  color: var(--color-primary);
  box-shadow: none;
}

.cal-filter-pills {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.cal-filter-pill {
  padding: var(--s-1) var(--s-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--c-bg);
  cursor: pointer;
  color: var(--color-text-muted);
  transition: all 0.2s;
}

.cal-filter-pill.active {
  background: var(--color-primary);
  color: var(--c-brand-text);
  border-color: var(--color-primary);
}

.cal-modal-month-block {
  margin-bottom: var(--s-5);
}

.cal-modal-month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--s-2);
  border-bottom: 2px solid var(--color-primary);
  margin-bottom: var(--s-3);
}

.cal-modal-month-num {
  font-size: var(--fs-list-md);
  font-weight: 800;
  color: var(--color-primary);
}

.cal-modal-month-count {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--color-text-muted);
}

.cal-modal-month-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-2);
}

.cal-modal-event-card {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--c-bg);
  align-items: center;
  transition: all 0.15s;
}

.cal-modal-event-card:hover {
  background: var(--c-bg);
  border-color: var(--color-accent);
  box-shadow: none;
}

.cal-modal-event-date {
  display: flex;
  flex-direction: column;
  min-width: 90px;
  flex-shrink: 0;
}

.cal-m-date-badge {
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: var(--s-1) var(--s-2);
  border-radius: 4px;
  text-align: center;
  color: var(--c-brand-text);
}

.cal-m-date-str {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--s-1);
}

.cal-modal-event-body {
  flex: 1;
  min-width: 0;
}

.cal-m-event-title {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--color-text-main);
  line-height: 1.35;
}

.cal-m-event-desc {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-top: var(--s-1);
  line-height: 1.4;
}

.gnb-link:is(button) { appearance: none; border: 0; background: transparent; font-family: inherit; cursor: pointer; }
.gnb-link:is(button):hover,
.gnb-link:is(button):active,
.gnb-link:is(button):focus:not(:focus-visible) { border: 0; outline: none; background: transparent; }

:root {
  --fs-xs: 0.8125rem;
  --fs-list-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-list-md: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-list-lg: 1.0625rem;
  --fs-lg: 1.125rem;
  --fs-list-title: 1.1875rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --font-size-base: var(--fs-md);
  --c-text-muted: #363c43;
  --c-control-border: #737b86;
  --c-scrim-strong: rgba(0, 0, 0, 0.8);
  --c-scrim-nav: rgba(0, 0, 0, 0.74);
}

:root[data-theme="dark"] {
  --c-text-muted: #b0b3b8;
  --c-control-border: #85898f;
  --c-scrim-strong: rgba(0, 0, 0, 0.84);
  --c-scrim-nav: rgba(0, 0, 0, 0.78);
}

html {
  scroll-padding-top: 100px;
}

body {
  font-size: var(--fs-md);
  line-height: var(--lh-body);
}



:focus-visible {
  outline: 2px solid var(--c-brand) !important;
  outline-offset: 3px !important;
}

.skip-link:focus-visible,
.btn-primary:focus-visible,
.cal-month-pill.active:focus-visible,
.cal-filter-pill.active:focus-visible,
.search-cat-pill.active:focus-visible {
  outline: 2px solid var(--c-brand) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 2px var(--c-bg);
}

.portal-hero .carousel-container .carousel-nav-btn:focus-visible,
.portal-hero .carousel-container .carousel-toggle:focus-visible,
.portal-hero .carousel-container .carousel-dot:focus-visible {
  outline: 2px solid #ffffff !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px #002c6c;
}

.search-input:focus-visible,
.global-search-input:focus-visible,
.gnb-link:is(button):focus-visible {
  outline: 2px solid var(--c-brand) !important;
  outline-offset: 2px !important;
}

.btn-theme-toggle,
.btn-global-search,
.btn-megamenu,
.btn-outline,
.btn-cal-export,
.cal-nav-btn,
.cal-filter-pill,
.search-cat-pill,
.search-input,
.global-search-modal,
.megamenu-close-btn,
.index-a-4,
.cal-brief-badge {
  border-color: var(--c-control-border);
}

.global-search-header {
  border-bottom-color: var(--c-control-border);
}

.global-search-input {
  min-height: var(--control-h);
  padding: 0 var(--s-2);
  border: 1px solid var(--c-control-border);
  border-radius: var(--radius);
  background: var(--c-bg);
}

.cal-view-toggle,
.cal-sem-tabs {
  border: 1px solid var(--c-control-border);
}

.cal-toggle-btn.active,
.cal-sem-tab.active {
  border: 1px solid var(--c-control-border);
}

.top-links a,
.gnb-link,
.portal-board-tab,
.portal-board-more,
.calendar-hub-card .calendar-header-link,
.cal-toggle-btn,
.cal-nav-btn,
.cal-month-pill,
.cal-sem-tab,
.cal-filter-pill,
.cal-modal-close-btn,
.btn-cal-export,
.research-row a,
.footer-bk21-link,
.footer-bottom-strip a,
.megamenu-tab,
.megamenu-close-btn,
.index-a-4,
.search-cat-pill,
.global-search-close-btn,
.breadcrumb-nav a.breadcrumb-item,
.lnb-item a {
  min-height: var(--control-h);
}

.top-links a,
.gnb-link,
.portal-board-more,
.research-row a,
.footer-bk21-link,
.footer-bottom-strip a,
.index-a-4 {
  display: inline-flex;
  align-items: center;
}

.top-links a,
.gnb-link,
.portal-board-tab,
.portal-board-more,
.calendar-hub-card .calendar-header-link,
.cal-toggle-btn,
.cal-nav-btn,
.cal-month-pill,
.cal-sem-tab,
.cal-filter-pill,
.cal-modal-close-btn,
.megamenu-tab,
.megamenu-close-btn,
.search-cat-pill,
.global-search-close-btn,
.footer-bottom-strip a,
.breadcrumb-nav a.breadcrumb-item {
  min-width: var(--control-h);
  justify-content: center;
}

.portal-calendar p > a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-h);
  color: var(--c-brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-cal-export {
  padding: 0 var(--s-3);
  margin-top: var(--s-2);
}

.portal-primary .bulletin-item {
  height: auto;
  min-height: 48px;
  padding: 2px var(--s-4);
  font-size: var(--fs-list-md);
}

.portal-primary .bulletin-item.bulletin-item-message {
  min-height: 48px;
  padding: var(--s-3) var(--s-4);
}

.portal-primary .bulletin-item > div > a {
  display: block;
  min-height: var(--control-h);
  line-height: var(--control-h);
  padding: 0;
  font-size: var(--fs-list-md);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-hero .carousel-container .carousel-label {
  background: var(--c-scrim-strong);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.portal-hero .carousel-container .carousel-toggle {
  min-width: 52px;
  min-height: var(--control-h);
  padding: 0 var(--s-3);
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: var(--c-scrim-strong);
  color: #ffffff;
  font-size: var(--fs-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.portal-hero .carousel-container .carousel-toggle:hover {
  background: #000000;
  color: #ffffff;
}

.portal-hero .carousel-container .carousel-nav-btn {
  width: var(--control-h);
  height: var(--control-h);
  min-width: var(--control-h);
  min-height: var(--control-h);
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: var(--c-scrim-nav);
  color: #ffffff;
  opacity: 1;
}

.portal-hero .carousel-container .carousel-nav-btn:hover {
  background: #000000;
  color: #ffffff;
}

.portal-hero .carousel-container .carousel-content {
  padding: var(--space-8) var(--space-8) calc(var(--space-8) + 46px);
}



.calendar-hub-card .calendar-header h2 {
  color: var(--c-brand);
  font-size: var(--fs-lg);
  font-weight: 800;
  margin: 0;
}

.cal-modal-header h2 {
  font-size: var(--fs-md);
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--c-text);
}

.cal-modal-close-btn {
  color: var(--c-text);
  background: var(--c-bg);
}

.cal-day-cell.other-month {
  opacity: 1;
  color: var(--c-text-muted);
}

.lnb-header .lnb-title {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: var(--s-1);
}

.intro-summary-box {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--line-w);
  margin: 0 0 var(--s-6);
  background: var(--c-line);
  border: var(--line-w) solid var(--c-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.intro-summary-item {
  padding: var(--s-4);
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  min-width: 0;
}

.intro-summary-item dt {
  color: var(--c-text-muted);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.4;
}

.intro-summary-item dd {
  margin: 0;
  color: var(--c-brand);
  font-size: var(--fs-lg);
  font-weight: 800;
  line-height: var(--lh-tight);
}

.intro-summary-item dd.intro-summary-sub {
  color: var(--c-text-muted);
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.45;
}

.intro-sections {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.intro-section-card {
  background: var(--c-bg);
  border: var(--line-w) solid var(--c-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}

.intro-section-head {
  padding: var(--s-4) var(--s-5);
  background: var(--c-bg);
  border-bottom: var(--line-w) solid var(--c-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-2);
}

main.subpage-content .intro-section-head h3 {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--c-brand);
}

.intro-section-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--s-2);
  border: var(--line-w) solid var(--c-line-strong);
  border-radius: var(--radius);
  background: var(--c-bg-section);
  color: var(--c-text-muted);
  font-size: var(--fs-xs);
  font-weight: 700;
}

.intro-section-body {
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

main.subpage-content .intro-section-body p {
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--c-text);
  margin: 0;
  max-width: 72ch;
  text-indent: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

main.subpage-content .intro-section-body .callout-note {
  margin: 0;
  font-size: var(--fs-md);
  line-height: var(--lh-body);
}

@media (max-width: 900px) {
  .intro-summary-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .portal-hero .carousel-container .carousel-content {
    padding: var(--space-4) var(--space-4) calc(var(--space-4) + 50px);
  }

  .portal-hero .carousel-container .carousel-nav-btn {
    top: var(--space-3);
    transform: none;
    width: var(--control-h);
    height: var(--control-h);
  }

  .portal-hero .carousel-container .carousel-toggle {
    top: var(--space-3);
    right: var(--space-3);
  }

  .portal-hero .carousel-container .carousel-next {
    right: calc(var(--space-3) + 52px + var(--s-2));
  }

  .portal-hero .carousel-container .carousel-prev {
    left: auto;
    right: calc(var(--space-3) + 52px + var(--s-2) + var(--control-h) + var(--s-2));
  }



  .portal-primary .bulletin-item {
    height: auto;
    padding: var(--s-2) var(--s-3);
  }

  .portal-primary .bulletin-item > div > a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: var(--control-h);
    line-height: var(--lh-list);
    white-space: normal;
  }

  .intro-section-head {
    padding: var(--s-3) var(--s-4);
  }

  .intro-section-body {
    padding: var(--s-4);
  }
}

@media (max-width: 480px) {
  .intro-summary-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intro-summary-item {
    padding: var(--s-3);
  }
}

.portal-hero .carousel-container .carousel-indicators { bottom: var(--s-2); gap: 0; max-width: 100%; }
.portal-hero .carousel-container .carousel-dot, .portal-hero .carousel-container .carousel-dot.active { width: 24px; height: 24px; min-width: 24px; min-height: 24px; flex: 0 0 24px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; }
.portal-hero .carousel-container .carousel-dot::before { content: ""; display: block; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.78); }
.portal-hero .carousel-container .carousel-dot.active::before { background: #fff; }

.site-header .btn-theme-toggle, .site-header .btn-global-search, .site-header .btn-megamenu { border-color: var(--c-control-border); }

:root[data-theme="dark"] :is(.data-table th, .academic-tag.primary, .bulletin-table .col-sem, .curriculum-official-table thead tr:first-child th, .curriculum-official-table th.cell-category, .curriculum-official-table td.cell-category, .curriculum-official-table td.cell-code, .curriculum-official-table td.cell-subject, .curriculum-official-table tr.total-row th.row-title-total, .curriculum-official-table tr.total-row td, .summary-table th, .summary-table tr.total-row td, .calendar-hub-card .calendar-header h2, .calendar-hub-card .calendar-header h3, .calendar-hub-card .calendar-date-badge, .calendar-hub-card .calendar-date-badge .badge-day, .cal-month-title, .cal-modal-month-num, .lnb-header .lnb-title, .intro-summary-item dd, main.subpage-content .intro-section-head h3) { color: var(--c-heading); }
:root[data-theme="dark"] :is(.academic-board-table, .curriculum-official-table, .cal-modal-month-header) { border-color: var(--c-accent-line); }
