@charset "UTF-8";
:root {
  --paper: #f8f7f2;
  --ink: #262a27;
  --muted: #82857f;
  --line: #dedfd6;
  --yellow: #eacf51;
  --green: #44735e;
  --editor: #222831;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 14px;
  line-height: 1.65;
}
button,
a,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button,
a,
summary {
  touch-action: manipulation;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #528c74;
  outline-offset: 4px;
}
button:hover {
  filter: brightness(0.96);
}
.site-header {
  height: 80px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4.2%;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand-en {
  font-size: 10px;
  color: #73766d;
  letter-spacing: 0.13em;
  margin-left: 7px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
  font-weight: 500;
}
.brand-symbol {
  display: grid;
  grid-template-columns: repeat(2, 9px);
  gap: 3px;
  transform: rotate(-8deg);
}
.brand-symbol i {
  height: 9px;
  background: var(--ink);
}
.brand-symbol i:last-child {
  background: var(--yellow);
}
.header-actions {
  display: flex;
  gap: 27px;
  align-items: center;
}
.lesson-label {
  font-size: 11px;
  color: #6f736d;
  letter-spacing: 0.05em;
}
.quiet-button {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  padding: 8px 0;
}
.quiet-button > span {
  display: inline-grid;
  place-content: center;
  border: 1px solid #85897e;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font: 11px var(--mono);
}
main {
  max-width: 1600px;
  padding: 37px 4.2% 0;
  margin: auto;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 32px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin: 0 0 9px;
  color: #757a6e;
}
.intro .eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #687064;
}
.eyebrow > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}
h1 {
  font-size: 45px;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin: 0;
  font-weight: 800;
}
.title-accent {
  position: relative;
  z-index: 0;
}
.title-accent:after {
  content: "";
  position: absolute;
  bottom: 1px;
  left: 0;
  right: 0;
  height: 13px;
  background: var(--yellow);
  z-index: -1;
  transform: rotate(-1.5deg);
}
.intro-copy {
  font-size: 12px;
  color: #747970;
  margin: 15px 0 0;
  letter-spacing: 0.02em;
}
.mobile-break {
  display: none;
}
.intro-note {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  padding: 20px 23px;
  transform: rotate(-1.2deg);
  background: #f1f1e8;
  max-width: 410px;
}
.note-number {
  font: 38px var(--mono);
  color: #b5b8a9;
}
.intro-note strong {
  font-size: 13px;
  font-weight: 600;
}
.intro-note p {
  font-size: 10px;
  margin: 7px 0 0;
  color: #777e70;
}
.intro-note p span {
  margin: 0 3px;
}
.note-orbit {
  font-size: 28px;
  margin-left: 13px;
  color: #758172;
}
.lab-layout {
  display: grid;
  grid-template-columns: 195px minmax(0, 1fr);
  gap: 30px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.curriculum {
  padding-top: 3px;
}
.curriculum-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.curriculum h2 {
  font-size: 12px;
  margin: 0;
  font-weight: 700;
}
.curriculum-top > span {
  font: 10px var(--mono);
  color: #858b7d;
}
.progress-track {
  height: 3px;
  background: #e5e7de;
  margin: 14px 0 24px;
}
.progress-track > div {
  height: 100%;
  background: #6a8c74;
  transition: width 0.3s;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  width: 100%;
  text-align: left;
  border-radius: 5px;
  padding: 13px 9px;
  margin-bottom: 8px;
  color: #7b8177;
}
.step-number {
  font: 11px var(--mono);
  width: 25px;
  height: 25px;
  display: grid;
  place-content: center;
  border: 1px solid #d4d8cb;
  border-radius: 50%;
  flex-shrink: 0;
}
.step-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.step-copy strong {
  font-size: 12px;
  font-weight: 600;
}
.step-copy small {
  font-size: 9px;
  color: #969b90;
}
.step.active {
  background: #e9eddf;
  color: #3a513e;
}
.step.active:before {
  content: "";
  position: absolute;
  left: -1px;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 2px;
  background: #637b52;
}
.step.active .step-number {
  background: #637b52;
  color: white;
  border-color: #637b52;
}
.step.done:not(.active) .step-number {
  color: #547a61;
  border-color: #90a28c;
}
.sidebar-note {
  border-top: 1px dashed var(--line);
  margin: 28px 8px 0;
  padding-top: 22px;
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: #808879;
}
.sidebar-note > span {
  font-size: 22px;
  line-height: 1.2;
  color: #929c80;
}
.sidebar-note p {
  font-size: 10px;
  margin: 0;
  line-height: 1.9;
}
.teacher-link {
  font-size: 10px;
  color: #7b8375;
  margin: 21px 8px;
  padding: 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}
.lesson-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 19px;
  gap: 10px;
}
.lesson-heading .eyebrow {
  font-size: 9px;
  color: #77816d;
  margin-bottom: 5px;
}
.lesson-heading h2 {
  font-size: 21px;
  margin: 0 0 6px;
  line-height: 1.4;
  letter-spacing: 0.01em;
}
.lesson-heading p:last-child {
  font-size: 11px;
  color: #7c8177;
  margin: 0;
}
.level-tag {
  border: 1px solid #d7ddca;
  border-radius: 3px;
  padding: 4px 8px;
  font-size: 9px;
  white-space: nowrap;
  color: #768367;
}
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 17px;
  align-items: stretch;
}
.editor-panel,
.preview-panel {
  border: 1px solid #dcded4;
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}
.panel-header {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid #e9ebe4;
}
.panel-header h3 {
  margin: 0;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.code-icon {
  font: 14px var(--mono);
  color: #75806c;
}
.preview-icon {
  font-size: 15px;
  color: #78866b;
}
.file-tab {
  font: 9px var(--mono);
  color: #858b7f;
  display: flex;
  align-items: center;
  gap: 5px;
}
.file-tab > span {
  width: 5px;
  height: 5px;
  background: #bdc69e;
  border-radius: 50%;
}
.editor-toolbar,
.preview-toolbar {
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  gap: 5px;
}
.editor-toolbar {
  background: #282f38;
  color: #adb6bc;
  border-bottom: 1px solid #343d48;
  font-size: 9px;
}
.editor-toolbar > div {
  display: flex;
  gap: 8px;
}
.editor-toolbar button {
  color: #aeb8c0;
  padding: 3px 2px;
  font-size: 14px;
  display: flex;
  gap: 4px;
  align-items: center;
}
.editor-toolbar button span {
  font-size: 9px;
}
.code-surface {
  height: 372px;
  display: flex;
  background: var(--editor);
  overflow: hidden;
  padding: 15px 0 0;
  position: relative;
}
.code-area {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}
.code-area pre,
.code-area textarea {
  font: 11px/22px var(--mono);
  margin: 0;
  padding: 0 16px 24px 0;
  white-space: pre;
  tab-size: 2;
  letter-spacing: 0;
  text-align: left;
  border: 0;
  border-radius: 0;
}
.code-area pre {
  color: #d8e0e6;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  min-width: 100%;
  min-height: 100%;
  width: max-content;
}
.code-area textarea {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  resize: none;
  background: transparent;
  color: transparent;
  caret-color: #f2d370;
  -webkit-text-fill-color: transparent;
  outline: 0;
  overflow: auto;
}
.code-area textarea::selection {
  background: #59728a70;
}
.code-area:focus-within {
  box-shadow: inset 2px 0 #eacf5155;
}
#line-numbers {
  font: 10px/22px var(--mono);
  color: #727e8c;
  min-width: 43px;
  white-space: pre;
  text-align: right;
  padding: 0 13px 24px 0;
  user-select: none;
  will-change: transform;
}
.syntax-tag {
  color: #e4a273;
}
.syntax-string {
  color: #acd2ac;
}
.syntax-comment {
  color: #809080;
}
.syntax-keyword {
  color: #bca9dd;
}
.syntax-number {
  color: #e8c36a;
}
.editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #282f38;
  color: #9ba6b0;
  font: 9px var(--mono);
  padding: 9px 13px;
  height: 32px;
}
.footer-dot {
  font-size: 6px;
  margin: 0 7px;
  color: #7d8b97;
}
.preview-toolbar {
  background: #fbfcf8;
  font-size: 9px;
  color: #7b8572;
}
.run-button {
  background: var(--yellow);
  border: 1px solid #d5ba41;
  border-radius: 4px;
  padding: 6px 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 0 #d6b94e44;
}
.run-button > span {
  font-size: 9px;
}
.run-button kbd {
  font: 8px var(--mono);
  color: #6c5e24;
  opacity: 0.7;
  margin-left: 5px;
}
.preview-stage {
  margin: 11px 16px 0;
  border: 1px solid #e5e6dd;
  border-radius: 5px;
  overflow: hidden;
  background: #f4f5ee;
}
.browser-chrome {
  height: 29px;
  background: #eceee5;
  border-bottom: 1px solid #dfe3d5;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  position: relative;
}
.browser-chrome > span {
  width: 5px;
  height: 5px;
  background: #c5cabe;
  border-radius: 50%;
}
.browser-chrome small {
  font: 8px var(--mono);
  letter-spacing: 0.12em;
  color: #89927d;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
#preview {
  width: 100%;
  height: 270px;
  border: 0;
  display: block;
  background: #f4f5ee;
}
.play-instructions {
  font-size: 9px;
  color: #8a9082;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 38px;
  padding: 7px 9px;
}
.keycap {
  font: 10px var(--mono);
  border: 1px solid #d9ddd0;
  border-radius: 3px;
  line-height: 17px;
  min-width: 19px;
  text-align: center;
}
.instruction-divider {
  height: 10px;
  width: 1px;
  background: #ddd;
  margin: 0 5px;
}
.preview-tip {
  display: flex;
  gap: 9px;
  justify-content: center;
  align-items: flex-start;
  margin: 10px 16px 18px;
  padding: 13px 8px;
  border-top: 1px dashed #e1e4d7;
  color: #868d7c;
}
.preview-tip > span {
  font-size: 23px;
  color: #a0ad8b;
}
.preview-tip p {
  font-size: 10px;
  line-height: 1.9;
  margin: 0;
}
.preview-tip strong {
  font-weight: 600;
  color: #6a755d;
}
.error-panel {
  margin: 12px;
  background: #fff1e9;
  color: #8b402a;
  border: 1px solid #eac7b7;
  border-radius: 4px;
  padding: 12px;
  font-size: 11px;
}
.error-panel p {
  overflow-wrap: anywhere;
  margin: 5px 0;
}
.error-panel button {
  font-size: 10px;
  text-decoration: underline;
}
.mission {
  margin-top: 17px;
  border: 1px solid #dedfce;
  border-radius: 6px;
  padding: 19px 20px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  background: #f2f2e7;
}
.mission-marker {
  width: 31px;
  height: 31px;
  display: grid;
  place-content: center;
  background: #e7ead6;
  border-radius: 6px;
  color: #809056;
  font-size: 22px;
  margin-top: 2px;
  flex-shrink: 0;
}
.mission-content {
  flex: 1;
  min-width: 0;
}
.mission .eyebrow {
  font: 8px var(--mono);
  letter-spacing: 0.14em;
  color: #8a946c;
  margin-bottom: 5px;
}
.mission h3 {
  font-size: 13px;
  margin: 0 0 4px;
}
.mission-content > p:not(.eyebrow) {
  font-size: 10px;
  color: #848b78;
  margin: 0 0 9px;
}
.snippet-button {
  border: 1px solid #dddfcb;
  border-radius: 4px;
  padding: 5px 9px;
  display: inline-flex;
  gap: 18px;
  align-items: center;
  background: #f9f9f0;
  max-width: 100%;
  text-align: left;
}
.snippet-button code {
  font: 10px var(--mono);
  color: #566641;
  overflow-wrap: anywhere;
}
.snippet-button span {
  font-size: 8px;
  white-space: nowrap;
  color: #8a9474;
}
.hint {
  font-size: 10px;
  color: #7c856b;
  margin-top: 10px;
}
.hint summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  gap: 11px;
}
.hint summary::-webkit-details-marker {
  display: none;
}
.hint p {
  max-width: 600px;
  margin: 8px 0 0;
  line-height: 1.9;
}
.complete-button {
  display: flex;
  align-items: center;
  gap: 22px;
  border: 1px solid #ced4bb;
  background: #fcfcf5;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 10px;
  color: #66784e;
  flex-shrink: 0;
  align-self: center;
}
.concepts {
  display: flex;
  gap: 21px;
  align-items: center;
  color: #8b9083;
  font-size: 9px;
  margin: 16px 0 22px;
}
.concepts > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.concepts strong {
  font: 9px var(--mono);
  color: #717968;
  margin-right: 2px;
}
.concept-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.html-dot {
  background: #b2c1a2;
}
.css-dot {
  background: #e1c274;
}
.js-dot {
  background: #a5b8ca;
}
.concept-note {
  margin-left: auto;
  font-size: 9px;
}
.site-footer {
  max-width: 1600px;
  margin: 0 auto;
  padding: 17px 4.2% 23px;
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 0.05em;
  color: #999d92;
}
.site-footer > span > span {
  margin: 0 10px;
  color: #c1c4b8;
}
.site-footer:before {
  content: none;
}
dialog {
  width: min(560px, calc(100% - 30px));
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 28px 32px;
  color: var(--ink);
  box-shadow: 0 25px 90px #17231f33;
  max-height: 85dvh;
  overflow-y: auto;
}
dialog::backdrop {
  background: #19231dc0;
  backdrop-filter: blur(3px);
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-close {
  font-size: 25px;
  line-height: 1;
  padding: 4px;
}
dialog h2 {
  font-size: 22px;
  line-height: 1.5;
  margin: 13px 0 20px;
}
dialog p {
  font-size: 12px;
  color: #707966;
}
dialog ol {
  padding-left: 22px;
}
dialog li {
  padding: 7px 0;
  font-size: 12px;
}
dialog li p {
  margin: 4px 0;
}
.dialog-note {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 20px;
}
.reference-link {
  font-size: 12px;
  text-decoration: underline;
}
.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 25px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #344b3a;
  color: #fff;
  padding: 11px 22px;
  border-radius: 6px;
  font-size: 12px;
  box-shadow: 0 5px 25px #22352830;
  z-index: 5;
  max-width: 90%;
  width: max-content;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1500px) {
  .code-surface {
    height: 445px;
  }
  .code-area pre,
  .code-area textarea {
    font-size: 12px;
    line-height: 24px;
  }
  #line-numbers {
    line-height: 24px;
  }
  #preview {
    height: 340px;
  }
  .preview-tip {
    margin-top: 14px;
  }
}
@media (max-width: 1150px) {
  main {
    padding-left: 3%;
    padding-right: 3%;
  }
  .lab-layout {
    grid-template-columns: 164px minmax(0, 1fr);
    gap: 20px;
  }
  .brand-en {
    display: none;
  }
  .intro-note {
    padding: 16px;
  }
  .run-button kbd {
    display: none;
  }
  .workbench {
    gap: 12px;
  }
  .panel-header {
    padding: 0 12px;
  }
  .preview-stage {
    margin-left: 10px;
    margin-right: 10px;
  }
  .concept-note {
    display: none;
  }
  .concepts {
    gap: 15px;
  }
  .intro-copy {
    font-size: 11px;
  }
  .snippet-button {
    gap: 9px;
  }
}
@media (max-width: 900px) {
  .site-header {
    height: 65px;
  }
  .intro-note {
    display: none;
  }
  main {
    padding-top: 25px;
  }
  .intro {
    padding-bottom: 26px;
  }
  h1 {
    font-size: 38px;
  }
  .lab-layout {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 18px;
    gap: 20px;
  }
  .curriculum {
    padding: 0;
  }
  .curriculum-top {
    margin: 0 2px;
  }
  .progress-track {
    margin: 10px 0 12px;
  }
  .curriculum nav {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
  }
  .step {
    padding: 9px 7px;
    gap: 6px;
    margin: 0;
    align-items: center;
    justify-content: center;
  }
  .step-copy strong {
    font-size: 10px;
  }
  .step-copy small {
    display: none;
  }
  .step-number {
    width: 21px;
    height: 21px;
    font-size: 9px;
  }
  .sidebar-note,
  .teacher-link {
    display: none;
  }
  .step.active:before {
    top: auto;
    bottom: 0;
    left: 10px;
    right: 10px;
    width: auto;
    height: 2px;
  }
  .lesson-heading h2 {
    font-size: 20px;
  }
  .code-surface {
    height: 365px;
  }
  .site-footer {
    padding-left: 3%;
    padding-right: 3%;
  }
}
@media (max-width: 600px) {
  .site-header {
    padding: 0 20px;
  }
  .brand {
    font-size: 14px;
    gap: 9px;
  }
  .lesson-label {
    display: none;
  }
  .header-actions {
    gap: 0;
  }
  .quiet-button {
    font-size: 11px;
  }
  main {
    padding: 24px 17px 0;
  }
  h1 {
    font-size: 34px;
  }
  .intro-copy {
    line-height: 1.9;
  }
  .mobile-break {
    display: block;
  }
  .intro .eyebrow {
    font-size: 9px;
  }
  .curriculum nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
  .step {
    justify-content: flex-start;
    padding: 9px 10px;
    background: #f0f1e9;
  }
  .step-copy strong {
    font-size: 10px;
  }
  .lab-layout {
    gap: 20px;
  }
  .lesson-heading {
    align-items: flex-start;
  }
  .lesson-heading h2 {
    font-size: 19px;
  }
  .lesson-heading p:last-child {
    font-size: 11px;
    line-height: 1.8;
  }
  .level-tag {
    font-size: 8px;
    margin-top: 3px;
  }
  .workbench {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
  }
  .code-surface {
    height: 290px;
  }
  .code-area pre,
  .code-area textarea {
    font-size: 12px;
    line-height: 22px;
  }
  #preview {
    height: 280px;
  }
  .preview-tip {
    margin-top: 0;
    margin-bottom: 10px;
  }
  .run-button kbd {
    display: inline;
  }
  .preview-toolbar {
    height: 47px;
  }
  .mission {
    padding: 16px 13px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .mission-marker {
    width: 26px;
    height: 26px;
    font-size: 19px;
  }
  .mission h3 {
    font-size: 13px;
  }
  .mission-content > p:not(.eyebrow) {
    font-size: 11px;
  }
  .complete-button {
    margin-left: 36px;
    width: calc(100% - 36px);
    justify-content: space-between;
    padding: 10px 12px;
    margin-top: 3px;
  }
  .snippet-button {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .snippet-button code {
    font-size: 10px;
  }
  .snippet-button span {
    font-size: 9px;
  }
  .concepts {
    gap: 9px;
    flex-wrap: wrap;
    margin-bottom: 10px;
  }
  .concepts > span {
    gap: 4px;
    font-size: 8px;
  }
  .site-footer {
    font-size: 8px;
    padding: 18px 17px;
    display: block;
  }
  .site-footer > span {
    display: block;
    margin-bottom: 4px;
  }
  dialog {
    padding: 22px;
  }
  dialog h2 {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Keep the editor and game aligned as the responsive game resizes. */
.editor-panel {
  display: flex;
  flex-direction: column;
}
.code-surface {
  flex: 1;
  min-height: 372px;
}
.code-area {
  height: auto;
}
@media (min-width: 1500px) {
  .code-surface {
    min-height: 445px;
  }
}
@media (max-width: 900px) {
  .code-surface {
    min-height: 365px;
  }
}
@media (max-width: 600px) {
  .code-surface {
    min-height: 290px;
  }
}

#line-numbers {
  position: absolute;
  left: 0;
  top: 15px;
  width: 43px;
}
.code-area {
  margin-left: 43px;
}
.code-area pre,
.code-area textarea {
  font-size: 12px;
}

/* Classroom editor: larger type, visible controls, and no horizontal clipping. */
.workbench {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}
.editor-panel .panel-header h3 {
  font-size: 13px;
}
.editor-toolbar {
  background: #202731;
  min-height: 42px;
  height: auto;
  padding: 9px 15px;
  font-size: 11px;
}
.editor-toolbar button {
  font-size: 17px;
  padding: 3px 6px;
}
.editor-toolbar button span {
  font-size: 11px;
}
#save-state {
  min-width: 0;
}
.editor-tools {
  background: #2b3541;
  border-bottom: 1px solid #455365;
  color: #d9e2eb;
  padding: 9px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: space-between;
}
.edit-actions,
.display-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.editor-tools button {
  min-height: 30px;
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 11px;
  white-space: nowrap;
}
.editor-tools button:hover {
  background: #455568;
  filter: none;
}
.editor-tools button:disabled {
  opacity: 0.38;
}
.editor-tools .mission-jump {
  color: #e7e9b8;
  background: #455340;
}
.font-controls {
  display: flex;
  align-items: center;
  border: 1px solid #556373;
  border-radius: 4px;
}
.font-controls button {
  font-family: var(--mono);
}
.font-controls output {
  font: 11px var(--mono);
  min-width: 34px;
  text-align: center;
  color: #c8d2db;
}
.editor-tools button[aria-pressed="true"] {
  color: #e8efd2;
  background: #43543e;
  box-shadow: inset 0 0 0 1px #6e8359;
}
.editor-tools .editor-run {
  background: var(--yellow);
  color: #3f3c25;
  padding-left: 10px;
  padding-right: 10px;
}
.code-surface {
  padding: 0;
  height: 470px;
  min-height: 470px;
  overflow: hidden;
}
#code-editor {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
#code-editor .cm-editor {
  height: 100%;
}
#code-editor .cm-editor.cm-focused {
  outline: none;
  box-shadow: inset 0 0 0 2px #b0bd7355;
}
#code-editor .cm-scroller {
  height: 100%;
  scrollbar-color: #617286 #202731;
  scrollbar-width: thin;
}
#code-editor .cm-search {
  font:
    12px/1.9 -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  padding: 10px 26px 10px 10px;
}
#code-editor .cm-search input {
  max-width: 160px;
  padding: 5px 7px;
  font-size: 13px;
}
#code-editor .cm-search label {
  display: inline-flex;
  align-items: center;
  margin-right: 7px;
  white-space: nowrap;
}
#code-editor .cm-search button {
  margin-right: 3px;
  padding: 4px 6px;
  font-size: 11px;
}
#code-editor .cm-search [name="close"] {
  font-size: 22px;
}
.editor-footer {
  color: #c0cbd6;
  font-size: 10px;
  padding: 10px 13px;
  height: auto;
  min-height: 35px;
  gap: 8px;
}
#editor-help {
  font-family: inherit;
  font-size: 9px;
  color: #afbdcb;
}
body.editor-expanded {
  overflow: hidden;
}
body.editor-expanded::before {
  content: "";
  position: fixed;
  inset: 0;
  background: #151d24c9;
  z-index: 19;
  backdrop-filter: blur(3px);
}
.editor-panel.is-expanded {
  position: fixed;
  inset: 24px;
  z-index: 20;
  box-shadow: 0 24px 80px #0008;
}
.editor-panel.is-expanded .code-surface {
  height: 0;
  min-height: 0;
  flex: 1;
}
.editor-panel.is-expanded .editor-tools {
  padding: 11px 18px;
}
.editor-panel.is-expanded #editor-help {
  font-size: 11px;
}
@media (max-width: 900px) {
  .workbench {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .workbench {
    grid-template-columns: minmax(0, 1fr);
  }
  .code-surface {
    height: 400px;
    min-height: 400px;
  }
  .editor-tools {
    gap: 8px;
    padding: 9px 8px;
  }
  .editor-tools button {
    padding: 5px 6px;
    font-size: 10px;
    min-height: 34px;
  }
  .edit-actions,
  .display-actions {
    width: 100%;
    justify-content: space-between;
    gap: 2px;
  }
  .font-controls output {
    min-width: 32px;
  }
  .editor-panel.is-expanded {
    inset: 8px;
  }
  .editor-panel.is-expanded .editor-tools {
    padding: 9px 8px;
  }
  .editor-footer {
    flex-wrap: wrap;
  }
  #code-editor .cm-search input {
    max-width: 125px;
  }
}

/* A full-width class sequence leaves the whole next row for editing and play. */
.lab-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding-top: 18px;
}
.curriculum {
  padding: 0;
}
.curriculum-top {
  gap: 15px;
}
.curriculum h2 {
  font-size: 13px;
}
.curriculum-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.curriculum-actions #progress-count {
  color: #788170;
  font: 11px var(--mono);
}
.curriculum .teacher-link {
  display: inline-flex;
  margin: 0;
  gap: 9px;
  font-size: 12px;
  padding: 4px 0;
}
.curriculum nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.progress-track {
  margin: 12px 0 14px;
}
.curriculum .step {
  margin: 0;
  padding: 12px;
  background: #eff0e8;
}
.curriculum .step.active {
  background: #e4ead7;
}
.curriculum .step.active::before {
  inset: auto 12px 0;
  height: 3px;
  width: auto;
}
.curriculum .step-copy strong {
  font-size: 12px;
}
.curriculum .step-copy small {
  display: block;
}
.lesson-heading {
  margin-bottom: 15px;
}
.workbench {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 20px;
}
.code-surface {
  min-height: 620px;
  height: 620px;
}
.preview-tabs {
  display: flex;
  background: #f5f7ef;
  border-bottom: 1px solid #dee3d5;
  padding: 0 14px;
  gap: 18px;
}
.preview-tabs button {
  padding: 12px 3px;
  font-size: 12px;
  border-bottom: 3px solid transparent;
}
.preview-tabs button[aria-selected="true"] {
  color: #4f653e;
  border-color: #748757;
  font-weight: 700;
}
#hint-count {
  display: inline-grid;
  place-content: center;
  min-width: 18px;
  font: 10px var(--mono);
  border-radius: 50%;
  background: #e2e8d5;
  margin-left: 3px;
}
#hint-count:empty {
  display: none;
}
#hint-output {
  padding: 10px 17px 18px;
  max-height: 700px;
  overflow-y: auto;
}
.hint-intro {
  font-size: 12px;
  color: #7b856c;
  line-height: 1.9;
}
.coding-hint {
  border: 1px solid #dde3d0;
  border-radius: 6px;
  margin-top: 13px;
  padding: 14px;
  background: #f7f9f2;
}
.coding-hint-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.coding-hint h4 {
  font-size: 13px;
  margin: 0;
}
.coding-hint small {
  font-size: 10px;
  color: #8a947b;
  white-space: nowrap;
}
.coding-hint p {
  font-size: 11px;
  color: #7a856b;
  line-height: 1.9;
}
.coding-hint pre {
  margin: 12px 0;
  background: #26302d;
  color: #e4edce;
  padding: 13px;
  border-radius: 4px;
  font: 13px/1.9 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.hint-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.hint-actions button {
  font-size: 11px;
  padding: 6px 9px;
  border: 1px solid #d1d9c0;
  border-radius: 4px;
  background: #fff;
}
.hint-actions .copy-hint {
  background: #e5eacb;
  color: #546a37;
  border-color: #cdd8ad;
}
@media (max-width: 1000px) {
  .curriculum nav {
    gap: 7px;
  }
  .curriculum .step {
    padding: 10px 7px;
    gap: 7px;
  }
  .curriculum .step-copy strong {
    font-size: 11px;
  }
}
@media (max-width: 700px) {
  .curriculum nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .curriculum .step-copy small {
    display: none;
  }
  .curriculum-actions {
    gap: 15px;
  }
  .workbench {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
  }
  .code-surface {
    height: 480px;
    min-height: 480px;
  }
  .coding-hint {
    padding: 12px;
  }
}
