:root {
  --orange: #ff5a00;
  --ink: #172232;
  --paper: #f7f6f2;
  --white: #ffffff;
  --green: #4f7f2b;
  --purple: #71458d;
  --teal: #0d7377;
  --red: #bb3e32;
  --indigo: #34508c;
  --shadow: 10px 10px 0 rgba(23, 34, 50, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif;
  letter-spacing: 0;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

body {
  overflow: hidden;
}

.course-deck {
  position: relative;
  min-height: 100dvh;
  border: 7px solid var(--orange);
  overflow: hidden;
  background: var(--paper);
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 7px;
  left: 7px;
  right: 7px;
  height: 80px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  padding: 0 42px;
  border-bottom: 2px solid var(--ink);
  background: rgba(247, 246, 242, 0.96);
}

.series-brand {
  display: inline-flex;
  width: max-content;
  flex-direction: column;
  color: var(--ink);
  text-decoration: none;
}

.series-brand__en {
  font-size: 10px;
  font-weight: 900;
}

.series-brand__zh {
  font-size: 21px;
  font-weight: 900;
}

/* =========================================================================
   標題列課程輪播（中央）：‹ 當前課 › ＋ 五顆圓點進度
   ========================================================================= */
.course-carousel {
  --carousel-accent: var(--green);
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.course-carousel__stage {
  display: flex;
  align-items: center;
  gap: 14px;
}

.carousel-arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, opacity 0.12s ease;
}

.carousel-arrow:hover:not(:disabled),
.carousel-arrow:focus-visible {
  background: var(--carousel-accent);
  color: var(--white);
}

.carousel-arrow:disabled {
  opacity: 0.22;
  cursor: default;
}

.carousel-current {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 132px;
  margin: 0;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

.carousel-current__ep {
  color: var(--carousel-accent);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 22px;
}

.carousel-current__name {
  color: var(--ink);
  font-size: 21px;
  font-weight: 900;
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 9px;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease;
}

.carousel-dot:hover,
.carousel-dot:focus-visible {
  background: rgba(23, 34, 50, 0.35);
}

.carousel-dot.is-active {
  background: var(--carousel-accent);
  border-color: var(--carousel-accent);
  transform: scale(1.25);
}

/* 輪播主題色跟著當前課切換（沿用課別色） */
.course-carousel[data-accent="0"] { --carousel-accent: var(--green); }
.course-carousel[data-accent="1"] { --carousel-accent: var(--teal); }
.course-carousel[data-accent="2"] { --carousel-accent: var(--purple); }
.course-carousel[data-accent="3"] { --carousel-accent: var(--red); }
.course-carousel[data-accent="4"] { --carousel-accent: var(--indigo); }

.slides {
  position: relative;
  width: 100%;
  height: 100dvh;
}

.course {
  --course-accent: var(--green);
  position: absolute;
  inset: 0;
  min-width: 100%;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--paper);
  scrollbar-width: thin;
}

.course--02 {
  --course-accent: var(--teal);
}

.course--03 {
  --course-accent: var(--purple);
}

.course--04 {
  --course-accent: var(--red);
}

.course--05 {
  --course-accent: var(--indigo);
}

.course__number {
  position: absolute;
  z-index: 0;
  top: 86px;
  right: 5%;
  color: rgba(255, 90, 0, 0.09);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 250px;
  line-height: 1;
  pointer-events: none;
}

.course__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  column-gap: 64px;
  row-gap: 24px;
  width: calc(100% - 200px);
  margin: 0 auto;
  padding: 118px 0 118px;
  align-content: start;
}

.course__copy {
  align-self: center;
  padding-top: 6px;
}

.course__eyebrow {
  display: flex;
  align-items: center;
  width: max-content;
  margin-bottom: 22px;
  border: 2px solid var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.course__eyebrow span {
  padding: 8px 12px;
}

.course__eyebrow span:first-child {
  background: var(--ink);
  color: var(--white);
}

.course__schedule {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  padding-left: 14px;
  border-left: 3px solid var(--course-accent);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
  color: #4a5666;
}

.course__schedule-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.course__schedule-eyebrow {
  color: var(--course-accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.course__schedule-date {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
  font-weight: 900;
}

.course__schedule-scarce {
  color: #4a5666;
  font-size: 13px;
}

.course__schedule .is-scarce {
  display: inline-block;
  padding: 1px 8px;
  background: var(--course-accent);
  color: var(--white);
  font-weight: 900;
}

.course__schedule.is-urgent .course__schedule-eyebrow,
.course__schedule.is-urgent .is-scarce {
  animation: scarce-pulse 1.6s ease-in-out infinite;
}

.course__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border: 3px solid var(--ink);
  background: var(--course-accent);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--white);
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.course__cta span {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 18px;
}

.course__cta:hover,
.course__cta:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.course__cta:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

@keyframes scarce-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

h1 {
  max-width: 680px;
  margin: 0 0 22px;
  font-size: 47px;
  line-height: 1.18;
  font-weight: 900;
}

h1 strong {
  color: var(--course-accent);
  font-weight: 900;
}

.course__lead {
  margin: 0;
  color: #334153;
  font-size: 16px;
  line-height: 1.85;
  font-weight: 700;
}

.course__lead strong {
  color: var(--ink);
  font-weight: 900;
  background: linear-gradient(transparent 62%, rgba(255, 90, 0, 0.22) 62%);
}

.pain-point {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 650px;
  min-height: 5.2em;
  margin: 0;
  padding: 15px 46px 15px 20px;
  border-left: 8px solid var(--course-accent);
  background: var(--white);
  box-shadow: 5px 5px 0 rgba(23, 34, 50, 0.1);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 900;
}

.pain-point::after {
  content: "?";
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--course-accent);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 34px;
  transform: translateY(-50%);
}

.course__visual {
  position: relative;
  align-self: center;
  min-width: 0;
  padding: 28px 8px 22px 0;
}

.visual-label {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 22px;
  padding: 9px 14px;
  background: var(--course-accent);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.material-preview {
  position: relative;
  z-index: 2;
  margin: 0;
  border: 3px solid var(--ink);
  background: var(--white);
  box-shadow: var(--shadow);
}

.material-preview::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -15px 20px 22px -18px;
  border: 5px solid var(--course-accent);
}

.material-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #f2f1ed;
}

.material-preview figcaption {
  position: relative;
  z-index: 1;
  padding: 15px 18px;
  border-top: 3px solid var(--ink);
  background: var(--white);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 900;
}

.visual-stamp {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 4px;
  min-width: 94px;
  padding: 12px 14px;
  border: 3px solid var(--ink);
  background: var(--course-accent);
  color: var(--white);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 20px;
  text-align: center;
  transform: rotate(-4deg);
}

.course__signal {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: stretch;
  min-height: 58px;
  margin-top: 2px;
  border: 2px solid var(--ink);
  background: var(--white);
}

.course__signal > span,
.course__signal > p {
  margin: 0;
  padding: 14px 18px;
}

.course__signal > span {
  display: flex;
  align-items: center;
  background: var(--ink);
  color: var(--white);
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.course__signal > p {
  display: flex;
  align-items: center;
  border-left: 2px solid var(--ink);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 700;
}

.course__signal > p strong {
  color: var(--course-accent);
  font-weight: 900;
}

.course__outcomes {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 168px 1fr;
  column-gap: 24px;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}

.course__outcomes ul {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.course__outcomes li {
  position: relative;
  min-width: 0;
  padding: 16px 18px 18px;
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 4px 4px 0 rgba(23, 34, 50, 0.1);
}

.outcome-index {
  display: block;
  margin-bottom: 8px;
  color: var(--course-accent);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 26px;
  line-height: 1;
}

.course__outcomes strong,
.course__outcomes .outcome-desc {
  display: block;
}

.course__outcomes strong {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.course__outcomes .outcome-desc {
  color: #475365;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
}

/* =========================================================================
   快捷入口（頁首右上）—— 線下課須知 / 開課時間表
   ========================================================================= */
.quick-access {
  justify-self: end;
  display: flex;
  gap: 10px;
}

.quick-access__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px 8px 10px;
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  text-align: left;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.08s ease;
}

.quick-access__btn:hover,
.quick-access__btn:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
  background: var(--orange);
  color: var(--white);
}

.quick-access__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid currentColor;
  font-size: 15px;
  font-weight: 900;
}

.quick-access__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.quick-access__text strong {
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

/* =========================================================================
   覆蓋層（overlay）—— 遮罩 + 面板 + 關閉鈕
   ========================================================================= */
.overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 3vh 3vw;
}

.overlay[hidden] {
  display: none;
}

.overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 34, 50, 0.55);
  backdrop-filter: blur(2px);
  animation: overlay-fade 0.18s ease-out;
}

.overlay__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(920px, 100%);
  max-height: 94vh;
  border: 7px solid var(--orange);
  background: var(--paper);
  box-shadow: 14px 14px 0 rgba(23, 34, 50, 0.3);
  animation: overlay-pop 0.2s ease-out;
}

.overlay__panel--timetable {
  width: min(1040px, 100%);
  min-width: 0;
}

.overlay__close {
  position: absolute;
  z-index: 3;
  top: -3px;
  right: -3px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 3px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.overlay__close:hover,
.overlay__close:focus-visible {
  background: var(--orange);
}

.overlay__scroll {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  padding: 40px 46px 42px;
  scrollbar-width: thin;
}

@keyframes overlay-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes overlay-pop {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === 覆蓋層內：資訊頁首（須知式，非課程模板） === */
.info-head {
  margin-bottom: 30px;
}

.info-head__kicker {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.info-head h2 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 900;
}

.info-head h2 strong {
  color: var(--orange);
}

.info-head__lead {
  max-width: 100%;
  margin: 0;
  color: #334153;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 700;
}

/* === 覆蓋層內：資訊區塊 === */
.info-block {
  margin-bottom: 28px;
}

.info-block__title {
  margin: 0 0 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
  font-size: 19px;
  font-weight: 900;
}

/* 為什麼來現場：三張橫向卡片 */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.why-card {
  padding: 18px 18px 20px;
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 4px 4px 0 rgba(23, 34, 50, 0.1);
}

.why-card__mark {
  display: block;
  margin-bottom: 8px;
  color: var(--orange);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 30px;
  line-height: 1;
}

.why-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.35;
}

.why-card p {
  margin: 0;
  color: #475365;
  font-size: 13.5px;
  line-height: 1.65;
  font-weight: 700;
}

/* 異動提醒框 */
.notice-box {
  padding: 20px 22px;
  border: 2px solid var(--ink);
  border-left: 8px solid var(--red);
  background: var(--white);
  box-shadow: 5px 5px 0 rgba(23, 34, 50, 0.1);
}

.notice-box__intro {
  margin: 0 0 12px;
  font-size: 15.5px;
  line-height: 1.6;
  font-weight: 700;
}

.notice-box__intro strong {
  color: var(--red);
  font-weight: 900;
}

.notice-box__reasons {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.notice-box__reasons li {
  display: flex;
  gap: 10px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
}

.notice-box__reasons li span {
  color: var(--red);
  font-weight: 900;
}

.notice-box__note {
  margin: 0;
  color: #4a5666;
  font-size: 13.5px;
  line-height: 1.6;
  font-weight: 700;
}

/* 行動呼籲條：先報名才通知得到你 */
.cta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border: 3px solid var(--ink);
  background: var(--ink);
  color: var(--white);
}

.cta-strip__text {
  flex: 1 1 340px;
}

.cta-strip__text strong {
  display: block;
  margin-bottom: 6px;
  font-size: 19px;
  font-weight: 900;
}

.cta-strip__text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  font-weight: 700;
  color: #d7dde5;
}

.cta-strip__text b {
  color: var(--orange);
  font-weight: 900;
}

.cta-strip__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border: 3px solid var(--white);
  background: var(--orange);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
  color: var(--white);
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.cta-strip__btn span {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 19px;
}

.cta-strip__btn:hover,
.cta-strip__btn:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.35);
}

.cta-strip__btn--sm {
  padding: 10px 20px;
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--white);
  font-size: 14px;
}

.cta-strip__btn--sm:hover,
.cta-strip__btn--sm:focus-visible {
  box-shadow: 6px 6px 0 var(--ink);
}

/* =========================================================================
   時間表 —— 月份 × 課程矩陣
   ========================================================================= */
.timetable-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 352px;
}

#timetable-overlay .overlay__scroll {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.timetable-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  margin-bottom: 20px;
  padding-right: 8px;
}

#timetable-overlay .timetable-actions .cta-strip__btn {
  justify-content: center;
  min-height: 40px;
  padding: 8px 15px;
  border-width: 2px;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 13px;
}

#timetable-overlay .timetable-actions .cta-strip__btn:hover,
#timetable-overlay .timetable-actions .cta-strip__btn:focus-visible {
  box-shadow: 5px 5px 0 var(--ink);
}

#timetable-overlay .info-head__lead span {
  display: block;
}

#timetable-overlay .info-head,
#timetable-overlay .timetable-actions {
  flex: 0 0 auto;
}

.timetable-filter {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: var(--white);
}

.timetable-filter__btn {
  min-height: 36px;
  padding: 5px 12px;
  border: 0;
  background: var(--white);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.08s ease, color 0.08s ease;
}

.timetable-filter__btn + .timetable-filter__btn {
  border-left: 1px solid var(--ink);
}

.timetable-filter__btn:hover,
.timetable-filter__btn:focus-visible {
  position: relative;
  z-index: 1;
  background: #fff0e8;
  outline: 3px solid rgba(255, 90, 0, 0.25);
  outline-offset: -3px;
}

.timetable-filter__btn.is-active {
  position: relative;
  z-index: 1;
  background: var(--ink);
  color: var(--white);
}

.timetable {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 260px;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}

.timetable__table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 5px 5px 0 rgba(23, 34, 50, 0.1);
  scrollbar-color: var(--ink) #dfe2e4;
  scrollbar-width: thin;
}

.timetable__table {
  width: 100%;
  min-width: 840px;
  border-spacing: 0;
  table-layout: fixed;
}

.timetable__table th,
.timetable__table td {
  text-align: left;
}

.timetable__table thead th {
  position: sticky;
  z-index: 3;
  top: 0;
  padding: 14px 12px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.24);
  background: var(--ink);
  box-shadow: inset 0 5px 0 var(--tt-accent, var(--orange));
  color: var(--white);
  font-size: 15px;
  font-weight: 900;
}

.timetable__table thead th:first-child {
  z-index: 4;
  left: 0;
  width: 72px;
  box-shadow: none;
}

.timetable__table thead th:last-child {
  border-right: 0;
}

.timetable__table thead small {
  display: block;
  margin-top: 3px;
  color: #c9d0d9;
  font-size: 10px;
  font-weight: 900;
}

.timetable__table tbody tr:nth-child(even) {
  background: rgba(23, 34, 50, 0.018);
}

.timetable__table tbody th[scope="rowgroup"] {
  position: sticky;
  z-index: 1;
  left: 0;
  width: 72px;
  padding: 12px 11px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: #eceeeb;
  color: var(--ink);
  font-weight: 900;
  vertical-align: top;
  white-space: nowrap;
}

.timetable__table tbody th strong {
  display: block;
  font-size: 15px;
}

.timetable__table tbody th small {
  display: block;
  margin-top: 5px;
  color: #6d7784;
  font-size: 10px;
  font-weight: 700;
}

.timetable__table tbody td {
  height: 82px;
  padding: 5px 8px;
  border-right: 1px solid #d8dce0;
  border-bottom: 1px solid #e1e4e6;
  vertical-align: middle;
}

.timetable__table tbody td:last-child {
  border-right: 0;
}

.timetable__month-group:not(:last-child) tr:last-child td {
  border-bottom: 2px solid var(--ink);
}

.timetable__month-group:last-child th,
.timetable__month-group:last-child tr:last-child td {
  border-bottom: 0;
}

.timetable__session {
  display: flex;
  min-height: 70px;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 3px;
  padding: 7px 8px 7px 11px;
  background: var(--white);
  box-shadow: inset 3px 0 0 var(--tt-accent, var(--orange));
  cursor: help;
  outline: none;
  transition: background 0.08s ease, box-shadow 0.08s ease, color 0.08s ease;
}

.timetable__session:hover,
.timetable__session:focus-visible {
  background: #fff0e8;
  box-shadow: inset 4px 0 0 var(--tt-accent, var(--orange));
}

.timetable__session-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.timetable__session-head strong {
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.timetable__session-head small {
  color: #6b7583;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.timetable__session-time {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.timetable__session-place {
  overflow-wrap: anywhere;
  color: #657080;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.timetable__empty {
  padding: 22px 4px;
  color: #4a5666;
  font-size: 15px;
  font-weight: 700;
}

.timetable-tooltip {
  position: fixed;
  z-index: 200;
  width: max-content;
  max-width: min(310px, calc(100vw - 24px));
  padding: 10px 13px;
  border: 2px solid var(--ink);
  border-left: 5px solid var(--orange);
  background: var(--ink);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.28);
  color: var(--white);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.65;
  pointer-events: none;
  white-space: pre-line;
}

.timetable-tooltip[hidden] {
  display: none;
}

.qa-note {
  position: fixed;
  z-index: 24;
  left: 50%;
  bottom: 26px;
  margin: 0;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.qa-note strong {
  color: var(--orange);
}

@media (max-width: 1180px) {
  .course__inner {
    width: calc(100% - 120px);
    column-gap: 44px;
  }

  h1 {
    font-size: 40px;
  }

  .qa-note {
    display: none;
  }
}

@media (min-width: 1600px) and (min-height: 850px) {
  .site-header {
    height: 88px;
    padding-right: 54px;
    padding-left: 54px;
  }

  .series-brand__en {
    font-size: 11px;
  }

  .series-brand__zh {
    font-size: 24px;
  }

  .carousel-current__ep,
  .carousel-current__name {
    font-size: 24px;
  }

  .course__number {
    top: 92px;
    right: 4%;
    font-size: 300px;
  }

  .course__inner {
    column-gap: 84px;
    row-gap: 26px;
    width: calc(100% - 240px);
    padding-top: 132px;
    padding-bottom: 128px;
  }

  .course__copy {
    padding-top: 10px;
  }

  .course__eyebrow {
    margin-bottom: 25px;
    font-size: 15px;
  }

  .course__eyebrow span {
    padding: 9px 14px;
  }

  h1 {
    margin-bottom: 24px;
    font-size: 56px;
    line-height: 1.16;
  }

  .course__lead {
    font-size: 18px;
    line-height: 1.85;
  }

  .course__visual {
    padding-top: 32px;
    padding-right: 12px;
    padding-bottom: 26px;
  }

  .visual-label {
    left: 28px;
    padding: 11px 17px;
    font-size: 13px;
  }

  .material-preview figcaption {
    padding: 16px 20px;
    font-size: 15px;
  }

  .visual-stamp {
    min-width: 112px;
    padding: 14px 16px;
    font-size: 23px;
  }

  .course__outcomes {
    grid-template-columns: 200px 1fr;
    gap: 28px;
    padding-top: 20px;
  }

  .outcome-index {
    font-size: 30px;
  }

  .course__outcomes strong {
    font-size: 18px;
  }

  .course__outcomes .outcome-desc {
    font-size: 14px;
  }

  .qa-note {
    font-size: 12px;
  }
}

@media (max-height: 850px) and (min-width: 901px) {
  /* 筆電高度（≤850px）：標題與教材圖靠上對齊（與 header 留呼吸感），圖拉高吃掉中間橫向空白；
     底部三張卡上移、與置中 QA 說明拉開間距 */
  .course__inner {
    min-height: 100dvh;
    padding-top: 102px;
    padding-bottom: 74px;
    row-gap: 18px;
    align-content: space-between;
  }

  /* 靠上對齊：文字欄與圖欄同起於頂線 */
  .course__copy {
    align-self: start;
  }

  .course__visual {
    align-self: start;
  }

  .course__eyebrow {
    margin-bottom: 12px;
    font-size: 12px;
  }

  .course__eyebrow span {
    padding: 6px 10px;
  }

  h1 {
    margin-bottom: 14px;
    font-size: 34px;
    line-height: 1.16;
  }

  .course__lead {
    font-size: 14px;
    line-height: 1.7;
  }

  .course__visual {
    padding-top: 12px;
    padding-bottom: 8px;
  }

  /* 教材預覽圖依視窗高度封頂——放大到主角尺寸，拉高以吃掉中間橫向空白 */
  .material-preview img {
    aspect-ratio: auto;
    height: min(41vh, 320px);
  }

  .material-preview figcaption {
    padding: 11px 15px;
    font-size: 12px;
  }

  .visual-stamp {
    padding: 10px 13px;
    font-size: 18px;
  }

  .course__outcomes {
    padding-top: 14px;
  }

  .course__outcomes li {
    padding: 15px 16px 16px;
  }

  .outcome-index {
    margin-bottom: 5px;
    font-size: 23px;
  }

  .course__outcomes strong {
    margin-bottom: 5px;
    font-size: 15px;
  }

  .course__outcomes .outcome-desc {
    font-size: 12.5px;
    line-height: 1.5;
  }

  /* 頁首快捷鈕在矮螢幕略縮 */
  .quick-access__btn {
    padding: 6px 11px 6px 9px;
  }

  .quick-access__icon {
    width: 26px;
    height: 26px;
    font-size: 14px;
  }

  .quick-access__text strong {
    font-size: 12px;
  }
}

@media (max-width: 900px) {
  body {
    overflow: hidden;
  }

  .course-deck {
    border-width: 5px;
  }

  .site-header {
    top: 5px;
    left: 5px;
    right: 5px;
    height: 70px;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 0 14px;
  }

  .series-brand__en {
    font-size: 8px;
  }

  .series-brand__zh {
    font-size: 17px;
  }

  /* 行動版：輪播移到底部置中（夾在左右箭頭之間），頁首只留品牌＋須知鈕 */
  .course-carousel {
    position: fixed;
    z-index: 25;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    gap: 5px;
  }

  .carousel-current {
    min-width: 0;
  }

  .quick-access {
    justify-self: end;
  }

  .quick-access__text strong {
    font-size: 12px;
  }

  .course {
    background: var(--paper);
  }

  .course__number {
    top: 70px;
    right: 16px;
    font-size: 138px;
  }

  .course__inner {
    display: block;
    width: calc(100% - 40px);
    padding: 100px 0 96px;
  }

  .course__copy {
    max-width: none;
  }

  .course__eyebrow {
    margin-bottom: 16px;
  }

  h1 {
    max-width: 720px;
    margin-bottom: 15px;
    font-size: 34px;
  }

  .course__lead {
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.65;
  }

  .pain-point {
    margin-bottom: 16px;
    font-size: 14px;
  }

  .course__visual {
    max-width: 620px;
    margin: 34px auto 30px;
  }

  .course__outcomes {
    display: block;
    padding-top: 16px;
  }

  .course__signal {
    grid-template-columns: 1fr;
    margin-bottom: 22px;
  }

  .course__signal > p {
    border-left: 0;
    border-top: 2px solid var(--ink);
  }

  .course__outcomes ul {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .course__outcomes li {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    align-items: baseline;
    padding: 12px 16px 14px;
  }

  .outcome-index {
    margin-bottom: 0;
    font-size: 22px;
  }

  .course__outcomes li strong {
    grid-column: 2;
  }

  .course__outcomes .outcome-desc {
    grid-column: 2;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .timetable-actions {
    align-items: stretch;
    justify-content: space-between;
    gap: 12px 20px;
    min-width: 0;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(23, 34, 50, 0.28);
  }

  .timetable-actions .cta-strip__btn {
    margin-left: auto;
  }

  .timetable-head {
    display: block;
    margin-bottom: 18px;
    padding-right: 0;
  }

  .timetable__table {
    min-width: 780px;
  }

  .overlay__scroll {
    padding: 32px 22px 34px;
  }

  .info-head h2 {
    font-size: 27px;
  }

  .quick-access__btn {
    padding: 8px 11px 8px 9px;
  }

  .qa-note {
    display: none;
  }
}

@media (max-width: 520px) {
  .timetable-actions {
    flex-direction: column;
    gap: 10px;
  }

  .timetable-filter,
  .timetable-actions .cta-strip__btn {
    width: 100%;
  }

  .timetable-filter__btn {
    flex: 1;
  }

  .timetable-actions .cta-strip__btn {
    justify-content: center;
    margin-left: 0;
  }

  .site-header {
    padding: 0 13px;
  }

  .course__inner {
    width: calc(100% - 28px);
    padding-top: 92px;
  }

  .course__eyebrow {
    font-size: 11px;
  }

  .course__eyebrow span {
    padding: 7px 9px;
  }

  h1 {
    font-size: 29px;
    line-height: 1.22;
  }

  .course__lead {
    font-size: 14px;
  }

  .pain-point {
    padding: 13px 42px 13px 14px;
    font-size: 13px;
  }

  .course__visual {
    margin-top: 30px;
    padding-right: 10px;
  }

  .course__signal {
    margin-bottom: 18px;
  }

  .course__signal > span {
    min-height: 34px;
  }

  .course__signal > span,
  .course__signal > p {
    padding: 10px 12px;
    font-size: 13px;
  }

  .material-preview::before {
    inset: -10px 12px 15px -10px;
  }

  .material-preview figcaption {
    padding: 10px 12px;
    font-size: 11px;
  }

  .visual-label {
    left: 10px;
    font-size: 10px;
  }

  .visual-stamp {
    right: -2px;
    min-width: 78px;
    padding: 9px 10px;
    font-size: 16px;
  }

  .course-carousel {
    bottom: 16px;
  }
}
