:root {
  font-family: Silkscreen, monospace;
  color: #f2eedc;
  background: #23312d;
  --ink: #192620;
  --paper: #f2eedc;
  --green: #b4df87;
  --blue: #94c9da;
  --orange: #f4b471;
  --pink: #dca2b7;
  --muted: #b9c5b7;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100dvh;
  background-image: radial-gradient(#80948324 1px, transparent 1px);
  background-size: 20px 20px;
}
button,
input {
  font: inherit;
}
button,
a.primary {
  font-weight: 800;
  font-size: 14px;
  min-height: 46px;
  border: 2px solid var(--ink);
  border-radius: 0;
  box-shadow: 3px 3px 0 #101c17;
  background: var(--paper);
  color: var(--ink);
  padding: 12px 16px;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  transition:
    background 0.1s,
    translate 0.1s;
}
button:hover {
  background: var(--green);
}
button:active {
  translate: 2px 2px;
  box-shadow: 1px 1px 0 #101c17;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 4px solid var(--orange);
  outline-offset: 4px;
}
button.selected {
  background: var(--green);
}
.quiet {
  background: transparent;
  color: var(--paper);
  box-shadow: none;
  border-color: #6a7a6d;
  font-size: 12px;
  padding: 9px 12px;
}
.quiet:hover {
  color: var(--ink);
}
header {
  max-width: 1480px;
  margin: auto;
  padding: 22px 30px;
  border-bottom: 2px solid #657969;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
header > div {
  display: flex;
  gap: 10px;
}
.brand {
  display: grid;
  grid-template-columns: 40px auto;
  column-gap: 12px;
  align-items: center;
  letter-spacing: 1px;
  font-weight: 900;
  font-size: 23px;
  text-decoration: none;
}
.brand img {
  width: 40px;
  height: 40px;
  grid-row: span 2;
  image-rendering: pixelated;
}
.brand small {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1.5px;
  margin-top: 5px;
}
.skip {
  position: fixed;
  top: -90px;
  left: 10px;
  background: var(--green);
  color: var(--ink);
  padding: 14px;
  z-index: 20;
}
.skip:focus {
  top: 10px;
}
main {
  max-width: 1420px;
  margin: 0 auto;
  padding: 28px 30px;
  min-height: calc(100dvh - 165px);
}
footer {
  max-width: 1480px;
  margin: auto;
  padding: 20px 30px;
  border-top: 2px solid #657969;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 11px;
  color: var(--muted);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
.eyebrow {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  color: var(--green);
}
.home-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 50px;
  align-items: center;
  padding: 20px 0 34px;
}
.home-top h1 {
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.06;
  letter-spacing: -3px;
  margin: 16px 0 20px;
}
.home-top h1 span {
  color: var(--green);
}
.home-top p {
  font-size: 17px;
  line-height: 1.7;
  max-width: 650px;
  color: #d3dccf;
}
.little-story {
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 #132119;
  background: var(--paper);
  color: var(--ink);
  padding: 24px;
  rotate: 2deg;
}
.little-story h2 {
  font-size: 18px;
  margin-bottom: 20px;
}
.story-scene {
  display: grid;
  grid-template-columns: 1fr 30px 1fr;
  gap: 10px;
  align-items: center;
}
.story-arrow {
  font-size: 28px;
}
.story-block {
  padding: 18px 10px;
  background: var(--green);
  border: 3px solid var(--ink);
  text-align: center;
  font-weight: bold;
}
.story-block svg {
  display: block;
  width: 42px;
  height: 42px;
  margin: 0 auto 10px;
}
.story-screen {
  padding: 12px;
  border: 6px solid var(--ink);
  background: #a5c293;
  text-align: center;
  font-size: 12px;
}
.story-screen strong {
  display: block;
  font-size: 19px;
  margin: 12px 0;
}
.little-story p {
  font-size: 13px;
  margin: 20px 0 0;
  color: #435442;
}
.choose-area {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  border-top: 2px solid #657969;
  padding-top: 26px;
}
.choose-area h2 {
  font-size: 16px;
  margin-bottom: 14px;
}
.devices {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.devices button {
  background: #394b3f;
  color: var(--paper);
  font-size: 12px;
}
.devices .selected {
  background: var(--green);
  color: var(--ink);
}
.parts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.part {
  background: #394b3f;
  color: var(--paper);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px 12px;
}
.part .app-icon {
  width: 28px;
  height: 28px;
}
.part small {
  font-size: 11px;
  font-weight: normal;
  opacity: 0.8;
}
.part.selected {
  color: var(--ink);
}
.ready-card {
  background: var(--paper);
  color: var(--ink);
  padding: 24px;
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 #132119;
  align-self: start;
}
.ready-card h2 {
  font-size: 27px;
  line-height: 1.2;
}
.ready-card p {
  font-size: 14px;
  line-height: 1.7;
}
.ready-card .primary {
  background: var(--green);
  width: 100%;
  font-size: 17px;
}
.ready-card details {
  margin-top: 22px;
  border-top: 1px solid #9da98f;
  padding-top: 16px;
  font-size: 13px;
}
.ready-card summary {
  cursor: pointer;
}
.levels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}
.levels button {
  font-size: 12px;
  padding: 10px;
}
.check {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  line-height: 1.5;
}
.check input {
  width: 18px;
  height: 18px;
  accent-color: #466c38;
}
.ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.ribbon h1 {
  font-size: 21px;
  margin: 6px 0 0;
}
.ribbon .numbers {
  display: flex;
  gap: 28px;
  text-align: right;
}
.numbers small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 5px;
}
.numbers strong {
  font-size: 23px;
  color: var(--green);
}
.bip-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.bip-avatar {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  image-rendering: pixelated;
}
.bip-words {
  font-size: 15px;
  line-height: 1.6;
}
.bip-words strong {
  display: block;
  font-size: 10px;
  color: var(--orange);
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.play-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
  gap: 28px;
  align-items: start;
}
.device-panel {
  background: #34473b;
  border: 2px solid #68816c;
  padding: 22px;
  position: relative;
}
.panel-label {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}
.machine {
  border: 8px solid #101e17;
  background: #101e17;
  box-shadow: 4px 4px 0 #13211980;
  margin: 0 auto;
  max-width: 520px;
  position: relative;
}
.machine.laptop:after {
  content: "";
  display: block;
  height: 16px;
  margin: 7px -22px -16px;
  background: #8a9e8a;
  clip-path: polygon(6% 0, 94% 0, 100% 75%, 96% 100%, 4% 100%, 0 75%);
}
.machine.desktop:after {
  content: "";
  display: block;
  width: 80px;
  height: 20px;
  background: #8a9e8a;
  margin: 8px auto -25px;
  border-bottom: 6px solid #b8c6af;
}
.machine.smartphone {
  max-width: 220px;
  border-radius: 14px;
  border-width: 10px;
}
.machine.tablet {
  max-width: 380px;
  border-radius: 10px;
  border-width: 10px;
}
.screen-wrap {
  position: relative;
  touch-action: none;
}
.screen-wrap canvas {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
}
.screen-wrap.drop-target {
  outline: 5px dashed var(--orange);
  outline-offset: 5px;
}
.screen-wrap:focus-visible {
  outline: 4px solid var(--orange);
}
.effect-caption {
  margin: 32px 0 0;
  min-height: 48px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--green);
  border-top: 1px solid #68816c;
  padding-top: 16px;
}
.effect-caption.flash {
  animation: happy 0.45s steps(3);
}
@keyframes happy {
  50% {
    background: #547647;
    color: var(--paper);
  }
}
.lesson-feedback {
  margin-top: 20px;
  background: var(--green);
  color: var(--ink);
  padding: 18px;
  border: 2px solid var(--ink);
}
.lesson-feedback h2 {
  font-size: 20px;
  margin-bottom: 10px;
}
.lesson-feedback p {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 14px;
}
.lesson-feedback button {
  width: 100%;
  background: var(--paper);
}
.work-panel {
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 7px 7px 0 #132119;
  position: relative;
  min-width: 0;
}
.work-title {
  padding: 14px 20px;
  background: var(--green);
  border-bottom: 3px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.work-title h2 {
  font-size: 17px;
  margin: 0;
}
.work-title span {
  font-size: 11px;
}
.work-inner {
  padding: 22px;
}
.instruction {
  font-size: clamp(19px, 2.1vw, 26px);
  line-height: 1.35;
  margin: 0 0 16px;
  font-weight: 900;
  letter-spacing: -0.6px;
}
.action-hint {
  font-size: 12px;
  line-height: 1.7;
  color: #4c6047;
  margin: 16px 0 0;
}
.task-source {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 68px;
  align-items: center;
  margin-bottom: 22px;
}
.app-block,
.job-block,
.file-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 3px solid var(--ink);
  background: var(--orange);
  color: var(--ink);
  font-weight: bold;
  font-size: 16px;
  padding: 12px 15px;
  min-height: 64px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  position: relative;
}
.app-block .app-icon,
.file-block .app-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.app-icon {
  width: 30px;
  height: 30px;
  display: inline-block;
  flex-shrink: 0;
}
.app-block.selected,
.file-block.selected,
.job-block.selected,
.piece.selected {
  outline: 4px solid #a56524;
  outline-offset: 4px;
}
.app-block:active,
.job-block:active,
.file-block:active {
  cursor: grabbing;
}
.space-label {
  font-size: 11px;
  margin-bottom: 10px;
  color: #4c6047;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.memory-board {
  height: 176px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 0;
  border: 3px solid var(--ink);
  background: #bacbaa;
}
.memory-slot {
  background: none;
  border: 1px dashed #71866c;
  box-shadow: none;
  padding: 0;
  min-height: 0;
  font-size: 10px;
  color: #58704e;
}
.memory-slot:hover {
  background: #dbebca;
}
.memory-app {
  position: absolute;
  min-height: 0;
  height: 50%;
  font-size: 13px;
  box-shadow: none;
  border: 3px solid var(--ink);
  padding: 6px;
  gap: 5px;
  z-index: 1;
  overflow: hidden;
}
.memory-app .app-icon {
  width: 24px;
  height: 24px;
}
.out-bin {
  display: block;
  margin-top: 20px;
  border: 3px dashed #8c6652;
  background: #e9cdb7;
  color: #644a36;
  width: 100%;
  min-height: 62px;
  font-size: 14px;
  box-shadow: none;
}
.out-bin small {
  display: block;
  font-weight: normal;
  font-size: 11px;
  margin-top: 4px;
}
.core-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.core-grid.one {
  grid-template-columns: 1fr;
}
.core {
  background: #d2dfc3;
  border: 3px dashed #69875b;
  box-shadow: none;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  padding: 14px;
}
.core:disabled {
  opacity: 1;
  cursor: wait;
}
.core strong {
  font-size: 24px;
}
.core small {
  font-size: 11px;
}
.core-progress {
  height: 13px;
  background: #9eb28c;
  border: 2px solid var(--ink);
  width: 100%;
}
.core-progress i {
  display: block;
  background: #557c3d;
  height: 100%;
  width: 0;
}
.job-block {
  background: var(--orange);
  font-size: 13px;
  min-height: 58px;
}
.job-block .job-icon {
  width: 26px;
  height: 26px;
}
.job-block small {
  display: block;
  font-size: 10px;
  font-weight: normal;
  margin-top: 3px;
}
.pieces {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.piece {
  width: 72px;
  height: 72px;
  min-height: 0;
  padding: 0;
  background: #d1dcc3;
  border: 3px solid var(--ink);
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.piece canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  display: block;
  pointer-events: none;
}
.picture-board {
  width: min(260px, 100%);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: #afc19c;
  border: 3px solid var(--ink);
  margin: auto;
}
.picture-cell {
  padding: 0;
  min-height: 0;
  box-shadow: none;
  background: #d9e3cb;
  border: 2px dashed #6b865b;
  aspect-ratio: 1;
}
.picture-cell canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  pointer-events: none;
}
.picture-cell.pending canvas {
  opacity: 0.2;
}
.folder-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.folder {
  background: #e7d791;
  box-shadow: none;
  min-height: 105px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 15px 8px;
  border: 3px solid #72613b;
  font-size: 13px;
}
.folder svg {
  width: 36px;
  height: 30px;
}
.file-shelf {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: #d3dfc6;
  border: 2px solid #8ba17b;
  padding: 12px;
  min-height: 65px;
  margin: 18px 0;
}
.saved-file {
  font-size: 11px;
  min-height: 44px;
  padding: 9px;
  background: #e6dfbe;
  border: 2px solid var(--ink);
  box-shadow: none;
}
.file-block {
  background: var(--pink);
}
.meter {
  height: 48px;
  border: 3px solid var(--ink);
  background: #c8cbb3;
  position: relative;
  margin: 30px 0 24px;
  overflow: hidden;
}
.meter-green {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #7cab60;
  opacity: 0.8;
}
.meter-pointer {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--ink);
  left: 0;
  translate: -2px 0;
}
.power {
  width: 100%;
  font-size: 25px;
  min-height: 100px;
  background: var(--orange);
  touch-action: none;
  user-select: none;
}
.power.active {
  background: var(--green);
}
.meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #56704a;
}
.word-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0 24px;
}
.letter {
  background: #d9dfc6;
  border-bottom: 4px solid #8ca279;
  padding: 10px;
  font-size: 30px;
  min-width: 40px;
  text-align: center;
}
.letter.typed {
  background: var(--green);
}
.letter.next {
  outline: 3px solid #a56624;
}
.keys {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.keys button {
  width: 48px;
  height: 52px;
  padding: 8px;
  font-size: 19px;
  background: var(--blue);
}
.sensor-pad {
  height: 215px;
  background: repeating-linear-gradient(
    0deg,
    #d8e0ca 0 23px,
    #c4d0b7 24px 25px
  );
  border: 3px solid var(--ink);
  position: relative;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}
.target-square {
  position: absolute;
  width: 60px;
  height: 50px;
  background: var(--orange);
  border: 3px solid var(--ink);
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: bold;
}
.mouse-puck {
  position: absolute;
  width: 40px;
  height: 46px;
  background: var(--blue);
  border: 3px solid var(--ink);
  transform: translate(-50%, -50%);
  pointer-events: none;
  clip-path: polygon(
    10% 0,
    80% 0,
    100% 20%,
    100% 80%,
    80% 100%,
    10% 100%,
    0 80%,
    0 20%
  );
}
.mouse-puck:before {
  content: "";
  position: absolute;
  top: 4px;
  left: 15px;
  height: 10px;
  border-left: 3px solid var(--ink);
}
.click-button {
  width: 100%;
  background: var(--blue);
  margin-top: 16px;
  font-size: 19px;
}
.gesture-mark {
  position: absolute;
  inset: 30% 25%;
  display: grid;
  place-items: center;
  font-size: 45px;
  color: #49633d;
  pointer-events: none;
  animation: nudge 1.8s steps(6) infinite;
}
.gesture-mark small {
  font-size: 12px;
}
.gesture-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.gesture-controls button {
  font-size: 12px;
  padding: 10px 12px;
}
.touch-note {
  border: 3px dashed #8ba17b;
  background: #d9e3cd;
  padding: 30px 20px;
  text-align: center;
  font-size: 18px;
  line-height: 1.7;
}
.touch-note svg {
  display: block;
  width: 65px;
  height: 65px;
  margin: 0 auto 15px;
}
.lens {
  width: min(240px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 20px;
  position: relative;
  border: 5px solid var(--ink);
  overflow: hidden;
  background: #acc99a;
}
.lens canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}
.focus-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  gap: 10px;
  margin-bottom: 12px;
}
.focus-label strong {
  color: #466c31;
}
.focus-slider {
  width: 100%;
  height: 34px;
  accent-color: #557c3d;
  cursor: pointer;
}
.snap,
.display-button {
  width: 100%;
  background: var(--orange);
  margin-top: 18px;
  font-size: 19px;
}
.monitor-frame {
  width: min(230px, 100%);
  aspect-ratio: 1;
  background: #c4d5b3;
  border: 4px solid var(--ink);
  margin: 0 auto 18px;
  position: relative;
  overflow: hidden;
}
.monitor-frame canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  display: block;
}
.up-marker {
  text-align: center;
  font-size: 11px;
  color: #466c31;
  font-weight: bold;
  margin-bottom: 10px;
}
.rotate-button {
  width: 100%;
  background: var(--blue);
}
.work-controls {
  border-top: 1px solid #aab99e;
  margin-top: 22px;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.work-controls button {
  font-size: 11px;
  padding: 9px 12px;
  min-height: 42px;
}
.tiny-fact {
  font-size: 11px;
  line-height: 1.7;
  color: #5e7454;
  margin-top: 18px;
  margin-bottom: 0;
}
.queue {
  margin-top: 24px;
}
.queue h3 {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 0 0 12px;
}
.queue button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  width: 100%;
  box-shadow: none;
  border: 0;
  border-bottom: 1px solid #68816c;
  background: none;
  color: var(--paper);
  font-size: 11px;
  padding: 12px 0;
  text-align: left;
  font-weight: normal;
}
.queue button.active {
  color: var(--green);
}
.queue button:hover {
  background: #465b48;
}
.queue .clock {
  color: var(--orange);
}
.empty-work {
  border: 3px dashed #a4b58f;
  padding: 34px 20px;
  text-align: center;
  background: #dee6cf;
  font-size: 16px;
  line-height: 1.8;
  min-height: 180px;
}
.learn-target {
  outline: 4px solid #b26b27 !important;
  outline-offset: 4px;
}
.demo-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}
.demo-layer svg {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.demo-cursor {
  position: absolute;
  width: 15px;
  height: 20px;
  left: var(--x);
  top: var(--y);
  background: #fff;
  border: 2px solid #14261a;
  clip-path: polygon(0 0, 100% 65%, 53% 68%, 32% 100%);
  animation: show-drag 2.8s steps(12) infinite;
  filter: drop-shadow(2px 2px 0 #14261a);
}
@keyframes show-drag {
  0%,
  12% {
    translate: 0 0;
    opacity: 1;
  }
  70%,
  85% {
    translate: var(--dx) var(--dy);
    opacity: 1;
  }
  100% {
    translate: var(--dx) var(--dy);
    opacity: 0;
  }
}
@keyframes nudge {
  50% {
    translate: 12px 0;
  }
}
.drag-shadow {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  opacity: 0.8;
  box-shadow: 5px 5px 0 #14261a;
  transform: translate(-50%, -50%);
  max-width: 180px;
}
.drag-shadow canvas {
  display: block;
}
.paused {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: #23312df2;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 26px;
  color: var(--paper);
}
.paused h2 {
  font-size: 34px;
}
.paused p {
  line-height: 1.8;
}
.result {
  text-align: center;
  max-width: 760px;
  margin: 35px auto;
}
.result img {
  width: 95px;
  image-rendering: pixelated;
}
.result h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.1;
  letter-spacing: -2px;
  margin: 20px 0;
}
.result .big-score {
  font-size: 64px;
  color: var(--green);
  margin: 24px 0;
}
.result p {
  line-height: 1.8;
}
.result-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.result small {
  display: block;
  color: var(--muted);
  margin: 20px 0;
}
dialog {
  max-width: 560px;
  width: calc(100% - 32px);
  background: var(--paper);
  color: var(--ink);
  padding: 28px;
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 #102017;
}
dialog::backdrop {
  background: #122118c9;
}
dialog p {
  font-size: 14px;
  line-height: 1.8;
}
dialog button {
  background: var(--green);
}
[hidden] {
  display: none !important;
}
@media (min-width: 1700px) {
  main {
    padding-top: 42px;
    padding-bottom: 42px;
  }
}
@media (max-width: 1050px) {
  .parts {
    grid-template-columns: repeat(3, 1fr);
  }
  .choose-area {
    grid-template-columns: 1fr 270px;
  }
  .home-top {
    gap: 25px;
  }
  .play-grid {
    gap: 22px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }
  .work-inner,
  .device-panel {
    padding: 18px;
  }
  .core-grid {
    gap: 7px;
  }
  .core {
    padding: 10px;
    font-size: 12px;
  }
}
@media (max-width: 760px) {
  header {
    padding: 17px 18px;
  }
  .brand {
    font-size: 19px;
    grid-template-columns: 32px auto;
    column-gap: 9px;
  }
  .brand img {
    width: 32px;
    height: 32px;
  }
  .brand small {
    font-size: 7px;
    letter-spacing: 1px;
  }
  header > div {
    gap: 6px;
  }
  .quiet {
    font-size: 10px;
    padding: 8px;
  }
  main {
    padding: 22px 18px;
  }
  .home-top {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 4px 0 28px;
  }
  .home-top h1 {
    font-size: 44px;
    letter-spacing: -2px;
  }
  .home-top p {
    font-size: 15px;
  }
  .little-story {
    rotate: 0;
    padding: 18px;
  }
  .choose-area {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .parts {
    grid-template-columns: repeat(3, 1fr);
  }
  .part {
    font-size: 13px;
    padding: 12px 9px;
  }
  .part small {
    font-size: 10px;
  }
  .ready-card {
    grid-row: 1;
  }
  .devices {
    gap: 7px;
  }
  .devices button {
    padding: 10px;
    font-size: 11px;
  }
  .ribbon h1 {
    font-size: 18px;
  }
  .ribbon .numbers {
    gap: 14px;
  }
  .numbers strong {
    font-size: 18px;
  }
  .numbers small {
    font-size: 9px;
  }
  .bip-strip {
    gap: 12px;
    margin-bottom: 17px;
  }
  .bip-avatar {
    width: 44px;
    height: 44px;
  }
  .bip-words {
    font-size: 13px;
  }
  .play-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .device-panel {
    padding: 16px;
  }
  .panel-label {
    margin-bottom: 12px;
  }
  .machine {
    max-width: 370px;
  }
  .machine.smartphone {
    max-width: 170px;
  }
  .machine.tablet {
    max-width: 300px;
  }
  .effect-caption {
    margin-top: 25px;
    font-size: 14px;
    min-height: 0;
  }
  .work-title {
    padding: 13px 16px;
  }
  .work-title h2 {
    font-size: 16px;
  }
  .work-inner {
    padding: 18px;
  }
  .instruction {
    font-size: 22px;
  }
  .memory-board {
    height: 155px;
  }
  .memory-app {
    font-size: 11px;
    padding: 4px;
    flex-direction: column;
    gap: 3px;
  }
  .memory-app .app-icon {
    width: 22px;
    height: 22px;
  }
  .task-source {
    margin-bottom: 20px;
  }
  .app-block,
  .file-block {
    font-size: 14px;
  }
  .core-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .core {
    min-height: 120px;
  }
  .core strong {
    font-size: 20px;
  }
  .work-controls button {
    font-size: 10px;
  }
  .queue {
    margin-top: 18px;
  }
  .queue button {
    font-size: 11px;
  }
  .lesson-feedback {
    padding: 16px;
  }
  .lesson-feedback h2 {
    font-size: 18px;
  }
  .folder {
    font-size: 12px;
  }
  .picture-board {
    max-width: 230px;
  }
  .piece {
    width: 64px;
    height: 64px;
  }
  .sensor-pad {
    height: 190px;
  }
  footer {
    padding: 18px;
    flex-wrap: wrap;
    font-size: 10px;
  }
}
@media (max-width: 400px) {
  .brand small {
    max-width: 160px;
    line-height: 1.5;
  }
  .brand {
    font-size: 17px;
  }
  .quiet {
    padding: 7px;
    max-width: 70px;
  }
  .ribbon {
    flex-wrap: wrap;
  }
  .ribbon .numbers {
    width: 100%;
    justify-content: space-between;
    text-align: left;
  }
  .home-top h1 {
    font-size: 38px;
  }
  .part {
    font-size: 12px;
  }
  .part small {
    font-size: 9px;
  }
  .work-inner {
    padding: 14px;
  }
  .folder-row {
    gap: 6px;
  }
  .folder {
    font-size: 11px;
    padding: 12px 4px;
  }
  .core-grid {
    gap: 6px;
  }
  .core {
    font-size: 11px;
    padding: 8px;
  }
  .core strong {
    font-size: 17px;
  }
  .pieces {
    gap: 8px;
  }
  .piece {
    width: 56px;
    height: 56px;
  }
  .instruction {
    font-size: 20px;
  }
  .device-panel {
    padding: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
  .demo-cursor {
    translate: var(--dx) var(--dy);
  }
}

.quick-play {
  background: var(--green);
  font-size: 17px;
  min-height: 54px;
  padding: 16px 24px;
}
.home-top .quick-note {
  font-size: 12px;
  margin: 14px 0 0;
  color: var(--muted);
}

/* 2.1: the arcade, not the lesson. Font bundled under SIL OFL 1.1. */
@font-face {
  font-family: Silkscreen;
  src: url("../assets/fonts/Silkscreen-Regular.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}
:root {
  font-family: Silkscreen, monospace;
}
p,
.tiny-fact,
.action-hint,
.hint-message,
.bip-words span,
.ready-card > p,
.little-story p,
dialog p {
  font-family: Silkscreen, monospace;
  font-size: 15px;
  line-height: 1.6;
}
button {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.instruction {
  font-size: clamp(17px, 2vw, 25px);
  line-height: 1.5;
}
.math-form {
  display: grid;
  grid-template-columns: 1fr 90px auto;
  align-items: center;
  gap: 12px;
  margin: 16px 0 24px;
}
.math-form label {
  font-size: 23px;
  white-space: nowrap;
}
.math-form input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  background: white;
  border: 3px solid var(--ink);
  padding: 8px;
  font-size: 22px;
  color: var(--ink);
}
.gpu-budget {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  font-size: 12px;
}
.gpu-budget > span,
.gpu-budget > small {
  font:
    14px/1.5 Silkscreen, monospace;
}
.slot-meter {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}
.slot-meter i {
  height: 24px;
  border: 2px solid var(--ink);
  background: #c9cdbb;
}
.slot-meter .shader {
  background: var(--orange);
}
.slot-meter .pixel {
  background: var(--green);
}
.quality-buttons,
.rgb-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.quality-buttons button,
.rgb-controls button {
  flex: 1;
  padding: 10px;
  font-size: 11px;
}
.quality-buttons [aria-pressed="true"],
.rgb-controls [aria-pressed="true"] {
  background: #b4df87;
  box-shadow: inset 0 0 0 2px var(--ink);
}
.file-row {
  display: flex;
  gap: 8px;
  width: 100%;
}
.file-row .saved-file {
  flex: 1;
  min-width: 0;
  white-space: normal;
  text-align: left;
}
.file-row [data-delete] {
  flex: none;
  min-width: 46px;
  background: #f2b7a4;
}
.file-shelf {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}
.hint-message {
  border: 2px dashed #98662a;
  background: #f9ddb4;
  color: #25382d;
  padding: 14px;
}
.mistyped {
  background: #efb4a5 !important;
  color: #722e25;
}
.keys {
  gap: 7px;
}
.keys button {
  min-width: 44px;
  min-height: 44px;
}
.power-status {
  display: flex;
  gap: 22px;
  justify-content: space-between;
  margin: 18px 0;
  font-size: 13px;
}
.power-status strong {
  display: block;
  font-size: 24px;
  margin-top: 8px;
}
.obstacle {
  position: absolute;
  left: 40%;
  top: 38%;
  width: 15%;
  height: 32%;
  background: repeating-linear-gradient(45deg, #c5644e 0 8px, #f0baa5 8px 16px);
  border: 2px solid #753d32;
  pointer-events: none;
}
.combo-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 16px 0;
  font-size: 12px;
}
.combo-line .current {
  background: #f4b471;
  padding: 10px;
  border: 2px solid var(--ink);
}
.combo-line .done {
  color: #45622e;
  text-decoration: line-through;
}
.capture-timing {
  position: relative;
  height: 48px;
  background: #d4d6c6;
  border: 2px solid var(--ink);
  margin: 20px 0;
}
.capture-timing span {
  position: absolute;
  left: 25%;
  width: 45%;
  height: 100%;
  background: #b4df87;
  font-size: 10px;
  display: grid;
  place-items: center;
}
.capture-timing i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 5px;
  background: #273b2f;
  z-index: 1;
}
.lens:has(.centered) {
  outline: 4px solid #6b963f;
}
.monitor-frame {
  position: relative;
}
.work-controls {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: var(--paper);
  padding: 12px 0;
  gap: 8px;
  border-top: 2px solid #a9b09e;
}
.work-controls button {
  min-height: 44px;
  font-size: 10px;
}
.practice-toggle {
  margin-top: 20px;
  padding: 14px;
  border: 2px dashed #6a805c;
  font:
    15px/1.5 Silkscreen, monospace;
}
.practice-toggle input {
  width: 22px;
  height: 22px;
  flex: none;
}
.ready-card details[hidden] {
  display: none;
}
.memory-app,
.app-block,
.job-block,
.piece,
.saved-file {
  touch-action: none;
}
.memory-slot {
  min-height: 44px;
}
.memory-board {
  min-width: 0;
}
.touch-note {
  font-size: 15px;
}
.tiny-fact {
  font-size: 13px;
}
.quick-note {
  font-size: 14px !important;
}
@media (max-width: 760px) {
  main {
    padding: 16px 10px;
  }
  .play-grid {
    gap: 12px;
  }
  .ribbon .numbers strong {
    font-size: 17px;
  }
  .ribbon h1 {
    font-size: 18px;
  }
  .bip-strip {
    margin: 12px 0;
  }
  .device-panel {
    position: sticky;
    top: 0;
    z-index: 4;
    border: 2px solid #819078;
    display: grid;
    grid-template-columns: minmax(100px, 0.9fr) minmax(120px, 1fr);
    gap: 8px;
    padding: 8px;
    background: #34473a;
    align-items: center;
  }
  .device-panel .panel-label {
    display: none;
  }
  .device-panel .machine {
    width: 100%;
    max-width: 230px;
    margin: 0;
    border-width: 5px;
  }
  .device-panel .machine:after {
    display: none;
  }
  .device-panel .machine.smartphone {
    max-width: 85px;
    margin: auto;
  }
  .device-panel .machine.tablet {
    max-width: 150px;
  }
  .device-panel .effect-caption {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    min-height: 0;
  }
  .device-panel .queue {
    grid-column: 1/-1;
    margin: 0;
    border-top: 1px solid #70816d;
    padding-top: 6px;
  }
  .queue h3 {
    display: none;
  }
  #queue {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 2px;
  }
  .queue button {
    min-width: 105px;
    max-width: 160px;
    flex: none;
    font-size: 9px;
    padding: 6px;
    min-height: 44px;
  }
  .queue button .clock {
    font-size: 10px;
  }
  .device-panel #lesson-feedback:not(:empty) {
    grid-column: 1/-1;
  }
  .lesson-feedback {
    padding: 10px;
  }
  .lesson-feedback h2 {
    font-size: 15px;
  }
  .lesson-feedback p {
    font-size: 13px;
    margin: 6px 0;
  }
  .lesson-feedback button {
    font-size: 10px;
    padding: 10px;
    min-height: 44px;
  }
  .work-inner {
    padding: 14px;
  }
  .work-title {
    padding: 12px;
  }
  .work-title h2 {
    font-size: 15px;
  }
  .work-title > span {
    font-size: 10px;
  }
  .instruction {
    font-size: 17px;
  }
  .work-controls {
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .work-controls button {
    padding: 10px;
  }
  .tiny-fact,
  .action-hint {
    font-size: 13px;
  }
  .math-form {
    grid-template-columns: 1fr 70px;
    gap: 10px;
  }
  .math-form button {
    grid-column: 1/-1;
  }
  .math-form label {
    font-size: 22px;
  }
  .core {
    min-height: 100px;
  }
  .core strong {
    font-size: 15px;
  }
  .quality-buttons button {
    font-size: 10px;
    min-width: 55px;
  }
  .picture-board {
    max-width: 200px;
  }
  .parts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .part {
    font-size: 13px;
    min-height: 95px;
  }
  .part small {
    font-size: 11px;
  }
  .part > span {
    line-height: 1.5;
  }
  .memory-app {
    font-size: 10px;
  }
  .memory-board {
    height: 145px;
  }
  .ready-card {
    padding: 18px;
  }
  header {
    padding: 12px 10px;
  }
  .brand {
    font-size: 17px;
  }
  .brand small {
    display: none;
  }
  .home-top h1 {
    font-size: 35px;
    letter-spacing: -1px;
  }
  .home-top p {
    font-size: 16px;
  }
  .quiet {
    font-size: 10px;
    max-width: 95px;
    min-height: 44px;
  }
  .result h1 {
    font-size: 30px;
  }
  .sensor-pad {
    height: 170px;
  }
  .letter {
    font-size: 21px;
    min-width: 28px;
  }
  .touch-note {
    padding: 12px;
    font-size: 14px;
  }
  main[data-component="Touchscreen"] .device-panel {
    grid-template-columns: 1fr 1fr;
  }
  .machine.smartphone #screen-wrap {
    min-height: 130px;
  }
  .machine.smartphone canvas {
    height: 130px;
    object-fit: fill;
  }
}
@media (max-height: 600px) and (max-width: 760px) {
  .device-panel {
    position: relative;
  }
  .bip-avatar {
    display: none;
  }
}
@media (pointer: coarse) {
  button {
    min-height: 48px;
  }
  .memory-slot {
    min-height: 44px;
  }
  .keys button {
    min-width: 46px;
    min-height: 46px;
  }
}
/* Keep the pixel face legible on small high-density displays. */
@media (max-width: 760px) {
  .work-controls button,
  .quality-buttons button,
  .quiet,
  .queue button,
  .lesson-feedback button {
    font-size: 12px;
  }
  .part small {
    font-size: 12px;
  }
  .queue button {
    min-width: 130px;
  }
  .space-label,
  .meter-label {
    font-size: 11px;
  }
  .memory-app {
    font-size: 11px;
  }
  .power-status {
    font-size: 13px;
  }
  .tiny-fact {
    font-size: 13px;
  }
}
@media (max-width: 760px) {
  #work-panel button,
  #work-panel input {
    scroll-margin-top: 210px;
    scroll-margin-bottom: 150px;
  }
}
@media (max-height: 600px) and (max-width: 760px) {
  .work-controls {
    position: static;
  }
  #work-panel button,
  #work-panel input {
    scroll-margin: 20px;
  }
}
/* 2.2: controls represent the component's real input and output. */
.job-context {
  padding: 12px 14px;
  background: #dce6cf;
  border-left: 4px solid #6d8d54;
  font:
    16px/1.6 Silkscreen, monospace;
  color: #284b34;
}
.job-context strong {
  font-weight: 750;
}
.desktop-pad {
  background: #b8cda7;
}
.desktop-item {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 4px;
  pointer-events: none;
  width: 72px;
  color: #284b34;
}
.desktop-item .app-icon {
  width: 30px;
  height: 30px;
}
.desktop-item small {
  font-size: 12px;
}
.mouse-puck {
  z-index: 2;
}
#frame-reference {
  display: block;
  width: 140px;
  height: 140px;
  image-rendering: pixelated;
  border: 3px solid #284b34;
  margin: 16px auto;
}
.frame-bands {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}
.frame-bands button {
  padding: 5px;
  min-height: 48px;
  touch-action: none;
}
.frame-bands canvas {
  display: block;
  width: 110px;
  image-rendering: pixelated;
}
.scan-port {
  display: block;
  width: 100%;
  padding: 18px;
  border: 3px dashed #6d8d54;
  background: #dce6cf;
  font-size: 13px;
}
.sync-ready,
.sync-busy {
  padding: 12px;
  border: 2px solid #284b34;
  font:
    15px/1.5 Silkscreen, monospace;
}
.sync-ready {
  background: #b4df87;
}
.sync-busy {
  background: #f4d6a7;
}
.exposure-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font:
    14px/1.6 Silkscreen, monospace;
  margin-top: 20px;
}
.click-events {
  font:
    15px/1.5 Silkscreen, monospace;
}
.lens {
  position: relative;
}
.lens:after {
  content: "";
  position: absolute;
  left: 30%;
  width: 40%;
  top: 10%;
  height: 80%;
  border: 2px dashed #284b34;
  pointer-events: none;
}
.lens canvas {
  transition: filter 0.08s linear;
}
@media (max-width: 760px) {
  .job-context {
    font-size: 15px;
  }
  .frame-bands canvas {
    width: 90px;
  }
  .scan-port {
    font-size: 12px;
  }
  .desktop-item small {
    font-size: 11px;
  }
}
.component-flow {
  font:
    13px/1.6 Silkscreen, monospace;
  padding: 10px 12px;
  color: #38563b;
  background: #dce6cf;
  border: 1px solid #96aa84;
  margin: 0 0 18px;
}
.stage-blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}
.stage-blocks button {
  padding: 18px;
  background: #94c9da;
  touch-action: none;
}
.core-unit {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.core-unit > .core {
  width: 100%;
}
.yield-core {
  font-size: 11px;
  min-height: 44px;
  background: #f4d6a7;
}
.core-unit small {
  overflow-wrap: anywhere;
}

.capacity-controls {border:2px solid var(--ink);margin:20px 0;padding:14px;min-width:0;display:grid;gap:12px}
.capacity-controls input {width:100%;box-sizing:border-box;min-height:44px;padding:10px;font:inherit;background:var(--paper);color:var(--ink);border:2px solid var(--ink)}
.capacity-controls small {font:13px/1.5 Silkscreen,monospace}
.capacity-presets {display:flex;flex-wrap:wrap;gap:8px}
.capacity-presets button {font-size:11px;min-height:44px;padding:10px}
.capacity-presets [aria-pressed=true] {background:var(--green)}
.capacity-warning {background:#ffe29a;padding:12px;border:2px solid var(--ink);font:14px/1.5 Silkscreen,monospace}
.shader-block {margin:16px 0;background:#ffd58b;touch-action:none;max-width:100%;white-space:normal}
.shader-block small {display:block;font:13px/1.5 Silkscreen, monospace;margin-top:8px}
.picture-cell {position:relative;overflow:hidden}
.shader-overlay {position:absolute;inset:0;pointer-events:none;border:4px solid #cc8a20;box-sizing:border-box}
.shader-layer-0 {box-shadow:inset 0 -22px #1d362b88}
.shader-layer-1 {box-shadow:inset 22px 0 #fff7}
.shader-layer-2 {border:7px double #f4ffe8}
.slot-meter {flex-wrap:wrap}

/* 2.5: every game label uses the bundled pixel face, including form controls. */
body,button,input,select,textarea,dialog,button::before,button::after{font-family:Silkscreen,monospace}
input::placeholder,textarea::placeholder{font-family:inherit}
p,small,label,.tiny-fact,.job-context,.action-hint,.capacity-controls small{line-height:1.75;overflow-wrap:anywhere}
.capacity-controls legend{line-height:1.6}
