:root {
  --shell-h: 64px;
}

body.has-course-shell {
  padding-top: var(--shell-h);
}

.course-bar {
  position: fixed;
  z-index: 200;
  inset: 0 0 auto;
  height: var(--shell-h);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 0 max(18px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(196, 204, 220, .85);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 8px 26px rgba(23, 32, 51, .045);
  backdrop-filter: blur(18px) saturate(1.2);
}

.course-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--night, #10182a);
  text-decoration: none;
}

.course-brand:hover {
  color: var(--night, #10182a);
}

.course-brand-mark {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.course-brand > span:last-child {
  display: grid;
  line-height: 1;
}

.course-brand b {
  font: 900 .76rem/1 var(--mono, "Nanum Gothic Coding", monospace);
  letter-spacing: .09em;
}

.course-brand small {
  margin-top: 4px;
  color: var(--ink-soft, var(--ps-soft, #59657a));
  font-size: .67rem;
  font-weight: 700;
}

.course-location {
  overflow: hidden;
  color: var(--ink-soft, var(--ps-soft, #59657a));
  font: 650 .78rem/1.3 var(--mono, "Nanum Gothic Coding", monospace);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shell-link,
.shell-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft, var(--ps-soft, #59657a));
  padding: 6px 10px;
  font: 700 .76rem/1 var(--font, var(--ps-font, "Noto Sans KR", sans-serif));
  text-decoration: none;
  cursor: pointer;
}

.shell-link:hover,
.shell-button:hover {
  border-color: var(--line, var(--ps-line, #dbe1ec));
  background: var(--bg, #f4f6fb);
  color: var(--night, var(--ps-ink, #10182a));
}

.shell-link[aria-current="page"] {
  border-color: #cbd5ff;
  background: var(--blue-tint, var(--ps-accent-soft, #edf0ff));
  color: var(--blue-deep, var(--ps-accent-deep, #3457d5));
}

.shell-button span {
  font: 700 .95rem/1 var(--mono, "Nanum Gothic Coding", monospace);
}

.shell-button em {
  font-style: normal;
}

@media (max-width: 720px) {
  :root {
    --shell-h: 58px;
  }

  .course-bar {
    gap: 10px;
    padding-inline: 12px;
  }

  .course-location,
  .shell-link,
  .shell-button em {
    display: none;
  }

  .course-actions {
    margin-left: auto;
  }

  .shell-button {
    width: 38px;
    justify-content: center;
    padding: 6px;
  }
}

@media print {
  .course-bar {
    display: none !important;
  }

  body.has-course-shell {
    padding-top: 0 !important;
  }
}
