:root {
  color-scheme: light;
  --ink: #203039;
  --muted: #61717a;
  --line: #dce5e4;
  --green: #287763;
  --paper: #f5f8f6;
  font-family: system-ui, -apple-system, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}
button,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
select:focus-visible {
  outline: 3px solid #e5a73f;
  outline-offset: 3px;
}
.game-shell {
  max-width: 1100px;
  margin: auto;
  padding: 20px 22px 30px;
}
.header,
.intro,
.panel-heading,
.board-title,
.navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: clamp(25px, 4vw, 36px);
  letter-spacing: -0.04em;
}
h2 {
  font-size: 19px;
}
.eyebrow {
  color: var(--green);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  margin-bottom: 5px;
}
.level-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}
select {
  max-width: 210px;
  border: 1px solid #c7d6d2;
  background: #fff;
  color: var(--ink);
  padding: 9px;
  border-radius: 8px;
}
.intro {
  padding: 18px 0;
}
.intro > div {
  min-width: 155px;
}
.intro p:not(.eyebrow) {
  max-width: 690px;
  line-height: 1.5;
  font-size: 13px;
  color: #4e6268;
}
.boards,
.workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.board-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 18px #234b3408;
}
.board-card {
  padding: 14px;
}
.board-title {
  font-size: 13px;
  font-weight: 750;
}
.board-title span + span {
  font-size: 11px;
  color: #82928e;
  font-weight: 500;
}
.board {
  min-height: 145px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  overflow: auto;
  padding: 15px 5px 2px;
}
.column {
  display: flex;
  flex-direction: column-reverse;
  gap: 3px;
  flex: none;
}
.cube {
  width: clamp(17px, 2.7vw, 28px);
  height: clamp(17px, 2.7vw, 28px);
  border: 1px solid #20303925;
  border-radius: 4px;
  box-shadow:
    inset 0 2px 1px #ffffff82,
    inset 0 -3px 0 #00000018;
}
.cube[data-color="Yellow"] {
  background: #f5c850;
}
.cube[data-color="Red"] {
  background: #e86b5d;
}
.cube[data-color="Cyan"] {
  background: #55bec1;
}
.cube[data-color="Brown"] {
  background: #967768;
}
.cube[data-color="Orange"] {
  background: #ed9d56;
}
.status {
  min-height: 31px;
  padding: 9px 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.status.solved {
  color: #16775a;
}
.workspace .panel {
  padding: 16px;
}
.panel-heading h2 {
  font-size: 16px;
}
.panel-heading span,
.program-hint {
  font-size: 12px;
  color: var(--muted);
}
.functions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.function {
  border: 1px solid #cfe1da;
  background: #f4faf7;
  color: #1d5f4d;
  text-align: left;
  padding: 10px;
  border-radius: 8px;
  min-height: 45px;
  font-size: 12px;
  line-height: 1.3;
}
.function:hover {
  background: #e3f3ea;
}
.program-hint {
  margin: 10px 0;
  line-height: 1.4;
}
.program {
  padding: 0;
  list-style: none;
  margin: 0;
  display: grid;
  gap: 7px;
}
.program li {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f3f5f4;
  border-radius: 8px;
  padding: 5px 6px 5px 10px;
  font-size: 12px;
}
.program li .step-label {
  flex: 1;
  min-width: 0;
}
.small-button,
.text-button {
  border: 0;
  background: transparent;
  border-radius: 5px;
  color: #40685b;
  padding: 5px 7px;
}
.small-button:hover,
.text-button:hover {
  background: #dcece4;
}
.small-button:disabled,
.navigation button:disabled {
  opacity: 0.35;
  cursor: default;
}
.empty {
  color: #8a9996;
  font-size: 13px;
  padding: 18px 0;
}
.navigation {
  justify-content: flex-end;
  margin-top: 16px;
}
.navigation button {
  border: 0;
  border-radius: 9px;
  padding: 10px 15px;
  font-weight: 700;
}
.primary {
  background: #287763;
  color: #fff;
}
.secondary {
  background: #e6efeb;
  color: #31594a;
}
.credit {
  font-size: 11px;
  color: #738781;
  margin-top: 24px;
  text-align: center;
}
@media (max-width: 650px) {
  .game-shell {
    padding: 14px 12px 26px;
  }
  .header {
    align-items: flex-start;
  }
  .level-label {
    display: grid;
  }
  .intro {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }
  .boards {
    gap: 8px;
  }
  .board-card {
    padding: 10px 8px;
  }
  .board {
    min-height: 112px;
    justify-content: flex-start;
  }
  .board-title {
    font-size: 12px;
  }
  .board-title span + span {
    display: none;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .functions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .navigation button {
    font-size: 12px;
  }
  .credit {
    line-height: 1.5;
  }
}
:root .board-card {
  min-width: 0;
}
.function code {
  display: block;
  color: #67867b;
  font-size: 10px;
  margin-top: 4px;
}
