/* The picture the tabs render: the picture itself, the button and what
   is known of the picture beside it, and under both the devices that
   rendered a tile. */
.picture {
  display: grid;
  grid-template-columns: minmax(0, 230px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

/* The picture is dark whatever the page's theme, as the set's inside
   is. The veil lies over the picture and takes no pointer, so that the
   picture under the veil is what is pointed at. */
.picture-frame {
  position: relative;
  aspect-ratio: 1;
  background: var(--space);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.picture-frame canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#picture {
  cursor: crosshair;
  touch-action: manipulation;
}

#picture-veil {
  pointer-events: none;
}

.picture-side p {
  margin: 0 0 10px;
}

/* The button's words stay on one line, whatever they are at the
   moment. */
#paint {
  white-space: nowrap;
}

/* The devices, each with how many tiles the device rendered. Each is
   a button that lights the device's tiles, and the one that was
   pressed is marked. */
#picture-devices {
  margin-top: 12px;
  gap: 6px 8px;
}

#picture-devices .device {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 7px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

#picture-devices .device:hover,
#picture-devices .device[aria-pressed="true"] {
  border-color: var(--accent);
}

#picture-devices .device[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

#picture-devices .times {
  color: var(--muted);
}

/* On a phone the picture has the panel's whole width. */
@media (max-width: 520px) {
  .picture {
    grid-template-columns: minmax(0, 1fr);
  }
}
