/* Both collections feel like cards, with distinct ownership and attribution. */
.room-main {
  --creation-paper: color-mix(in srgb, var(--room-background, #f5f5f5) 38%, #fffdf8);
  --reference-paper: color-mix(in srgb, var(--room-background, #f5f5f5) 92%, #000);
  --creation-ink: #41443f;
  --reference-ink: #414141;
  --card-image-paper: #ffffff60;
}
html[data-room-theme=dark] .room-main {
  --creation-paper: color-mix(in srgb, var(--room-background, #252525) 75%, #55554c);
  --reference-paper: color-mix(in srgb, var(--room-background, #252525) 84%, #000);
  --creation-ink: #eeeee5;
  --reference-ink: #eeeeee;
  --card-image-paper: #ffffff08;
}
.room-main #room-grid,
.room-main .reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 24px 20px;
  align-items: start;
  margin-top: 24px;
}
.room-main #room-grid .work,
.room-main .reference-card {
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 13px 13px 7px;
  border: 0;
  border-radius: 7px;
  background: var(--creation-paper);
  color: var(--creation-ink);
  box-shadow: 0 3px 12px #00000009;
}
.room-main .reference-card {
  background: var(--reference-paper);
  color: var(--reference-ink);
  box-shadow: 2px 3px 0 #00000009, 0 4px 12px #00000007;
}
.room-main .reference-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 17px;
  height: 17px;
  border-radius: 0 7px 0 4px;
  background: linear-gradient(45deg, #0000000b 49%, #ffffff45 50%);
  pointer-events: none;
}
.room-main #room-grid .room-card-image,
.room-main .reference-card-image,
.room-main .reference-unavailable {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: var(--card-image-paper);
}
.room-main #room-grid .room-card-image img,
.room-main .reference-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  background: transparent;
}
.room-main #room-grid .work figcaption,
.room-main .reference-card figcaption {
  color: inherit;
  opacity: 1;
  padding: 12px 2px 0;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.room-main #room-grid .work figcaption > span {
  display: block;
  margin: 0;
  opacity: 1;
  font-size: 12px;
}
.room-main #room-grid .work figcaption small {
  margin-top: 5px;
  color: inherit;
  font-size: 10px;
  opacity: .78;
}
.room-main .reference-card figcaption { display: grid; gap: 3px; }
.reference-author-label { font-size: 10px; letter-spacing: .03em; opacity: .78; }
.reference-creator { font-size: 12px; }
.room-main #room-grid .work .room-star,
.room-main .reference-card .reference-remove {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  align-self: flex-start;
  gap: 6px;
  width: auto;
  min-height: 44px;
  margin: 3px 0 0;
  padding: 8px 2px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: inherit;
  font-size: 11px;
  line-height: 1.6;
}
.room-main #room-grid .work .room-star[aria-pressed=true] { color: inherit; font-weight: 500; }
.room-main .reference-card .reference-remove svg { flex: none; }
.room-main .reference-unavailable {
  margin: 0;
  padding: 18px;
  text-align: center;
  font-size: 12px;
  line-height: 1.8;
  opacity: .65;
}
.room-main :is(.room-card-image, .reference-card-image, .room-star, .reference-remove):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}
@media(max-width:700px) {
  .room-main #room-grid, .room-main .reference-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .room-main #room-grid .work, .room-main .reference-card { padding: 10px 10px 5px; }
}
@media(max-width:340px) {
  .room-main #room-grid, .room-main .reference-grid { gap: 16px 9px; }
  .room-main #room-grid .work, .room-main .reference-card { padding: 8px 8px 4px; }
}

.room-main .room-collection-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
}
.room-main #room-creations-heading { margin-top: 32px; }
.room-collection-heading .room-heading-en {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .1em;
  opacity: .72;
}
html[lang=en] .room-collection-heading .room-heading-en { display: none; }
