.archive-page{background:var(--paper);overflow-x:clip}
.archive-header{position:relative;padding:22px 5%;border-bottom:1px solid var(--line)}
.archive-header .wordmark img{width:52px;height:52px}
.archive-header nav{font-size:13px;gap:28px}
.archive-header nav span{margin-left:12px}
.archive-heading{padding:55px 6% 12px;display:flex;flex-wrap:wrap;align-items:end;justify-content:space-between;gap:24px;min-width:0}
.archive-heading>div:first-child{min-width:0;flex:1 1 210px}
.archive-view-toggle{flex:none}
.archive-heading .eyebrow{font-size:10px;letter-spacing:.17em;margin-bottom:14px;color:var(--muted)}
.archive-heading h1{text-align:left;font-family:Georgia,serif;font-size:clamp(45px,5vw,74px);letter-spacing:-.06em;font-weight:400;line-height:1.05}
.archive-heading h1 em{font-weight:400}
.archive-note{font-size:13px;color:var(--muted);margin:15px 0 0}
.archive-view-toggle button{font-size:12px;padding:10px 18px}
.card-table{position:relative;margin:0 5% 35px;padding:16px 0 0}
.photo-deck{position:relative;height:min(58svh,590px);min-height:340px;display:grid;place-items:center;isolation:isolate}
.shuffle-card{--ratio:1;position:absolute;display:block;margin:0;width:min(78vw,calc(53svh * var(--ratio)),calc(580px * var(--ratio)));aspect-ratio:var(--ratio);max-height:60svh;padding:12px 12px 29px;background:#fff;border:1px solid #e8e8e0;border-radius:5px;box-shadow:0 10px 28px #26291d18;cursor:zoom-in;transform-origin:50% 70%;transition:transform .62s cubic-bezier(.22,.8,.24,1),box-shadow .4s;overflow:hidden}
.shuffle-card img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
.shuffle-card{touch-action:pan-y;user-select:none;-webkit-user-select:none;cursor:grab}
.shuffle-card.dragging{transition:none;cursor:grabbing;box-shadow:0 24px 48px #26291d35}
.shuffle-card[data-depth="0"]{z-index:5;transform:translate(0,-5px) rotate(-1.1deg);box-shadow:0 17px 40px #26291d23}
.shuffle-card[data-depth="1"]{z-index:4;transform:translate(24px,6px) rotate(4deg)}
.shuffle-card[data-depth="2"]{z-index:3;transform:translate(-23px,12px) rotate(-5deg)}
.shuffle-card[data-depth="3"]{z-index:2;transform:translate(7px,22px) rotate(2deg)}
.shuffle-card:not([data-depth="0"]){pointer-events:none}
.shuffle-card[data-depth="0"]:hover{box-shadow:0 24px 48px #26291d2d;transform:translate(0,-10px) rotate(.3deg)}
.shuffle-card.dealing{z-index:6!important;pointer-events:none;transform:translate(63vw,-40px) rotate(18deg)!important;opacity:0;transition:transform .58s cubic-bezier(.5,.05,.75,.6),opacity .58s}
.shuffle-card.dealing-back{transform:translate(-63vw,-40px) rotate(-18deg)!important}
.shuffle-controls{position:relative;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:12px 1% 20px;z-index:8}
.shuffle-label{display:flex;align-items:center;gap:25px;font-size:12px;color:var(--muted)}
#archive-category{font-family:Georgia,serif;font-size:23px;color:var(--ink)}
#archive-index{font-variant-numeric:tabular-nums;letter-spacing:.07em;white-space:nowrap}
.shuffle-buttons{display:flex;align-items:center;gap:10px}
.shuffle-buttons button{border:1px solid #c8ccbe;background:transparent;border-radius:50%;width:40px;height:40px;font-size:20px;transition:background .2s,transform .2s}
.shuffle-buttons button:hover{background:#e4e8da;transform:translateY(-2px)}
.shuffle-buttons #archive-pause{width:auto;border-radius:30px;padding:0 18px;font-size:12px}
.shuffle-progress{height:2px;background:#e1e3d9;overflow:hidden}
.shuffle-progress span{display:block;width:100%;height:100%;background:#7d8867;transform-origin:left;transform:scaleX(0)}
.shuffle-progress.running span{animation:shuffle-countdown 5s linear forwards}
@keyframes shuffle-countdown{from{transform:scaleX(0)}to{transform:scaleX(1)}}
.table-mark{position:absolute;z-index:0;font-family:Georgia,serif;font-style:italic;color:#899173;font-size:21px;pointer-events:none}
.table-mark-left{top:46%;left:2%;transform:rotate(-10deg)}
.table-mark-right{top:28%;right:9%;font-size:50px;transform:rotate(15deg)}
.archive-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:28px;padding:50px 6% 60px}
.archive-grid button{border:0;background:white;padding:10px 10px 24px;box-shadow:0 5px 15px #26291d12;position:relative;transition:transform .35s,box-shadow .35s;aspect-ratio:4/5;border-radius:3px}
.archive-grid button:nth-child(3n+1){transform:rotate(-1deg)}
.archive-grid button:nth-child(3n+2){transform:rotate(1deg)}
.archive-grid img{width:100%;height:100%;object-fit:contain;display:block;transition:transform .35s}
.archive-grid button:hover,.archive-grid button:focus-visible{transform:translateY(-7px) rotate(0);box-shadow:0 18px 32px #26291d25}
.archive-grid button:hover img{transform:scale(1.025)}
.archive-grid button span{position:absolute;bottom:8px;left:12px;font-size:10px;color:var(--muted)}
.archive-return{display:flex;justify-content:center;padding:16px 6% 60px}
.archive-return a{border-bottom:1px solid #b7b9af;padding:12px 0;font-size:13px}
.archive-return span{margin-left:28px}
@media(max-width:700px){
 .archive-header{padding:18px 6%}.archive-header nav{gap:16px;font-size:11px}.archive-header nav span{margin-left:4px}.archive-header .wordmark img{width:44px;height:44px}
 .archive-heading{padding-top:35px;align-items:start}.archive-heading h1{font-size:48px}.archive-heading .eyebrow{font-size:9px;max-width:150px;line-height:1.6}
 .archive-note{font-size:12px;max-width:175px;line-height:1.6}.archive-view-toggle{margin-top:30px}.archive-view-toggle button{padding:9px 13px;font-size:11px}
 .photo-deck{height:50svh;min-height:300px}.shuffle-card{width:min(78vw,calc(44svh * var(--ratio)));max-height:51svh;padding:9px 9px 22px}
 .shuffle-card[data-depth="1"]{transform:translate(12px,5px) rotate(4deg)}.shuffle-card[data-depth="2"]{transform:translate(-12px,9px) rotate(-5deg)}
 .table-mark-left{top:8%;left:3%;font-size:15px}.table-mark-right{top:4%;right:6%;font-size:34px}
 .shuffle-controls{flex-direction:column;align-items:stretch;gap:20px;padding:15px 3% 25px}.shuffle-label{justify-content:space-between}#archive-category{font-size:25px}
 .shuffle-buttons{justify-content:center}.shuffle-buttons button{width:42px;height:42px}.archive-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;padding-top:35px}
}
@media(prefers-reduced-motion:reduce){.shuffle-card{transition:none}.shuffle-progress.running span{animation:none}.shuffle-card.dealing{transform:none!important;opacity:0}}

/* Keep actions reachable in a narrow side panel or phone window. */
.archive-header nav{min-width:0;flex-wrap:wrap;justify-content:flex-end}
.archive-heading h1{overflow-wrap:anywhere}
.shuffle-controls,.shuffle-label,.shuffle-buttons{min-width:0}
@media(max-width:480px){
 .archive-header{gap:12px;padding:16px 5%;align-items:center}.archive-header nav{gap:8px 15px;font-size:11px;max-width:75%}
 .archive-heading{padding:28px 5% 10px;gap:18px}.archive-heading>div:first-child{flex-basis:100%}
 .archive-heading h1{font-size:clamp(34px,11vw,48px)}.archive-heading .eyebrow{max-width:none}.archive-note{max-width:none}
 .archive-view-toggle{margin-top:0}.photo-deck{height:48svh;min-height:270px}.shuffle-card{max-width:75vw}
 .table-mark{display:none}.shuffle-controls{padding-left:0;padding-right:0}.shuffle-buttons{gap:8px;flex-wrap:wrap}
 .shuffle-buttons button{width:36px;height:36px}.shuffle-buttons #archive-pause{font-size:11px;padding:0 12px}
 #archive-category{font-size:22px}.shuffle-label{gap:12px}.archive-grid{gap:12px;padding-left:5%;padding-right:5%}
 .archive-return a{line-height:1.6}.archive-return span{margin-left:8px}
}
