/* =========================================================
   Sacred Heart Convent School, Jalalabad — GALLERY
   The album archive (gallery.html) and album pages (album.html).
   Load after css/style.css; uses its :root colours, fonts and easing.
   ========================================================= */

:root {
  --vinyl:   #111317;   /* disc */
  --vinyl-2: #262a31;   /* disc grooves */
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- 1. Stage ---------- */
.shelf-stage {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  min-height: clamp(640px, calc(100vh - 130px), 920px);
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream) 58%, var(--white) 100%);
  color: var(--navy-800);
}

/* Top strip: brand · now on the shelf · filters + view */
.shelf-top {
  position: relative; z-index: 6; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px;
  padding: 16px clamp(16px, 3vw, 40px); border-bottom: 1px solid var(--line);
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
}
.shelf-top__brand { font: 600 12px/1.2 var(--sans); letter-spacing: 3px; color: var(--navy-800); white-space: nowrap; }
.shelf-top__now { justify-self: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.shelf-top__now b { color: var(--navy-800); font-weight: 600; }
.shelf-top__tools { display: flex; align-items: center; gap: 12px; }
.shelf-dot { display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; vertical-align: 1px; background: var(--gold); animation: shelfPulse 2.4s ease-in-out infinite; }
@keyframes shelfPulse { 50% { opacity: .35; } }

.shelf-filters { display: flex; gap: 2px; }
.shelf-filter { padding: 6px 10px; border-radius: 30px; font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); transition: color .3s, background .3s; }
.shelf-filter:hover { color: var(--navy-800); }
.shelf-filter[aria-pressed="true"] { background: var(--navy-800); color: var(--white); }
.shelf-filter:disabled { opacity: .4; cursor: default; }
.shelf-select { display: none; }
.shelf-select select { appearance: none; padding: 7px 34px 7px 14px; border: 1px solid var(--line); border-radius: 30px; background: var(--white) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b2347' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>") right 12px center / 14px no-repeat; color: var(--navy-800); font: 500 11px var(--sans); letter-spacing: 1.2px; text-transform: uppercase; cursor: pointer; }
.shelf-view { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 30px; background: var(--white); font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--navy-800); transition: border-color .3s, background .3s; }
.shelf-view .icon { font-size: 14px; }
.shelf-view:hover, .shelf-view[aria-pressed="true"] { border-color: var(--gold); }
.shelf-filter:focus-visible, .shelf-view:focus-visible, .shelf-select select:focus-visible, .shelf-nav:focus-visible, .tl__year:focus-visible, .shelf-open:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- 2. The 3D scene ---------- */
.shelf-scene {
  position: relative; flex: 1; min-height: 360px;
  perspective: 1500px; perspective-origin: 50% 18%;
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.shelf-scene.is-dragging { cursor: grabbing; }
.shelf-world { position: absolute; left: 50%; top: 52%; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; }
.shelf-ring { position: absolute; transform-style: preserve-3d; }

/* Curved platter with a dashed, record-like rim (size set by the script) */
.shelf-platter {
  position: absolute; border-radius: 50%; will-change: transform;
  background:
    repeating-radial-gradient(circle, rgba(11, 35, 71, .035) 0 1px, transparent 1px 9px),
    radial-gradient(circle, var(--white) 0%, var(--cream) 82%, rgba(212, 165, 60, .18) 100%);
  border: 2px dashed rgba(212, 165, 60, .75);
  box-shadow: inset 0 0 0 12px rgba(212, 165, 60, .08), inset 0 0 0 13px rgba(11, 35, 71, .08);
}
.shelf-platter::before {
  content: ''; position: absolute; inset: 18px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(11, 35, 71, .22) 0 .12deg, transparent .12deg 1.5deg);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 14px), #000 calc(100% - 13px));
          mask: radial-gradient(closest-side, transparent calc(100% - 14px), #000 calc(100% - 13px));
}

/* ---------- 3. Covers (shelf + grid). Designed from the data; cover.jpg sits on top ---------- */
.cover { position: relative; display: block; width: 100%; aspect-ratio: 1; height: auto; overflow: hidden; background: var(--c); color: var(--t); container-type: inline-size; }
.face--front .cover { height: 100%; }
.cover__art { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 10cqi 9cqi 9cqi; }
.cover__art::before { content: ''; position: absolute; inset: 4.5cqi; border: 1px solid currentColor; opacity: .25; pointer-events: none; }
.cover__art::after { content: ''; position: absolute; right: -30cqi; top: -30cqi; width: 78cqi; aspect-ratio: 1; border-radius: 50%; background: repeating-radial-gradient(circle, currentColor 0 1px, transparent 1px 3.4cqi); opacity: .12; pointer-events: none; }
.cover__top { display: flex; align-items: center; justify-content: space-between; font-size: 3.4cqi; letter-spacing: .3em; }
.cover__logo { display: grid; place-items: center; width: 12cqi; aspect-ratio: 1; overflow: hidden; border-radius: 50%; background: var(--a); color: var(--c); font: 700 2.7cqi/1 var(--sans); letter-spacing: .04em; }
.cover__logo img { width: 100%; height: 100%; object-fit: contain; background: var(--white); }
.cover__code { font-weight: 600; font-variant-numeric: lining-nums; }
.cover__cat { margin-top: auto; font-size: 3.4cqi; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--a); }
.cover__title { margin: 2.5cqi 0 1cqi; font: 600 10.5cqi/1.02 var(--serif); text-wrap: balance; }
.cover__year { font: italic 600 19cqi/.9 var(--serif); font-variant-numeric: lining-nums; color: var(--a); }
.cover__school { margin-top: 5cqi; padding-top: 3.5cqi; border-top: 1px solid currentColor; border-top-color: color-mix(in srgb, currentColor 30%, transparent); font-size: 3cqi; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.cover__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- 4. A case ----------
   .slot      placed by js/gallery-shelf.js (transform written by JS only)
   .case      CSS only: pulled out / leaning
   .disc-wrap CSS only: slides the disc out of the sleeve
   The box has faces on the front, back, spine, top and bottom — the open edge
   (opposite the spine) has none, so the disc can slide out there. */
.slot { position: absolute; left: calc(var(--W) / -2); top: calc(var(--W) / -2); width: var(--W); height: var(--W); transform-style: preserve-3d; cursor: pointer; --shade: 0; --face-camera: 0deg; }
.case { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; transform-origin: 50% 100%; transition: transform .45s var(--ease); }
.face { position: absolute; overflow: hidden; backface-visibility: hidden; background: var(--c); color: var(--t); }
.face::after { content: ''; position: absolute; inset: 0; background: var(--navy-900); opacity: var(--shade); pointer-events: none; }
.face--front { inset: 0; transform: translateZ(calc(var(--T) / 2)); box-shadow: inset 0 0 0 1px rgba(7, 26, 54, .12); }
.face--back { inset: 0; transform: rotateY(180deg) translateZ(calc(var(--T) / 2)); }
.face--back::before { content: ''; position: absolute; inset: 8%; border: 1px solid currentColor; opacity: .15; }
.face--spine { top: 0; left: calc((var(--W) - var(--T)) / 2); width: var(--T); height: 100%; transform: rotateY(-90deg) translateZ(calc(var(--W) / 2)); }
.face--top, .face--bottom { left: 0; top: calc((var(--W) - var(--T)) / 2); width: 100%; height: var(--T); }
.face--top { transform: rotateX(90deg) translateZ(calc(var(--W) / 2)); }
.face--bottom { transform: rotateX(-90deg) translateZ(calc(var(--W) / 2)); }
.face--top::after, .face--bottom::after { opacity: calc(var(--shade) + .2); }

/* Only what you can see takes the mouse: spines, the front cover and a disc that is out.
   (Hidden faces and discs still inside other sleeves would otherwise catch clicks.) */
.slot, .case, .disc-wrap, .face, .disc { pointer-events: none; }
.face--spine, .slot.is-front .face--front, .disc-out .disc { pointer-events: auto; }

/* Spine: code · title (vertical) · year · logo dot */
.face--spine {
  display: flex; flex-direction: column; align-items: center; padding: 12px 0 10px;
  box-shadow: inset 3px 0 0 rgba(255, 255, 255, .14), inset -3px 0 0 rgba(7, 26, 54, .16);
}
.face--spine::before { content: ''; position: absolute; left: 0; right: 0; top: 56px; height: 1px; background: var(--a); opacity: .7; }
.spine__code, .spine__title, .spine__year { writing-mode: vertical-rl; white-space: nowrap; }
.spine__code { font-size: 8px; letter-spacing: 1.2px; opacity: .8; height: 40px; overflow: hidden; font-variant-numeric: lining-nums; }
.spine__title { flex: 1; min-height: 0; margin: 14px 0 10px; overflow: hidden; text-overflow: ellipsis; font: 700 clamp(8px, calc(var(--T) * .44), 15px)/1 var(--serif); letter-spacing: .3px; }
.spine__year { font-size: 9px; font-weight: 600; letter-spacing: 1.6px; font-variant-numeric: lining-nums; }
.spine__logo { width: 9px; height: 9px; margin-top: 9px; border-radius: 50%; background: var(--a); box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }

/* Shelf book hovered: slides out of the shelf towards you (its spine side is local −X) and lifts */
.slot.is-hover:not(.is-front) .case { transform: translate3d(-40px, -6px, 0); }
/* Neighbours lean away from the hovered book */
.slot.lean-l .case { transform: rotateX(3deg); }
.slot.lean-r .case { transform: rotateX(-3deg); }

/* The disc inside the sleeve (between the front and back faces) */
.disc-wrap {
  position: absolute; left: 3%; top: 3%; width: 94%; height: 94%;
  transform-style: preserve-3d; will-change: transform;
  transition: transform .45s var(--ease) .1s;                 /* going back in: after the disc has turned back */
}
.disc-wrap::before { /* soft glow, shown on hover */
  content: ''; position: absolute; inset: -12%; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .45s;
  background: radial-gradient(circle, rgba(241, 212, 136, .55) 0 38%, rgba(241, 212, 136, 0) 70%);
  transform: translateZ(-2px);
}
/* Front album: 35% out at rest, 60% out on hover */
.slot.is-front .disc-wrap { transform: translateX(calc(var(--W) * .36)); transition: transform .6s var(--ease); }
.slot.is-front.is-hover .disc-wrap { transform: translateX(calc(var(--W) * .59)); }
/* Shelf book hovered: the disc rises out of the top */
.slot.is-hover:not(.is-front) .disc-wrap { transform: translate3d(-58%, -58%, 0) scale(.8); transition-delay: 0s; }   /* up, and out past the spine */
.slot.is-front.is-hover .disc-wrap::before { opacity: 1; }   /* front only: a turned shelf disc would cut through it */
.no-trans .disc-wrap, .no-trans .case, .no-trans .disc { transition: none !important; }

/* ---------- 5. The disc ---------- */
.disc {
  position: relative; display: block; width: 100%; height: 100%; padding: 0; border-radius: 50%; container-type: inline-size;
  background:
    radial-gradient(circle, transparent 0 48.6%, rgba(255, 255, 255, .06) 49% 49.4%, transparent 49.8%),
    repeating-radial-gradient(circle, var(--vinyl) 0 1.4px, var(--vinyl-2) 1.8px 2.6px, var(--vinyl) 3px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 14px 34px rgba(7, 26, 54, .35);
  cursor: pointer; transition: transform .35s var(--ease);
}
.disc::after { /* moving light sheen (stays lit from the same side while the disc turns) */
  content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 25deg, transparent 0 6%, rgba(255, 255, 255, .17) 11%, transparent 17% 52%, rgba(255, 255, 255, .12) 61%, transparent 67%);
  animation: discSheen 5s ease-in-out infinite alternate;
}
@keyframes discSheen { to { transform: rotate(28deg); } }
.disc:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
/* Shelf book hovered: the risen disc turns to face the camera */
.slot.is-hover:not(.is-front) .disc { transform: rotateY(var(--face-camera)); transition: transform .45s var(--ease) .15s; }

/* Spin: paused in the sleeve; runs when out; a second layer speeds it up on hover */
.disc__spin, .disc__boost { position: absolute; inset: 0; border-radius: 50%; will-change: transform; animation: discSpin 8s linear infinite paused; }
.disc__boost { animation-duration: 4s; }
.disc-out .disc__spin, .disc--spin .disc__spin, .is-hover .disc__boost { animation-play-state: running; }
@keyframes discSpin { to { transform: rotate(360deg); } }
.disc__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: var(--gold-300); font: 600 7.2px var(--sans); letter-spacing: 1px; text-transform: uppercase; }
.disc__label {
  position: absolute; inset: 31.5%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 12% 0 13%;
  background: radial-gradient(circle, var(--cream) 0 56%, var(--gold-300) 57% 59%, var(--cream) 60%);
  box-shadow: 0 0 0 2px var(--gold), inset 0 0 0 4px rgba(212, 165, 60, .25);
  color: var(--navy-800);
}
.disc__logo { display: grid; place-items: center; width: 30%; aspect-ratio: 1; overflow: hidden; border-radius: 50%; font: 700 3.4cqi/1 var(--sans); letter-spacing: .03em; }
.disc__logo img { width: 100%; height: 100%; object-fit: contain; }
.disc__code { font: 600 2.6cqi/1 var(--sans); letter-spacing: .14em; font-variant-numeric: lining-nums; color: var(--gold); }
.disc__hole { position: absolute; left: 50%; top: 50%; width: 4.4%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: var(--hole, var(--cream)); box-shadow: inset 0 1px 2px rgba(7, 26, 54, .55); }

/* ---------- 6. Arrows + hint ---------- */
.shelf-nav {
  position: absolute; top: 52%; z-index: 5; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(11, 35, 71, .18); background: var(--white); color: var(--navy-800); font-size: 18px; box-shadow: var(--shadow);
  transform: translateY(-50%); transition: background .3s, color .3s, border-color .3s, opacity .3s;
}
.shelf-nav:hover { background: var(--navy-800); border-color: var(--navy-800); color: var(--white); }
.shelf-nav:disabled { opacity: .3; pointer-events: none; }
.shelf-nav--prev { left: clamp(12px, 3vw, 40px); }
.shelf-nav--next { right: clamp(12px, 3vw, 40px); }
.shelf-hint { position: absolute; left: 50%; bottom: 10px; z-index: 5; transform: translateX(-50%); white-space: nowrap; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); pointer-events: none; }
.shelf-empty { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; font-family: var(--serif); font-size: 24px; color: var(--muted); }

/* ---------- 7. Under the shelf: caption + year timeline ---------- */
.shelf-info { position: relative; z-index: 6; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: end; gap: 48px; padding: 0 clamp(16px, 3vw, 40px) 26px; }
.shelf-caption { min-height: 150px; }
.shelf-caption.is-in > * { animation: captionIn .55s var(--ease) both; }
.shelf-caption.is-in > :nth-child(2) { animation-delay: .04s; }
.shelf-caption.is-in > :nth-child(3) { animation-delay: .08s; }
.shelf-caption.is-in > :nth-child(n + 4) { animation-delay: .12s; }
@keyframes captionIn { from { opacity: 0; transform: translateY(10px); } }
.shelf-tag { display: flex; align-items: center; flex-wrap: wrap; font-size: 11px; font-weight: 600; letter-spacing: 2.4px; text-transform: uppercase; color: var(--navy-700); font-variant-numeric: lining-nums; }
.sample-chip { margin-left: 12px; padding: 2px 9px; border: 1px dashed var(--gold); border-radius: 20px; font-size: 9px; letter-spacing: 1.5px; color: var(--navy-700); }
.shelf-title { margin: 8px 0 6px; font: 600 clamp(30px, 3.2vw, 46px)/1.04 var(--serif); font-variant-numeric: lining-nums; color: var(--navy-900); }
.shelf-meta { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 12.5px; color: var(--muted); font-variant-numeric: lining-nums; }
.shelf-meta span::before { content: '·'; margin: 0 9px; color: var(--gold); }
.shelf-summary { max-width: 52ch; margin-top: 6px; font-size: 13.5px; color: var(--ink); }
.shelf-open { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding-bottom: 3px; border-bottom: 2px solid var(--gold); font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--navy-800); transition: gap .3s var(--ease); }
.shelf-open:hover { gap: 14px; }

.tl { padding-top: 14px; }
.tl__track {
  position: relative; height: 50px; border-bottom: 1px solid rgba(11, 35, 71, .3);
  background: repeating-linear-gradient(90deg, rgba(11, 35, 71, .16) 0 1px, transparent 1px calc(100% / var(--months, 36))) left bottom / 100% 6px no-repeat;
}
.tl__tick { position: absolute; bottom: 0; width: 3px; height: calc(var(--h) * 1%); margin-left: -1.5px; padding: 0; border-radius: 2px 2px 0 0; background: var(--navy-700); opacity: .4; transition: opacity .3s, background .3s; }
.tl__tick::before { content: ''; position: absolute; inset: -4px -4px 0; }
.tl__tick:hover { opacity: .85; }
.tl__tick.is-on { background: var(--gold); opacity: 1; }
.tl__dotwrap { position: absolute; inset: 0; pointer-events: none; transition: transform .7s cubic-bezier(.65, 0, .35, 1); }
.tl__dot { position: absolute; left: 0; top: -8px; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(212, 165, 60, .22); }
.tl__years { position: relative; height: 24px; margin-top: 8px; }
.tl__year { position: absolute; top: 0; padding: 2px 0 2px 7px; border-left: 1px solid rgba(11, 35, 71, .3); font-size: 11px; letter-spacing: 2px; color: var(--muted); font-variant-numeric: lining-nums; transition: color .3s; }
.tl__year:hover:not(:disabled), .tl__year.is-on { color: var(--navy-800); font-weight: 600; }
.tl__year:disabled { opacity: .45; cursor: default; }

/* ---------- 8. Grid view ---------- */
.shelf-stage.is-grid { min-height: 0; }
.shelf-stage.is-grid .shelf-scene, .shelf-stage.is-grid .shelf-info { display: none; }
.album-grid { position: relative; padding: 34px clamp(16px, 3vw, 40px) 60px; }
.album-grid__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 30px 26px; }
.album-card { display: block; }
.album-card .cover { border-radius: 6px; box-shadow: var(--shadow); transition: transform .45s var(--ease), box-shadow .45s; }
.album-card:hover .cover, .album-card:focus-visible .cover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.album-card:focus-visible { outline: none; }
.album-card:focus-visible .cover { outline: 3px solid var(--gold); outline-offset: 3px; }
.album-card__body { display: block; padding-top: 14px; }
.album-card__tag { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--navy-700); font-variant-numeric: lining-nums; }
.album-card strong { display: block; margin: 4px 0 2px; font: 600 21px/1.15 var(--serif); font-variant-numeric: lining-nums; color: var(--navy-900); }
.album-card small { font-size: 12px; color: var(--muted); font-variant-numeric: lining-nums; }
.album-grid .shelf-empty { position: static; padding: 60px 0; }

.archive-noscript { padding: 80px 20px; text-align: center; font-family: var(--serif); font-size: 22px; color: var(--navy-800); background: var(--cream); }

/* ---------- 9. Dive: shelf to album and back ----------
   A flat, fixed layer above everything (built by js/gallery-ui.js), so nothing in the
   3D scene clips it. The disc rolls to the centre, then the hole (album colour) grows. */
.dive { position: fixed; inset: 0; z-index: 9990; pointer-events: none; }
.dive__veil {
  position: absolute; inset: 0; opacity: 0; will-change: opacity;
  background: color-mix(in srgb, var(--cream) 55%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.dive__disc { position: absolute; will-change: transform; --hole: var(--c); }
.dive__disc .disc { cursor: default; box-shadow: 0 30px 80px rgba(7, 26, 54, .45); }
.dive__fill { position: absolute; inset: 0; background: var(--c); clip-path: circle(0px at 50% 50%); will-change: clip-path; }

/* Arriving / leaving (classes set by the inline script in the page head) */
html.dive-in, html.dive-leave { background: var(--dive-c, var(--navy-900)); }
html.dive-in body { clip-path: circle(0px at 50% 50vh); animation: diveFallback 0s 3s forwards; }
html.dive-in .preloader, html.dive-back .preloader { display: none; }
html.dive-back body::after { content: ''; position: fixed; inset: 0; z-index: 9989; background: var(--dive-c, var(--navy-900)); animation: diveFallbackHide 0s 3s forwards; }
@keyframes diveFallback { to { clip-path: none; } }
@keyframes diveFallbackHide { to { visibility: hidden; } }

/* ---------- 10. Album page (album.html) ---------- */
.album { background: var(--white); }
.album-wrap { width: min(100% - 2 * clamp(16px, 3vw, 40px), 1400px); margin-inline: auto; }
.album-top { border-bottom: 1px solid var(--line); background: var(--cream); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.album-top .album-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-block: 14px; }
.album-back { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--navy-800); transition: gap .3s var(--ease); }
.album-back:hover { gap: 13px; }
.album-back:focus-visible, .pager-case:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.album-top__code { color: var(--muted); font-variant-numeric: lining-nums; }
.album-top__code b { color: var(--navy-800); font-weight: 600; }

.album-hero { background: linear-gradient(180deg, var(--cream), var(--white)); }
.album-hero .album-wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 40px; padding-block: 26px 6px; }
.album-school { margin-top: 6px; font-size: 12.5px; letter-spacing: .5px; color: var(--muted); }
.album-title { margin: 8px 0 12px; font: 600 clamp(40px, 4.4vw, 66px)/1 var(--serif); font-variant-numeric: lining-nums; color: var(--navy-900); text-wrap: balance; }
.album-meta { display: flex; flex-wrap: wrap; font-size: 11.5px; font-weight: 600; letter-spacing: 2.4px; text-transform: uppercase; color: var(--navy-700); font-variant-numeric: lining-nums; }
.album-meta span + span::before { content: '/'; margin: 0 12px; color: var(--gold); }
.album-desc { max-width: 62ch; margin-top: 12px; font-size: 14.5px; color: var(--ink); }
.album--in .album-hero__text > * { animation: captionIn .7s var(--ease) both; }
.album--in .album-hero__text > :nth-child(2) { animation-delay: .06s; }
.album--in .album-hero__text > :nth-child(3) { animation-delay: .12s; }
.album--in .album-hero__text > :nth-child(n + 4) { animation-delay: .18s; }

/* The case facing you, disc half out and spinning; tilts with the mouse (js/album.js) */
.album-stage { --W: clamp(190px, 18vw, 262px); --T: 30px; --hole: var(--cream); position: relative; height: calc(var(--W) * 1.22); perspective: 1400px; }
.album-slot { position: absolute; left: 42%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; transform: rotateY(18deg); }
.album-slot .slot { cursor: default; }

/* Photos: masonry; each photo fades up as it scrolls into view */
.album-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 10px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.album-sec-head h2 { font: 600 28px/1.1 var(--serif); color: var(--navy-900); }
.album-sec-head span { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); font-variant-numeric: lining-nums; }
.album-photos { padding-block: 22px 40px; }
.masonry { display: flex; align-items: flex-start; gap: 16px; }
.masonry__col { flex: 1; min-width: 0; }
.album-photo { margin-bottom: 16px; border-radius: 8px; opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease) var(--d, 0s), transform .7s var(--ease) var(--d, 0s); }
.album-photo.in { opacity: 1; transform: none; }
.album-photo img { height: auto; }
.album-photo.is-missing { aspect-ratio: 4 / 3; }
.album-empty { padding: 30px 0; color: var(--muted); }
/* Large albums: 40 photos at a time — loads on scroll, the button is the fallback */
.album-loadmore { position: relative; display: grid; justify-items: center; gap: 12px; padding-top: 18px; text-align: center; }
.album-loadmore[hidden] { display: none; }
.album-loadmore__sentinel { position: absolute; top: -600px; left: 0; width: 1px; height: 1px; }
.album-loadmore__count { margin: 0; font-size: 13px; color: var(--muted); }
.album-loadmore__count b { color: var(--navy-800); font-weight: 600; }
.album-loadmore__btn.is-loading { opacity: .6; pointer-events: none; }
.album-loadmore__btn.is-loading .icon { animation: loadmoreSpin 1s linear infinite; }
@keyframes loadmoreSpin { to { transform: rotate(360deg); } }

/* Programme (numbered rows) + video */
.album-lower { padding-block: 20px 50px; }
.album-lower .album-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 50px; align-items: start; }
.album-lower .album-wrap > :only-child { max-width: 760px; }
.prog li { display: flex; align-items: baseline; gap: 14px; padding: 12px 10px; border-bottom: 1px solid var(--line); transition: background .3s; }
.prog li:hover { background: var(--cream); }
.prog li:hover .prog__n { color: var(--navy-800); }
.prog__n { width: 24px; flex-shrink: 0; font-size: 12px; font-weight: 600; letter-spacing: 1px; color: var(--gold); font-variant-numeric: lining-nums; transition: color .3s; }
.prog__item { font: 600 19px/1.2 var(--serif); color: var(--navy-900); }
.prog__dots { flex: 1; min-width: 20px; border-bottom: 1px dotted rgba(11, 35, 71, .3); transform: translateY(-4px); }
.prog__by { font-size: 13px; color: var(--muted); text-align: right; }
.album-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; box-shadow: var(--shadow); }

/* Previous / next album as small cases */
.album-pager { padding-block: 10px 30px; }
.album-pager .album-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pager-case { display: flex; align-items: center; gap: 20px; padding: 16px 22px; border: 1px solid var(--line); border-radius: 12px; transition: border-color .3s, box-shadow .3s; }
.pager-case:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.pager-case--next { grid-column: 2; flex-direction: row-reverse; text-align: right; }
.pager-case small { display: block; font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.pager-case strong { display: block; margin-top: 2px; font: 600 21px/1.15 var(--serif); color: var(--navy-900); font-variant-numeric: lining-nums; }
.mini { --W: 78px; --T: 14px; position: relative; flex-shrink: 0; width: var(--W); height: var(--W); perspective: 500px; }
.mini .slot { left: 0; top: 0; transform: rotateY(26deg); transition: transform .5s var(--ease); }
.pager-case--next .mini .slot { transform: rotateY(-26deg); }
.pager-case:hover .mini .slot { transform: rotateY(8deg); }
.mini .face--spine > *, .mini .face--spine::before { display: none; }

/* More from the same year */
.album-more { padding-block: 10px 60px; }
.album-more__list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 210px); gap: 22px; overflow-x: auto; padding: 4px 4px 14px; scroll-snap-type: x proximity; }
.album-more__list > * { scroll-snap-align: start; }

/* Unknown or unpublished album */
.album-missing { padding: 90px 20px 110px; text-align: center; background: var(--cream); }
.album-missing h1 { margin: 10px 0; font: 600 clamp(36px, 4vw, 52px)/1.1 var(--serif); color: var(--navy-900); }
.album-missing .shelf-tag { justify-content: center; }
.album-missing p { max-width: 46ch; margin: 0 auto 26px; color: var(--muted); }

/* ---------- 11. Responsive ---------- */
@media (max-width: 1365px) {
  .shelf-filters { display: none; }
  .shelf-select { display: block; }
}
@media (max-width: 991px) {
  .shelf-info { grid-template-columns: 1fr; gap: 14px; }
  .shelf-caption { min-height: 0; }
  .album-hero .album-wrap { grid-template-columns: 1fr; gap: 0; }
  .album-stage { --W: 200px; }
  .album-lower .album-wrap { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 768px) {
  .shelf-stage { min-height: calc(100svh - 80px); }
  .shelf-top { grid-template-columns: 1fr auto; gap: 10px 14px; padding-block: 12px; }
  .shelf-top__now { grid-column: 1 / -1; grid-row: 2; justify-self: start; font-size: 10px; }
  .shelf-top__tools { gap: 8px; }
  .shelf-view span { display: none; }
  .shelf-view { padding: 8px 10px; }
  .shelf-scene { min-height: 300px; perspective: 1100px; }
  .shelf-nav { width: 40px; height: 40px; font-size: 16px; }
  .shelf-hint { display: none; }
  .shelf-timeline { overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .tl { min-width: 620px; padding-right: 20px; }
  .album-grid__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .album-card strong { font-size: 18px; }
}
@media (max-width: 600px) {
  .masonry { gap: 10px; }
  .album-stage { --W: 165px; --T: 24px; }
  .album-photo { margin-bottom: 10px; }
  .album-pager .album-wrap { grid-template-columns: 1fr; }
  .pager-case--next { grid-column: auto; }
  .prog__item { font-size: 17px; }
}
@media (max-width: 480px) {
  .shelf-top__brand { font-size: 10.5px; letter-spacing: 1.6px; }
  .shelf-select select { max-width: 124px; padding-left: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .disc__spin, .disc__boost, .disc::after, .shelf-dot { animation: none; }
  .tl__dotwrap { transition: none; }
}
