.archive.magazine {
  background: radial-gradient(ellipse at 60% 0%, #202718, #11130e 47%, #0d100c 86%);
}
.archive.magazine .mag-reader {
  background:
    radial-gradient(ellipse at 50% 17%, #48503a88, transparent 59%),
    repeating-linear-gradient(97deg, #0003 0 1px, transparent 1px 18px),
    #171a13;
}
.archive.magazine .mag-cover-front {
  background:
    linear-gradient(0deg, #080907f0 0%, #0c0e0b40 58%, #0b0d09ab 100%),
    url("./assets/ref-back.webp") center 78% / cover;
}
@media (max-width: 700px) {
  .archive.magazine .mag-heading h2 { font-size: clamp(36px, 13.2vw, 84px); }
}

dialog.archive-viewer {
  box-sizing: border-box;
  width: min(930px, 100% - 28px);
  max-width: none;
  max-height: calc(100dvh - 22px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #4c5442;
  color: #eeeee5;
  background: #11140f;
}
.archive-viewer::backdrop { background: #070a08eb; }
.archive-viewer-shell { padding: clamp(10px, 1.8vw, 22px); }
.archive-viewer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.archive-viewer-category, .archive-viewer-count {
  margin: 0;
  color: var(--lime, #bcff35);
  font: 700 10px/1.35 var(--mono, monospace);
  letter-spacing: .075em;
  text-transform: uppercase;
}
.archive-viewer-category { margin-bottom: 4px; }
.archive-viewer-frame { height: min(65dvh, 680px); background: #080a07; touch-action: pan-y pinch-zoom; }
.archive-viewer-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.archive-viewer-info {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 8px 13px;
  padding-top: 12px;
}
.archive-viewer h3 { margin: 0; font: 650 clamp(23px, 2.7vw, 39px)/1.03 var(--display, sans-serif); }
.archive-viewer-info > div:first-child { flex: 1 1 auto; }
.archive-viewer-description { max-width: 58ch; margin-top: 6px; color: #c4c7b9; font-size: 13px; line-height: 1.45; }
.archive-source {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-block: 3px;
  width: fit-content;
  color: #aeb1a1;
  font-size: 12px;
  line-height: 1.45;
  text-underline-offset: 3px;
}
.archive-source:hover { color: var(--lime, #bcff35); text-decoration: underline; }
.archive-source svg { width: 12px; height: 12px; }
.archive-viewer-nav { display: flex; gap: 6px; margin-left: auto; }
.archive-viewer button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #5b634b;
  background: #191d15;
  color: #eeeee5;
}
.archive-viewer button:hover { border-color: var(--lime, #bcff35); color: var(--lime, #bcff35); }
.archive-viewer button svg { width: 20px; height: 20px; }
.archive-prev svg { transform: rotate(180deg); }

@media (max-width: 560px) {
  .archive-viewer-frame { height: min(59dvh, 560px); }
  .archive-viewer-info > div:first-child { flex-basis: 100%; }
}

