@font-face {
  font-family: "Hakgyoansim Bunpil";
  src: url("assets/HakgyoansimBunpilR.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --wall: #f2f2f2;
  --frame: #bdbdbd;
  --frame-dark: #a3a3a3;
  --board: #303030;
  --chalk: #f2f2f2;
  --chalk-soft: #c8c8c8;
  --chalk-line: rgba(242, 242, 242, 0.5);
  --chalk-faint: rgba(242, 242, 242, 0.12);
  --cream: #dcdcdc;
  --paper: #f2f2f2;
  --ink: #2a2728;
  --ink-soft: #4d4a4b;
  --label: #5c5c5c;
  --night: #3a3d55;
  --chalk-yellow: #f3dd8e;
  --title-gray: #c2c2c2;
  --box: #3b3b3b;
  --card-dark: #262626;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--wall);
  color: var(--chalk);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Pretendard", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

b, strong, th, h1, h2, h3, h4, dt, summary { font-weight: 500; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* ---------- progress + dock ---------- */

.dockbar { position: sticky; top: 0; z-index: 20; }
.progress { height: 4px; background: #d3d3d3; }
.progress span { transition: width 0.3s ease; }
.progress span { display: block; height: 100%; width: 0; background: var(--ink); }

.dock {
  display: flex; gap: 4px; flex-wrap: nowrap; align-items: center;
  justify-content: safe center;
  overflow-x: auto;
  padding: 10px 16px;
  background: rgba(242, 242, 242, 0.94);
}
/* centred when it fits, scrollable from the first item when it does not */
.dock a {
  flex: none;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  color: var(--label);
  text-decoration: none;
}
.dock a:hover, .dock a.is-active { background: var(--ink); color: var(--paper); }
.clock {
  flex: none; margin-left: 12px;
  padding: 6px 14px; border-radius: 999px; border: 1px solid #bdbdbd;
  background: #fff; color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.clock.is-running { background: var(--ink); color: var(--paper); border-color: var(--ink); }
/* one section at a time */
@media screen {
  .is-steps .board > .is-off { display: none; }
  .is-steps .board > .room, .is-steps .include .room {
    margin: 0; padding: clamp(28px, 4vw, 44px) 0 8px; background: none; border-radius: 0;
  }
  .is-steps .hero--guide { border-bottom: 0; }
}
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 22px; }
.pager[hidden] { display: none; }
.pager-btn {
  padding: 10px 18px; border-radius: 999px; border: 2px solid var(--chalk-line);
  background: transparent; color: var(--chalk);
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
}
.pager-btn[hidden] { display: block; visibility: hidden; }
.pager-btn:hover { background: var(--chalk); color: var(--ink); }
.pager-next { background: var(--chalk); color: var(--ink); }
.pager-count { color: var(--cream); font-size: 14px; font-variant-numeric: tabular-nums; }
/* site header: which course; the dock below it: where in the course */
.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 12px 20px 10px; background: #fff; border-bottom: 1px solid #d3d3d3;
}
.topbar-home {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  color: var(--ink); font-size: 16px; font-weight: 700; text-decoration: none;
}
.topbar-home img { display: block; width: auto; height: 40px; }
.topbar-courses { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; }
.topbar-courses a {
  flex: none; padding: 6px 12px; border-radius: 999px;
  color: var(--label); font-size: 14px; font-weight: 500; text-decoration: none;
}
.topbar-courses a:hover { background: var(--paper); color: var(--ink); }
.topbar-courses a.is-here { background: var(--paper); color: var(--ink); font-weight: 700; }
.topbar-tools { display: flex; gap: 6px; flex: none; margin-left: auto; }
.topbar-tools .clock { margin-left: 0; }
.dock-count {
  flex: none; margin-right: 10px; padding: 6px 4px;
  color: var(--ink);
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.dock-count[hidden] { display: none; }
.dock a[hidden] { display: none; }
.dock-phases { flex: none; display: inline-flex; margin-right: 10px; border: 1px solid #bdbdbd; border-radius: 999px; overflow: hidden; background: #fff; }
.dock-phases[hidden] { display: none; }
.dock-phases button {
  padding: 6px 14px; border: 0; background: transparent; color: var(--label);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}
.dock-phases > * + * { border-left: 1px solid #d3d3d3; }
.dock-phases button.is-done { color: #a3a3a3; }
.dock-phases button.is-done::before { content: "✓ "; }
.dock-phases .is-on { background: var(--ink); color: var(--paper); font-weight: 700; }
.dock a.is-done { color: #a3a3a3; }
.dock a.is-done::before { content: "✓ "; }
.is-steps .dock a.is-active { background: transparent; color: var(--ink); font-weight: 700; box-shadow: inset 0 0 0 2px var(--ink); }

.stripe-band {
  height: 36px;
  background: url("assets/stripe.png") repeat-x center / auto 100%;
}

/* ---------- the board ---------- */

.board {
  max-width: 1080px;
  margin: 28px auto 0;
  padding: 0 clamp(18px, 4.5vw, 56px);
  background-color: var(--board);
  background-image:
    radial-gradient(ellipse at 18% 4%, rgba(255, 255, 255, 0.07), transparent 38%),
    radial-gradient(ellipse at 85% 30%, rgba(255, 255, 255, 0.05), transparent 42%),
    radial-gradient(ellipse at 30% 75%, rgba(255, 255, 255, 0.04), transparent 45%);
  padding-bottom: 14px;
  border: 16px solid var(--frame);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}

.tray {
  max-width: 1080px;
  margin: 0 auto 48px;
  height: 30px;
  background: var(--frame);
  border-top: 6px solid var(--frame-dark);
  border-radius: 0 0 12px 12px;
  position: relative;
}
.tray span {
  position: absolute; top: -13px; height: 10px; border-radius: 3px;
  background: var(--chalk);
}
.tray span:nth-child(1) { left: 12%; width: 54px; }
.tray span:nth-child(2) { left: 20%; width: 34px; background: var(--cream); transform: rotate(-3deg); }
.tray span:nth-child(3) { right: 14%; width: 70px; height: 16px; top: -19px; background: #8f8f8f; border-radius: 4px; }

/* ---------- hero ---------- */

.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
  padding: clamp(40px, 7vw, 80px) 0 clamp(24px, 4vw, 40px);
}
.hero--mascot { grid-template-columns: 1fr auto; }
.hero-mascot {
  width: 170px; height: 170px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper);
}
.hero-mascot img { width: 96px; }
.hero--poster { grid-template-columns: 1fr; gap: 22px; padding-top: clamp(32px, 5vw, 56px); justify-items: center; text-align: center; }
.hero--poster .photo { order: -1; width: min(320px, 100%); padding: 7px 7px 10px; }
.hero--poster .lead { max-width: none; }
/* lecture intro: a small title on top, then the character saying today's goal */
.hero--guide {
  display: block; padding-top: clamp(32px, 5vw, 56px);
  margin-bottom: 30px; border-bottom: 2px dashed var(--chalk-line);
}
.hero--guide h1 {
  margin: 0; color: var(--cream);
  font-family: inherit; font-size: 14px; font-weight: 500; letter-spacing: 2px; line-height: 1.65;
}
.say { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; margin: 28px 0 30px; }
.say .hero-mascot { order: 2; }
.say .hero-art { order: 2; width: 280px; max-width: 100%; height: auto; }
.say .hero-mascot { width: 150px; height: 150px; }
.bubble { position: relative; }
.bubble h2 {
  margin: 12px 0 0;
  font-weight: 700; letter-spacing: -0.3px; line-height: 1.3;
  font-size: clamp(24px, 3.2vw, 36px);
}
.bubble .goals { display: block; margin-top: 18px; }
.bubble .goals li { border-top: 0; padding: 4px 0; font-size: 17px; }
.bubble .goals li::before { display: inline-block; margin: 0 10px 0 0; font-size: 18px; }
.hero--guide > .note { margin-top: 0; }
.uses { margin-top: 22px; }
.uses .pills { margin-top: 8px; }
.uses .pills li { font-size: 15px; padding: 6px 16px; }
.hero--guide { padding-bottom: 30px; }
/* the course name is in the site header now: kept for screen readers only */
.hero--guide .hero-top { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.guide-intro { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; margin-top: 20px; }
.guide-intro h2 { margin-top: 0; }
.eyebrow { font-size: 14px; font-weight: 500; letter-spacing: 2px; color: var(--cream); }
h1 { font-size: clamp(28px, 3.8vw, 44px); line-height: 1.25; font-weight: 500; margin: 14px 0 18px; }
.lead { font-size: 19px; color: var(--chalk-soft); max-width: 30em; }

.btn {
  display: inline-block; margin-top: 28px;
  padding: 12px 26px; border-radius: 999px; border: 0;
  background: var(--chalk); color: var(--ink);
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--cream); }
.card .btn { margin-top: 12px; padding: 9px 18px; font-size: 15px; }

.photo {
  position: relative;
  padding: 10px 10px 14px;
  background: var(--paper);
  border-radius: 4px;
  transform: rotate(1.5deg);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
.hedgehog { animation: bob 2.4s ease-in-out infinite; }
.hedgehog--photo { position: absolute; left: 8%; bottom: 8%; width: 17%; }

/* ---------- sections on the board ---------- */

.room {
  margin: 22px 0; padding: clamp(24px, 3.6vw, 40px);
  background: var(--box); border-radius: 18px;
}

.tag {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 999px;
  background: var(--cream);
  font-size: 14px; font-weight: 500; letter-spacing: 1px; color: var(--ink);
}
h2 { font-size: clamp(21px, 2.6vw, 28px); line-height: 1.35; font-weight: 500; margin: 14px 0 20px; }
h2.big { font-size: clamp(24px, 3.4vw, 38px); }
h3 { font-size: 18px; line-height: 1.35; font-weight: 500; }
.sub { color: var(--chalk-soft); margin: 6px 0 20px; }
.sub + .sub { margin-top: -14px; }
.note { margin-top: 22px; color: var(--chalk-soft); }
.note b, .sub b { color: var(--chalk); }

/* ---------- layout helpers ---------- */

.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.cols-wide-left { grid-template-columns: 1.35fr 1fr; }
.cols-wide-right { grid-template-columns: 1fr 1.35fr; }

.cards { display: grid; gap: 16px; }
.cards-2 { grid-template-columns: 1fr 1fr; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
/* shared sections show only the cards for the course they are pulled into */
body[data-course="space"] [data-course="storage"], body[data-course="storage"] [data-course="space"] { display: none; }
body[data-course="house"] [data-course="storage"], body[data-course="storage"] [data-course="house"], body[data-course="space"] [data-course="house"] { display: none; }
body[data-course] .prep-cards { grid-template-columns: 1fr 1fr; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }

/* chalk-outlined box */
.card {
  background: var(--card-dark);
  border: 2px solid var(--chalk-line);
  border-radius: 14px;
  padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.card p { color: var(--chalk-soft); }
.card-list { margin: 4px 0 0; padding: 0; list-style: none; color: var(--chalk-soft); }
.card-list li { position: relative; padding-left: 14px; line-height: 1.65; }
.card-list li + li { margin-top: 10px; }
.card-list li::before { content: "–"; position: absolute; left: 0; }
.card-list b { display: block; color: var(--chalk); }
/* what to bring: a plain list with small dots, nothing to tick */
.prep-list { margin: 10px 0 0; padding: 0; list-style: none; }
.prep-list li { position: relative; padding-left: 18px; line-height: 1.65; }
.prep-list li + li { margin-top: 8px; }
.prep-list li::before { content: ""; position: absolute; left: 2px; top: 0.66em; width: 7px; height: 7px; border-radius: 50%; background: var(--chalk-yellow); }
.step { font-size: 13px; font-weight: 500; letter-spacing: 1px; color: var(--cream); }
code {
  padding: 6px 10px; border-radius: 8px;
  background: var(--chalk-faint); color: var(--chalk);
  font: 13px/1.4 "SFMono-Regular", Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}
.card code { margin-top: auto; }

/* paper note stuck on the board */
.card--note, .prompt {
  background: var(--paper); color: var(--ink);
  border: 0; border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}
.card--note p, .card--note li { color: var(--ink-soft); }
.card--note .step { color: var(--label); }
.card--note code { background: #e0e0e0; color: var(--ink); }
.card--warn { border-color: var(--cream); }

.plain li { padding: 5px 0 5px 18px; position: relative; }
.plain li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.goals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 8px; }
.goals li { border-top: 2px solid var(--chalk-line); padding-top: 14px; font-weight: 500; font-size: 18px; }
.goals li::before { content: "✓"; display: block; color: var(--cream); font-size: 22px; margin-bottom: 4px; }

.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 12px; align-items: stretch; }
.flow-4 { grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; margin-bottom: 28px; }
.arrow {
  align-self: center; width: 26px; height: 16px; background: var(--chalk-soft);
  clip-path: polygon(0 30%, 60% 30%, 60% 0, 100% 50%, 60% 100%, 60% 70%, 0 70%);
}

/* ---------- cycle diagram ---------- */

.cycle-steps { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: stretch; }
.cycle-node {
  padding: 16px 18px;
  background: var(--card-dark);
  border: 2px solid var(--chalk-line); border-radius: 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.cycle-node p { font-size: 15px; line-height: 1.5; color: var(--chalk-soft); }
.cycle-node .step { font-size: 12px; color: var(--cream); }
.cycle-arrow { width: 40px; height: auto; align-self: center; opacity: 0.85; }
/* the same three steps, played out twice with a real request: each lap is one row under the step it belongs to */
/* each step is a column that runs down through both prompts; the prompts are the rows, named on the left */
.laps { position: relative; padding-bottom: 18px; }
.laps .cycle-steps { grid-template-columns: 78px minmax(0, 1fr) 40px minmax(0, 1fr) 40px minmax(0, 1fr); position: relative; }
.lane { position: absolute; top: 0; bottom: 0; width: calc((100% - 208px) / 3); border: 2px solid var(--chalk-line); border-radius: 14px; background: var(--card-dark); }
.lane--1 { left: 88px; }
.lane--2 { left: calc((100% - 208px) / 3 + 148px); }
.lane--3 { left: calc((100% - 208px) / 3 * 2 + 208px); }
.laps .cycle-node { border: 0; background: none; }
.lap { align-items: center; margin-top: 12px; padding-top: 18px; border-top: 1px dashed var(--chalk-line); }
.lap-label { font-size: 14px; line-height: 1.5; color: var(--cream); }
.lap > :not(.cycle-arrow):not(.lap-label) { margin: 0 12px; }
.lap .prompt { padding: 12px 14px; }
.lap .prompt-text { font-size: 14px; line-height: 1.6; }
.lap-wait { display: grid; justify-items: center; gap: 6px; padding: 8px 4px; text-align: center; }
.lap-wait img { width: 28px; height: 28px; }
.lap-wait p { font-size: 14px; color: var(--chalk-soft); }
.lap-dots { display: inline-flex; gap: 5px; }
.lap-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--chalk-soft); animation: lap-dot 1.2s ease-in-out infinite; }
.lap-dots i:nth-child(2) { animation-delay: 0.2s; }
.lap-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes lap-dot { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }
.invite { padding: 14px 12px 16px; border-radius: 10px; background: #f6efe0; color: var(--ink); text-align: center; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35); }
.invite-art { display: block; width: 100%; max-width: 170px; height: auto; margin: 0 auto 6px; overflow: visible; }
.invite-title { font-size: 15px; font-weight: 500; }
.invite-date { margin-top: 3px; font-size: 12px; font-weight: 500; }
.invite-place { margin-top: 1px; font-size: 12px; color: var(--ink-soft); }
.invite-title, .invite-date, .invite-place, .invite-hint { display: block; }
/* second lap: night colours, and a postcard under the cake that shows the invitation text when pressed */
.invite--night { position: relative; overflow: hidden; padding-top: 30px; padding-bottom: 9px; background: radial-gradient(circle at 7% 22%, rgba(255, 255, 255, 0.85) 1px, transparent 1.5px), radial-gradient(circle at 93% 27%, rgba(255, 255, 255, 0.85) 1px, transparent 1.5px), radial-gradient(circle at 5% 48%, rgba(255, 255, 255, 0.85) 1px, transparent 1.5px), radial-gradient(circle at 95% 52%, rgba(255, 255, 255, 0.85) 1px, transparent 1.5px), radial-gradient(circle at 9% 70%, rgba(255, 255, 255, 0.85) 1px, transparent 1.5px), radial-gradient(circle at 91% 74%, rgba(255, 255, 255, 0.85) 1px, transparent 1.5px), radial-gradient(circle at 50% 17%, rgba(255, 255, 255, 0.85) 1px, transparent 1.5px), #26314f; color: #f6efe0; }
.invite--night > :not(.roof-lights):not(.roof-city) { position: relative; }
.invite--night .invite-place { color: rgba(246, 239, 224, 0.75); }
.roof-lights { position: absolute; left: 0; top: 0; width: 100%; height: 26px; }
.roof-bulb { animation: bulb 1.8s ease-in-out infinite alternate; }
.roof-bulb:nth-child(odd) { animation-delay: -0.9s; }
@keyframes bulb { from { opacity: 0.55; } to { opacity: 1; } }
.roof-city { position: absolute; left: 0; bottom: 0; width: 100%; height: 52px; }
.invite--night .invite-art { margin: 12px auto 0; }
.invite--night .invite-post { margin-top: 0; }
.invite-post-open .invite-place { color: var(--ink-soft); }
.invite-post { display: grid; width: 100%; margin-top: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.invite-post > span { grid-area: 1 / 1; transition: opacity 0.4s ease, transform 0.4s ease; }
.invite-post-closed { display: grid; justify-items: center; align-content: center; gap: 6px; }
.invite-post-closed svg { animation: post-nudge 2.4s ease-in-out infinite; }
@keyframes post-nudge { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-5deg); } 88% { transform: rotate(4deg); } }
.invite-post-open { padding: 12px 10px; border-radius: 6px; background: #f6efe0; color: var(--ink); opacity: 0; transform: translateY(8px) scale(0.94); }
.invite-post.is-open .invite-post-closed { opacity: 0; transform: scale(0.85); }
.invite-post.is-open .invite-post-open { opacity: 1; transform: none; }
.invite-hint { font-size: 11px; opacity: 0.8; }
.invite-balloon { animation: balloon 4s ease-in-out infinite alternate; }
.invite-balloon--b { animation-delay: -2s; }
@keyframes balloon { from { transform: translateY(2px); } to { transform: translateY(-3px); } }
.invite-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flame 0.5s ease-in-out infinite alternate; }
.invite-flame--b { animation-delay: -0.25s; }
@keyframes flame { from { transform: scale(1, 1); } to { transform: scale(0.8, 1.2); } }
@media (prefers-reduced-motion: reduce) { .invite-balloon, .invite-flame, .lap-dots i, .roof-bulb { animation: none; } .invite-post > span { transition: none; } .invite-post-closed svg { animation: none; } }
/* the way back from the last step to the first: only the arrow goes round */

.compare-title { margin: 40px 0 12px; padding-top: 28px; border-top: 1px solid var(--chalk-faint); }
.compare td:last-child, .compare thead th:last-child { color: var(--chalk); font-weight: 500; }
.compare thead th:nth-child(2) { color: var(--chalk-soft); }
.compare .group th {
  padding-top: 20px; border-bottom-width: 2px;
  font-size: 13px; letter-spacing: 2px; color: var(--cream);
}

/* ---------- the three tools as a picture diagram ---------- */

.roles { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 6px; align-items: start; }
.role { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 10px; text-align: center; }
.role-art { width: 100px; height: auto; margin-bottom: 4px; }
.role > p:not(.step) { color: var(--chalk-soft); }
.role-link { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 24px; }
.role-arrow { width: 44px; height: auto; opacity: 0.85; }
.role-verb { font-size: 13px; color: var(--chalk-soft); white-space: nowrap; }
/* who does what, drawn around "me" in the middle; picture, label and name sit together as one block */
.roles--me { align-items: stretch; margin-top: 8px; }
.roles--me .role { padding: 0; }
.role-head { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; height: 100%; padding: 22px 16px 20px; border: 2px solid var(--chalk-line); border-radius: 14px; background: var(--card-dark); }
.role-head > p:not(.step) { margin-top: 6px; font-size: 14px; line-height: 1.6; color: var(--chalk-soft); }
.roles--me .role-art { width: auto; height: 78px; margin-bottom: 6px; }
.roles--me .role-link { align-self: center; margin-top: 0; }
.role-arrow--back { transform: scaleX(-1); }
.svc-row { display: flex; align-items: center; gap: 8px; }
.role .svc-row { justify-content: center; }
/* a small light chip holding the service's own logo (files supplied by the user) */
.svc {
  flex: none; width: 26px; height: 26px; border-radius: 7px;
  display: grid; place-items: center;
  background: var(--chalk); color: var(--ink); font-size: 14px; line-height: 1;
}

.svc--logo { width: 28px; height: 28px; background: #fff; object-fit: contain; overflow: hidden; }
.svc--pad { padding: 4px; }

/* ---------- setup, one tool per wide panel ---------- */

.setup-list { display: grid; gap: 16px; }
.card.setup { display: grid; grid-template-columns: 220px 1fr; gap: 30px; align-items: start; padding: 24px 26px; }
.card.setup--solo { grid-template-columns: 1fr; }
.setup-intro { gap: 12px; margin: 6px 0 20px; }
.setup-intro .sub { margin: 0; }
.setup-side { display: flex; flex-direction: column; gap: 8px; }
.setup-side p:not(.step) { font-size: 15px; }
.checklist--steps { counter-reset: setup-step; margin-top: 0; }
.checklist--steps li { counter-increment: setup-step; }
.checklist--steps li + li { margin-top: 9px; }
.checklist--steps label span::before { content: counter(setup-step) ". "; color: var(--cream); }
/* a small drawing of the app's input area, pointing at the folder button */
.app-mock { margin: 16px 0 4px; display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 16px; align-items: center; }
.app-mock-ui { padding: 14px; border-radius: 12px; background: #faf9f5; color: #3d3b38; }
.app-mock-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.app-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid #d9d6cf; border-radius: 8px; background: #fff; font-size: 14px; }
.app-chip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app-chip--hit { outline: 3px solid #d97757; outline-offset: 3px; }
.app-mock-input { padding: 10px 12px; border: 1px solid #d9d6cf; border-radius: 10px; background: #fff; font-size: 14px; color: #a39f97; }
.app-mock figcaption { font-size: 15px; color: var(--chalk-soft); }
.checklist--steps li > .app-mock { margin: 10px 0 16px 30px; }
.app-mock-ui--split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.app-mock-chat { display: grid; align-content: start; gap: 8px; font-size: 12px; line-height: 1.5; }
.app-mock-ui .app-mock-me { justify-self: end; max-width: 95%; padding: 6px 9px; border-radius: 10px; background: #ebe8e0; color: #3d3b38; }
.app-mock-ui .app-mock-ai { color: #6b6862; }
.app-mock-view { display: grid; grid-template-rows: auto 1fr; border: 1px solid #d9d6cf; border-radius: 8px; overflow: hidden; background: #fff; }
.app-mock-bar { padding: 3px 8px; border-bottom: 1px solid #d9d6cf; background: #f1efe9; font-size: 11px; color: #8a867e; }
.app-mock-page { display: grid; place-items: center; min-height: 84px; font-size: 16px; font-weight: 500; }
.setup-help, .setup-done { margin-top: 14px; padding: 10px 14px; font-size: 15px; border-radius: 10px; }
.setup-help { background: rgba(255, 255, 255, 0.06); color: var(--chalk-soft); }
.setup-done { margin-top: 8px; border: 1px solid var(--chalk-line); color: var(--chalk); }
.card .setup-help, .card .setup-done { color: var(--chalk-soft); }
.setup-help b, .setup-done b { display: block; margin-bottom: 2px; font-size: 12px; letter-spacing: 1px; color: var(--cream); }

/* ---------- checklists ---------- */

.checklist { margin-top: 10px; }
.checklist li + li { margin-top: 6px; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.checklist input, .lab-toggles input { flex: none; width: 20px; height: 20px; margin: 4px 0 0; accent-color: var(--cream); }
.checklist input:checked + span { opacity: 0.5; text-decoration: line-through; }
.card--note .checklist input { accent-color: var(--ink); }

/* ---------- prompts ---------- */

/* every prompt sits in the same full-width row, directly above the example it produces */
.prompt-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 16px; margin-top: 24px; }
.prompt { padding: 18px 22px 22px; }
/* the request on the left, what it produced on the right */
.ask { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.15fr); gap: 18px; align-items: center; margin-top: 24px; }
.ask-prompts { display: grid; gap: 14px; }
/* a prompt shown on its own, with no result beside it */
/* a second part inside one intro section: the example in 바이브코딩이란?, the roles in 가이드 소개 */
.vibe-demo, .guide-roles { margin-top: 56px; }
.vibe-sub { font-size: 22px; margin-bottom: 10px; }
/* a short line above a section heading: plain words, not the section-name pill */
.section-kicker { margin: 0 0 6px; color: var(--chalk-yellow); font-size: 16px; }
/* the house kit, shown on the house course introduction */
.kit-block { margin: 34px 0 30px; }
.kit-block .sub { margin-top: 0; }
.kit-shot { display: block; width: 100%; height: auto; margin: 22px 0 0; border-radius: 14px; }
.ask--solo { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.prompt[hidden] { display: none; }
.ask-notes[hidden] { display: none; }
.ask-notes .tips { margin-top: 18px; }
.ask-switch { margin-top: 24px; margin-bottom: 0; }
.ask-switch + .ask { margin-top: 14px; }
.result-arrow { display: block; width: 40px; height: auto; opacity: 0.85; }
.ask-result { min-width: 0; }
.ask-result .shelf { grid-template-columns: repeat(2, 1fr); }
.ask-notes { margin-top: 20px; }
.ask-notes > .sub { margin-top: 6px; }
.tips--row { display: grid; grid-auto-flow: column; grid-template-rows: auto auto; grid-template-columns: repeat(3, 1fr); column-gap: 24px; margin-bottom: 4px; }
.tips--row dd { margin-bottom: 0; }
.prompt-head { margin-bottom: 8px; font-size: 13px; font-weight: 500; letter-spacing: 1px; color: var(--label); }
.prompt-text { font-size: 17px; line-height: 1.7; }

.tips dt { font-size: 18px; font-weight: 500; }
.tips dd { margin: 2px 0 16px; color: var(--chalk-soft); }

.steps { counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 14px 44px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -4px;
  font-size: 26px; font-weight: 500; color: var(--cream);
}

.tip {
  margin-top: 28px; padding: 18px 22px 22px;
  border: 2px solid var(--cream); border-radius: 14px;
  background: rgba(0, 0, 0, 0.16);
}
.tip-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-size: 13px; font-weight: 500; letter-spacing: 3px; color: var(--cream);
}
.tip-icon { width: 24px; height: 24px; }
.tip > h3 { margin-bottom: 14px; }
.tip > p { color: var(--chalk-soft); }
.tip > p b { color: var(--chalk); }
.tip > p + p { margin-top: 12px; }
.tip-list { margin: 0; padding-left: 1.1em; color: var(--chalk-soft); }
.tip-list li + li { margin-top: 8px; }
.tip-list b { color: var(--chalk); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pills li { padding: 5px 14px; border-radius: 999px; border: 1px solid var(--chalk-line); font-size: 14px; font-weight: 500; }

/* ---------- live example: a tiny room built from the four materials ---------- */

.lab {
  display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 36px; align-items: start;
  margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--chalk-faint);
}

.lab-stage {
  position: relative; height: 320px; overflow: hidden;
  display: grid; place-items: end center;
  padding-bottom: 76px;
  background: var(--night); color: var(--chalk);
  border-radius: 6px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  transition: background 0.4s ease;
}
.lab-title { position: absolute; left: 20px; top: 14px; font-size: 20px; }
.lab-sky { position: absolute; left: 0; top: 0; width: 100%; height: 60%; }
.lab-sky, .art-moon, .art-stars { transition: opacity 0.4s ease; }
.lab-pet { width: 96px; height: auto; animation: bob 2.4s ease-in-out infinite; position: relative; }
.lab-rug {
  position: absolute; left: 50%; bottom: 64px; width: 190px; height: 38px;
  transform: translateX(-50%); border-radius: 50%;
  background: rgba(242, 242, 242, 0.35);
}
.lab-btn {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  padding: 7px 20px; border-radius: 999px; border: 0;
  background: var(--chalk); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
}
/* the house the character lives in: night sky outside, and the inside warms up when the lamp is on */
.room-house { position: absolute; left: 5%; right: 5%; top: 44px; bottom: 60px; z-index: 1; }
.house-shape { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.house-fill { fill: #2b2d42; transition: fill 0.4s ease; }
.house-line { fill: none; stroke: #c8c8c8; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.house-roof { stroke-width: 4; }
.lab-stage.is-lit .house-fill { fill: #fff0bd; }
.video-stage.is-bg .house-fill { fill: rgba(43, 45, 66, 0.45); }
.video-stage.is-bg.is-lit .house-fill { fill: rgba(255, 240, 189, 0.45); }
.lab-pet, .art-me, .lab-rug, .tv, .room-door, .lab-btn { z-index: 2; }
.enter, .mute { z-index: 3; }
/* a lamp hanging from the roof; the whole lamp is the button, and its pull cord is the switch */
.light-switch { position: absolute; left: 50%; top: 4px; width: 44px; height: 70px; margin-left: -22px; padding: 0; border: 0; background: none; color: #c8c8c8; cursor: pointer; }
.light-switch::before { content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 24px; margin-left: -1px; background: currentColor; }
.light-switch::after { content: ""; position: absolute; left: 4px; top: 22px; width: 36px; height: 22px; background: #e9e5d4; clip-path: polygon(24% 0, 76% 0, 100% 100%, 0 100%); transition: background 0.2s ease; }
.light-pull { position: absolute; left: 66%; top: 44px; width: 1.5px; height: 11px; background: currentColor; transition: height 0.15s ease; }
.light-pull::after { content: ""; position: absolute; left: 50%; top: 100%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: currentColor; }
.light-switch:active .light-pull { height: 16px; }
.lab-stage.is-lit .light-switch { color: #2a2728; filter: drop-shadow(0 8px 12px rgba(242, 193, 78, 0.9)); }
.lab-stage.is-lit .light-switch::after { background: #f2c14e; }
.light-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lab-stage.is-lit .lab-rug { background: rgba(42, 39, 40, 0.14); }

/* CSS switched off: everything falls back to the browser's plain defaults */
.lab-stage.no-css, .lab-stage.no-css * { all: revert; }
.lab-stage.no-css { background: #fff; color: #000; padding: 12px; min-height: 320px; }
.lab-stage.no-css .lab-rug, .lab-stage.no-css .house-shape { display: none; }
.lab-stage.no-css .light-switch::before, .lab-stage.no-css .light-switch::after, .lab-stage.no-css .light-pull::after { content: none; }
.lab-stage.no-svg .lab-sky, .lab-stage.no-svg .lab-pet, .lab-stage.no-svg .house-shape { display: none; }

/* 스케치: a book's landing page after saeharu.com 1F 하루끝그림일기, drawn in code */
.lab-stage.sketch-1f { display: block; height: auto; aspect-ratio: 900 / 510; padding: 0; }
.sk-scene { display: block; width: 100%; height: 100%; }
.sk-btn { bottom: 4%; }
@media (max-width: 560px) { .sk-btn { padding: 5px 14px; font-size: 13px; } }

/* 이미지 & 애니메이션: the same page with the drawn layers (each a 900×510 sheet, stacked) */
.lab-stage.day-stage { display: block; height: auto; aspect-ratio: 900 / 510; padding: 0; background: #45465f; }
.day-float, .day-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.day-float { --lift: -13.7%; transform: translateY(var(--lift)); }
.day-stage .day-float { animation: day-float 5s ease-in-out infinite; }
.day-stage .day-moon { animation: day-glow 3.6s ease-in-out infinite; }
.day-stage .day-star { animation: twinkle 2.6s ease-in-out infinite; }
/* the brush pivots on its handle (x 595, y 335); each of its three dabs opens a flower.
   One flower drawing (x 566, y 282) is reused three times, the copies moved across the calendar */
.day-brush { transform-origin: 66.1% 65.7%; }
.day-flower { transform-origin: 62.9% 55.3%; opacity: 0; }
.day-flower--2 { translate: -6.2% -6.3%; }
.day-flower--3 { translate: -5.1% 7.5%; }
.day-stage .day-brush { animation: day-dab 4.8s ease-in-out infinite; }
.day-stage .day-flower--1 { animation: day-bloom-1 4.8s ease-in-out infinite; }
.day-stage .day-flower--2 { animation: day-bloom-2 4.8s ease-in-out infinite; }
.day-stage .day-flower--3 { animation: day-bloom-3 4.8s ease-in-out infinite; }
@keyframes day-float { 0%, 100% { transform: translateY(var(--lift)); } 50% { transform: translateY(calc(var(--lift) - 1.8%)); } }
@keyframes day-glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(242, 210, 122, 0)); } 50% { filter: drop-shadow(0 0 8px rgba(242, 210, 122, 0.8)); } }
@keyframes day-dab {
  0%, 12%, 32%, 52%, 100% { transform: rotate(0); }
  4%, 24%, 44% { transform: rotate(-12deg); }
  8%, 28%, 48% { transform: rotate(4deg); }
}
@keyframes day-bloom-1 { 0%, 8% { opacity: 0; transform: scale(0.2); } 14%, 85% { opacity: 1; transform: scale(1); } 95%, 100% { opacity: 0; transform: scale(1); } }
@keyframes day-bloom-2 { 0%, 28% { opacity: 0; transform: scale(0.2); } 34%, 85% { opacity: 1; transform: scale(0.8); } 95%, 100% { opacity: 0; transform: scale(0.8); } }
@keyframes day-bloom-3 { 0%, 48% { opacity: 0; transform: scale(0.2); } 54%, 85% { opacity: 1; transform: scale(0.9); } 95%, 100% { opacity: 0; transform: scale(0.9); } }

/* the room with hand-drawn files in place of the code drawings */
.art-moon { position: absolute; left: 81%; top: 5%; width: 10%; animation: float 4s ease-in-out infinite; }
.art-stars { position: absolute; left: 17%; top: 2%; width: 18%; animation: twinkle 2.6s ease-in-out infinite; }
.art-me { width: 104px; position: relative; animation: bob 2.4s ease-in-out infinite; }

/* the finished room, reused for the video and music examples */
.room-art {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  display: grid; place-items: end center; padding-bottom: 76px;
}
.has-tv .room-art { place-items: end start; padding-left: 14%; }
.has-tv .lab-rug { left: 25%; width: 150px; }
.tv {
  position: absolute; right: 12%; top: 118px; width: 40%;
  padding: 7px 7px 12px; border-radius: 10px;
  background: #17171c; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}
.tv::before, .tv::after {
  content: ""; position: absolute; bottom: -16px; width: 7px; height: 18px;
  background: #17171c; border-radius: 0 0 3px 3px;
}
.tv::before { left: 18%; transform: rotate(14deg); }
.tv::after { right: 18%; transform: rotate(-14deg); }
.tv-screen {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px;
  background: #23253a; display: grid; place-items: center;
}
.tv-screen video, .frame-embed, .frame-embed iframe {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: 0;
}
.tv-screen video { object-fit: cover; display: none; }
.frame-embed { display: none; }
.room-stage.has-clip video { display: block; }
.room-stage.has-clip .frame-empty, .video-stage.is-embed .frame-empty { display: none; }
.video-stage.is-embed video { display: none; }
.video-stage.is-embed .frame-embed { display: block; }
.frame-empty { display: none; }
.frame-empty { font-size: 13px; font-weight: 500; color: var(--chalk-soft); }
/* the same clip laid behind the whole room */
.bg-clip { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; display: none; filter: brightness(0.55); transition: filter 0.4s ease; }
.video-stage.is-bg:not(.is-embed) .bg-clip { display: block; }
/* a YouTube player stretched to cover the room; it cannot be clicked */
.bg-embed { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; display: none; pointer-events: none; filter: brightness(0.55); transition: filter 0.4s ease; }
.bg-embed iframe { position: absolute; left: 50%; top: 50%; height: 130%; aspect-ratio: 16 / 9; min-width: 130%; border: 0; transform: translate(-50%, -50%); }
.video-stage.is-bg.is-embed .bg-embed { display: block; }
.video-stage.is-bg.is-lit .bg-embed { filter: none; }
.ask-switches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.ask-switches .seg { margin: 0; }
.ask-switches + .ask { margin-top: 14px; }
.video-stage.is-bg.is-lit .bg-clip { filter: none; }
.video-stage.is-bg .tv { display: none; }
/* a photo dropped in as it is, and the same photo with its background removed */
.cut-demo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.cut-demo figure { margin: 0; }
/* a photo shown as the result of a prompt: the box keeps the photo's proportions */
.ask-result .cut-box { height: auto; aspect-ratio: 650 / 457; }
.ask-result .cut-out { width: 46%; }
.cut-box {
  position: relative; height: 210px; overflow: hidden; border-radius: 6px;
  background: var(--night); display: grid; place-items: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
/* the photo fills the box like object-fit: cover, and the chalk marks are placed in the photo's own coordinates */
.cut-box--photo { container-type: size; }
.photo-canvas { position: absolute; left: 50%; top: 50%; width: max(100cqw, 100cqh * 650 / 457); aspect-ratio: 650 / 457; transform: translate(-50%, -50%); }
.photo-canvas > img:first-child { display: block; width: 100%; height: 100%; }
.photo-doodles { position: absolute; left: 0; top: 0; width: 100%; height: 100%; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.55)); }
/* the child's greeting, in a chalk speech bubble whose tail points down at her head (x 30%, y 52%) */
.photo-bubble {
  position: absolute; left: 39%; top: 31%; margin: 0; padding: 7px 13px;
  border: 2px solid var(--chalk); border-radius: 18px; background: rgba(42, 39, 40, 0.55);
  font-family: "Hakgyoansim Bunpil", "Noto Sans KR", sans-serif; font-size: 16px; font-weight: 500; line-height: 1.25;
  white-space: nowrap; color: var(--chalk);
}
.photo-bubble::after {
  content: ""; position: absolute; left: 12px; bottom: -10px; width: 16px; height: 16px;
  border: solid var(--chalk); border-width: 0 0 2px 2px; background: inherit; border-radius: 0 0 0 3px;
  transform: rotate(-30deg) skewX(10deg);
}
/* the untouched photo, with rabbits hopping about on its grass */
.bunny-track { position: absolute; left: 100%; top: 68%; animation: bunny-run 8s linear infinite; }
.bunny-track--far { top: 51%; animation-duration: 11s; animation-delay: -5s; }
@keyframes bunny-run { 0%, 100% { transform: translateX(4px); } 38%, 56% { transform: translateX(-104px); } 94% { transform: translateX(4px); } }
.bunny-turn { display: block; animation: bunny-turn 8s linear infinite; }
.bunny-track--far .bunny-turn { animation-duration: 11s; animation-delay: -5s; }
@keyframes bunny-turn { 0%, 55.99% { transform: scaleX(1); } 56%, 100% { transform: scaleX(-1); } }
.bunny { display: block; width: 28px; height: auto; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25)); animation: bunny-hop 0.26s ease-out infinite alternate; }
.bunny-track--far .bunny { width: 16px; animation-duration: 0.3s; }
@keyframes bunny-hop { from { transform: translateY(0) rotate(4deg); } to { transform: translateY(-9px) rotate(-8deg); } }
.cut-plain { width: 64%; height: auto; }
.cut-rug { display: none; position: absolute; left: 50%; bottom: 26px; width: 190px; height: 26px; margin-left: -95px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
/* under the sea, drawn in code; the cut-out photo drifts by inside a soap bubble */
.sea { display: block; background: linear-gradient(#5fb6d6 0%, #2f7fb4 45%, #173f73 100%); }
.sea-rays { position: absolute; left: -10%; top: -20%; width: 120%; height: 120%; background: repeating-linear-gradient(105deg, rgba(255, 255, 255, 0.12) 0 14px, rgba(255, 255, 255, 0) 14px 54px); mask-image: linear-gradient(#000, transparent 75%); -webkit-mask-image: linear-gradient(#000, transparent 75%); }
.soap {
  position: absolute; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.95) 0 5%, rgba(255, 255, 255, 0) 17%),
    radial-gradient(circle at 70% 78%, rgba(255, 255, 255, 0.5) 0 4%, rgba(255, 255, 255, 0) 14%),
    radial-gradient(circle, rgba(255, 255, 255, 0) 56%, rgba(255, 255, 255, 0.22) 72%, rgba(190, 225, 255, 0.5) 100%);
  box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.6), inset -5px -7px 16px rgba(120, 190, 255, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.45);
}
.soap--big { left: 0; top: 0; width: 100%; height: 100%; animation: wobble 3.2s ease-in-out infinite; }
.bubble-ride { position: absolute; left: 54%; top: 46%; width: 128px; height: 128px; margin: -64px 0 0 -64px; animation: ride 6s ease-in-out infinite; }
/* one fish keeps trying to pop the bubble; it rides along so the jab always lands */
.sea-poker { position: absolute; right: 100%; top: 56%; width: 40px; height: auto; margin-right: -2px; overflow: visible; animation: poke 3.2s ease-in-out infinite; }
@keyframes poke {
  0%, 100% { transform: translateX(-24px); }
  40% { transform: translateX(-30px) rotate(-4deg); }
  52% { transform: translateX(1px); }
  60% { transform: translateX(-12px) rotate(-10deg); }
  74% { transform: translateX(-20px) rotate(5deg); }
}
@keyframes wobble {
  0%, 51%, 86%, 100% { transform: none; }
  56% { transform: scale(0.94, 1.06); }
  64% { transform: scale(1.04, 0.96); }
  74% { transform: scale(0.98, 1.02); }
}
@keyframes ride { 0%, 100% { transform: translate(-10px, 6px) rotate(-3deg); } 50% { transform: translate(10px, -6px) rotate(3deg); } }
.sea-fish { position: absolute; left: 0; height: auto; animation: swim linear infinite; }
.sea-fish--a { top: 14%; width: 38px; animation-duration: 13s; }
.sea-fish--b { top: 58%; width: 30px; animation-duration: 17s; animation-delay: -6s; }
.sea-fish--c { top: 34%; width: 22px; animation-duration: 21s; animation-delay: -12s; }
@keyframes swim { from { transform: translateX(340px); } to { transform: translateX(-70px); } }
.sea-jelly { position: absolute; right: 8%; top: 40%; width: 30px; height: auto; animation: jelly 5s ease-in-out infinite; }
@keyframes jelly { 0%, 100% { transform: translateY(8px); } 50% { transform: translateY(-10px); } }
.sea-weed { position: absolute; left: 0; bottom: 0; width: 100%; height: 44px; }
.air { position: absolute; bottom: -10px; width: 7px; height: 7px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.75); animation: rise 5s linear infinite; }
.air--a { left: 18%; }
.air--b { left: 24%; width: 5px; height: 5px; animation-duration: 6.5s; animation-delay: -2s; }
.air--c { left: 74%; animation-duration: 7s; animation-delay: -4s; }
@keyframes rise { to { transform: translateY(-240px); } }
.sea .cut-plain { position: absolute; left: 18%; top: 12%; width: 64%; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); }
.cut-out { width: 170px; height: auto; }
.sea .cut-out { position: absolute; left: 50%; top: 50%; width: 88px; margin: -32px 0 0 -44px; }
/* the same cut-out on a beach */
.beach { background: linear-gradient(#b9d6ee, #dcebf5 46%); display: block; }
.beach-sun { position: absolute; right: 12%; top: 12%; width: 34px; height: 34px; border-radius: 50%; background: #fff3c4; }
.beach-sea { position: absolute; left: 0; top: 44%; width: 100%; height: 22%; background: linear-gradient(#5d93c9, #86b6dd); }
.beach-sand { position: absolute; left: 0; bottom: 0; width: 100%; height: 38%; background: #e9dcb8; }
.beach-sand::before {
  content: ""; position: absolute; left: 0; top: -15px; width: 100%; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='16' viewBox='0 0 120 16'%3E%3Cpath d='M0 8 Q30 0 60 8 T120 8 V16 H0Z' fill='%23e9dcb8'/%3E%3C/svg%3E") repeat-x left bottom / 120px 16px;
  animation: wave 5s linear infinite;
}
@keyframes wave { to { background-position-x: -120px; } }
.beach-sun { animation: swelter 2.4s ease-in-out infinite; }
@keyframes swelter { 0%, 100% { box-shadow: 0 0 0 3px rgba(255, 243, 196, 0.35); } 50% { box-shadow: 0 0 0 11px rgba(255, 243, 196, 0.2); } }
/* small bathers far behind, by the water */
.beach-people { position: absolute; right: 6px; bottom: 62px; width: 100px; height: 54px; overflow: visible; }
.beach-swimmer { animation: bathe 2.6s ease-in-out infinite alternate; }
.beach-swimmer--b { animation-delay: -1.3s; }
@keyframes bathe { to { transform: translateY(1.5px); } }
.beach-parasol { position: absolute; left: 50%; bottom: 30px; width: 120px; height: 150px; margin-left: -150px; }
.sunbed { position: absolute; left: 50%; bottom: 12px; width: 210px; height: 90px; margin-left: -105px; }
/* the photo is tipped back so the legs lie flat on the bed and the back meets the backrest */
.beach-kid { position: absolute; left: 50%; bottom: 16px; width: 150px; margin-left: -86px; }
.beach .cut-out { display: block; width: 150px; transform: rotate(-11deg); transform-origin: 23% 78%; }
.sweat { position: absolute; width: 6px; height: 6px; border-radius: 0 50% 50% 50%; background: #7cc4f5; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7); opacity: 0; animation: sweat 2.2s ease-in infinite; }
.sweat--a { left: 12px; top: 12px; }
.sweat--b { left: 47px; top: 16px; animation-delay: -0.8s; }
.sweat--c { left: 22px; top: 2px; animation-delay: -1.5s; }
@keyframes sweat {
  0% { opacity: 0; transform: translateY(0) rotate(45deg) scale(0.5); }
  20% { opacity: 1; transform: translateY(2px) rotate(45deg) scale(1); }
  80% { opacity: 1; transform: translateY(16px) rotate(45deg) scale(1); }
  100% { opacity: 0; transform: translateY(22px) rotate(45deg) scale(0.8); }
}
.gull-track { position: absolute; left: 0; width: 100%; animation: glide linear infinite; }
.gull-track--a { top: 10%; animation-duration: 11s; }
.gull-track--b { top: 24%; animation-duration: 15s; animation-delay: -7s; animation-direction: reverse; }
@keyframes glide {
  0% { transform: translate(-40px, 6px); }
  50% { transform: translate(50%, -6px); }
  100% { transform: translate(100%, 4px); }
}
.gull { display: block; width: 30px; height: auto; overflow: visible; }
.gull-track--b .gull { width: 20px; }
.gull-wing { fill: none; stroke: #4f6077; stroke-width: 3; stroke-linecap: round; transform-origin: 20px 12px; animation: flap 0.7s ease-in-out infinite alternate; }
.gull-wing--r { animation-name: flap-r; }
@keyframes flap { from { transform: rotate(-16deg); } to { transform: rotate(26deg); } }
@keyframes flap-r { from { transform: rotate(16deg); } to { transform: rotate(-26deg); } }
/* and on a snowy hill, riding a sled pulled by Rudolph */
.snow { background: linear-gradient(#8fa3bd, #c9d5e3 70%); display: block; }
.snow-fall { position: absolute; left: 0; top: -60px; width: 100%; height: calc(100% + 60px); background: radial-gradient(circle, #fff 1.6px, transparent 2px) 0 0 / 46px 52px, radial-gradient(circle, rgba(255,255,255,.8) 1.2px, transparent 1.6px) 20px 24px / 38px 44px; animation: snowfall 6s linear infinite; }
@keyframes snowfall { to { transform: translateY(52px); } }
.snow-hill { position: absolute; left: -70%; bottom: -62%; width: 240%; height: 100%; border-radius: 50%; background: #fff; }
.snow-hill--back { left: 30%; bottom: -44%; width: 110%; background: #e6edf5; }
.snowman { position: absolute; left: 50%; bottom: 106px; width: 50px; height: auto; margin-left: 76px; }
.sleigh-track { position: absolute; left: 0; bottom: 66px; width: 100%; height: 110px; animation: sleigh-run 9s linear infinite; }
@keyframes sleigh-run { from { transform: translateX(-230px); } to { transform: translateX(100%); } }
/* rise and tilt follow the curve of the hill */
.sleigh { position: relative; width: 230px; height: 110px; transform-origin: 50% 100%; animation: sleigh-hill 9s linear infinite; }
@keyframes sleigh-hill {
  0% { transform: translateY(34px) rotate(-17deg); }
  10% { transform: translateY(20px) rotate(-12deg); }
  20% { transform: translateY(11px) rotate(-8deg); }
  30% { transform: translateY(5px) rotate(-5deg); }
  40% { transform: translateY(1px) rotate(-2.5deg); }
  50% { transform: translateY(0) rotate(0deg); }
  60% { transform: translateY(1px) rotate(2.5deg); }
  70% { transform: translateY(5px) rotate(5deg); }
  80% { transform: translateY(11px) rotate(8deg); }
  90% { transform: translateY(20px) rotate(12deg); }
  100% { transform: translateY(34px) rotate(17deg); }
}
.sleigh-art { position: absolute; left: 0; top: 0; width: 230px; height: 110px; overflow: visible; }
.snow .cut-out { position: absolute; left: 0; bottom: 2px; width: 104px; transform: rotate(-11deg); transform-origin: 23% 78%; }
.deer-leg { transform-box: fill-box; transform-origin: 50% 0; animation: trot 0.45s ease-in-out infinite alternate; }
.deer-leg--b { animation-direction: alternate-reverse; }
@keyframes trot { from { transform: rotate(-24deg); } to { transform: rotate(24deg); } }
.deer-glow { opacity: 0.15; animation: nose 1.2s ease-in-out infinite alternate; }
@keyframes nose { to { opacity: 0.6; } }
@media (prefers-reduced-motion: reduce) {
  .bubble-ride, .soap--big, .sea-poker, .sea-fish, .sea-jelly, .air, .snow-fall, .beach-sand::before, .beach-sun, .beach-swimmer, .gull-track, .gull-wing, .sleigh, .deer-leg, .deer-glow { animation: none; }
  .sweat { animation: none; opacity: 1; }
  .bunny, .bunny-turn { animation: none; }
  .bunny-track { animation: none; transform: translateX(-70px); }
  .sleigh-track { animation: none; transform: translateX(calc(50% - 115px)); }
}
/* three short prompts, each above the scene it makes */
.cut-demo--ask figure { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
.prompt--mini { padding: 14px 16px 16px; }
.prompt--mini .prompt-head { margin-bottom: 4px; }
.prompt--mini .prompt-text { font-size: 15px; line-height: 1.6; }
.result-arrow--down { width: 30px; margin: 6px auto; transform: rotate(90deg); }
.cut-demo figcaption { margin-top: 10px; font-size: 15px; color: var(--chalk-soft); }
.cut-demo figcaption b { display: block; color: var(--chalk); }
.cut-demo + .compare-title, .ask + .compare-title { margin-top: 30px; }
.compare-title--plain { padding-top: 0; border-top: 0; }
.cut-demo + .tips { margin-top: 26px; }
.cut-demo + .tips + .tips { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--chalk-faint); }
/* the .env file as it looks when opened */
.envfile { background: var(--card-dark); border: 2px solid var(--chalk-line); border-radius: 14px; padding: 16px 20px 18px; }
.envfile pre { margin: 6px 0 0; overflow-x: auto; }
.envfile code { display: block; padding: 0; background: none; color: var(--chalk); font-size: 15px; line-height: 1.9; white-space: pre; }
.envfile code i { font-style: normal; color: var(--cream); opacity: 0.75; }
.envfile-note { margin-top: 12px; font-size: 14px; color: var(--chalk-soft); }
.has-clip-note { display: none; }

.enter {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  display: grid; place-items: center;
  background: rgba(24, 25, 38, 0.82);
  transition: opacity 0.6s ease;
}
.enter-btn { position: static; transform: none; padding: 10px 28px; font-size: 17px; }
.sound-stage.is-open .enter { opacity: 0; pointer-events: none; }
.mute {
  position: absolute; right: 12px; top: 12px;
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--chalk-line);
  background: rgba(24, 25, 38, 0.6); color: var(--chalk);
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.mute[hidden], .seg-reset[hidden] { display: none; }
.seg-reset {
  margin-top: 16px; padding: 7px 16px; border-radius: 999px;
  border: 1px solid var(--chalk-line); background: transparent; color: var(--chalk-soft);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}

/* 폰트: the drawn page with its title set in a Google web font (only the title's glyphs are loaded) */
.font-stage .lab-title { z-index: 2; margin: 0; font-family: "Gowun Batang", serif; font-weight: 700; font-size: 22px; left: 5%; top: 6%; color: var(--chalk); }
/* everything steps down to leave the title room */
.font-stage .day-moon, .font-stage .day-star { transform: translateY(18%); }
.font-stage .day-float { --lift: -8%; }
/* a title set in the chalk face, kept by the rooms after the font example */
.has-font .lab-title {
  font-family: "Hakgyoansim Bunpil", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-weight: 400; font-size: 28px; letter-spacing: 0.5px;
}
/* a door that leads somewhere else: what makes the page a landing page */
.room-door {
  position: absolute; left: 10%; bottom: 62px; width: 52px; height: 92px;
  border: 2px solid rgba(42, 39, 40, 0.55); border-radius: 26px 26px 2px 2px;
  background: var(--paper);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.room-door::after {
  content: ""; position: absolute; right: 8px; top: 52%; width: 7px; height: 7px;
  border-radius: 50%; background: var(--ink);
}
.room-door:hover { transform: translateY(-2px); box-shadow: 0 0 18px rgba(255, 244, 200, 0.55); }
.door-label {
  position: absolute; left: 0; top: 100%; margin-top: 8px;
  font-size: 12px; white-space: nowrap; color: var(--chalk);
}
.has-door .room-art { padding-left: 26%; }
.has-door .lab-rug { left: 38%; }
.has-door .tv { width: 36%; }

.seg { display: inline-flex; margin-bottom: 4px; border: 2px solid var(--chalk-line); border-radius: 999px; overflow: hidden; }
.seg button {
  padding: 8px 18px; border: 0; background: transparent; color: var(--chalk-soft);
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
}
.seg button.is-on { background: var(--chalk); color: var(--ink); }

#basics .lab { margin-top: 26px; padding-top: 0; border-top: 0; }
.lab-toggles { margin-top: 4px; }
.lab-toggles li { padding: 12px 0; border-bottom: 1px solid var(--chalk-faint); }
.lab-toggles label { display: grid; grid-template-columns: 20px 110px 1fr; gap: 12px; align-items: start; cursor: pointer; }
.lab-toggles span { color: var(--chalk-soft); }
.lab-toggles span b { color: var(--chalk); }
.lab-toggles .lab-file { margin: 8px 0 0 32px; display: flex; flex-wrap: wrap; gap: 6px; }
.lab-toggles code { display: inline-block; }
.lab-toggles code.file { background: var(--cream); color: var(--ink); }
.lab-toggles li.is-off b, .lab-toggles li.is-off span { opacity: 0.45; }

/* ---------- lecture B: a tiny storehouse (table on the left, site on the right) ---------- */

.db-demo {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start;
  margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--chalk-faint);
}
.db-demo h3 { margin-bottom: 12px; }
.db-demo .table-wrap { margin-bottom: 12px; }
.db-table { min-width: 0; font-size: 15px; }
.db-table th, .db-table td { padding: 9px 10px; }
.db-table tbody tr { transition: background 0.2s ease; }
.db-table tbody tr:hover, .db-table tbody tr.is-hot { background: var(--chalk-faint); }
.db-table tbody tr.is-off td { opacity: 0.45; }
.db-table input { width: 18px; height: 18px; accent-color: var(--cream); cursor: pointer; }
.db-table tbody tr.is-new { animation: pop 0.5s ease; }
.seg-reset:disabled { opacity: 0.4; cursor: default; }

.shelf { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.lab .shelf { grid-template-columns: repeat(3, 1fr); }
.item {
  background: var(--paper); color: var(--ink);
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pop 0.4s ease;
}
.item.is-hot { outline: 3px solid var(--cream); }
a.item { display: block; text-decoration: none; transition: transform 0.15s ease; }
a.item:hover { transform: translateY(-3px); }
.item-link { margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-table .db-link { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-art { height: 92px; background: var(--night); display: grid; place-items: center; }
.item-art img { max-height: 70px; max-width: 70%; width: auto; }
.item-body { padding: 10px 12px 12px; }
.item-title { font-size: 15px; font-weight: 500; line-height: 1.35; }
.item-meta { margin-top: 2px; font-size: 12px; color: var(--label); }
.shelf-empty { grid-column: 1 / -1; padding: 24px 0; color: var(--chalk-soft); }
.shelf-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.lab > div:first-child { min-width: 0; }
.lab--wide { grid-template-columns: 1.5fr 1fr; }
.tip--flush { margin-top: 0; }

.upload-open { position: static; transform: none; margin-bottom: 14px; }
.modal {
  width: min(420px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 14px;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal::backdrop { background: rgba(20, 20, 24, 0.6); }
.upload-form { display: grid; gap: 14px; padding: 24px; }
.modal-title { font-size: 20px; font-weight: 500; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-name { font-size: 12px; font-weight: 500; letter-spacing: 1px; color: var(--label); }
.field input[type="text"], .field input[type="url"], .field select {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid #bdbdbd; border-radius: 8px;
  background: #fff; color: var(--ink); font: inherit; font-size: 15px;
}
.field input[type="file"] { width: 100%; font: inherit; font-size: 13px; color: var(--ink-soft); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.modal .seg-reset { margin-top: 0; border-color: #bdbdbd; color: var(--ink-soft); }
.upload-btn { position: static; transform: none; height: 38px; padding: 0 22px; background: var(--ink); color: var(--paper); }
.unfurl-form { display: flex; gap: 8px; margin-bottom: 10px; }
.unfurl-form input {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px;
  border: 1px solid var(--chalk-line); border-radius: 8px;
  background: var(--paper); color: var(--ink); font: inherit; font-size: 15px;
}
.unfurl-btn { position: static; transform: none; height: 40px; padding: 0 20px; }
.unfurl-btn:disabled { opacity: 0.6; cursor: default; }
.unfurl-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.unfurl-presets button {
  padding: 4px 12px; border-radius: 999px; border: 1px solid var(--chalk-line);
  background: transparent; color: var(--chalk-soft); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.unfurl-presets button:hover { border-color: var(--cream); color: var(--chalk); }
.item.is-loading .item-art { background: #4a4d66; }
.item.is-loading .item-title, .item.is-loading .item-meta { color: var(--label); }
.upload-log { margin-bottom: 12px; font-size: 14px; font-weight: 500; color: var(--cream); }
.upload-log[hidden] { display: none; }

@keyframes pop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- table ---------- */

.table-wrap { overflow-x: auto; margin-bottom: 28px; }
table { width: 100%; min-width: 560px; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--chalk-line); }
thead th { color: var(--cream); border-bottom-width: 2px; }
tbody th { font-weight: 500; white-space: nowrap; }
tbody td { color: var(--chalk-soft); }

.guide-title { margin: 32px 0 14px; padding-top: 24px; border-top: 1px solid var(--chalk-faint); }
h2 + .guide-title { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---------- details ---------- */

details { border-top: 1px solid var(--chalk-line); }
details summary {
  cursor: pointer; padding: 16px 28px 16px 0; position: relative;
  font-size: 18px; font-weight: 500; list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 24px; font-weight: 400; color: var(--cream); }
details[open] summary::after { content: "−"; }
details > p, details > ol { padding-bottom: 16px; color: var(--chalk-soft); }
details > ol { margin-top: 14px; }
.qa:last-child { border-bottom: 1px solid var(--chalk-line); }
.more { margin-top: 28px; }

/* ---------- doors to each lecture ---------- */

.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.doors--3 { grid-template-columns: repeat(3, 1fr); }
.doors--3 .door h3 { font-size: 19px; }
.doors--pair { grid-template-columns: repeat(2, 1fr); }
.doors--trio { grid-template-columns: repeat(3, 1fr); }
.title-sub { font-size: 13px; letter-spacing: 0.2px; opacity: 0.72; margin-bottom: -4px; }
.door .title-sub { color: var(--chalk); }
.bubble .title-sub { margin: 12px 0 -6px; }
.kit-download { margin: 22px 0 26px; }
/* how long a course takes: a small chip on the card and in the introduction */
.duration {
  align-self: flex-start; width: fit-content; margin-top: 6px;
  padding: 3px 12px; border: 1px solid var(--chalk-line); border-radius: 999px;
  color: var(--chalk); font-size: 14px;
}
.door .duration { color: var(--chalk); opacity: 1; }
.bubble .duration { margin-top: 14px; }

/* the foot of the public pages: how to ask */
.contact { padding: 44px 0 16px; text-align: center; }
.contact .lead { max-width: none; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 22px; }
.contact-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 24px; border: 2px solid var(--chalk-line); border-radius: 999px;
  color: var(--chalk); font-weight: 500; text-decoration: none;
}
.contact-btn:hover { border-color: var(--cream); background: var(--chalk-faint); }
.contact-btn svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-legal { margin-top: 28px; font-size: 14px; color: var(--chalk-soft); }
.contact-legal span { margin: 0 6px; }

/* the small print: privacy.html */
.policy { font-size: 13.5px; line-height: 1.6; color: var(--chalk-soft); }
.policy .lead { font-size: 14px; line-height: 1.6; max-width: none; }
.policy h3 { margin: 22px 0 4px; font-size: 14px; color: var(--chalk); }
.policy li { padding: 1px 0 1px 14px; }
.policy li::before { top: 9px; width: 4px; height: 4px; }
.policy .sub { margin: 4px 0 0; }

/* the front page: one block per way of working together */
.offer > .lead { margin-top: 18px; max-width: 34em; }
.offer > p:not(.tag):not(.lead) { margin-top: 12px; max-width: 40em; }
.offer > .doors { margin-top: 30px; }
.offer > p b { background: linear-gradient(transparent 58%, var(--chalk-yellow) 58%); }
/* two small chalkboards: the drawing tells them apart, not the colour */
.doors--pair .door { background: var(--board) !important; }
.door-art { display: block; width: 240px; max-width: 100%; height: auto; margin: 0 auto 14px; }
/* what comes after the courses: a slimmer card across the row */
.doors .door--wide { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 20px 28px; }
.doors .door--wide .door-art { width: 112px; margin: 0; }
.doors .door--wide > div { flex: 1 1 240px; display: flex; flex-direction: column; gap: 8px; }
.doors .door--wide .go { margin-top: 0; }
.doors--3 .door { border-color: transparent; }
.doors--3 .door:nth-child(1) { background: #4b5a55; }
.doors--3 .door:nth-child(2) { background: #3f4466; }
.doors--3 .door:nth-child(3) { background: #6a4d57; }
.doors--3 .door:hover { border-color: var(--cream); filter: brightness(1.12); }
.doors--3 .door p { color: var(--chalk); opacity: 0.86; }
.doors--3 .door .step, .doors--3 .door .go { color: var(--chalk); opacity: 1; }
.door {
  display: flex; flex-direction: column; gap: 8px;
  padding: 28px; border: 2px solid var(--chalk-line); border-radius: 14px;
  text-decoration: none;
}
.door:hover { border-color: var(--cream); background: var(--chalk-faint); }
.door h3 { font-size: 20px; }
.door p { color: var(--chalk-soft); }
.door .go { margin-top: 10px; font-weight: 500; color: var(--cream); }

/* ---------- edit mode ---------- */

.clock + .clock { margin-left: 6px; }
.clock[hidden] { display: none; }
body.editing [data-edit] {
  outline: 1px dashed rgba(220, 220, 220, 0.5); outline-offset: 3px; border-radius: 3px;
  cursor: text; min-width: 1em;
}
body.editing .card--note [data-edit], body.editing .prompt [data-edit] {
  outline-color: rgba(42, 39, 40, 0.45);
}
body.editing [data-edit]:focus { outline: 2px solid var(--cream); }
body.editing .card--note [data-edit]:focus, body.editing .prompt [data-edit]:focus { outline-color: var(--ink); }
body.editing .checklist input:checked + span { opacity: 1; text-decoration: none; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 40;
  padding: 10px 20px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-size: 15px; font-weight: 500;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.toast[hidden] { display: none; }

/* ---------- motion ---------- */

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-6px) rotate(2deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hedgehog, .lab-pet, .art-moon, .art-stars, .art-me, .day-stage * { animation: none !important; }
  .day-flower { opacity: 1; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- small screens ---------- */

@media (max-width: 820px) {
  .board { border-width: 10px; margin-top: 16px; }
  body[data-course] .prep-cards { grid-template-columns: 1fr; }
  .guide-intro { grid-template-columns: 1fr; gap: 20px; }
  .say { grid-template-columns: 1fr; gap: 22px; }
  .say .hero-mascot { order: 0; }
  .hero-mascot { width: 120px; height: 120px; }
  .hero-mascot img { width: 68px; }
  .cut-demo { grid-template-columns: 1fr; }
  .hero, .cols-2, .cols-wide-left, .cols-wide-right, .cards-2, .cards-3, .lab, .lab--wide, .db-demo, .doors { grid-template-columns: 1fr; }
  .lab .shelf { grid-template-columns: repeat(2, 1fr); }
  .prompt-row { grid-auto-flow: row; }
  .ask { grid-template-columns: 1fr; }
  .ask .result-arrow { justify-self: center; transform: rotate(90deg); margin: 6px 0; }
  .tips--row { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: 1fr; }
  .files li { grid-template-columns: 1fr; gap: 2px; }
  .cards-4, .goals { grid-template-columns: 1fr 1fr; }
  .flow, .flow-4 { grid-template-columns: 1fr; }
  .arrow { justify-self: center; transform: rotate(90deg); }
  .lab-toggles label { grid-template-columns: 20px 1fr; }
  .lab-toggles label span { grid-column: 2; }
  .roles { grid-template-columns: 1fr; }
  .card.setup { grid-template-columns: 1fr; gap: 16px; }
  .app-mock { grid-template-columns: 1fr; }
  .role-link { margin: 4px auto; }
  .role-link .role-arrow { transform: rotate(90deg); margin: 10px 0; }
  .role-link .role-arrow--back { transform: rotate(-90deg); }
  .room::after, .hero--poster::before, .hero--poster::after { display: none; }
}

@media (max-width: 560px) {
  .cycle-steps { grid-template-columns: 1fr; }
  .laps .cycle-steps { grid-template-columns: 1fr; }
  .lane { display: none; }
  .laps .cycle-node { border: 2px solid var(--chalk-line); background: var(--card-dark); }
  .lap > :not(.cycle-arrow):not(.lap-label) { margin: 0; }
  .lap-corner { display: none; }
  .lap-label { margin-bottom: 4px; }
  .cycle-arrow { justify-self: center; transform: rotate(90deg); margin: 6px 0; }
}

/* ---------- the files in a project folder ---------- */

.files { background: var(--card-dark); border: 2px solid var(--chalk-line); border-radius: 14px; padding: 16px 20px 8px; }
.files-head { font-size: 13px; letter-spacing: 1px; color: var(--cream); margin-bottom: 4px; }
.files li {
  display: grid; grid-template-columns: 130px 70px 1fr; gap: 14px; align-items: baseline;
  padding: 10px 0; border-top: 1px solid var(--chalk-faint);
}
.files li:first-child { border-top: 0; }
.files span { color: var(--chalk-soft); }

/* ---------- chalk doodles and emphasis marks ---------- */

h1, .room > h2, .guide-intro h2 { font-weight: 700; letter-spacing: -0.3px; }
h1 { font-size: clamp(30px, 4vw, 46px); }
.room > h2, .guide-intro h2 { font-size: clamp(22px, 2.6vw, 29px); }
.room > h2.big { font-size: clamp(28px, 3.8vw, 44px); }

.room { position: relative; }
.room::after {
  content: ""; position: absolute; right: 22px; top: 22px; width: 50px; height: 50px;
  background: no-repeat center / contain;
  opacity: 0.5; pointer-events: none;
}
.room:nth-of-type(4n+1)::after { background-image: url("assets/doodle-star.svg"); transform: rotate(-10deg); }
.room:nth-of-type(4n+2)::after { background-image: url("assets/doodle-arrow.svg"); transform: rotate(4deg); }
.room:nth-of-type(4n+3)::after { background-image: url("assets/doodle-spiral.svg"); transform: rotate(12deg); }
.room:nth-of-type(4n)::after { background-image: url("assets/doodle-sparkle.svg"); transform: rotate(-6deg); width: 44px; height: 44px; }
.include .room::after { background-image: url("assets/doodle-house.svg"); transform: rotate(-4deg); }
.hero--poster { position: relative; }
.hero--poster::before, .hero--poster::after {
  content: ""; position: absolute; width: 60px; height: 60px;
  background: no-repeat center / contain; opacity: 0.5; pointer-events: none;
}
.hero--poster::before { left: 14%; top: 22%; background-image: url("assets/doodle-house.svg"); transform: rotate(-8deg); }
.hero--poster::after {
  right: 11%; top: 28%; width: 104px;
  background-image: url("assets/doodle-wrench.svg"), url("assets/doodle-hammer.svg");
  background-position: left center, right center; background-size: 50px auto;
  transform: rotate(6deg);
}

/* the gate: Kakao login in front of the courses */
.kakao-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px;
  background: #fee500; color: rgba(0, 0, 0, 0.85);
  font-weight: 500; text-decoration: none;
}
.kakao-btn:hover { filter: brightness(0.96); }
.kakao-btn svg { flex: none; fill: #000; }
.kakao-btn[hidden] { display: none; }
.kakao-btn--small { padding: 6px 12px; border-radius: 8px; font-size: 14px; white-space: nowrap; }
.kakao-btn--small svg { width: 16px; height: 16px; }
.gate-note {
  margin: 0 0 24px; padding: 14px 18px; border: 2px dashed var(--chalk-yellow); border-radius: 12px;
  color: var(--chalk-yellow);
}
.gate-note[hidden] { display: none; }
.topbar-who { align-self: center; color: var(--label); font-size: 14px; white-space: nowrap; }
a.clock { text-decoration: none; white-space: nowrap; }

/* mypage.html: one line per class or consultation */
.mine-log[hidden] { display: none; }
.log { margin-top: 18px; }
.log li { display: flex; gap: 18px; padding: 10px 0 10px 18px; border-bottom: 1px solid var(--chalk-faint); }
.log-date { flex: none; color: var(--chalk-soft); font-variant-numeric: tabular-nums; }
.log .log-none { color: var(--chalk-soft); border-bottom: 0; }
.mine-note { margin-top: 18px; padding: 0 8px; font-size: 13px; line-height: 1.6; color: var(--chalk-soft); text-align: center; }
.mine-note[hidden] { display: none; }

/* ---------- print / PDF ---------- */

@page { size: A4; margin: 14mm; }

/* the lobby: no chalkboard, just the wall */
.plain .board {
  --chalk: #2a2728; --chalk-soft: #4d4a4b;
  --chalk-line: #b5b5b5; --chalk-faint: #e6e6e6;
  --cream: #5c5c5c; --title-gray: #2a2728; --box: #fff;
  background: none; border: 0; margin-top: 0; padding-bottom: 48px; color: var(--chalk);
}
.plain .tray, .plain .dockbar { display: none; }
.plain .room { box-shadow: 0 1px 0 #d9d9d9; }
.plain .tag { background: var(--paper); color: var(--ink); }
.plain .door { --chalk: #f2f2f2; --chalk-soft: #c8c8c8; --cream: #dcdcdc; color: var(--chalk); }
.plain .door h3 { color: var(--chalk); }
.plain .btn { color: #fff; }
.offer > .btn--dm { margin-top: 18px; }
.plain .room::after, .plain .hero--poster::before, .plain .hero--poster::after { filter: invert(1); }

@media print {
  .lap { display: grid !important; }
  :root {
    --wall: #fff; --board: #fff;
    --chalk: #2a2728; --chalk-soft: #4d4a4b;
    --chalk-line: #b5b5b5; --chalk-faint: #e6e6e6;
    --cream: #5c5c5c; --chalk-yellow: #2a2728; --title-gray: #2a2728;
  }
  html { scroll-behavior: auto; }
  body { font-size: 11.5pt; background: #fff; }
  .pager, .topbar, .dock, .progress, .stripe-band, .tray, .toast, .btn, .lab-btn, .seg, .seg-reset, .mute, .enter, .upload-open, .modal, .upload-log, .unfurl-form, .unfurl-presets, .clip-missing, .bgm-missing, .door .go { display: none !important; }
  .board { max-width: none; margin: 0; padding: 0; border: 0; background: #fff; }
  .hero { grid-template-columns: 1.4fr 1fr; padding: 0 0 20px; }
  .photo { transform: none; box-shadow: none; border: 1px solid #ccc; }
  .room { margin: 0; padding: 20px 0; background: none; border-radius: 0; }
  .card, .cycle-node, .files, .tip { background: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hedgehog, .lab-pet { animation: none; }
  .tag { display: block; width: fit-content; background: #e0e0e0; color: #2a2728; }
  .tag, .card--note, .prompt, .lab-stage, .marker, .doors--3 .door, thead th {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .card--note, .prompt { box-shadow: none; border: 1px solid #ccc; transform: none; }
  .lab-stage { box-shadow: none; color: #f2f2f2; }
  .room::after, .hero--poster::before, .hero--poster::after { display: none; }
  .role-art, .role-arrow, .result-arrow { filter: invert(1); }
  .svc { -webkit-print-color-adjust: exact; print-color-adjust: exact; background: #2a2728; color: #fff; }
  .cycle-arrow { filter: invert(1); }
  .table-wrap { overflow: visible; }
  table { min-width: 0; }
  a { text-decoration: none; }
  h2, h3, .tag { break-after: avoid; }
  .card, .prompt, tr, .cycle-node, .lab-stage, .door, details, .tip, li { break-inside: avoid; }
  .cols-2, .cols-wide-left, .cols-wide-right { align-items: start; }
}

/* 소개: before/now cards — time, cost, fixing */
.card-facts { margin: auto 0 0; padding-top: 12px; border-top: 1px dashed var(--chalk-line); display: grid; gap: 8px; }
.card-facts div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; }
.card-facts dt { color: var(--cream); font-size: 13px; padding-top: 2px; }
.card-facts dd { margin: 0; color: var(--chalk); }
.intro-art { width: 100%; max-width: 260px; height: auto; align-self: center; margin: 12px 0; }

/* 활용: one example page per kind */
.example-art { display: block; width: 100%; height: auto; margin: 6px 0; border-radius: 10px; }
/* the guide's own site leads; the kinds of page follow, smaller */
.example-feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: center;
  margin-bottom: 20px; padding: 24px; border-radius: 14px; background: var(--paper); color: var(--ink);
}
.example-feature .example-art { width: auto; max-width: 100%; max-height: 620px; margin: 0 auto; background: #fff; }
.example-feature .example-link { display: flex; justify-content: center; background: #fff; border-radius: 10px; }
.example-sub { margin: 8px 0 12px; font-size: 18px; }
.example-feature-text { display: flex; flex-direction: column; gap: 10px; }
.example-feature-text .step { color: var(--label); }
.example-feature-text h3 { font-size: 22px; }
.example-feature .example-feature-text p.feature-link { font-size: 14px; }
.feature-link a { color: var(--label); }
.feature-link a:hover { color: var(--ink); }
.example-feature-text p:not(.step) { color: var(--ink-soft); font-size: 17px; line-height: 1.7; }
.example-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.example-cards .card { padding: 16px; }
.example-cards h3 { font-size: 16px; }
@media (max-width: 820px) {
  .example-feature { grid-template-columns: 1fr; gap: 18px; }
  .example-feature .example-art { max-height: 480px; }
  .example-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .example-cards { grid-template-columns: 1fr; }
}
/* the course's own bar, between the site header and the menu: 수업 소개 | 교실 */
.coursebar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; background: #fff; border-bottom: 1px solid #d3d3d3;
}
.coursebar-name { margin: 0; color: var(--ink); font-size: 17px; font-weight: 700; white-space: nowrap; }
/* a course title in two parts: a small line above the name (house course) */
.coursebar-title { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.coursebar-title .title-sub { margin: 0; color: var(--label); font-size: 12px; white-space: nowrap; }
.coursebar-tabs { display: inline-flex; flex: none; border: 1px solid #bdbdbd; border-radius: 999px; overflow: hidden; }
.coursebar-tabs a { padding: 7px 18px; color: var(--label); font-size: 14px; font-weight: 500; text-decoration: none; }
.coursebar-tabs a + a { border-left: 1px solid #d3d3d3; }
.coursebar-tabs a:hover { color: var(--ink); }
.coursebar-tabs a.is-on { background: var(--ink); color: #fff; font-weight: 700; }
/* header and course bar: full-width background, contents within the board's width */
.topbar, .coursebar { padding-left: max(20px, calc((100% - 1080px) / 2)); padding-right: max(20px, calc((100% - 1080px) / 2)); }
/* 수업 소개 (one page): sections sit on the board itself, split by a chalk line instead of boxes */
.onepage .room {
  margin: 0; padding: clamp(36px, 5vw, 56px) 0;
  background: none; border-radius: 0; border-top: 2px dashed var(--chalk-line);
}
.onepage .hero + .room { border-top: 0; padding-top: 8px; }
/* 이런 분께: what the class does, next to the guide's homepage */
.example-feature-text p.feature-steps-title { margin-top: 14px; padding-top: 16px; border-top: 1px dashed #c9c4bb; color: var(--label); font-size: 14px; font-weight: 500; }
.feature-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; }
.feature-steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; column-gap: 10px; }
.feature-steps li::before {
  content: counter(step); grid-row: span 2; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700;
}
.feature-steps b { color: var(--ink); font-size: 16px; }
.feature-steps span { color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.feature-steps small { grid-column: 2; margin-top: 2px; color: var(--label); font-size: 12px; }
/* 과정 소개: the goals and "이런 페이지가 필요하다면" read as one part */
.onepage .hero--guide { margin-bottom: 0; border-bottom: 0; }
.card .prep-note { margin-top: 4px; font-size: 13px; line-height: 1.6; color: var(--chalk-soft); }
/* the contact footer under the board, on the wall, in dark ink */
.site-foot {
  --chalk: #2a2728; --chalk-soft: #4d4a4b; --chalk-line: #b5b5b5; --chalk-faint: #e6e6e6; --cream: #5c5c5c;
  max-width: 1080px; margin: 0 auto; padding: 0 20px 48px; color: var(--chalk);
}
.site-foot .contact { padding-top: 8px; }
.site-foot .contact .lead { color: var(--chalk-soft); }
/* the guide's homepage, shown on a phone */
.example-feature .phone-mock {
  display: block; justify-self: center; width: min(100%, 270px); padding: 10px;
  background: #1f1f1f; border-radius: 40px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.phone-screen {
  position: relative; display: block; aspect-ratio: 9 / 19.5; overflow: hidden;
  border-radius: 31px; background: #fff;
}
.phone-screen::before {
  content: ""; position: absolute; z-index: 1; left: 50%; top: 9px; width: 30%; height: 18px;
  transform: translateX(-50%); border-radius: 999px; background: #1f1f1f;
}
.example-feature .phone-screen .example-art {
  width: 100%; height: 100%; max-height: none; margin: 0;
  /* the house sits right of the screenshot's middle (x 274–959 of 1152); this puts it mid-screen */
  object-fit: cover; object-position: 67.7% top; border-radius: 0;
}
/* a phone-sized screenshot (9:19.5): fills the screen as it is */
.example-feature .phone-screen .example-art--full { object-position: center; }
/* a recording of a card page: show all of it, on the page's own dark */
.phone-mock--dark .phone-screen { background: #0f0f0f; }
.example-feature .phone-screen .example-art--contain { object-fit: contain; object-position: center; background: #0f0f0f; }
/* a screenshot that already has its own dark margin: show all of it, on the same dark */
.phone-mock--fit .phone-screen { background: #1b1a1f; }
/* the card in this screenshot spans x 145–1100 of 1230: enlarge so the card fills the phone's width */
.example-feature .phone-mock--fit .phone-screen .example-art {
  position: absolute; left: 50%; top: 50%; width: 127%; max-width: none; height: auto; max-height: none;
  transform: translate(-50%, -50%); background: #1b1a1f;
}
/* 신청: the invitation, with a chalk paper plane flying to a calendar */
.apply { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; }
.apply-art { width: 300px; max-width: 100%; height: auto; }
/* 신청: one card per class date */
.class-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-top: 4px; }
/* the class card is what to act on: a light card on the dark board */
.class-card {
  --chalk: #2a2728; --chalk-soft: #4d4a4b; --cream: #7a7168; --chalk-line: #d3ccc1;
  background: #f6f2ea; border-color: transparent; color: var(--chalk);
}
.class-card .step { color: #8a7f74; }
.class-card .btn { background: #2a2728; color: #fff; }
.class-card .btn:hover { background: #4d4a4b; }
.class-card .card-facts div { grid-template-columns: 52px 1fr; }
.class-card h3 { margin-bottom: 4px; }
.class-card dd a { color: inherit; }
.class-card .class-apply { margin-top: 18px; align-self: flex-start; }
.apply-ask { margin-top: 36px; }
.apply-ask .btn { margin-top: 14px; }
@media (max-width: 720px) {
  .apply { grid-template-columns: 1fr; }
  .apply-art { order: -1; width: 240px; }
}
/* the intro pages already end with 신청; the footer keeps just the buttons and small print */
.site-foot .contact > .lead { display: none; }
.coursebar-tabs[hidden] { display: none; }
