.world-adventure-art .world-adventure-cover {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.world-adventure-game {
  --beat-clap: var(--world-peach);
  --beat-tap: var(--world-mint);
  --beat-rest: var(--world-note);
  padding: clamp(12px, 2vw, 20px);
  margin-block: 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}

.world-adventure-game[hidden] { display: none; }

.world-adventure-game h3 {
  margin-block-end: .55em;
  color: var(--world-forest-dark);
  text-wrap: wrap;
}

.world-game-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(4px, 1.4vw, 10px);
  max-width: 26rem;
}

.world-game-button {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 8px 4px;
  border: 1px solid var(--world-forest);
  border-radius: var(--r-md);
  color: var(--world-forest-dark);
  background: var(--beat-colour, var(--card));
  font: 800 .93rem/1.2 var(--body);
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.world-game-button:hover { box-shadow: inset 0 0 0 1px var(--world-forest); }
.world-game-button[aria-pressed="true"] {
  box-shadow: inset 0 0 0 2px var(--world-forest-dark);
  background: var(--world-mint);
}

.world-leaf-model {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-block-end: 10px;
  padding: 6px 10px;
  border-radius: var(--r-md);
  background: var(--world-mint);
  color: var(--world-forest-dark);
  font-weight: 750;
}

.world-game-leaf {
  position: relative;
  display: inline-block;
  flex: none;
  inline-size: 29px;
  block-size: 24px;
  background: var(--world-forest);
}

.world-game-leaf::after {
  position: absolute;
  inset: calc(50% - 1px) 4px auto;
  block-size: 2px;
  border-radius: 2px;
  background: var(--world-mint);
  content: "";
}

.world-game-leaf-round { border-radius: 50%; }
.world-game-leaf-long { block-size: 15px; margin-block: 4.5px; border-radius: 50% 30%; }
.world-game-leaf-pointed { border-radius: 85% 0 85% 0; transform: rotate(-11deg); }

.world-rhythm-clap { --beat-colour: var(--beat-clap); }
.world-rhythm-tap { --beat-colour: var(--beat-tap); }
.world-rhythm-rest { --beat-colour: var(--beat-rest); }

.world-rhythm-sequence {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  max-width: 26rem;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.world-rhythm-sequence li {
  padding: .22em .08em;
  border-radius: var(--r-md);
  background: var(--beat-colour);
  color: var(--world-forest-dark);
  font-weight: 800;
  text-align: center;
  overflow-wrap: anywhere;
}

.world-adventure-game .world-game-feedback {
  min-height: 1.6em;
  margin-block: 8px 0;
  color: var(--world-forest-dark);
  font-weight: 750;
}

.world-game-reset {
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-block-start: 6px;
  background: none;
  color: var(--world-forest-dark);
  font: 800 .9rem var(--body);
  cursor: pointer;
}

.world-story-choices,
.world-two-choices {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.world-story-choices .world-game-button { padding-inline: 8px; }

.world-story-ending:not([hidden]) {
  padding: 8px 10px;
  border-radius: var(--r-md);
  background: var(--world-mint);
}

.world-build-preview {
  position: relative;
  height: 84px;
  max-width: 26rem;
  margin: 0 0 10px;
  border-radius: var(--r-md);
  background: var(--world-mint);
}

.world-build-support {
  position: absolute;
  inset-block-end: 10px;
  width: 24%;
  height: 24px;
  border: 1px solid var(--world-clay);
  border-radius: 3px;
  background: var(--world-peach);
}

.world-build-support:first-child { inset-inline-start: 14%; }
.world-build-support:nth-child(2) { inset-inline-end: 14%; }

.world-build-deck {
  --deck-width: 0%;
  --deck-height: 11px;
  position: absolute;
  inset: auto calc((100% - var(--deck-width)) / 2) 34px;
  height: var(--deck-height);
  border-radius: 3px;
  background: var(--world-forest);
}

.world-build-preview[data-deck="wide"] .world-build-deck { --deck-width: 73%; }
.world-build-preview[data-deck="short"] .world-build-deck { --deck-width: 19%; }
.world-build-preview[data-deck="narrow"] .world-build-deck {
  --deck-width: 10%;
  --deck-height: 31px;
}

.world-ramp-preview {
  --ramp-rise: 27px;
  --ramp-finish: 56%;
  position: relative;
  height: 106px;
  max-width: 26rem;
  margin: 0 0 10px;
  border-radius: var(--r-md);
  background: var(--world-mint);
}

.world-ramp-preview[data-ramp="high"] {
  --ramp-rise: 52px;
  --ramp-finish: 82%;
}

.world-ramp-floor {
  position: absolute;
  inset: auto 6% 20px;
  border-bottom: 2px solid var(--world-forest);
}

.world-ramp-slope {
  position: absolute;
  inset: auto 57% 22px 13%;
  height: var(--ramp-rise);
  background: var(--world-clay);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.world-ramp-start,
.world-ramp-ball {
  position: absolute;
  width: 17px;
  height: 17px;
  border: 2px solid var(--world-forest-dark);
  border-radius: 50%;
  transform: translateX(-50%);
}

.world-ramp-start {
  inset: auto auto calc(22px + var(--ramp-rise)) 13%;
  border-style: dashed;
  background: var(--card);
}

.world-ramp-ball {
  inset: auto auto 22px var(--ramp-finish);
  background: var(--gold);
}

.world-ramp-preview[data-ramp=""] .world-ramp-ball { visibility: hidden; }

.world-clue-card {
  margin-block-end: 10px;
  padding: 9px 12px;
  border-inline-start: 3px solid var(--world-forest);
  border-radius: var(--r-md);
  background: var(--world-mint);
}

.world-adventure-game .world-clue-number {
  margin: 0;
  color: var(--world-forest-dark);
  font-size: .88rem;
  font-weight: 800;
}

.world-clue-card ol { margin: 4px 0 0; padding-inline-start: 1.2em; }
.world-clue-card li + li { margin-block-start: 4px; }

.world-adventure-game .world-clue-answer {
  margin: 7px 0 0;
  color: var(--world-forest-dark);
  font-weight: 900;
}

.world-clue-controls .world-game-button:disabled {
  border-style: dashed;
  box-shadow: none;
  opacity: .56;
  cursor: default;
}

.world-collage-tools,
.world-collage-board { margin-block-end: 8px; }

.world-shape-mark,
.world-collage-tile[data-shape]::before {
  display: block;
  width: var(--shape-size, 17px);
  height: var(--shape-size, 17px);
  background: var(--shape-colour, var(--world-forest));
  clip-path: var(--shape-outline, inset(0 round 1px));
}

:is(.world-shape-mark, .world-collage-tile)[data-shape="circle"] {
  --shape-outline: circle(48%);
}

:is(.world-shape-mark, .world-collage-tile)[data-shape="triangle"] {
  --shape-outline: polygon(50% 3%, 98% 96%, 2% 96%);
}

:is(.world-collage-swatch, .world-collage-tile)[data-color="gold"] {
  --shape-colour: var(--world-gold);
}

:is(.world-collage-swatch, .world-collage-tile)[data-color="coral"] {
  --shape-colour: var(--red-product);
}

:is(.world-collage-swatch, .world-collage-tile)[data-color="mint"] {
  --shape-colour: var(--path-1);
}

.world-collage-swatch {
  width: 17px;
  height: 17px;
  border: 1px solid var(--world-forest-dark);
  border-radius: 50%;
  background: var(--shape-colour);
}

.world-collage-tile {
  --shape-size: clamp(26px, 4.8vw, 44px);
  min-height: clamp(52px, 8vw, 78px);
  border-style: dashed;
  background: var(--world-note);
}

.world-collage-tile[data-shape]::before { content: ""; }

.world-adventure-game .world-pattern-number {
  margin-block-end: 5px;
  color: var(--world-forest-dark);
  font-size: .88rem;
  font-weight: 800;
}

.world-pattern-trail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  max-width: 26rem;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.world-pattern-trail li {
  display: grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--world-mint);
}

.world-pattern-trail .world-pattern-missing {
  border: 1px dashed var(--world-forest-dark);
  background: var(--world-note);
  color: var(--world-forest-dark);
  font-weight: 900;
}

@media (max-width: 500px) {
  .world-clue-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .world-clue-controls [data-clue-next-card] { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .world-adventure-art .world-adventure-cover { height: 100%; }
}
