/* ==========================================================
   1. SILVER BACKGROUND & TYPOGRAPHY
   ========================================================== */
@font-face {
  font-family: MusicOriginal;
  src: url('/scans/POPSTAR.TTF') format('truetype');
  font-display: swap;
}
:root {
  --ink: #29292c;
  --pink: #ff2e9a;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  padding: 10px;
  color: var(--ink);
  background: radial-gradient(ellipse at top, #f3f3f6, transparent 60%), #ffffff;
  background-attachment: fixed;
  min-height: 100vh;
  font-family: MusicOriginal, Arial, sans-serif;
  cursor: url('/assets/Normal Select.cur'), auto;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}
button, a {
  touch-action: manipulation;
}
button:disabled {
  opacity: .3;
  cursor: default;
}
:focus-visible {
  outline: 2px solid #c30064;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  padding: 12px;
  background: white;
  z-index: 20;
}
.skip-link:focus {
  top: 10px;
}
.archive-shell {
  width: 100%;
  margin: auto;
}
/* ==========================================================
   2. QUIET HEADER & SCAN FILTERS
   ========================================================== */
.archive-header {
  position: sticky;
  top: 10px;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  width: fit-content;
  max-width: calc(100% - 16px);
  margin: 0 auto 12px;
  padding: 8px 16px;
  border: 1px solid #ffffffc9;
  border-radius: 36px;
  background: linear-gradient(135deg, #ffffffbf, #eeeef37d 52%, #ffffffa3);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  backdrop-filter: blur(22px) saturate(145%);
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #fff7,     0 3px 14px #36364715, 0 0 0 1px #7c7c8d12;
}
h1 {
  margin: 0;
  font-size: 24px;
  font-weight: normal;
  letter-spacing: -1px;
  line-height: 1.2;
}
h1 span {
  color: var(--pink);
  margin-left: 8px;
  font: normal .6em Arial, sans-serif;
  vertical-align: middle;
}
.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  grid-column: 3;
  grid-row: 1;
}
.home-link {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #55555c;
  font-size: 11px;
  white-space: nowrap;
}
.home-link:hover {
  color: #a30051;
}
.category-tabs {
  display: flex;
  grid-column: 2;
  grid-row: 1;
  justify-content: center;
  gap: 4px;
  margin: 0;
}
.category-tabs button {
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 24px;
  background: transparent;
  color: #36363e;
  font-size: 12px;
  white-space: nowrap;
  transition: background-color .2s ease, box-shadow .2s ease;
}
.category-tabs button[aria-pressed='true'] {
  border-color: #ffffffd9;
  background: linear-gradient(140deg, #fff7, #ff2e9a24);
  box-shadow: inset 0 1px 1px #fff, 0 2px 6px #50213a12;
  color: #8b0043;
}
.category-tabs button:hover {
  color: #a30051;
}
/* ==========================================================
   3. PHOTOGRAPHS — no frame numbers or decorative panels
   ========================================================== */
.photo-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.photo-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.photo-frame {
  margin: 0;
  flex: 0 0 auto;
  min-width: 0;
}
.photo-button {
  display: block;
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #d0d0d4;
  cursor: zoom-in;
}
.photo-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  color: #555;
  font: 11px Arial, sans-serif;
}
.photo-button::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid #0002;
  border-radius: 4px;
  pointer-events: none;
}
.photo-button:hover::after, .photo-button:focus-visible::after {
  border: 2px solid var(--pink);
}
.photo-frame figcaption {
  padding-top: 7px;
  color: #55555c;
  font-size: 11px;
  line-height: 1.5;
}
.archive-footer {
  padding-top: 25px;
  text-align: center;
  color: #55555c;
  font-size: 10px;
}
/* ==========================================================
   4. SIMPLE GLASS LIGHTBOX — the gallery remains visible beneath
   ========================================================== */
.viewer {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 24px;
  border: 0;
  background: transparent;
  overflow: auto;
  cursor: zoom-out;
}
.viewer[open] {
  display: flex;
  justify-content: center;
  align-items: center;
}
.viewer::backdrop {
  background: #33313f66;
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  backdrop-filter: blur(14px) saturate(115%);
}
body:has(.viewer[open]) {
  overflow: hidden;
}
.lightbox-frame {
  position: relative;
  max-width: 94vw;
  padding: 7px;
  border: 1px solid #ffffffe0;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffffe0, #f3e8f259 50%, #ffffffb0);
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 1px #ff2e9a33, 0 18px 70px #17152055;
}
#viewer-photo {
  display: block;
  max-width: calc(94vw - 16px);
  max-height: 86dvh;
  width: auto;
  height: auto;
  border-radius: 9px;
  object-fit: contain;
}
#close-viewer {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: 1px solid #ffffffcf;
  border-radius: 50%;
  background: #ffffffe0;
  color: #803250;
  font: 25px/1 Arial, sans-serif;
  box-shadow: inset 0 1px 0 white, 0 3px 12px #17152022;
}
#close-viewer:hover {
  background: #ffe0ef;
}
#viewer-message {
  max-width: 260px;
  margin: 0;
  padding: 16px;
  color: #29292c;
  background: #f5f3f7;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.5;
}
/* ==========================================================
   5. MOBILE — full-width scans & compact filters
   ========================================================== */
@media (max-width: 900px) {
  .archive-header {
    grid-template-columns: 1fr auto;
    gap: 5px 16px;
    padding: 10px 14px;
    border-radius: 26px;
  }
  .header-controls {
    grid-column: 2;
  }
  .category-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
@media (max-width: 600px) {
  body {
    padding: 6px;
  }
  .archive-header {
    top: 6px;
    width: calc(100% - 8px);
    max-width: 430px;
    margin-bottom: 10px;
    padding: 8px 12px;
    gap: 3px 12px;
  }
  h1 {
    font-size: 23px;
  }
  .header-controls {
    gap: 12px;
  }
  .home-link {
    font-size: 10px;
  }
  .category-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
  }
  .category-tabs button {
    padding: 8px 2px;
    font-size: 10px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .photo-grid, .photo-row {
    gap: 6px;
  }
}
/* Solid fallback keeps the controls legible without backdrop blur. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .archive-header {
    background: #eeeef3;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .viewer::backdrop {
    background: #45414ee8;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .archive-header {
    background: #eeeef3;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .category-tabs button {
    transition: none;
  }
}
/* ==========================================================
   6. COLLECTION LABEL & ORIGINAL SCAN USAGE NOTICE
   ========================================================== */
.collection-heading {
  padding: 4px 4px 12px;
}
.collection-heading h2 {
  margin: 0;
  color: #777;
  font-size: 11px;
  font-weight: normal;
}
.about-dialog {
  width: min(500px, 92vw);
  padding: 30px;
  border: 1px solid white;
  border-radius: 22px;
  background: #fffffff2;
  color: #29292c;
  box-shadow: inset 0 1px 0 white, 0 20px 60px #0003;
  line-height: 1.7;
  font-size: 13px;
}
.about-dialog::backdrop {
  background: #33313f66;
  backdrop-filter: blur(12px);
}
.about-dialog h2 {
  font-weight: normal;
  color: #a30051;
}
#close-about {
  position: absolute;
  top: 10px;
  right: 14px;
  border: 0;
  background: transparent;
  color: #a30051;
  font: 26px Arial, sans-serif;
}
body:has(.about-dialog[open]) {
  overflow: hidden;
}
