:root {
  --course-bg: #f7f9fc;
  --course-bg-warm: #fff7e8;
  --course-surface: #ffffff;
  --course-surface-soft: #eef7ff;
  --course-ink: #1e2a44;
  --course-muted: #607089;
  --course-line: #dce6f3;
  --course-blue: #4c97ff;
  --course-sky: #5bc0de;
  --course-green: #59c059;
  --course-yellow: #ffbf00;
  --course-orange: #ff8c1a;
  --course-pink: #ff6680;
  --course-purple: #cf63cf;
  --course-shadow: 0 18px 45px rgba(30, 42, 68, 0.12);
  --course-radius: 20px;
  --course-width: 1180px;
  --font-round: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--course-bg);
}

body.course-page {
  margin: 0;
  background:
    radial-gradient(circle at 12% 7%, rgba(255, 191, 0, 0.22), transparent 26rem),
    radial-gradient(circle at 85% 4%, rgba(91, 192, 222, 0.22), transparent 24rem),
    linear-gradient(180deg, #f7f9fc 0%, #fff 46%, #f7f9fc 100%);
  color: var(--course-ink);
  font-family: var(--font-round);
  line-height: 1.65;
  word-break: keep-all;
}

a {
  color: inherit;
}

svg,
iframe {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 50;
  transform: translateY(-140%);
  border-radius: 999px;
  background: var(--course-ink);
  color: #fff;
  padding: 10px 14px;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.course-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(220, 230, 243, 0.9);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
}

.course-nav {
  width: min(100% - 32px, var(--course-width));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.course-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--course-ink);
  font-weight: 900;
  text-decoration: none;
}

.brand-spark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--course-blue), var(--course-sky));
  color: #fff;
  font-size: 23px;
  box-shadow: 0 12px 24px rgba(76, 151, 255, 0.24);
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy small {
  color: var(--course-muted);
  font-size: 12px;
  font-weight: 800;
}

.back-link,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.back-link {
  border-color: #cfe0f5;
  background: #fff;
  color: #2f5d9c;
}

.button-link {
  background: var(--course-blue);
  color: #fff;
  box-shadow: 0 12px 28px rgba(76, 151, 255, 0.28);
}

.back-link:hover,
.button-link:hover,
.back-link:focus-visible,
.button-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(30, 42, 68, 0.14);
}

.course-shell,
.course-section {
  width: min(100% - 32px, var(--course-width));
  margin: 0 auto;
}

.course-hero {
  padding: 56px 0 26px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 32px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  border-radius: 999px;
  background: #e8f2ff;
  color: #245da8;
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 900;
}

.course-hero h1 {
  margin: 0;
  color: var(--course-ink);
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.03;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--course-muted);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-board {
  position: relative;
  overflow: hidden;
  border: 1px solid #dbe7f6;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 255, 0.98)),
    repeating-linear-gradient(45deg, rgba(76, 151, 255, 0.05) 0 12px, transparent 12px 24px);
  padding: 26px;
  box-shadow: var(--course-shadow);
}

.hero-board h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
}

.hero-board p {
  margin: 10px 0 18px;
  color: var(--course-muted);
  font-weight: 800;
}

.hero-map-svg {
  display: block;
  width: 100%;
  height: auto;
}

.course-section {
  padding: 52px 0;
}

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

.section-kicker {
  margin: 0 0 7px;
  color: #245da8;
  font-size: 14px;
  font-weight: 950;
}

.section-head h2,
.lesson-title h2 {
  margin: 0;
  color: var(--course-ink);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: 0;
}

.section-head p,
.lesson-title p {
  max-width: 640px;
  margin: 10px 0 0;
  color: var(--course-muted);
  font-weight: 750;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mission-node {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  border: 2px solid #dfeaf7;
  border-radius: var(--course-radius);
  background: var(--course-surface);
  padding: 14px;
  color: var(--course-ink);
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(30, 42, 68, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.mission-node:hover,
.mission-node:focus-visible {
  transform: translateY(-3px);
  border-color: var(--course-blue);
  box-shadow: 0 18px 34px rgba(30, 42, 68, 0.13);
}

.mission-node.is-ready {
  background: linear-gradient(145deg, #fff, #edf6ff);
}

.mission-node.is-soon {
  background: #fbfcfe;
  color: #7a879a;
}

.mission-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--course-blue);
  color: #fff;
  font-weight: 950;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
}

.mission-grid li:nth-child(3n + 2) .mission-num {
  background: var(--course-yellow);
  color: #3c2c00;
}

.mission-grid li:nth-child(3n) .mission-num {
  background: var(--course-green);
}

.mission-title {
  display: block;
  font-size: 16px;
  font-weight: 950;
  line-height: 1.28;
}

.mission-status {
  display: block;
  margin-top: 3px;
  color: var(--course-muted);
  font-size: 12px;
  font-weight: 900;
}

.soon-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.soon-card {
  border: 2px dashed #d5e1ef;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  padding: 14px;
  text-align: center;
  color: #7a879a;
  font-weight: 950;
}

.lesson {
  scroll-margin-top: 92px;
}

.lesson-card {
  border: 1px solid #dce7f4;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  padding: clamp(20px, 3vw, 34px);
  box-shadow: var(--course-shadow);
}

.lesson-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 24px;
}

.lesson-badge {
  display: grid;
  place-items: center;
  min-width: 74px;
  min-height: 74px;
  border-radius: 24px;
  background: var(--course-yellow);
  color: #3b2c00;
  font-size: 19px;
  font-weight: 950;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.12);
}

.lesson-7 .lesson-badge {
  background: var(--course-blue);
  color: #fff;
}

.lesson-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr);
  gap: 22px;
  align-items: start;
}

.content-stack {
  display: grid;
  gap: 18px;
}

.challenge-card,
.info-card,
.video-card,
.step-card,
.mission-panel,
.answer-panel,
.palette-card {
  border: 1px solid #dfe9f6;
  border-radius: var(--course-radius);
  background: var(--course-surface);
  padding: 20px;
  box-shadow: 0 12px 24px rgba(30, 42, 68, 0.07);
}

.challenge-card {
  background: linear-gradient(145deg, #fff7df, #fff);
  border-color: #ffe4a7;
}

.challenge-card h3,
.info-card h3,
.video-card h3,
.step-card h3,
.mission-panel h3,
.answer-panel h3,
.palette-card h3 {
  margin: 0 0 12px;
  color: var(--course-ink);
  font-size: 22px;
  line-height: 1.24;
}

.token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.token-list li {
  border-radius: 999px;
  background: #fff;
  border: 2px solid #ffe0a0;
  padding: 9px 12px;
  font-weight: 950;
}

.video-frame {
  overflow: hidden;
  border: 3px solid #17233a;
  border-radius: 18px;
  background: #17233a;
  aspect-ratio: 16 / 9;
}

.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.step-card {
  position: relative;
  overflow: hidden;
  min-height: 100%;
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--course-blue);
  color: #fff;
  font-weight: 950;
  margin-bottom: 12px;
}

.step-card:nth-child(2) .step-number {
  background: var(--course-yellow);
  color: #3b2c00;
}

.step-card:nth-child(3) .step-number {
  background: var(--course-green);
}

.step-card p,
.mission-panel p,
.answer-panel p,
.info-card p {
  margin: 0;
  color: var(--course-muted);
  font-weight: 750;
}

.step-list {
  margin: 12px 0 0;
  padding-left: 20px;
  color: #33415f;
  font-weight: 850;
}

.hint {
  display: block;
  margin-top: 12px;
  border-radius: 14px;
  background: #eef7ff;
  padding: 11px 12px;
  color: #245da8;
  font-weight: 950;
}

.hardware-art {
  display: grid;
  place-items: center;
  min-height: 300px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(76, 151, 255, 0.12), rgba(255, 191, 0, 0.13)),
    #fff;
  border: 1px solid #dce7f4;
}

.hardware-art svg {
  width: min(100%, 560px);
  height: auto;
}

.led-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.led-check {
  border: 2px solid #dfe9f6;
  border-radius: 18px;
  background: #fff;
  padding: 14px;
  font-weight: 950;
}

.led-dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border-radius: 50%;
  vertical-align: -3px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.16);
}

.led-red {
  background: #f05252;
}

.led-green {
  background: #26b965;
}

.led-blue {
  background: #3f7cff;
}

.coding-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 18px;
  align-items: start;
}

.coding-grid.has-top-gap {
  margin-top: 22px;
}

.mission-panel {
  background: linear-gradient(145deg, #fff, #f1fbf6);
  border-color: #d6f1e1;
}

.mission-panel + .mission-panel {
  margin-top: 14px;
}

.answer-panel {
  background: #f9fbff;
}

.svg-answer,
.block-answer {
  overflow-x: auto;
  border: 2px solid #dbe7f6;
  border-radius: 18px;
  background:
    linear-gradient(#f8fbff 23px, transparent 24px),
    linear-gradient(90deg, #f8fbff 23px, transparent 24px),
    #edf5ff;
  background-size: 24px 24px;
  padding: 18px;
}

.block-answer > .blk-stack {
  min-width: 430px;
}

.svg-answer svg {
  display: block;
  width: min(100%, 640px);
  min-width: 560px;
  height: auto;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.palette-card {
  overflow: hidden;
}

.palette-card h3 {
  font-size: 18px;
}

.blk-board {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 12px;
  padding: 2px 0;
}

.blk-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 10px 0 14px;
  isolation: isolate;
}

.blk-c-slot .blk-stack {
  min-width: 0;
  padding: 0;
}

.blk,
.blk-c {
  --blk-color: #0fbd8c;
  --blk-border: #0ba37a;
  --blk-notch-fill: #edf5ff;
  --blk-notch-left: 34px;
  --blk-notch-width: 34px;
  --blk-notch-height: 7px;
  --blk-c-arm: 16px;
  --blk-c-inset: 26px;
  --blk-c-foot-width: 88px;
  --blk-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
  color: #fff;
  font-family: "Helvetica Neue", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.18;
  text-shadow: none;
}

.blk-stack > :where(.blk, .blk-c) {
  margin: 0;
}

.blk-stack > :where(.blk, .blk-c) + :where(.blk, .blk-c) {
  margin-top: calc(-1 * var(--blk-notch-height));
}

.blk-stack > .blk-cap + :where(.blk, .blk-c),
.blk-stack > :where(.blk, .blk-c) + .blk-hat {
  margin-top: 0;
}

.blk-stack > :where(.blk, .blk-c):nth-child(1) {
  z-index: 40;
}

.blk-stack > :where(.blk, .blk-c):nth-child(2) {
  z-index: 39;
}

.blk-stack > :where(.blk, .blk-c):nth-child(3) {
  z-index: 38;
}

.blk-stack > :where(.blk, .blk-c):nth-child(4) {
  z-index: 37;
}

.blk-stack > :where(.blk, .blk-c):nth-child(5) {
  z-index: 36;
}

.blk-stack > :where(.blk, .blk-c):nth-child(6) {
  z-index: 35;
}

.blk-stack > :where(.blk, .blk-c):nth-child(7) {
  z-index: 34;
}

.blk-stack > :where(.blk, .blk-c):nth-child(8) {
  z-index: 33;
}

.blk-stack > :where(.blk, .blk-c):nth-child(9) {
  z-index: 32;
}

.blk-stack > :where(.blk, .blk-c):nth-child(n + 10) {
  z-index: 31;
}

.blk {
  display: inline-flex;
  position: relative;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  white-space: nowrap;
  box-sizing: border-box;
  border: 1px solid var(--blk-border);
  background: var(--blk-color);
  box-shadow: var(--blk-shadow);
}

.blk > * {
  position: relative;
  z-index: 2;
}

.blk-command {
  min-width: 142px;
  border-radius: 4px;
  padding: 8px 12px 8px;
}

.blk-command::before {
  content: "";
  position: absolute;
  top: -1px;
  left: var(--blk-notch-left);
  z-index: 3;
  width: var(--blk-notch-width);
  height: var(--blk-notch-height);
  border: 1px solid var(--blk-border);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  background: var(--blk-notch-fill);
}

.blk-command::after {
  content: "";
  position: absolute;
  bottom: calc(-1 * var(--blk-notch-height));
  left: var(--blk-notch-left);
  z-index: 4;
  width: var(--blk-notch-width);
  height: var(--blk-notch-height);
  border: 1px solid var(--blk-border);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  background: var(--blk-color);
  box-shadow: var(--blk-shadow);
}

.blk.blk-cap::after {
  content: none;
}

.blk-reporter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid var(--blk-border);
  background: var(--blk-color);
  color: #fff;
  padding: 4px 12px;
  vertical-align: middle;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.blk-hat {
  min-width: 170px;
  margin-top: 0;
  border-radius: 4px;
  padding: 12px 14px 8px;
  overflow: visible;
}

.blk-stack > .blk-hat:first-child {
  margin-top: 18px;
}

.blk-hat::before {
  content: "";
  position: absolute;
  top: -17px;
  left: -1px;
  right: -1px;
  z-index: 0;
  height: 30px;
  border: 1px solid var(--blk-border);
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: var(--blk-color);
}

.blk-hat::after {
  content: "";
  position: absolute;
  left: var(--blk-notch-left);
  bottom: calc(-1 * var(--blk-notch-height));
  z-index: 4;
  width: var(--blk-notch-width);
  height: var(--blk-notch-height);
  border: 1px solid var(--blk-border);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  background: var(--blk-color);
  box-shadow: var(--blk-shadow);
}

.blk-c {
  display: inline-grid;
  position: relative;
  grid-template-columns: 1fr;
  min-width: 330px;
  box-sizing: border-box;
}

.blk-c-head {
  display: flex;
  position: relative;
  z-index: 3;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid var(--blk-border);
  border-radius: 4px 4px 0 0;
  background: var(--blk-color);
  padding: 8px 12px;
  white-space: nowrap;
  box-shadow: var(--blk-shadow);
}

.blk-c-head::before {
  content: "";
  position: absolute;
  top: -1px;
  left: var(--blk-notch-left);
  z-index: 3;
  width: var(--blk-notch-width);
  height: var(--blk-notch-height);
  border: 1px solid var(--blk-border);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  background: var(--blk-notch-fill);
}

.blk-c-head::after {
  content: "";
  position: absolute;
  bottom: calc(-1 * var(--blk-notch-height));
  left: calc(var(--blk-c-inset) + var(--blk-notch-left));
  z-index: 4;
  width: var(--blk-notch-width);
  height: var(--blk-notch-height);
  border: 1px solid var(--blk-border);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  background: var(--blk-color);
  box-shadow: var(--blk-shadow);
}

.blk-c-head > * {
  position: relative;
  z-index: 5;
}

.blk-c-slot {
  position: relative;
  z-index: 2;
  min-height: 38px;
  box-sizing: border-box;
  background: transparent;
  padding: 0 0 0 var(--blk-c-inset);
}

.blk-c-slot::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--blk-c-arm);
  border-left: 1px solid var(--blk-border);
  border-right: 1px solid var(--blk-border);
  background: var(--blk-color);
  box-shadow: var(--blk-shadow);
}

.blk-c-slot::after {
  content: none;
}

.blk-c-mid {
  display: flex;
  position: relative;
  z-index: 3;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid var(--blk-border);
  border-radius: 0;
  background: var(--blk-color);
  padding: 8px 12px;
  white-space: nowrap;
  box-shadow: var(--blk-shadow);
}

.blk-c-mid::after {
  content: "";
  position: absolute;
  bottom: calc(-1 * var(--blk-notch-height));
  left: calc(var(--blk-c-inset) + var(--blk-notch-left));
  z-index: 4;
  width: var(--blk-notch-width);
  height: var(--blk-notch-height);
  border: 1px solid var(--blk-border);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  background: var(--blk-color);
  box-shadow: var(--blk-shadow);
}

.blk-c-mid > * {
  position: relative;
  z-index: 5;
}

.blk-c-foot {
  position: relative;
  z-index: 1;
  width: var(--blk-c-foot-width);
  min-height: 30px;
  box-sizing: border-box;
  border: 1px solid var(--blk-border);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  background: var(--blk-color);
  box-shadow: var(--blk-shadow);
}

.blk-c-foot::before {
  content: none;
}

.blk-c-foot::after {
  content: "";
  position: absolute;
  left: var(--blk-notch-left);
  bottom: calc(-1 * var(--blk-notch-height));
  z-index: 4;
  width: var(--blk-notch-width);
  height: var(--blk-notch-height);
  border: 1px solid var(--blk-border);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  background: var(--blk-color);
  box-shadow: var(--blk-shadow);
}

.blk-input {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 22px;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  background: #fff;
  color: #29323d;
  padding: 2px 8px;
  font-weight: 800;
  text-shadow: none;
  vertical-align: middle;
}

.blk-empty {
  min-width: 42px;
}

.blk-dropdown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #29323d;
  padding: 2px 9px;
  font-weight: 800;
  text-shadow: none;
  vertical-align: middle;
}

.blk-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 7px;
  background: #fff;
  object-fit: cover;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}

.blk-reporter .blk-icon {
  margin-left: -4px;
}

.blk-compare {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.blk-boolean {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 62px;
  min-height: 30px;
  box-sizing: border-box;
  border: 1px solid var(--blk-border);
  padding: 5px 18px;
  color: #fff;
  background: var(--blk-color);
  vertical-align: middle;
  clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 16px 100%, 0 50%);
}

.blk.blk-boolean {
  border-radius: 0;
}

.blk-mutator {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.blk-color {
  display: inline-block;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border: 1px solid #fff;
  border-radius: 4px;
  vertical-align: -2px;
}

.blk-label {
  display: inline;
  color: inherit;
  white-space: nowrap;
}

.blk-motion {
  --blk-color: #4c97ff;
  --blk-border: #3373cc;
}

.blk-looks {
  --blk-color: #9966ff;
  --blk-border: #774dcb;
}

.blk-sound {
  --blk-color: #cf63cf;
  --blk-border: #a63fa6;
}

.blk-elio,
.blk-connect,
.blk-io,
.blk-motor {
  --blk-color: #0fbd8c;
  --blk-border: #0ba37a;
}

.blk-sensor,
.blk-sensing {
  --blk-color: #5cb1d6;
  --blk-border: #4a9bbf;
}

.blk-event,
.blk-start {
  --blk-color: #ffbf00;
  --blk-border: #e6ac00;
}

.blk-control,
.blk-loop,
.blk-stop {
  --blk-color: #ffab19;
  --blk-border: #e69d16;
}

.blk-operator,
.blk-condition,
.blk-random {
  --blk-color: #59c059;
  --blk-border: #46a846;
}

.blk-variable {
  --blk-color: #ff8c1a;
  --blk-border: #e67e00;
}

.blk-list {
  --blk-color: #ff661a;
  --blk-border: #e64d00;
}

.blk-pen {
  --blk-color: #0e9c6b;
  --blk-border: #0b7d55;
}

.blk-function,
.blk-myblock {
  --blk-color: #ff6680;
  --blk-border: #f55a70;
}

.blk-unknown {
  --blk-color: #8a95a5;
  --blk-border: #6e7787;
}

.blk-note {
  margin-top: 14px;
  color: var(--course-muted);
  font-size: 14px;
  font-weight: 800;
}

.blk-board.is-c-demo {
  display: grid;
  justify-items: start;
  gap: 14px;
  margin-top: 12px;
}

.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.placeholder-lesson {
  scroll-margin-top: 92px;
  min-height: 86px;
  border: 2px dashed #d5e1ef;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.placeholder-lesson strong {
  display: block;
  color: var(--course-ink);
  font-size: 16px;
  line-height: 1.25;
}

.placeholder-lesson span {
  color: #7a879a;
  font-size: 13px;
  font-weight: 900;
}

.course-footer {
  margin-top: 38px;
  border-top: 1px solid #dce7f4;
  background: #ffffff;
}

.footer-inner {
  width: min(100% - 32px, var(--course-width));
  margin: 0 auto;
  padding: 26px 0;
  color: var(--course-muted);
  font-size: 14px;
  font-weight: 800;
}

.sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
}

@media (max-width: 980px) {
  .hero-grid,
  .lesson-grid,
  .coding-grid {
    grid-template-columns: 1fr;
  }

  .mission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .soon-strip,
  .placeholder-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .step-grid,
  .palette-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .course-nav,
  .section-head,
  .lesson-head {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .course-nav,
  .section-head {
    flex-direction: column;
  }

  .course-nav {
    padding: 12px 0;
  }

  .back-link,
  .button-link {
    width: 100%;
  }

  .course-hero {
    padding-top: 34px;
  }

  .mission-grid,
  .soon-strip,
  .placeholder-grid,
  .led-check-grid {
    grid-template-columns: 1fr;
  }

  .lesson-card {
    border-radius: 22px;
  }

  .blk-board {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
  }
}

@media print {
  body.course-page {
    background: #fff;
  }

  .course-topbar,
  .course-footer,
  .video-card {
    display: none;
  }

  .course-section {
    break-inside: avoid;
    padding: 20px 0;
  }

  .lesson-card,
  .challenge-card,
  .info-card,
  .step-card,
  .mission-panel,
  .answer-panel,
  .palette-card {
    box-shadow: none;
  }
}

/* ── 안드로이드 앱 실제 블록 캡처 (강의 교안 정본) + 스크래치 3.0 라벨 ── */
.android-real{
  margin:0 0 16px;padding:14px;
  background:var(--course-surface-soft);
  border:2px solid var(--course-line);border-radius:16px;
}
.android-real-tag{
  display:inline-flex;align-items:center;gap:6px;
  font-weight:800;font-size:.9rem;color:var(--course-blue);
  margin-bottom:10px;
}
.android-real img{
  display:block;max-width:100%;height:auto;
  border-radius:10px;background:#fff;
}
.scratch-ver-tag{
  display:inline-flex;align-items:center;gap:6px;
  font-weight:800;font-size:.9rem;color:var(--course-purple);
  margin-bottom:8px;
}

/* ── 강별 실제 연결법 카드 ── */
.wire-guide {
  margin-top: 24px;
  padding: 22px;
  border: 2px solid var(--course-line);
  border-radius: var(--course-radius);
  background: var(--course-surface-soft);
  box-shadow: 0 14px 32px rgba(76, 151, 255, 0.1);
}

.wire-guide h3 {
  margin: 0 0 10px;
  color: var(--course-ink);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.35;
}

.wire-note {
  margin: 0 0 16px;
  color: var(--course-muted);
  font-weight: 850;
}

.wire-figs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 16px;
}

.wire-fig {
  margin: 0;
  border: 1px solid #dbe8f8;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.wire-fig:only-child {
  grid-column: 1 / -1;
}

.wire-fig img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

.wire-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--course-blue);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(30, 42, 68, 0.08);
}

.wire-link:focus,
.wire-link:hover {
  color: #245da8;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .wire-guide {
    padding: 18px;
  }

  .wire-figs {
    grid-template-columns: 1fr;
  }

  .wire-link {
    width: 100%;
  }
}

/* 팔레트 샘플 제거 후 단일 정답이 넓게 보이도록 */
.coding-grid.single{
  grid-template-columns: minmax(0, 1fr);
}
.coding-grid.single .answer-panel{
  max-width: 760px;
}

/* 한글 어절 줄바꿈 전역 */
body,h1,h2,h3,h4,h5,h6,p,li,a,span,small,strong,em,figcaption,button,td,th{word-break:keep-all;overflow-wrap:break-word}

/* --- 차시 수업 페이지(education-k-*) --- */
.k-lesson-page .course-hero h1 {
  max-width: 940px;
}

.k-lesson-nav {
  flex-wrap: wrap;
}

.k-nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.lesson-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 2px solid #dce6f3;
  border-radius: 999px;
  background: #f7fbff;
  color: #2f5d9c;
  padding: 9px 13px;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.lesson-page-link.is-disabled {
  color: #8b98aa;
  background: #f3f5f8;
}

.k-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.k-meta-chips span {
  border: 1px solid var(--course-line);
  border-radius: 999px;
  background: var(--course-surface);
  color: var(--course-ink);
  padding: 8px 14px;
  font-weight: 900;
}

.k-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.k-timeline li {
  position: relative;
  min-height: 138px;
  border: 1px solid var(--course-line);
  border-top: 6px solid var(--course-blue);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 12px 26px rgba(30, 42, 68, 0.08);
}

.k-timeline li:nth-child(2) { border-top-color: var(--course-yellow); }
.k-timeline li:nth-child(3) { border-top-color: var(--course-green); }
.k-timeline li:nth-child(4) { border-top-color: var(--course-pink); }

.k-timeline span,
.k-timeline strong,
.k-timeline em {
  display: block;
  font-style: normal;
}

.k-timeline span {
  color: #245da8;
  font-size: 14px;
  font-weight: 950;
}

.k-timeline strong {
  margin-top: 4px;
  color: var(--course-ink);
  font-size: 28px;
  line-height: 1.1;
}

.k-timeline em {
  margin-top: 10px;
  color: var(--course-muted);
  font-weight: 850;
  line-height: 1.45;
}

.k-two-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.k-check-panel {
  border: 1px solid var(--course-line);
  border-radius: var(--course-radius);
  background: var(--course-surface);
  padding: 20px;
  box-shadow: 0 12px 24px rgba(30, 42, 68, 0.07);
}

.k-check-panel h3 {
  margin: 0 0 14px;
  color: var(--course-ink);
  font-size: 22px;
}

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

.k-check-list label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid #e4edf8;
  border-radius: 12px;
  background: #f9fbff;
  padding: 10px 12px;
  color: #33415f;
  font-weight: 850;
}

.k-check-list input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--course-blue);
}

.k-safety {
  display: grid;
  grid-template-columns: minmax(180px, 0.32fr) minmax(0, 1fr);
  gap: 22px;
  border: 2px solid #ffd7a8;
  border-left: 10px solid var(--course-orange);
  border-radius: var(--course-radius);
  background: #fff7e8;
  padding: clamp(20px, 3vw, 30px);
  box-shadow: 0 14px 30px rgba(255, 140, 26, 0.12);
}

.k-safety h2,
.k-safety p {
  margin: 0;
}

.k-safety p + p {
  margin-top: 12px;
}

.k-safety strong {
  display: inline-block;
  margin-right: 8px;
  border-radius: 999px;
  background: #ffe1c2;
  color: #8a3d00;
  padding: 3px 9px;
}

.k-slide-list {
  grid-template-columns: 1fr;
  gap: 16px;
}

.k-slide-card {
  border: 1px solid var(--course-line);
  border-left: 8px solid var(--course-blue);
  border-radius: var(--course-radius);
  background: var(--course-surface);
  padding: clamp(18px, 3vw, 26px);
  box-shadow: var(--course-shadow);
}

.k-slide-card.k-phase-만들기 { border-left-color: var(--course-yellow); }
.k-slide-card.k-phase-놀기 { border-left-color: var(--course-green); }
.k-slide-card.k-phase-정리 { border-left-color: var(--course-pink); }

.k-slide-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.k-phase,
.k-time {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 950;
}

.k-phase {
  background: #e8f2ff;
  color: #245da8;
}

.k-time {
  background: #fff7df;
  color: #6f4e00;
}

.k-slide-card h3 {
  margin: 0 0 14px;
  color: var(--course-ink);
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.2;
}

.k-teacher-note {
  border: 1px solid #dce6f3;
  border-radius: 14px;
  background: #f8fbff;
  margin-bottom: 14px;
}

.k-teacher-note summary {
  cursor: pointer;
  padding: 12px 14px;
  color: #245da8;
  font-weight: 950;
}

.k-teacher-note p,
.k-kid-task p,
.k-check {
  margin: 0;
  color: #33415f;
  font-weight: 820;
}

.k-teacher-note p {
  padding: 0 14px 14px;
}

.k-kid-task {
  border-radius: 14px;
  background: #f2fbf4;
  padding: 14px;
}

.k-kid-task strong {
  display: block;
  margin-bottom: 4px;
  color: #23723a;
}

.k-check {
  margin-top: 12px;
  border-radius: 14px;
  background: #fff7df;
  padding: 12px 14px;
  color: #624500;
}

.k-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.k-video-card {
  border: 1px solid var(--course-line);
  border-radius: var(--course-radius);
  background: var(--course-surface);
  padding: 14px;
  box-shadow: 0 12px 24px rgba(30, 42, 68, 0.07);
}

.k-video-card strong {
  display: block;
  margin-top: 10px;
  color: var(--course-ink);
  font-size: 16px;
}

.k-worksheet-print {
  border: 2px solid var(--course-line);
  border-radius: var(--course-radius);
  background: #fff;
  padding: clamp(18px, 3vw, 28px);
  box-shadow: var(--course-shadow);
}

.k-worksheet-print header {
  border-bottom: 2px solid #e4edf8;
  margin-bottom: 18px;
  padding-bottom: 12px;
}

.k-worksheet-print header strong {
  color: #245da8;
  font-weight: 950;
}

.k-worksheet-print header h2 {
  margin: 4px 0;
  color: var(--course-ink);
  font-size: clamp(26px, 4vw, 42px);
}

.k-worksheet-print header p {
  margin: 0;
  color: var(--course-muted);
  font-weight: 850;
}

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

.worksheet-item {
  min-height: 150px;
  border: 1px solid #e4edf8;
  border-radius: 16px;
  background: #fbfdff;
  padding: 16px;
}

.worksheet-item h3 {
  margin: 0 0 10px;
  color: var(--course-ink);
  font-size: 20px;
}

.worksheet-item p,
.worksheet-item pre {
  margin: 0;
  color: #33415f;
  font-family: var(--font-round);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.55;
  white-space: pre-wrap;
}

.table-scroll {
  overflow-x: auto;
}

.k-rubric-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  border: 1px solid var(--course-line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 24px rgba(30, 42, 68, 0.07);
}

.k-rubric-table th,
.k-rubric-table td {
  border: 1px solid #e2ebf7;
  padding: 13px;
  text-align: left;
  vertical-align: top;
}

.k-rubric-table th {
  background: #eef7ff;
  color: var(--course-ink);
  font-weight: 950;
}

.k-rubric-table td {
  color: #33415f;
  font-weight: 780;
}

.k-observe {
  margin: 14px 0 0;
  border-radius: 14px;
  background: #eef7ff;
  padding: 13px 15px;
  color: #245da8;
  font-weight: 900;
}

.next-lesson-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--course-line);
  border-radius: var(--course-radius);
  background: linear-gradient(145deg, #fff, #edf6ff);
  color: var(--course-ink);
  padding: 22px;
  text-decoration: none;
  box-shadow: var(--course-shadow);
}

.next-lesson-card span,
.next-lesson-card em {
  color: #245da8;
  font-style: normal;
  font-weight: 950;
}

.next-lesson-card strong {
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.16;
}

.roadmap-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 16px;
  border-radius: 999px;
  background: var(--color-ink, #18304f);
  color: #fff;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.roadmap-open:hover,
.roadmap-open:focus-visible {
  background: #17628c;
}

@media (max-width: 980px) {
  .k-timeline,
  .k-two-grid,
  .worksheet-grid {
    grid-template-columns: 1fr;
  }

  .k-safety {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .k-nav-actions {
    width: 100%;
    justify-content: stretch;
  }

  .lesson-page-link,
  .k-nav-actions .back-link {
    flex: 1 1 120px;
  }

  .k-timeline li {
    min-height: 0;
  }

  .k-slide-card {
    border-left-width: 0;
    border-top: 8px solid var(--course-blue);
  }

  .k-slide-card.k-phase-만들기 { border-top-color: var(--course-yellow); }
  .k-slide-card.k-phase-놀기 { border-top-color: var(--course-green); }
  .k-slide-card.k-phase-정리 { border-top-color: var(--course-pink); }
}

@media print {
  body.k-lesson-page * {
    visibility: hidden;
  }

  body.k-lesson-page,
  body.k-lesson-page .k-print-section,
  body.k-lesson-page .k-print-section * {
    visibility: visible;
  }

  body.k-lesson-page .k-print-section {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 0;
  }

  body.k-lesson-page .k-print-section .section-head {
    display: none;
  }

  body.k-lesson-page .k-worksheet-print {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 12mm;
  }

  body.k-lesson-page .worksheet-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8mm;
  }

  body.k-lesson-page .worksheet-item {
    break-inside: avoid;
    min-height: 0;
    padding: 5mm;
  }
}
