:root { --wall: #ece6da; --ink: #1d1b18; --dot: #c8341c; --paper: #faf7f1; --muted: #5f594f; }
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--ink);
  background: radial-gradient(120% 60% at 50% 0, #f7f2e8, var(--wall) 70%) var(--wall);
  font: 300 18px/1.55 Jost, "Avenir Next", sans-serif;
}
a { color: inherit; }
header, main, footer { width: min(1120px, 100% - 40px); margin-inline: auto; }
header { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--ink); }
.mark { font: italic 26px "Bodoni Moda", Didot, serif; text-decoration: none; }
.mark::after { content: ""; display: inline-block; width: 9px; height: 9px; margin-left: 6px; border-radius: 50%; background: var(--dot); }
nav { display: flex; gap: 24px; text-transform: uppercase; letter-spacing: .16em; font-size: 13px; }
nav a { text-decoration: none; }
nav a:hover { color: var(--dot); }
main { flex: 1; padding: 48px 0 80px; }
h1 { font: 400 clamp(46px, 9vw, 112px)/.98 "Bodoni Moda", Didot, serif; margin: 0 0 20px; max-width: 11ch; }
h1 em { color: var(--dot); }
.lead { max-width: 36ch; font-size: 21px; margin: 0 0 40px; }
.lead:empty { margin: 0; }
#wall { display: grid; gap: 72px 56px; }
.home { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
#wall.gallery, #wall.tools { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 28px 20px; align-items: start; }
.door { background: var(--paper); padding: 28px; min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end; text-decoration: none; box-shadow: 0 18px 30px -22px #0008; transition: transform .25s; }
.door:hover { transform: translateY(-6px); }
.door h2 { font: 400 40px "Bodoni Moda", Didot, serif; margin: 0; }
.door p { margin: 6px 0 0; }
.work { margin: 0; animation: hang .7s ease-out both; }
.work:nth-child(2) { animation-delay: .12s; }
.work:nth-child(3) { animation-delay: .24s; }
@keyframes hang { from { transform: translateY(16px); } }
.frame { aspect-ratio: 4 / 5; padding: 8px; background: var(--paper); border: 4px solid var(--ink); box-shadow: 0 14px 22px -16px #000a; }
.frame img, .blank { width: 100%; height: 100%; object-fit: contain; display: block; }
.blank { display: grid; place-items: center; text-align: center; color: var(--muted); border: 1px solid #d5cdbd; font: italic 14px "Bodoni Moda", Didot, serif; }
.pick { display: grid; gap: 10px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.pick .frame { transition: transform .2s; }
.pick:hover .frame, .pick:focus-visible .frame { transform: translateY(-4px); }
.work strong { font: italic 400 18px "Bodoni Moda", Didot, serif; }
.work p { margin: 4px 0 0; font-size: 14px; line-height: 1.4; }
.gallery .work, .tools .work { min-width: 0; }
body:is([data-view="gallery"], [data-view="tools"]) main { padding-top: 24px; }
body:is([data-view="gallery"], [data-view="tools"]) h1 { font-size: clamp(30px, 5vw, 44px); max-width: none; margin-bottom: 14px; }
.mode { display: block; margin: 0 0 28px; padding: 8px 18px; border: 1px solid var(--ink); background: none; color: inherit; font: 400 15px Jost, sans-serif; cursor: pointer; }
.mode:hover { background: var(--ink); color: var(--paper); }

.viewer { width: 100vw; width: 100dvw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 56px 8px 16px; border: 0; background: #14120f; color: var(--paper); }
.viewer[open] { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 8px; }
.stage { grid-column: 2; grid-row: 1; height: 100%; min-height: 0; min-width: 0; display: grid; grid-template: minmax(0, 1fr) auto / minmax(0, 1fr); justify-items: center; gap: 14px; }
.stage .frame { aspect-ratio: auto; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.stage .frame img { min-height: 0; }
.stage .blank { color: #bdb5a6; border-color: #3a352d; font-size: 22px; }
.label { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 16px; text-align: center; }
.label strong { font: italic 400 22px "Bodoni Moda", Didot, serif; }
.label p { margin: 0; }
.label .open { margin: 0; background: var(--paper); color: var(--ink); }
.label .open:hover { background: var(--dot); color: var(--paper); }
.label .source, .label .soon, .count { color: #bdb5a6; font-size: 14px; }
.viewer button { border: 0; background: none; color: inherit; cursor: pointer; font: 300 22px Jost, sans-serif; }
.viewer .close { position: absolute; top: 12px; right: 16px; padding: 6px 10px; }
.viewer .step { grid-row: 1; height: 96px; font-size: 48px; }
.viewer .step:hover, .viewer .close:hover { color: var(--dot); }
.previous { grid-column: 1; }
.next { grid-column: 3; }
.viewer [hidden] { display: none; }
.open { margin-top: 6px; padding: 9px 18px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 400; }
.open:hover { background: var(--dot); }
.source, .soon { font-size: 14px; color: var(--muted); }
footer { display: flex; justify-content: space-between; padding: 24px 0; border-top: 1px solid var(--ink); font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .work { animation: none; } .door { transition: none; } }
