/* 4 · Collector's Album: a leather-bound album. Ribbon tabs list the pages (lines), owned FiGGYZ
   get an ink stamp, missing ones sit in grey dashed slots, and a gold meter fills as the page
   completes. The F4F Gallery computer shows the same album in black and gold. */
.spc--album { --spc-bg: #FFF9EE; --spc-fg: #3A2A1A; --spc-muted: #7A6650; --spc-line: rgba(58, 42, 26, 0.16); --spc-card: #FFFDF8; --spc-accent: #B5482A; --alb-leather: #7A3E22; --alb-gold: #D9A441; }
.spc--album[data-site='f4f'] { --spc-accent: #1D1D1D; --alb-leather: #1E1E1E; --alb-gold: #D9B45A; }
.alb {
  position: relative; flex: 1; display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 0; padding: 12px; gap: 0;
  background: var(--alb-leather) radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08), transparent 60%); perspective: 1600px;
}
.alb__cover {
  position: absolute; inset: 12px; z-index: 30; display: grid; place-items: center; border-radius: 10px; pointer-events: none; transform-origin: left center;
  background: var(--alb-leather) repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 6px, transparent 6px 12px); box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.06), inset 0 0 0 9px var(--alb-gold);
  animation: albOpen 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.25s forwards;
}
.alb__cover b { font: 400 clamp(24px, 4cqi, 40px)/1 var(--title-font); color: var(--alb-gold); text-transform: uppercase; text-align: center; }
@keyframes albOpen { to { transform: rotateY(-100deg); opacity: 0; visibility: hidden; } }

.alb__index { display: flex; flex-direction: column; min-height: 0; padding: 14px 10px 14px 14px; border-radius: 10px 0 0 10px; background: #F4E7CF; box-shadow: inset -10px 0 14px -10px rgba(58, 42, 26, 0.35); }
.alb__index-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.alb__brand { flex: 1; margin: 0; font: 400 20px/1.05 var(--heading-font); color: var(--spc-accent); }
.alb__off { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: rgba(58, 42, 26, 0.08); cursor: pointer; }
.alb__lines { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.alb__line {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 8px 2px 2px 8px; cursor: pointer;
  background: rgba(255, 255, 255, 0.5); text-align: left; font-size: 13px; font-weight: 600;
}
.alb__line small { padding: 1px 7px; border-radius: 999px; background: rgba(58, 42, 26, 0.08); font-weight: 700; }
.alb__line small.has { background: var(--alb-gold); color: #3A2A1A; }
.alb__line[aria-pressed='true'] { background: var(--spc-accent); color: #fff; margin-right: -10px; box-shadow: 4px 2px 0 rgba(58, 42, 26, 0.2); }

.alb__page {
  min-height: 0; overflow-y: auto; padding: 18px 20px; border-radius: 0 10px 10px 0; overscroll-behavior: contain;
  background: var(--spc-bg) repeating-linear-gradient(0deg, transparent 0 31px, rgba(58, 42, 26, 0.05) 31px 32px); box-shadow: inset 12px 0 16px -12px rgba(58, 42, 26, 0.35);
}
.alb__title { margin: 0; font: 400 clamp(22px, 3.4cqi, 34px)/1.05 var(--title-font); color: var(--spc-accent); text-transform: uppercase; }
.alb__meter { height: 12px; margin: 8px 0 4px; border-radius: 999px; background: rgba(58, 42, 26, 0.1); overflow: hidden; }
.alb__meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--alb-gold), #F5D27A); transition: width 0.5s ease; }
.alb__sum { margin: 2px 0 8px; }
.alb__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.alb__filters { display: flex; flex-wrap: wrap; gap: 4px; margin-right: auto; }
.alb__chip { min-height: 36px; padding: 4px 12px; border: 0; border-radius: 999px; background: rgba(58, 42, 26, 0.07); cursor: pointer; font-size: 13px; font-weight: 600; }
.alb__chip[aria-pressed='true'] { background: var(--spc-fg); color: var(--spc-bg); }
.alb__addall[hidden] { display: none; }
.alb__note { min-height: 1.4em; }

.alb__slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 14px; margin: 10px 0; padding: 0; list-style: none; }
.alb-slot { position: relative; }
.alb-slot__open {
  position: relative; display: flex; flex-direction: column; gap: 4px; width: 100%; height: 100%; padding: 8px 8px 10px; border: 0; border-radius: 4px; cursor: pointer; text-align: left;
  background: var(--spc-card); box-shadow: 0 2px 0 rgba(58, 42, 26, 0.14), 0 6px 14px rgba(58, 42, 26, 0.12); transform: rotate(var(--tilt, 0deg)); transition: transform 0.15s ease;
}
.alb-slot:nth-child(3n + 1) { --tilt: -1.2deg; }
.alb-slot:nth-child(3n + 2) { --tilt: 0.8deg; }
.alb-slot__open:hover { transform: rotate(0deg) translateY(-3px); }
.alb-slot__photo { display: block; aspect-ratio: 1; background: #F6EEDD; overflow: hidden; }
.alb-slot__photo img { width: 100%; height: 100%; object-fit: contain; }
.alb-slot__name { font: 600 13px/1.25 var(--body-font); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.alb-slot__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; }
.alb-slot__wish { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; }
.alb-slot.is-missing .alb-slot__open { background: transparent; box-shadow: inset 0 0 0 2px rgba(58, 42, 26, 0.3); outline: 2px dashed rgba(58, 42, 26, 0.35); outline-offset: -8px; }
.alb-slot.is-missing .alb-slot__photo img { filter: grayscale(1) contrast(0.8); opacity: 0.45; }
.alb-slot.is-missing .alb-slot__open:hover .alb-slot__photo img { filter: none; opacity: 1; }
.alb__stamp {
  position: absolute; left: 12px; top: 30%; padding: 3px 10px; border: 3px solid currentColor; border-radius: 6px; transform: rotate(-12deg);
  font: 400 16px/1 var(--title-font); text-transform: uppercase; letter-spacing: 1px; pointer-events: none; mix-blend-mode: multiply;
}
.alb__stamp--own { color: #1E7A3A; }
.alb__stamp--miss { color: #8A7A66; border-style: dashed; font-size: 13px; }
.alb__ribbon { position: absolute; left: -4px; top: 14px; padding: 3px 10px 3px 8px; background: var(--alb-gold); color: #2A1B05; font: 700 11px/1.3 var(--body-font); clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%); }
.alb__pager { display: flex; align-items: center; justify-content: center; gap: 10px; }
.alb__pager[hidden] { display: none; }

/* the product plate and the cart slide over the album page */
.alb__sheet {
  position: absolute; z-index: 20; top: 12px; right: 12px; bottom: 12px; left: 232px; overflow-y: auto; padding: 16px 20px; border-radius: 0 10px 10px 0;
  background: var(--spc-bg); box-shadow: -14px 0 24px rgba(58, 42, 26, 0.3); animation: albSheet 0.28s ease; overscroll-behavior: contain;
}
.alb__sheet[hidden] { display: none; }
@keyframes albSheet { from { transform: translateX(30px); opacity: 0; } }
.alb__close { margin-bottom: 8px; }
.alb-plate { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; }
.alb-plate__main { position: relative; aspect-ratio: 1; padding: 10px; background: #fff; box-shadow: 0 2px 0 rgba(58, 42, 26, 0.14), 0 8px 18px rgba(58, 42, 26, 0.14); transform: rotate(-1deg); }
.alb-plate__main img { width: 100%; height: 100%; object-fit: contain; }
.alb-plate__main .alb__stamp { top: auto; bottom: 18px; left: auto; right: 14px; font-size: 20px; }
.alb-plate__thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.alb-plate__thumbs button { width: 50px; height: 50px; padding: 0; border: 0; overflow: hidden; background: #fff; cursor: pointer; box-shadow: 0 0 0 2px var(--spc-line); }
.alb-plate__thumbs button[aria-pressed='true'] { box-shadow: 0 0 0 3px var(--spc-accent); }
.alb-plate__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.alb-plate__line { margin: 0; font: 700 11px/1.2 var(--body-font); letter-spacing: 1px; text-transform: uppercase; color: var(--spc-muted); }
.alb-plate__own { margin: 4px 0 8px; font-style: italic; color: var(--spc-muted); }
.spc--album .spc-ptitle { font: 400 24px/1.1 var(--heading-font); }

@container pc (max-width: 700px) {
  .alb { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); padding: 6px; }
  .alb__cover { inset: 6px; }
  .alb__index { padding: 8px; border-radius: 10px 10px 0 0; box-shadow: none; }
  .alb__lines { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .alb__line { flex: none; border-radius: 8px; }
  .alb__line[aria-pressed='true'] { margin-right: 0; }
  .alb__page { border-radius: 0 0 10px 10px; padding: 12px; }
  .alb__slots { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
  .alb__sheet { inset: 6px; border-radius: 10px; }
  .alb-plate { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .alb__cover { display: none; }
  .alb__sheet, .alb__meter i { animation: none; transition: none; }
}
