/* Robot Workshop */
.shop { max-width: 74rem; margin: 0 auto; padding: 1.25rem 1.25rem 3rem; }
.shop__title { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: -.03em; line-height: .95; font-size: clamp(2.2rem, 7vw, 3.8rem); margin: 0 0 .4rem; }
.shop__lede { font-size: 1.2rem; margin: 0 0 1.25rem; max-width: 40rem; }

.shop__layout { display: grid; gap: 1.25rem; align-items: start; grid-template-columns: minmax(0, 1fr); }
.left { display: grid; gap: .9rem; justify-items: center; }
.left > .stage { width: 100%; }

/* ---------- stage ---------- */
.stage {
  background: #fff; border: var(--edge); border-radius: 1.6rem; box-shadow: var(--shadow);
  padding: .9rem; display: grid; gap: .7rem; justify-items: center;
}
.stage__art { width: 100%; max-width: 32rem; aspect-ratio: 1; border: var(--edge); border-radius: 1.4rem; overflow: hidden; cursor: pointer; }
.stage__art svg { display: block; width: 100%; height: 100%; }
.stage__art [data-part] { transition: filter .15s ease; }
.stage__art [data-part].is-sel { filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 3px #fff) drop-shadow(0 0 2px var(--black)); }
.stage__name {
  margin: 0; min-height: 2.2rem; font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.4rem, 5vw, 2rem); letter-spacing: -.02em; line-height: 1.1; text-align: center; overflow-wrap: anywhere;
}
.stage__actions { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }
.stage__actions .btn { font-size: 1.1rem; min-height: 52px; padding: .6rem 1.2rem; }
.btn--yellow { background: var(--yellow); }
.stage__note { margin: 0; min-height: 1.4rem; font-size: 1rem; text-align: center; }

/* ---------- controls ---------- */
.controls { display: grid; gap: 1rem; }
.panel { background: #fff; border: var(--edge); border-radius: 1.4rem; box-shadow: 4px 4px 0 var(--black); padding: 1rem 1.1rem 1.2rem; }
.panel h2 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.35rem; line-height: 1.1; margin: 0 0 .8rem; display: flex; align-items: center; gap: .55rem; }
.step { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--red); color: #fff; border: 3px solid var(--black); font-size: 1rem; }
.panel__label { font-family: var(--display); font-weight: 800; font-size: 1rem; text-transform: uppercase; margin: .9rem 0 .4rem; display: block; }
.panel__label:first-of-type { margin-top: 0; }
.panel__hint { margin: .5rem 0 0; font-size: .95rem; opacity: .8; }

.types { display: grid; gap: .6rem; grid-template-columns: repeat(3, 1fr); }
.type {
  display: grid; justify-items: center; gap: .1rem; padding: .35rem .3rem .5rem; cursor: pointer; font: inherit; color: inherit;
  background: #fff; border: var(--edge); border-radius: 1rem; box-shadow: 3px 3px 0 var(--black);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.type:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--black); }
.type[aria-pressed="true"] { background: var(--yellow); }
.type svg { width: 100%; max-width: 5.6rem; height: auto; }
.type__name { font-family: var(--display); font-weight: 800; font-size: .95rem; text-transform: uppercase; line-height: 1.1; text-align: center; }

.parts, .chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.part, .chip {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .35rem .85rem; cursor: pointer; font: inherit; font-weight: 700; color: inherit;
  background: #fff; border: 3px solid var(--black); border-radius: 999px;
}
.part:hover, .chip:hover { background: #f1ecdf; }
.part[aria-pressed="true"], .chip[aria-pressed="true"] { background: var(--black); color: #fff; }
.part__dot { width: 1.15rem; height: 1.15rem; border-radius: 50%; border: 2.5px solid var(--black); flex: none; }
.part[aria-pressed="true"] .part__dot { border-color: #fff; }

.swatches { display: grid; gap: .5rem; grid-template-columns: repeat(7, 1fr); margin-top: .9rem; }
.swatches--back { grid-template-columns: repeat(8, 1fr); margin-top: 0; }
.swatch {
  position: relative; aspect-ratio: 1; min-height: 44px; border-radius: 50%; border: 3px solid var(--black); cursor: pointer; padding: 0;
  box-shadow: 2px 2px 0 var(--black); transition: transform .1s ease;
}
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"] { outline: 4px solid var(--cyan); outline-offset: 2px; }
.swatch .icon { position: absolute; inset: 0; display: none; place-items: center; color: var(--black); }
.swatch[aria-pressed="true"] .icon { display: grid; }
.swatch--dark .icon { color: #fff; }

.field {
  width: 100%; font: inherit; font-size: 1.15rem; font-weight: 700; padding: .65rem .9rem; min-height: 52px;
  border: 3px solid var(--black); border-radius: 1rem; background: var(--paper); color: var(--black);
}
.field::placeholder { color: #7a766c; font-weight: 400; }
.panel .swatches--back + * { margin-top: 0; }
#backdrops { margin-top: 0; }

/* ---------- my robots ---------- */
.shelf { margin-top: 1.75rem; }
.shelf h2 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.6rem; margin: 0; }
.shelf__list { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); }
.shelf__item { position: relative; background: #fff; border: var(--edge); border-radius: 1.1rem; box-shadow: 3px 3px 0 var(--black); overflow: hidden; }
.shelf__open { display: grid; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.shelf__open svg { display: block; width: 100%; height: auto; }
.shelf__label { font-family: var(--display); font-weight: 800; font-size: .95rem; text-transform: uppercase; padding: .35rem .6rem .5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shelf__del {
  position: absolute; top: .35rem; right: .35rem; display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer;
  background: #fff; border: 3px solid var(--black); border-radius: 50%; color: var(--black);
}
.shelf__del:hover { background: var(--red); color: #fff; }

/* ---------- layout ---------- */
@media (min-width: 60rem) {
  .shop__layout { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 1.75rem; }
  .left { position: sticky; top: 1rem; }
}
@media (max-width: 59.99rem) {
  /* Phones and tablets: the robot stays in view while the colours below are changed. */
  .left { display: contents; }
  .stage { position: sticky; top: 0; z-index: 5; padding: .5rem; gap: .3rem; border-radius: 0 0 1.4rem 1.4rem; }
  .stage__art { width: auto; height: min(32svh, 24rem); max-width: 100%; margin-inline: auto; }
  .stage__name { min-height: 0; font-size: 1.15rem; }
  .stage__note { display: none; }
  .stage__actions { gap: .5rem; justify-self: center; }
  .stage__actions .btn { font-size: 1rem; min-height: 48px; padding: .45rem .9rem; }
}
@media (max-width: 36rem) {
  .shop { padding-inline: .9rem; }
  .swatches { grid-template-columns: repeat(5, 1fr); gap: .5rem; }
  .swatches--back { grid-template-columns: repeat(4, 1fr); }
  .types { gap: .45rem; }
}
@media (prefers-reduced-motion: reduce) {
  .type, .swatch, .stage__art [data-part] { transition: none; }
}

/* ---------- games hub ---------- */
.hub { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
.hub__card {
  display: grid; grid-template-rows: auto 1fr; color: inherit; text-decoration: none; overflow: hidden;
  background: #fff; border: var(--edge); border-radius: 1.8rem; box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.hub__card:hover { transform: translate(-2px, -2px); box-shadow: 9px 9px 0 var(--black); }
.hub__art { position: relative; display: block; aspect-ratio: 16 / 9; border-bottom: var(--edge); overflow: hidden; }
.hub__art--cards { background: var(--cyan); }
.hub__art--shop { background: #ffe69a; }
.hub__photo {
  position: absolute; top: 12%; width: 46%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  border: var(--edge); border-radius: 1rem; box-shadow: 5px 5px 0 var(--black); background: #fff;
}
.hub__photo--a { left: 7%; transform: rotate(-7deg); }
.hub__photo--b { right: 7%; top: 22%; transform: rotate(6deg); }
.hub__bot { position: absolute; bottom: 4%; width: 34%; }
.hub__bot svg { display: block; width: 100%; height: auto; }
.hub__bot--1 { left: 3%; transform: rotate(-4deg); }
.hub__bot--2 { left: 33%; bottom: 8%; }
.hub__bot--3 { right: 3%; transform: rotate(4deg); }
.hub__text { display: grid; gap: .7rem; padding: 1.2rem 1.3rem 1.5rem; align-content: start; justify-items: start; }
.hub__name { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: -.03em; line-height: .95; font-size: clamp(1.9rem, 6vw, 2.8rem); }
.hub__line { font-size: 1.15rem; }
.hub__tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.hub__tags span { font-weight: 700; font-size: .95rem; padding: .15rem .7rem; border: 3px solid var(--black); border-radius: 999px; background: var(--paper); }
.hub__go { margin-top: .3rem; font-size: 1.1rem; min-height: 52px; padding: .6rem 1.3rem; box-shadow: 4px 4px 0 var(--black); }
@media (min-width: 52rem) {
  .hub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
