/* /u/<username>/shelves/<slug> bookshelf page (docs/063 stage 7) -- the web
   twin of the app's shelf scene, in the site's own light/dark tokens
   (style.css): the scene sits on --bg, the page colour of whichever theme
   the viewer has, like the app (docs/063 decision 11). Laid out in
   360-wide reference units: --u = 1/360 of the scene's width, so the
   scene, text included, scales as a whole -- the same geometry as the app
   (join_preview/shelf_geometry.py). style.css gives every <section> the
   homepage's padding; sections here set their own. */

.bs-page {
  max-width: 720px;
  margin: 0 auto;
  container-type: inline-size;
}

.bs-scene {
  --u: calc(100cqw / 360);
  position: relative;
  width: 100%;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
}

.bs-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  object-fit: cover;
  object-position: top;
  pointer-events: none;
}
.bs-fade {
  position: absolute;
  left: 0;
  right: 0;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

/* The shelf's name on the background: always light, the backgrounds are
   dark pictures in both themes; a soft dark scrim keeps it readable. */
.bs-title {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  box-sizing: border-box;
  padding: calc(var(--u) * 14) calc(var(--u) * 18) 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent);
  color: #F3E9D8;
  text-shadow: 0 0 calc(var(--u) * 6) #000;
}
.bs-name {
  margin: 0;
  font-size: calc(var(--u) * 22);
  line-height: 1.15;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bs-meta {
  margin: calc(var(--u) * 4) 0 0;
  font-size: calc(var(--u) * 11);
  opacity: 0.8;
}
.bs-description {
  margin: calc(var(--u) * 6) 0 0;
  font-size: calc(var(--u) * 11.5);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bs-content {
  position: absolute;
  left: 0;
  width: 100%;
}
.bs-plank {
  position: absolute;
  left: 0;
  width: 100%;
  pointer-events: none;
}
.bs-plank-painted {
  background: linear-gradient(to bottom, #6B4226, #3B2314 30%, #24150C);
  box-shadow: 0 calc(var(--u) * 4) calc(var(--u) * 6) rgba(0, 0, 0, 0.54);
}

.bs-cover {
  position: absolute;
  display: block;
  border-radius: calc(var(--u) * 2);
  background: #3A2A22;
  box-shadow: calc(var(--u) * 2) calc(var(--u) * 2) calc(var(--u) * 5) rgba(0, 0, 0, 0.87);
  color: #E6C27A;
  text-decoration: none;
}
.bs-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--u) * 2);
}
.bs-cover-title {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: calc(var(--u) * 5);
  box-sizing: border-box;
  font-size: calc(var(--u) * 9);
  line-height: 1.2;
  text-align: center;
}
/* The space owner's avatar, like the app's SpaceOwnerAvatar. */
.bs-avatar {
  position: absolute;
  box-sizing: border-box;
  padding: calc(var(--u) * 2);
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bs-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.bs-avatar-icon { width: 80%; height: 80%; fill: var(--text-secondary); }

.bs-decoration {
  position: absolute;
  object-fit: contain;
  pointer-events: none;
}

/* ---- Below the scene ---- */
.bs-below {
  padding: 0 16px 48px;
}
.bs-owner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 16px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.bs-owner-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bs-owner-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bs-owner-icon { width: 24px; height: 24px; fill: currentColor; }
.bs-empty { text-align: center; opacity: 0.8; }
.bs-cta {
  padding: 24px 0 0;
  text-align: center;
}
.bs-cta h2 { margin: 0 0 8px; }
.bs-cta > p { margin: 0 0 16px; }
