.wue-archive-trigger {
  display: grid;
  width: 100%;
  gap: 0.3rem;
  margin-top: 0.25rem;
  padding: 0.8rem 0;
  border-top: 1px solid rgb(18 18 18 / 12%);
  border-bottom: 1px solid rgb(18 18 18 / 12%);
  text-align: left;
  transition: opacity 180ms ease;
}

.wue-archive-trigger:hover { opacity: 0.55; }
.wue-archive-trigger span { font-size: 11px; letter-spacing: 0.08em; }
.wue-archive-trigger small { font-size: 9px; letter-spacing: 0.2em; color: rgb(18 18 18 / 45%); }

@media (min-width: 1024px) {
  body.wue-process-page main section article > div:first-child {
    padding: clamp(0.6rem, 1.3vh, 1.05rem) clamp(1rem, 2.2vw, 2.2rem);
  }

  body.wue-process-page main section article > div:first-child img {
    width: auto !important;
    height: auto !important;
    max-width: 82% !important;
    max-height: 82% !important;
    object-fit: contain !important;
    object-position: center !important;
  }
}

.wue-archive-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgb(245 245 243 / 88%);
  backdrop-filter: blur(10px);
}

.wue-archive-shell {
  width: min(1380px, 100%);
  height: min(920px, calc(100svh - 2.4rem));
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgb(18 18 18 / 16%);
  box-shadow: 0 24px 80px rgb(0 0 0 / 8%);
}

.wue-archive-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.35rem 1rem;
  background: rgb(255 255 255 / 96%);
  border-bottom: 1px solid rgb(18 18 18 / 10%);
}

.wue-archive-header p { margin: 0 0 0.45rem; font-size: 9px; letter-spacing: 0.3em; color: rgb(18 18 18 / 52%); }
.wue-archive-header h2 { margin: 0; font-size: 20px; font-weight: 300; letter-spacing: -0.02em; }
.wue-archive-header-actions { display: flex; align-items: center; gap: 1rem; }
.wue-archive-count { white-space: nowrap; font-size: 9px; letter-spacing: 0.15em; color: rgb(18 18 18 / 48%); }
.wue-archive-header-actions button,
.wue-archive-preview-close { width: 2rem; height: 2rem; font-size: 22px; font-weight: 200; line-height: 1; }

.wue-archive-filters {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.8rem 1.35rem;
  border-bottom: 1px solid rgb(18 18 18 / 8%);
  scrollbar-width: none;
}

.wue-archive-filters::-webkit-scrollbar { display: none; }
.wue-archive-filters button {
  flex: 0 0 auto;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgb(18 18 18 / 14%);
  font-size: 9px;
  letter-spacing: 0.09em;
  color: rgb(18 18 18 / 56%);
  transition: 160ms ease;
}

.wue-archive-filters button:hover,
.wue-archive-filters button.is-active { border-color: #121212; color: #121212; }

.wue-archive-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.6rem 1rem;
  padding: 1.35rem;
}

.wue-archive-item { min-width: 0; text-align: left; cursor: zoom-in; }
.wue-archive-thumb {
  display: grid;
  height: 240px;
  place-items: center;
  overflow: hidden;
  background: #fafafa;
}

.wue-archive-thumb img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; transition: transform 450ms cubic-bezier(.22,1,.36,1); }
.wue-archive-item:hover img { transform: scale(1.018); }
.wue-archive-item-meta { display: grid; gap: 0.25rem; padding-top: 0.55rem; font-size: 10px; line-height: 1.45; color: rgb(18 18 18 / 72%); }
.wue-archive-item-meta small { font-size: 8px; letter-spacing: 0.12em; color: rgb(18 18 18 / 38%); }

body.wue-process-page .wue-archive-item-meta {
  display: none;
}

.wue-archive-preview {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) 3rem;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: #fff;
}

.wue-archive-preview figure { display: grid; min-width: 0; height: calc(100svh - 3rem); grid-template-rows: minmax(0, 1fr) auto; gap: 0.7rem; margin: 0; }
.wue-archive-preview figure img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.wue-archive-preview figcaption { display: flex; justify-content: space-between; gap: 1rem; font-size: 10px; color: rgb(18 18 18 / 64%); }
.wue-archive-preview figcaption span { color: rgb(18 18 18 / 38%); }
body.wue-process-page .wue-archive-preview figure { grid-template-rows: minmax(0, 1fr); }
body.wue-process-page .wue-archive-preview figcaption { display: none; }
.wue-archive-preview-close { position: absolute; top: 1rem; right: 1rem; z-index: 1; }
.wue-archive-preview-nav { width: 3rem; height: 3rem; font-size: 18px; color: rgb(18 18 18 / 48%); transition: color 160ms ease; }
.wue-archive-preview-nav:hover { color: #121212; }

@media (max-width: 900px) {
  .wue-archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wue-archive-thumb { height: 210px; }
}

@media (max-width: 640px) {
  .wue-archive-modal { padding: 0; }
  .wue-archive-shell { width: 100%; height: 100svh; border: 0; }
  .wue-archive-header { padding: 1rem; }
  .wue-archive-header h2 { font-size: 18px; }
  .wue-archive-count { display: none; }
  .wue-archive-filters { padding-inline: 1rem; }
  .wue-archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 0.7rem; padding: 1rem; }
  .wue-archive-thumb { height: 190px; }
  .wue-archive-preview { grid-template-columns: 2rem minmax(0, 1fr) 2rem; gap: 0.25rem; padding: 1rem 0.4rem; }
  .wue-archive-preview figure { height: calc(100svh - 2rem); padding-top: 2.5rem; }
  .wue-archive-preview figcaption { display: grid; padding: 0 0.6rem; }
  .wue-archive-preview-nav { width: 2rem; }
}
