/* Box Vault — gallery + 3D box, layered on the shared editorial styles.css */

.numbers-note { font-family: var(--mono); font-size: .72rem; color: var(--dim);
  margin-top: 14px; letter-spacing: .02em; }

/* Library controls ------------------------------------------------ */
.library { max-width: 1320px; margin: 0 auto; padding: 40px 60px 80px; }
.lib-controls { display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  margin-bottom: 32px; }
.lib-search {
  flex: 1 1 280px; min-width: 220px; height: 44px; padding: 0 16px;
  font-family: var(--mono); font-size: .9rem; color: var(--text);
  background: var(--bg-alt); border: 1px solid var(--rule); border-radius: var(--radius);
}
.lib-search:focus { outline: none; border-color: var(--dim); }
.lib-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .04em;
  text-transform: uppercase; padding: 9px 14px; cursor: pointer;
  background: var(--bg-alt); color: var(--dim);
  border: 1px solid var(--rule); border-radius: 100px; transition: .15s;
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--black); color: var(--bg); border-color: var(--black); }
.chip-n { opacity: .55; font-size: .92em; }
.lib-count { font-family: var(--mono); font-size: .74rem; color: var(--dim);
  margin-left: auto; }

/* Grid ------------------------------------------------------------ */
.grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
}
/* tile-size views (density toggle) */
.library.d-lg .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 26px; }
.library.d-sm .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.library.d-sm .card-meta { gap: 0; }
.library.d-sm .card-title { font-size: .72rem; -webkit-line-clamp: 1; }
.library.d-sm .card-sub { font-size: .58rem; }

.density { display: flex; gap: 4px; margin-left: auto; align-self: center; }
.density button { font-family: var(--mono); font-size: .66rem; letter-spacing: .04em;
  text-transform: uppercase; padding: 7px 10px; cursor: pointer;
  background: var(--bg-alt); color: var(--dim);
  border: 1px solid var(--rule); border-radius: 100px; transition: .15s; }
.density button:hover { color: var(--text); }
.density button.active { background: var(--black); color: var(--bg); border-color: var(--black); }
.card { cursor: pointer; display: flex; flex-direction: column; gap: 10px; }
.card-art {
  position: relative; aspect-ratio: 3/4; display: flex; align-items: center;
  justify-content: center; background: transparent; overflow: visible;
  perspective: 900px;
}
.card-art img { max-width: 100%; max-height: 100%; object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.28)); transition: transform .35s ease; }
.card:hover .card-art img { transform: translateY(-4px) scale(1.03); }
.card-art.noimg { aspect-ratio: 3/4; border: 1px dashed var(--rule);
  border-radius: var(--radius); }
.card-art.noimg::after { content: 'NO ART YET'; font-family: var(--mono);
  font-size: .66rem; color: var(--faint); letter-spacing: .08em; }
.card-meta { display: flex; flex-direction: column; gap: 2px; }
.card-title { font-size: .86rem; font-weight: 600; line-height: 1.25;
  color: var(--text); display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { font-family: var(--mono); font-size: .66rem; color: var(--dim);
  letter-spacing: .03em; text-transform: uppercase; }
.card-badge { font-family: var(--mono); font-size: .58rem; }

/* Modal ----------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 500; display: flex;
  align-items: center; justify-content: center; padding: 30px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.62);
  backdrop-filter: blur(4px); }
.modal-card { position: relative; z-index: 1; width: min(960px, 96vw);
  max-height: 92vh; overflow-y: auto; background: var(--bg-alt);
  border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); }
.modal-close { position: absolute; top: 12px; right: 16px; z-index: 3;
  font-size: 1.8rem; line-height: 1; color: var(--dim); background: none;
  border: none; cursor: pointer; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 34px; }
.detail-head { margin-bottom: 24px; }
.detail-title { font-size: 1.6rem; font-weight: 700; line-height: 1.15; }
.detail-sub { font-family: var(--mono); font-size: .74rem; color: var(--dim);
  margin-top: 6px; letter-spacing: .04em; text-transform: uppercase; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
@media (max-width: 720px){ .detail-grid { grid-template-columns: 1fr; } }

.stage { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.stage-img { max-width: 100%; max-height: 360px; object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(0,0,0,.32)); }
.stage-toggle { display: flex; gap: 6px; }
.stage-toggle button { font-family: var(--mono); font-size: .68rem;
  text-transform: uppercase; letter-spacing: .04em; padding: 7px 12px;
  background: var(--bg); color: var(--dim); border: 1px solid var(--rule);
  border-radius: 100px; cursor: pointer; }
.stage-toggle button.active { background: var(--black); color: var(--bg);
  border-color: var(--black); }

/* faces list */
.faces { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.face-thumb { display: flex; flex-direction: column; gap: 6px; }
.face-thumb img { width: 100%; border: 1px solid var(--rule);
  border-radius: 4px; background: #0001; }
.face-thumb span { font-family: var(--mono); font-size: .62rem; color: var(--dim);
  letter-spacing: .05em; text-transform: uppercase; }
.face-thumb.wide { grid-column: 1 / -1; }
.detail-links { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.detail-links a { font-family: var(--mono); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .04em; padding: 8px 14px; border: 1px solid var(--rule);
  border-radius: 100px; color: var(--text); }
.detail-links a:hover { background: var(--black); color: var(--bg); }

/* ----- CSS 3D interactive box (built from front + spine + back) ----- */
.box3d-stage { perspective: 1100px; width: 100%; height: 360px;
  display: flex; align-items: center; justify-content: center; }
.box3d {
  position: relative; transform-style: preserve-3d;
  transform: rotateX(-8deg) rotateY(-32deg);
  transition: transform .1s linear; cursor: grab;
}
.box3d:active { cursor: grabbing; }
.box3d .face { position: absolute; background-size: cover; background-position: center;
  backface-visibility: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.box3d .front { background-image: var(--front); }
.box3d .back  { background-image: var(--back); }
.box3d .spine { background-image: var(--spine); }
.box3d .top, .box3d .bottom { background: #1b1b1b; }
.box3d-hint { font-family: var(--mono); font-size: .62rem; color: var(--faint);
  letter-spacing: .06em; text-transform: uppercase; margin-top: 8px; }

.site-foot { display: flex; justify-content: space-between; align-items: center;
  padding: 30px 60px; border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: .72rem; color: var(--dim); }
.site-foot .sep { color: var(--faint); }
.foot-dim { color: var(--faint); }
@media (max-width: 640px){ .library { padding: 30px 20px 60px; } .site-foot { padding: 24px 20px; } }

/* ============================================================
   About page — editorial long-read with box-art marquee
   ============================================================ */
.ab-hero { max-width: 1100px; margin: 0 auto; padding: 70px 60px 34px; }
.ab-hero h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.02;
  letter-spacing: -0.02em; font-weight: 700; max-width: 14ch; }
.ab-hero .lede { font-size: clamp(1.05rem, 1.6vw, 1.35rem); color: var(--dim);
  max-width: 60ch; margin-top: 22px; line-height: 1.55; }
[data-theme="dark"] .ab-hero .lede { color: #aaa; }

/* full-bleed scrolling box-art marquee */
.ab-marquee { margin: 36px 0 10px; overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ab-track { display: flex; gap: 22px; width: max-content;
  animation: ab-scroll 70s linear infinite; }
.ab-track.rev { animation-direction: reverse; animation-duration: 88s; margin-top: 22px; }
.ab-marquee:hover .ab-track { animation-play-state: paused; }
.ab-track img { height: 150px; width: auto; object-fit: contain; border-radius: 3px;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.30)); }
@keyframes ab-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce){ .ab-track { animation: none; } }

/* body long-read */
.ab-body { max-width: 760px; margin: 0 auto; padding: 30px 60px 40px; }
.ab-kicker { font-family: var(--mono); font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--dim); margin: 64px 0 14px; }
.ab-body p { font-size: 1.06rem; line-height: 1.72; margin-bottom: 18px; color: var(--text); }
[data-theme="dark"] .ab-body p { color: #c8c8c8; }
.ab-body p.big { font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.45;
  font-weight: 500; color: var(--text); margin: 6px 0 30px; }
.ab-body strong { font-weight: 600; color: var(--text); }
.ab-body a { color: var(--text); border-bottom: 1px solid var(--muted); }
.ab-body a:hover { border-color: var(--text); }

/* era blocks with oversized year */
.ab-era { display: grid; grid-template-columns: 160px 1fr; gap: 28px;
  padding: 38px 0; border-top: 1px solid var(--rule); align-items: start; }
.ab-era .yr { font-family: var(--mono); font-weight: 500; font-size: 2.4rem;
  line-height: 1; color: var(--text); letter-spacing: -0.02em; position: sticky; top: 80px; }
.ab-era .yr small { display: block; font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--dim); margin-top: 8px; font-weight: 400; }
.ab-era h3 { font-size: 1.5rem; font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
.ab-era p { font-size: 1.02rem; line-height: 1.68; color: var(--text); margin-bottom: 14px; }
[data-theme="dark"] .ab-era p { color: #c0c0c0; }
@media (max-width: 680px){ .ab-era { grid-template-columns: 1fr; gap: 10px; }
  .ab-era .yr { position: static; font-size: 1.8rem; } }

/* pull quote */
.ab-quote { margin: 14px 0 8px; padding: 6px 0 6px 26px; border-left: 3px solid var(--text); }
.ab-quote p { font-size: clamp(1.25rem, 2.6vw, 1.75rem); line-height: 1.35;
  font-weight: 500; font-style: italic; color: var(--text); }
.ab-quote cite { display: block; font-family: var(--mono); font-style: normal;
  font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); margin-top: 14px; }

/* stat band */
.ab-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin: 30px 0; padding: 30px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.ab-stats .s .v { font-family: var(--mono); font-size: 2.3rem; font-weight: 500;
  line-height: 1; letter-spacing: -0.02em; }
.ab-stats .s .l { font-size: .86rem; color: var(--dim); margin-top: 10px; line-height: 1.4; }
@media (max-width: 680px){ .ab-stats { grid-template-columns: 1fr; gap: 18px; text-align: left; } }

/* closing CTA + sources */
.ab-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 10px; }
.ab-cta a { font-family: var(--mono); font-size: .78rem; text-transform: uppercase;
  letter-spacing: .05em; padding: 12px 20px; border: 1px solid var(--text); border-radius: 100px; color: var(--text); }
.ab-cta a.primary { background: var(--black); color: var(--bg); }
.ab-cta a:hover { background: var(--text); color: var(--bg); }
.ab-sources { font-family: var(--mono); font-size: .68rem; line-height: 1.9;
  color: var(--faint); margin-top: 30px; }
.ab-sources a { color: var(--dim); border-bottom: 1px dotted var(--muted); }

/* ===== Two-section library: tabs, system picker, lightbox ===== */
.section-tabs { display: flex; gap: 6px; margin-bottom: 26px; align-items: center;
  border-bottom: 1px solid var(--rule); }
.sectab { font-family: var(--mono); font-size: .82rem; letter-spacing: .03em;
  padding: 12px 18px; background: none; border: none; cursor: pointer;
  color: var(--dim); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sectab:hover { color: var(--text); }
.sectab.active { color: var(--text); border-bottom-color: var(--text); }
.sectab-n { font-size: .82em; opacity: .5; }

/* Cover Archive: mode toggle, console tiles, dropdown */
.cov-modes { display: flex; gap: 8px; margin-bottom: 22px; }
.cov-mode { font-family: var(--mono); font-size: .74rem; letter-spacing: .04em;
  text-transform: uppercase; padding: 9px 16px; cursor: pointer;
  background: var(--bg-alt); color: var(--dim);
  border: 1px solid var(--rule); border-radius: 100px; transition: .15s; }
.cov-mode:hover { color: var(--text); }
.cov-mode.active { background: var(--black); color: var(--bg); border-color: var(--black); }

.sys-grid { display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.sys-card { text-align: left; cursor: pointer; display: flex; flex-direction: column;
  gap: 8px; padding: 20px; background: var(--bg-alt); border: 1px solid var(--rule);
  border-radius: var(--radius); transition: .16s; }
.sys-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--faint); }
.sys-name { font-size: .96rem; font-weight: 600; color: var(--text); line-height: 1.25; }
.sys-count { font-family: var(--mono); font-size: .7rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--dim); }

.cov-select { height: 44px; padding: 0 36px 0 14px; font-family: var(--mono);
  font-size: .82rem; color: var(--text); background: var(--bg-alt);
  border: 1px solid var(--rule); border-radius: var(--radius); cursor: pointer;
  max-width: 280px;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%23999'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center; }
.cov-select:focus { outline: none; border-color: var(--dim); }
.shuffle-btn { height: 44px; padding: 0 18px; font-family: var(--mono); font-size: .74rem;
  letter-spacing: .04em; text-transform: uppercase; cursor: pointer; white-space: nowrap;
  background: var(--bg-alt); color: var(--text);
  border: 1px solid var(--rule); border-radius: var(--radius); transition: .15s; }
.shuffle-btn:hover { background: var(--black); color: var(--bg); border-color: var(--black); }
.shuffle-btn:disabled { opacity: .55; cursor: default; }
.loading { font-family: var(--mono); font-size: .8rem; color: var(--dim); padding: 40px 0; }

/* ===================== Mobile ===================== */
/* [hidden] must beat display rules like .sys-grid{display:grid} / .grid{display:grid},
   otherwise toggled views stay visible. */
[hidden] { display: none !important; }
* { min-width: 0; }
html, body { max-width: 100%; overflow-x: hidden; }
img { max-width: 100%; }

@media (max-width: 760px) {
  /* Nav: only two links here, so keep them and drop the (unwired) burger. */
  .nav-burger { display: none !important; }
  .nav-links { display: flex !important; gap: 18px; }
  .nav-links a { font-size: 13px; }
  nav.site-nav { padding: 0 16px; gap: 10px; }
  .nav-status { display: none; }
  .nav-logo { font-size: 13px; letter-spacing: 2px; white-space: nowrap; }

  .hero { padding: 30px 18px 26px !important; max-width: 100% !important; }
  .numbers { padding: 28px 18px !important; }
  .numbers-inner { padding: 0 !important; max-width: 100% !important; }
  .numbers-grid { grid-template-columns: 1fr 1fr !important; gap: 22px 16px !important; }
  .numbers-note { font-size: .68rem; }

  .library { padding: 22px 18px 56px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
  .sys-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .sys-card { padding: 14px; }
  .sys-name { font-size: .84rem; }

  .lib-controls { gap: 12px; }
  .lib-search { flex: 1 1 100%; min-width: 0; }
  .lib-count { margin-left: 0; }
  .cov-select { max-width: 100%; width: 100%; }
  .section-tabs { flex-wrap: wrap; gap: 4px 10px; }
  .sectab { white-space: nowrap; padding: 11px 12px; font-size: .76rem; }
  .density { margin-left: 0; width: 100%; }
  .density button { flex: 1 1 0; }

  /* Modal / detail */
  .modal { padding: 14px; }
  .modal-body { padding: 22px 18px; }
  .detail-grid { grid-template-columns: 1fr; gap: 22px; }

  /* About */
  .ab-hero { padding: 40px 18px 22px; }
  .ab-hero h1 { font-size: clamp(2rem, 9vw, 3rem); }
  .ab-body { padding: 16px 18px 40px; }
  .ab-era { grid-template-columns: 1fr; gap: 8px; padding: 30px 0; }
  .ab-era .yr { position: static; font-size: 1.7rem; }
  .ab-stats { grid-template-columns: 1fr; gap: 16px; }
  .ab-track img { height: 116px; }
  .site-foot { flex-direction: column; gap: 10px; align-items: flex-start; padding: 22px 18px; }
}

.lightbox { display: flex; justify-content: center; padding: 6px; }
.lightbox img { max-width: 100%; max-height: 72vh; object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0,0,0,.34)); border-radius: 4px; }

/* landscape media (snapshots, title screens, logos) get a wider card */
#covers-photos[data-media="snap"] .card-art,
#covers-photos[data-media="title"] .card-art { aspect-ratio: 4 / 3; }
#covers-photos[data-media="logo"] .card-art { aspect-ratio: 16 / 10; }
#covers-photos[data-media="logo"] .card-art img { filter: none; }
[data-theme="dark"] #covers-photos[data-media="logo"] .card-art { background: #1414140d; }

/* Cover Archive detail: cover + title/snap/logo */
.cov-detail { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: start; }
.cov-shot { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.cov-shot img { width: 100%; object-fit: contain; max-height: 360px;
  background: #0000000a; border: 1px solid var(--rule); border-radius: 4px;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.22)); }
.cov-shot figcaption { font-family: var(--mono); font-size: .64rem; letter-spacing: .05em;
  text-transform: uppercase; color: var(--dim); text-align: center; }
