/* PIP'S ROOM. A shelf, and the things on it. No task, no timer, no score: this
   is the one screen that is purely the reward. */

#room {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  background: var(--ink);
}

#title { display: grid; place-items: center; padding: 14px 0 4px; }
#title canvas { image-rendering: pixelated; }

#who {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 2px 16px 14px;
}
#who canvas { image-rendering: pixelated; width: 56px; height: 52px; }
#who p {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: color-mix(in srgb, var(--fg) 76%, transparent);
}

/* the strip stays reachable on a phone, where the shelf is taller than the
   screen and scrolling to the bottom to leave the room is a silly ask */
#strip { position: sticky; bottom: 0; }

#shelves {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0 18px 22px;
  max-width: 1040px;
  margin: 0 auto;
  width: 100%;
}

/* A SET, which is a deck. The gaps are the point: a child can see there are
   four left in this sound and knows exactly how to get them. */
.set {
  padding: 12px 14px 14px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--fg) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--fg) 9%, transparent);
}
.set.done {
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
}
.sethead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.sethead b { font-size: 15px; }
.sethead span {
  font-size: 12px;
  font-weight: 700;
  color: color-mix(in srgb, var(--fg) 58%, transparent);
}
.setrow {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}
/* NOT .card: style.css already owns that for the game's own cards, complete
   with a --size width, so every slot here inherited it and the grid was
   overruled. Second time this has bitten, after .again. */
.cardslot {
  aspect-ratio: 1;
  border-radius: 10px;
  background: color-mix(in srgb, var(--fg) 7%, transparent);
  border: 1px dashed color-mix(in srgb, var(--fg) 14%, transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cardslot.has {
  border: 1px solid color-mix(in srgb, var(--fg) 18%, transparent);
  border-style: solid;
  background: var(--cream, #f6ecd2);
}
.cardslot img { width: 100%; height: 76%; object-fit: contain; }
.cardslot span {
  font-size: 10px;
  font-weight: 800;
  color: #4a3a22;
  padding-bottom: 3px;
}

.none {
  color: color-mix(in srgb, var(--fg) 60%, transparent);
  font-size: 14px;
  text-align: center;
  padding: 30px 0;
}

/* THE SHAPE OF THE THING, BEFORE THERE IS ANYTHING IN IT. An empty shelf told a
   clinician nothing, so with nobody picked the first few sets are drawn with
   every slot empty. It is dimmed, because it is an illustration of what fills
   up and not a claim that anything has been won. */
.set.preview { opacity: 0.55; }
.set.preview .sethead span { opacity: 0.7; }
/* A LOCKED CARD HAS TO BE LEGIBLE OR IT IS A BLANK SQUARE WITH EXTRA STEPS.
   Greyscale at half opacity on a near-black shelf came out as a smudge: the
   whole point is that a child can see what is worth playing for. Desaturated
   rather than drained, and bright enough to make out the drawing. */
.cardslot.locked img {
  filter: grayscale(0.85) brightness(1.12) contrast(1.05); opacity: 0.8;
}
.cardslot.locked { background: rgba(255, 255, 255, 0.05); }
