/* Available and Archive pages, and the enlarged piece view. Phone-first. */

.page .lede { margin: 0; }

/* ---------- Archive introduction ---------- */
.intro { max-width: 46em; margin-top: 30px; }
.intro p { margin: 0 0 1.15em; color: #e4dccb; }
.intro p:first-child { font-family: var(--display); font-style: italic; font-size: clamp(1.35rem, 2.8vw, 1.8rem); line-height: 1.35; color: var(--text); }

/* ---------- Series and cards ---------- */
.work-list { display: flex; flex-direction: column; gap: 64px; margin-top: 44px; }
.series { display: flex; flex-direction: column; gap: 22px; }
.series h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); padding-bottom: 10px; border-bottom: 1px solid var(--verdigris); }
.series .blurb { white-space: pre-line; margin: -8px 0 0; color: var(--muted); max-width: 36em; }

.cards { display: grid; grid-template-columns: 1fr; gap: 34px; }
@media (min-width: 561px) { .cards { grid-template-columns: repeat(2, 1fr); gap: 30px 18px; } }
@media (min-width: 901px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 34px 22px; } }

.card { display: flex; flex-direction: column; text-align: left; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; }
button.card { cursor: pointer; }
.card .frame { position: relative; display: block; aspect-ratio: 4 / 5; background: #151616; box-shadow: 0 20px 40px -22px rgba(0, 0, 0, .9); outline: 1px solid transparent; transition: outline-color .25s, transform .4s; }
.card .frame img { width: 100%; height: 100%; object-fit: cover; }
button.card:hover .frame, button.card:focus-visible .frame { outline-color: var(--gold); transform: translateY(-3px); }
button.card:focus-visible { outline: none; }
.card .t { display: block; font-family: var(--display); font-weight: 500; font-size: 1.4rem; line-height: 1.15; padding-top: 12px; }
.card .m { display: block; color: var(--muted); font-size: .88rem; }
.card .p { display: block; color: var(--copper-hi); font-size: .92rem; padding-top: 2px; }
.card .c { display: block; font-size: .9rem; opacity: .85; padding-top: 6px; }
.sold-tag { position: absolute; top: 10px; left: 10px; background: var(--copper); color: #1b1109; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; padding: 5px 10px; font-weight: 500; }

/* ---------- Messages: loading, empty, couldn't load ---------- */
.status-note { max-width: 36em; color: var(--muted); }
.status-note h2 { font-size: clamp(1.6rem, 3.6vw, 2.1rem); color: var(--text); margin-bottom: 8px; }
.status-note p { margin: 0 0 12px; }
.status-note .note-links a { margin-right: 18px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--verdigris); padding: 4px 0; }
.status-note .note-links a:hover { color: var(--gold-hot); }
.status-note.loading p { font-style: italic; }
.status-note.stale { padding: 12px 16px; border: 1px solid var(--line); border-left: 2px solid var(--gold); background: rgba(10, 11, 10, .6); font-size: .92rem; }
.status-note.stale p { margin-bottom: 10px; }
.btn.small { padding: 10px 16px; min-height: 44px; font-size: .74rem; letter-spacing: .14em; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--gold); background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Enlarged view ---------- */
html.viewer-open { overflow: hidden; }
dialog.viewer {
  position: fixed; inset: 0; margin: auto; padding: 0; border: 0; background: transparent; color: var(--text);
  width: min(1000px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); overflow: visible;
}
dialog.viewer::backdrop { background: rgba(6, 7, 6, .92); }
.viewer-panel { display: grid; grid-template-columns: 1fr; background: #121413; border: 1px solid var(--line); max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain; }
@media (min-width: 761px) { .viewer-panel { grid-template-columns: 1.1fr 1fr; } }

.viewer-close {
  position: absolute; top: 8px; right: 8px; z-index: 5; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(10, 10, 9, .75); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.viewer-close:hover { border-color: var(--gold); }

.viewer-media { position: relative; background: #0b0c0b; min-width: 0; align-self: start; }
.stage { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; aspect-ratio: 4 / 5; max-height: calc(100dvh - 24px); width: 100%; outline-offset: -3px; }
.stage::-webkit-scrollbar { display: none; }
.stage.single { overflow: hidden; }
.slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; min-width: 0; }
.slide img { width: 100%; height: 100%; object-fit: contain; }
.nav-btn {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(10, 10, 9, .7); font-size: 1.7rem; line-height: 1; padding: 0 0 4px; cursor: pointer;
}
.nav-btn:hover { border-color: var(--gold); color: var(--gold-hot); }
.nav-btn.prev { left: 10px; }
.nav-btn.next { right: 10px; }
.dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; gap: 8px; justify-content: center; pointer-events: none; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(236, 228, 212, .35); }
.dots span.on { background: var(--gold-hot); }

.viewer-body { padding: 34px 26px 28px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.viewer-body h2 { font-size: clamp(1.9rem, 5vw, 2.4rem); padding-right: 40px; }
.viewer-body p { margin: 0; }
.v-meta { color: var(--muted); font-size: .92rem; }
.v-price { color: var(--copper-hi); font-size: 1.15rem; }
.viewer-body > .btn { align-self: flex-start; margin-top: 8px; }

.v-or { color: var(--muted); font-size: .92rem; word-break: break-word; }
.v-or a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--verdigris); }
.v-or a:hover { color: var(--gold-hot); }

@media (prefers-reduced-motion: reduce) {
  .card .frame { transition: none; }
  button.card:hover .frame { transform: none; }
}

/* Line breaks typed in the admin (series text, captions) show up as line breaks. */
.v-caption, .card .c { white-space: pre-line; }
