:root {
  font-family: "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
  color: #1e3445;
  background: #f4f7fb;
  font-synthesis: none;
  font-size: 20px;
  --ink: #193739;
  --green: #246657;
  --muted: #667b8d;
  --line: #dce5ec;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  min-height: 56px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 700;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  background: #eef5f2;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #307a68;
  outline-offset: 3px;
}
input,
textarea,
select {
  width: 100%;
  padding: 15px;
  border: 1px solid #becdd7;
  border-radius: 12px;
  background: #fff;
  color: #183c42;
  min-height: 56px;
}
textarea {
  resize: vertical;
  line-height: 1.8;
  min-height: 160px;
}
label {
  display: block;
  font-weight: 700;
  margin: 18px 0 9px;
}
small {
  font-size: 0.7rem;
}
header {
  max-width: 1600px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 25px 44px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 19px;
  letter-spacing: 2px;
  font-weight: 900;
  white-space: nowrap;
}
.brand small {
  display: block;
  letter-spacing: 0;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
}
.brand-icon {
  background: #183e3c;
  border-radius: 14px;
  color: #b3f3da;
  font-size: 35px;
  width: 54px;
  height: 54px;
  text-align: center;
  line-height: 52px;
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-tools > span {
  font-size: 15px;
  color: var(--muted);
}
.text-button,
.icon-button {
  background: transparent;
  border: 0;
  font-size: 16px;
}
.icon-button {
  font-size: 25px;
  padding: 8px 14px;
}
main {
  max-width: 1512px;
  margin: auto;
  padding: 42px 44px 20px;
}
.eyebrow {
  color: #367567;
  letter-spacing: 2px;
  font-weight: 800;
  font-size: 12px;
}
.heading h1 {
  font-size: clamp(28px, 2.6vw, 40px);
  letter-spacing: -1.5px;
  line-height: 1.5;
  margin: 12px 0 10px;
}
.heading h1 span {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  background: #e5efe9;
  padding: 7px 13px;
  border-radius: 7px;
  margin-left: 18px;
  vertical-align: middle;
  color: #427566;
  display: inline-block;
}
.heading p {
  color: var(--muted);
  margin: 0;
  font-size: 20px;
  line-height: 1.8;
}
nav {
  display: flex;
  gap: 10px;
  margin: 32px 0;
  overflow-x: auto;
  padding-bottom: 5px;
}
nav button {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  padding: 13px 15px;
  font-size: 16px;
  min-height: 65px;
  background: transparent;
  opacity: 1 !important;
  color: #8b9aa6;
}
nav button b {
  border-radius: 50%;
  background: #e8edf2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 14px;
}
nav button.current {
  background: #e5f0e9;
  border-color: #b0cfc0;
  color: #245d4c;
}
nav button.current b {
  color: #fff;
  background: #2b6956;
}
nav button.done {
  color: #377c68;
  border-color: #cedfd6;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(380px, 1fr) minmax(360px, 0.96fr);
  gap: 32px;
  align-items: start;
}
.lesson {
  background: #fff;
  border: 1px solid var(--line);
  padding: 34px;
  border-radius: 22px;
  box-shadow: 0 12px 36px #23405b04;
  min-width: 0;
  min-height: 610px;
}
.step-number {
  font-size: 13px;
  letter-spacing: 2px;
  color: #3b806d;
  font-weight: 800;
}
.lesson h2 {
  font-size: 30px;
  letter-spacing: -1px;
  line-height: 1.5;
  margin: 13px 0;
}
.lesson p {
  line-height: 1.85;
  color: #607789;
  margin: 14px 0 24px;
}
.primary {
  background: #245e50;
  border-color: #245e50;
  color: white;
  min-height: 62px;
  box-shadow: 0 5px 12px #245e5014;
}
.primary:hover {
  background: #174d40;
}
.wide {
  width: 100%;
  margin-top: 20px;
  text-align: center;
}
.helper {
  font-size: 16px !important;
  margin: 12px 0 !important;
  color: #6b7f8e !important;
}
.lesson-error {
  color: #ac334b !important;
  font-size: 18px;
  line-height: 1.7;
  min-height: 30px;
}
.example {
  display: block;
  text-align: left;
  background: #f0f7f4;
  border: 1px solid #dbeae1;
  border-radius: 14px;
  padding: 17px 20px;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.7;
  width: 100%;
  margin: 14px 0;
}
.example small {
  display: block;
  color: #38816a;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}
.tip {
  background: #faf8ee;
  border-radius: 12px;
  padding: 14px 17px;
  font-size: 16px;
  color: #8d7c47;
  line-height: 1.8;
}
.preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 14px;
  font-size: 16px;
  font-weight: 700;
}
.preview-heading i {
  display: inline-block;
  background: #53b795;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}
.live-tag {
  font-size: 10px;
  letter-spacing: 2px;
  color: #889ba8;
}
.config-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  margin-top: 18px;
}
.config-card h3 {
  font-size: 18px;
  margin: 0 0 14px;
}
.config-card h3 span {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: #8b9aa6;
  margin-top: 6px;
}
.config-card ul {
  margin: 0;
  padding-left: 22px;
  color: #587183;
  font-size: 16px;
  line-height: 1.9;
}
.config-card p {
  font-size: 15px;
  color: #327e64;
  line-height: 1.7;
}
.bottom-note {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 14px;
  color: #8799a7;
  margin-top: 28px;
  padding: 18px 0;
}
footer {
  max-width: 1424px;
  margin: 0 auto;
  padding: 24px 0;
  font-size: 12px;
  color: #91a1af;
  border-top: 1px solid var(--line);
}
footer span {
  float: right;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 42px;
  max-width: min(750px, 94vw);
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 30px 100px #142f4355;
}
dialog::backdrop {
  background: #0a233d88;
  backdrop-filter: blur(5px);
}
dialog h2 {
  font-size: 30px;
  line-height: 1.5;
}
dialog p,
dialog li {
  font-size: 18px;
  line-height: 1.9;
  color: #5d7587;
}
.close {
  position: absolute;
  right: 15px;
  top: 12px;
  border: 0;
  font-size: 28px;
}
.success-mark {
  background: #e4f5ec;
  color: #327f64;
  border-radius: 50%;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  font-size: 38px;
  margin: 0 auto 20px;
}
#completion {
  text-align: center;
  max-width: 620px;
}
#completion .primary {
  margin-top: 15px;
  min-width: 230px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #173f3b;
  color: white;
  z-index: 10;
  padding: 16px 24px;
  max-width: 90vw;
  border-radius: 12px;
  font-size: 16px;
  display: none;
}
#toast.show {
  display: block;
}
.code-panel {
  background: #0f1c30;
  border-radius: 15px;
  color: #bbd5e7;
  overflow: hidden;
  margin-top: 24px;
}
.code-top {
  padding: 14px 18px;
  font-size: 13px;
  background: #1a2b43;
  color: #a1b9d4;
  display: flex;
  justify-content: space-between;
}
.code-window {
  height: 270px;
  overflow: auto;
  padding: 15px 0;
  scrollbar-width: none;
}
.code-line {
  display: flex;
  font:
    14px/1.85 Consolas,
    monospace;
  white-space: pre-wrap;
  word-break: break-all;
}
.code-line i {
  width: 45px;
  flex-shrink: 0;
  text-align: right;
  padding-right: 15px;
  color: #526c8d;
  font-style: normal;
  user-select: none;
}
.code-line span {
  color: #93ddc2;
}
.code-line.comment span {
  color: #758eac;
}
.code-line.keyword span {
  color: #b9abf8;
}
.progress-track {
  height: 8px;
  background: #dfeae4;
  border-radius: 8px;
  overflow: hidden;
  margin: 20px 0 10px;
}
.progress-track i {
  display: block;
  height: 100%;
  background: #428b6d;
  width: 0;
}
.status-line {
  font-size: 16px;
  color: #4e7a69;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.final-icon {
  font-size: 45px;
}
.final-actions {
  display: grid;
  gap: 12px;
}
.save-state {
  background: #f1f6fa;
  border-radius: 12px;
  padding: 15px;
  font-size: 17px;
  line-height: 1.8;
  color: #4a6c7e;
}
.field-row {
  display: flex;
  gap: 16px;
}
.field-row > div {
  flex: 1;
  min-width: 0;
}
#adminDialog {
  width: 1180px;
  max-width: 96vw;
}
#adminContent h2 {
  margin-top: 0;
}
.admin-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.admin-toolbar > * {
  flex: 1;
  min-width: 130px;
}
.stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.stats > div {
  background: #edf5f1;
  padding: 15px;
  flex: 1;
  min-width: 110px;
  border-radius: 12px;
  font-size: 14px;
}
.stats b {
  display: block;
  font-size: 28px;
  color: #285c4f;
}
.table-wrap {
  overflow: auto;
  max-height: 400px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 16px;
  white-space: nowrap;
}
td,
th {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
th {
  background: #f0f5f8;
  position: sticky;
  top: 0;
}
td button {
  min-height: 42px;
  font-size: 14px;
  padding: 8px 12px;
}
input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-height: 22px;
}
.admin-options {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 20px;
}
.admin-options summary {
  cursor: pointer;
}
.admin-options label {
  font-size: 16px;
}
.admin-options .check {
  display: flex;
  gap: 12px;
  align-items: center;
}
.admin-detail {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    15px/1.8 Consolas,
    monospace;
  max-height: 300px;
  overflow: auto;
  background: #eff4f7;
  padding: 16px;
  border-radius: 10px;
}
.preview-frame {
  width: 100%;
  height: 75vh;
  border: 0;
  background: #071126;
}
.admin-message {
  font-size: 17px;
  color: #9e4052;
  line-height: 1.7;
}
#intro {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  text-align: center;
  overflow: hidden;
  color: #e8faff;
  background: radial-gradient(ellipse at 50% 80%, #1b4a60, #071126 65%);
}
#intro h1 {
  font-size: clamp(28px, 5vw, 48px);
}
#intro p {
  color: #a9d1dc;
}
.intro-ship {
  font-size: 100px;
  color: #a5f4e4;
  text-shadow: 0 24px 50px #79e2ff;
  animation: launch 2s ease-in-out;
}
.intro-star {
  font-size: 25px;
  color: #7d9eb7;
}
.intro-ship + h1 {
  margin-bottom: 5px;
}
#intro small {
  font-size: 10px;
  letter-spacing: 3px;
  margin-top: 25px;
  color: #7191ad;
}
@keyframes launch {
  from {
    transform: translateY(100px) scale(0.4);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
[hidden] {
  display: none !important;
}
@media (min-width: 1450px) {
  .flight canvas {
    max-height: 620px;
  }
}
@media (max-width: 1050px) {
  header {
    padding: 22px;
  }
  .header-tools > span {
    display: none;
  }
  main {
    padding: 30px 22px;
  }
  .workspace {
    gap: 20px;
    grid-template-columns: 1fr 1fr;
  }
  .lesson {
    padding: 26px;
  }
  .lesson h2 {
    font-size: 27px;
  }
  nav {
    gap: 6px;
  }
  nav button {
    font-size: 13px;
    padding: 10px;
    gap: 6px;
  }
  .heading h1 span {
    display: none;
  }
  .bottom-note {
    font-size: 12px;
  }
  footer {
    padding: 22px;
  }
}
@media (max-width: 760px) {
  :root {
    font-size: 20px;
  }
  header {
    padding: 16px;
    gap: 10px;
  }
  .brand {
    font-size: 16px;
    letter-spacing: 1px;
  }
  .brand small {
    font-size: 11px;
  }
  .brand-icon {
    height: 44px;
    width: 44px;
    font-size: 30px;
    line-height: 42px;
  }
  .header-tools {
    gap: 0;
  }
  .text-button {
    font-size: 14px;
    padding: 8px;
  }
  .icon-button {
    padding: 6px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .heading h1 {
    font-size: 30px;
  }
  .heading p {
    font-size: 18px;
  }
  main {
    padding: 26px 16px;
  }
  nav {
    margin: 24px 0;
  }
  nav button {
    min-width: 112px;
    flex: none;
  }
  .lesson {
    min-height: 0;
    padding: 26px 22px;
  }
  .lesson h2 {
    font-size: 28px;
  }
  .bottom-note {
    display: block;
    line-height: 2;
  }
  .bottom-note span {
    display: block;
  }
  .field-row {
    display: block;
  }
  dialog {
    padding: 32px 22px;
  }
  .stats b {
    font-size: 24px;
  }
  footer {
    font-size: 10px;
  }
  .config-card h3 span {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

h1,
h2,
p,
button {
  word-break: keep-all;
  overflow-wrap: break-word;
}
nav button {
  overflow-wrap: normal;
}

.intro-ship {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 20px 30px #78dcff55);
}
#intro:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 15% 25%, #e4fcff 0 1px, transparent 2px),
    radial-gradient(circle at 70% 20%, #e4fcff 0 1px, transparent 2px),
    radial-gradient(circle at 82% 65%, #adcfeb 0 1px, transparent 2px),
    radial-gradient(circle at 25% 75%, #adcfeb 0 1px, transparent 2px);
  background-size: 330px 380px;
  opacity: 0.5;
}
