@font-face {
  font-family: Hanken;
  src: url('./assets/hanken-grotesk-300-700.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
  size-adjust: 110%;
}
@font-face {
  font-family: Geist;
  src: url('./assets/geist-mono-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --paper: #fbfaf7;
  --ink: #2b2b2b;
  --sub: #676155;
  --rule: #d8d6cc;
  --lime: #b1dc53;
  --green: #37421f;
  --white: #fff;
  --code: #1e251d;
  --mono: Geist, monospace;
  font-family: Hanken, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
select {
  font: inherit;
  color: inherit;
}
button,
summary,
select {
  cursor: pointer;
}
button {
  border: 0;
  background: none;
}
a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration: underline;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
summary:focus-visible,
pre:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
::selection {
  background: #d7e8ab;
  color: #1e2609;
}
svg:not([data-icon]),
i[data-icon] {
  width: 17px;
  height: 17px;
  display: inline-block;
  vertical-align: middle;
  flex: none;
}
[data-icon] svg {
  vertical-align: top;
}
.wrap {
  width: min(1240px, calc(100% - clamp(40px, 9vw, 150px)));
  margin-inline: auto;
}
.mast {
  border-bottom: 1px solid var(--rule);
}
.mast-inner,
.brand,
.mast nav,
.mast nav a,
.pane-head,
.pane-head h2,
.mode,
.action,
.references,
.references a,
.references button,
.mcp-intro,
.copy-prompt,
.endpoint,
.sheet-heading,
.payment-method {
  display: flex;
  align-items: center;
}
.mast-inner {
  min-height: 68px;
  justify-content: space-between;
}
.brand {
  gap: 18px;
}
.brand img {
  display: block;
  width: 96px;
  height: auto;
}
.brand span {
  border-left: 1px solid #c4c1b8;
  padding-left: 18px;
  color: var(--sub);
  font-size: 15px;
}
.mast nav {
  gap: 26px;
  font-size: 14px;
  font-weight: 600;
}
.mast nav a {
  gap: 7px;
}
.mast nav a:last-child {
  border: 1px solid var(--rule);
  border-radius: 24px;
  padding: 7px 13px;
}
.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-block: clamp(28px, 4vw, 59px) 28px;
  gap: 24px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(43px, 5.5vw, 78px);
  font-weight: 550;
  letter-spacing: -0.04em;
  line-height: 0.98;
}
h1 .title-tail > span {
  color: #557600;
}
.intro p {
  margin-top: 12px;
  max-width: 640px;
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--sub);
  line-height: 1.45;
}
.mode {
  font-family: var(--mono);
  font-size: 12px;
  gap: 8px;
  margin-bottom: 4px;
  white-space: nowrap;
}
.mode span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 100%;
  background: #557600;
}
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--rule);
  margin-bottom: 24px;
}
.steps button {
  padding: 15px 12px;
  text-align: left;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 550;
  color: var(--sub);
}
.steps button:hover {
  background: #f2f2e8;
}
.steps button[aria-current] {
  color: var(--green);
}
.steps button[aria-current]:after {
  content: '';
  position: absolute;
  bottom: -1px;
  inset-inline: 0;
  height: 3px;
  background: var(--green);
}
.step-num {
  font-family: var(--mono);
  font-weight: 450;
  font-size: 12px;
}
[aria-current] .step-num {
  background: var(--lime);
  color: #1e2609;
}
.step-num {
  border-radius: 4px;
  padding: 3px 5px;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(18px, 2.1vw, 32px);
  align-items: start;
}
.pane-head {
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}
.pane-head h2 {
  font-size: 16px;
  gap: 8px;
  font-weight: 650;
}
.pane-head > span {
  font-size: 12px;
  color: var(--sub);
}
#counter {
  font-family: var(--mono);
}
.scene {
  background: white;
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
}
.game-art {
  height: clamp(170px, 16.5vw, 224px);
  position: relative;
  background: #354a64 url('./assets/kingdom.webp') center 17% / cover no-repeat;
  isolation: isolate;
}
.game-art:before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(10, 32, 49, 0.9), transparent 62%);
}
.game-name {
  position: absolute;
  left: clamp(18px, 2.1vw, 32px);
  bottom: 15px;
  color: #fff8e6;
  font:
    600 clamp(32px, 3.4vw, 50px) / 1 Georgia,
    serif;
  letter-spacing: -0.038em;
  text-shadow: 0 2px 4px #25324566;
}
.shop-body,
.checkout-sheet,
.result-sheet {
  padding: clamp(18px, 2vw, 28px);
}
.offer,
.product-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.offer > img,
.thumb {
  width: 55px;
  height: 55px;
  object-fit: contain;
}
.offer h3 {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.offer p,
.product-row small,
.result-sheet p,
.state-description {
  display: block;
  font-size: 14px;
  margin-top: 4px;
  color: var(--sub);
  line-height: 1.45;
}
.offer > b,
.product-row > b {
  font-size: 22px;
  font-weight: 550;
  margin-left: auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.action {
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border-radius: 24px;
  background: var(--lime);
  color: #1e2609;
  font-weight: 650;
  font-size: 15px;
  margin-top: 18px;
}
.action:hover,
.copy-prompt:hover {
  background: #9ccc41;
}
.dev-body {
  padding: clamp(19px, 2.05vw, 29px);
  background: #f2f1e8;
  border-radius: 14px;
}
.dev-body h3,
.mcp h2 {
  font-size: clamp(22px, 2.1vw, 31px);
  font-weight: 550;
  line-height: 1.12;
  letter-spacing: -0.035em;
}
.dev-body > p,
.mcp p {
  font-size: 15px;
  line-height: 1.43;
  color: var(--sub);
  margin-top: 8px;
}
.console {
  color: #edf1e8;
  background: var(--code);
  border-radius: 9px;
  margin-top: 18px;
  overflow: hidden;
}
.console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px 4px 16px;
  border-bottom: 1px solid #495044;
  min-height: 37px;
  font: 11px var(--mono);
  gap: 8px;
  overflow-wrap: anywhere;
}
.icon-btn,
.endpoint button {
  min-width: 34px;
  min-height: 34px;
  border-radius: 5px;
}
.icon-btn:hover,
#code-toggle:hover {
  background: #374232;
}
pre {
  margin: 0;
  padding: 13px 16px;
  font: clamp(11px, 0.86vw, 13px) / 1.64 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 265px;
  overflow: auto;
  scrollbar-color: #586851 var(--code);
}
.line {
  display: inline;
}
.key {
  color: #c5df91;
}
.string {
  color: #f2d5a3;
}
.number {
  color: #a9c9ea;
}
.comment {
  color: #c3c9bc;
}
#code-toggle {
  color: #d5e7a7;
  font: 11px var(--mono);
  padding: 8px 16px 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.references {
  justify-content: space-between;
  gap: 10px;
  margin-top: 17px;
  font-weight: 550;
  font-size: 13px;
}
.references a,
.references button {
  gap: 6px;
}
.references button {
  padding: 4px 0;
}
.references button:hover,
.text-button:hover {
  text-decoration: underline;
}
.references a > i:last-child {
  width: 12px;
  height: 12px;
}
.references a > i:last-child svg {
  width: 12px;
  height: 12px;
}
.mcp {
  margin: 28px 0 40px;
  padding: 22px 0;
  border-block: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 18px;
}
.mcp-intro {
  gap: 15px;
}
.mcp h2 {
  font-size: 23px;
}
.mcp p {
  font-size: 14px;
  margin-top: 5px;
}
.plug-tile {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  flex: none;
  border-radius: 12px;
  background: #e4ebd5;
  color: var(--green);
}
.plug-tile svg,
.plug-tile i {
  width: 23px;
  height: 23px;
}
.mcp details {
  max-width: 500px;
}
.mcp summary,
.copy-prompt {
  border: 1px solid var(--rule);
  border-radius: 22px;
  min-height: 40px;
  font-size: 14px;
  font-weight: 550;
  padding: 9px 16px;
  gap: 9px;
}
.mcp summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
.mcp details[open] summary svg {
  transform: rotate(180deg);
}
.mcp-content {
  padding-top: 6px;
}
.mcp-content h3 {
  font-size: 17px;
  margin-top: 15px;
}
.mcp-content a {
  font-size: 14px;
  text-decoration: underline;
}
.endpoint {
  margin: 10px 0;
  justify-content: space-between;
  background: #eeede4;
  padding: 4px 8px 4px 12px;
  border-radius: 7px;
  gap: 5px;
}
.endpoint code {
  overflow-wrap: anywhere;
  font: 12px var(--mono);
}
.copy-prompt {
  margin-top: 12px;
  background: var(--lime);
  border: 0;
}
.sheet-heading {
  gap: 8px;
  margin-bottom: 18px;
}
.sheet-heading h3,
.result-sheet h3 {
  font-size: 27px;
  font-weight: 550;
  letter-spacing: -0.035em;
}
.product-row {
  padding: 12px 0;
  border-block: 1px solid var(--rule);
}
.thumb {
  width: 40px;
  height: 40px;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-row strong {
  font-size: 17px;
}
.product-row small {
  font-size: 12px;
}
.product-row > b {
  font-size: 18px;
}
.payment-method {
  font-size: 14px;
  gap: 8px;
  padding-block: 16px 8px;
}
.outcome,
.receipt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}
/* Select owns its internal geometry and menu. Reserve room for the longest label. */
#outcome-control {
  --font-sans: Hanken, system-ui, sans-serif;
  width: 11.5rem;
  max-width: 64%;
}
.scene[data-stage='1'] {
  overflow: visible;
}
.text-button {
  display: block;
  font-size: 13px;
  margin: 10px auto 0;
  padding: 5px;
}
.error {
  font-size: 14px;
  color: #a52a22;
  margin: 3px 0 10px;
}
.state-description {
  margin: 16px 0;
}
.result-sheet {
  text-align: center;
}
.result-mark {
  height: 80px;
  display: grid;
  place-items: center;
  margin: 2px auto 8px;
}
.result-mark svg {
  width: 52px;
  height: 52px;
  background: #e0efc6;
  border-radius: 50%;
  padding: 11px;
  color: var(--green);
}
.result-mark img {
  width: 74px;
  height: 74px;
  object-fit: contain;
}
.receipt {
  padding-block: 15px;
  margin-top: 20px;
  border-block: 1px solid var(--rule);
}
.sr-only,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: absolute;
  z-index: 3;
  top: 9px;
  left: 10px;
  background: white;
  padding: 10px;
}
#announce.visible:not(:empty) {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  clip-path: none;
  width: auto;
  height: auto;
  white-space: normal;
  text-align: center;
  max-width: 90vw;
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--code);
  color: white;
  font-size: 14px;
  box-shadow: 0 3px 12px #191a191a;
  pointer-events: none;
}
@media (max-width: 820px) {
  .wrap {
    width: calc(100% - 40px);
  }
  .intro {
    padding-block: 30px 22px;
  }
  .workspace {
    gap: 16px;
  }
  .steps button {
    padding: 13px 4px;
    gap: 4px;
    font-size: 13px;
  }
  .dev-body {
    padding: 17px;
  }
  .references {
    flex-wrap: wrap;
  }
  .mcp {
    grid-template-columns: 1fr;
  }
  .mcp details {
    width: 100%;
    max-width: 600px;
  }
}
@media (max-width: 690px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .mast-inner {
    min-height: 56px;
  }
  .mast nav {
    gap: 13px;
  }
  .brand {
    gap: 9px;
  }
  .brand img {
    width: 80px;
  }
  .brand span {
    padding-left: 9px;
    font-size: 12px;
  }
  .mast nav a {
    font-size: 12px;
    gap: 3px;
  }
  .mast nav a:last-child {
    padding: 6px 9px;
  }
  .mast nav i,
  .mast nav svg {
    width: 13px;
    height: 13px;
  }
  .intro {
    align-items: start;
    position: relative;
    padding-top: 25px;
    display: block;
  }
  .intro p {
    font-size: 15px;
    max-width: 48ch;
    margin-top: 8px;
  }
  .mode {
    margin-top: 12px;
    font-size: 11px;
  }
  .steps {
    margin-bottom: 18px;
  }
  .steps button {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 8px 3px;
    font-size: 12px;
  }
  .step-num {
    font-size: 11px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .game-art {
    height: clamp(150px, 39vw, 225px);
  }
  .offer > img {
    width: 44px;
    height: 44px;
  }
  .offer {
    gap: 10px;
  }
  .offer h3 {
    font-size: 20px;
  }
  .offer p {
    font-size: 13px;
  }
  .dev-body {
    padding: 20px;
  }
  .dev-body h3 {
    font-size: 24px;
  }
  .pane-head {
    margin-bottom: 8px;
  }
  .references {
    font-size: 13px;
  }
  .mcp {
    margin-top: 22px;
  }
  .mcp-intro {
    align-items: start;
  }
  .mcp h2 {
    font-size: 21px;
  }
}
@media (max-width: 465px) {
  .brand span {
    display: none;
  }
}
@media (max-width: 365px) {
  .offer {
    flex-wrap: wrap;
  }
  .shop-body {
    padding: 15px;
  }
  .dev-body {
    padding: 15px;
  }
  .steps button {
    font-size: 11px;
  }
}

#excerpt {
  padding: 9px 16px 0;
  color: #bfc9b5;
  font: 11px var(--mono);
}
.jump {
  display: none;
}
@media (max-width: 690px) {
  .jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    min-height: 32px;
    color: var(--green);
    font-size: 13px;
    font-weight: 550;
  }
}

/* Pair the game’s painted world with a quieter, instrument-like code surface. */
.intro {
  align-items: center;
  padding-block: clamp(32px, 4.1vw, 64px);
  gap: clamp(20px, 4vw, 64px);
}
h1 {
  font-size: clamp(43px, 5vw, 74px);
}
.title-tail {
  white-space: nowrap;
}
.intro-note {
  max-width: 365px;
}
.intro-note p {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}
.intro-note .mode {
  margin: 9px 0 0;
  font-size: 11px;
}
.workspace {
  align-items: stretch;
}
.player,
.developer {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.scene[data-stage='0'] {
  display: flex;
  flex: 1;
  flex-direction: column;
  border: 0;
  background: #122c39;
  color: #fffaf0;
  isolation: isolate;
}
.game-art {
  flex: 1;
  min-height: 236px;
  background-position: center 8%;
  display: flex;
  align-items: end;
}
.game-art:before {
  background: linear-gradient(
    0deg,
    #122c39 0%,
    rgba(18, 44, 57, 0.85) 9%,
    rgba(18, 44, 57, 0.15) 45%,
    transparent 80%
  );
}
.game-name {
  position: relative;
  left: auto;
  bottom: auto;
  margin: 0 clamp(20px, 2.15vw, 34px);
  font-size: clamp(39px, 4.3vw, 66px);
  letter-spacing: -0.04em;
  line-height: 0.99;
  font-weight: 500;
}
.game-name em {
  font-weight: 400;
}
.shop-body {
  padding: 17px clamp(20px, 2.15vw, 34px) 22px;
}
.offer {
  border-top: 1px solid #617178;
  padding-top: 15px;
  gap: 14px;
}
.offer > img {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 3px 5px #07151c80);
}
.offer h3 {
  font-size: 22px;
}
.offer p {
  color: #cad5d4;
}
.offer > b {
  font:
    500 22px Hanken,
    system-ui,
    sans-serif;
}
.shop-body .action {
  background: #f7ddb0;
  color: #302614;
  justify-content: space-between;
  padding-inline: 20px;
  margin-top: 15px;
}
.shop-body .action:hover {
  background: #ffe8c3;
}
.dev-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: #efeee5;
}
.dev-body > p {
  max-width: 57ch;
}
.references {
  margin-top: auto;
  padding-top: 17px;
}
.console {
  border-radius: 8px;
}
pre {
  font-size: clamp(11.5px, 0.9vw, 13px);
}
#code-hint {
  font-size: 13px;
  margin-top: 10px;
}
.scene[data-stage='3'] .result-sheet {
  position: relative;
  padding-top: 0;
}
.inventory-art {
  height: 76px;
  background:
    linear-gradient(0deg, rgba(14, 40, 52, 0.35), transparent),
    url('./assets/kingdom.webp') center 19% / cover;
}
.scene[data-stage='3'] .result-mark {
  width: 84px;
  height: 84px;
  margin: -29px auto 12px;
  border-radius: 19px;
  background: var(--paper);
  box-shadow: 0 5px 18px #37421f19;
}
.scene[data-stage='3'] .result-mark img {
  width: 62px;
  height: 62px;
}
@media (prefers-reduced-motion: no-preference) {
  .scene[data-stage='1'] .checkout-sheet,
  .result-sheet {
    animation: arrive 0.24s cubic-bezier(0.2, 0, 0, 1);
  }
  @keyframes arrive {
    from {
      opacity: 0.7;
      transform: translateY(5px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  .action svg {
    transition: transform 0.18s ease-out;
  }
  .action:hover svg {
    transform: translateX(3px);
  }
}
@media (min-width: 691px) and (max-width: 1030px) {
  .intro-note {
    max-width: 270px;
  }
  .intro-note p {
    font-size: 14px;
  }
}
@media (max-width: 690px) {
  .intro {
    display: block;
    padding: 27px 0 18px;
  }
  .intro-note {
    max-width: 42ch;
  }
  .intro-note p {
    margin-top: 9px;
    font-size: 15px;
  }
  .intro-note .mode {
    margin-top: 8px;
  }
  .game-art {
    height: 158px;
    min-height: 158px;
  }
  .game-name {
    font-size: 41px;
  }
  .shop-body {
    padding: 11px 18px 16px;
  }
  .offer {
    padding-top: 11px;
  }
  .offer > img {
    width: 42px;
    height: 42px;
  }
  .offer h3 {
    font-size: 19px;
  }
  .offer > b {
    font-size: 19px;
  }
  .shop-body .action {
    margin-top: 10px;
  }
  .references {
    margin-top: 0;
  }
  .scene[data-stage='0'] {
    flex: auto;
  }
}
