/* Collections index and collection page (docs design.md → Collections, Collection page). */

/* Shared: a horizontal strip with a hidden scrollbar. Vertical wheel movement scrolls it sideways (collections.js). */
.hscroll{display:flex;overflow-x:auto;scrollbar-width:none;overscroll-behavior-x:contain}
.hscroll::-webkit-scrollbar{display:none}
.hfoot{position:absolute;left:var(--edge);right:var(--edge);bottom:40px;display:flex;justify-content:space-between;font:400 13px var(--font-mono);color:var(--muted)}

/* Index: covers at their natural ratio, three heights, bottom-aligned */
.coll-index{position:absolute;inset:0}
.coll-index .hscroll{position:absolute;top:150px;left:0;right:0;height:520px;gap:56px;padding:0 var(--edge);align-items:flex-end}
.cover{flex:none;display:flex;flex-direction:column;gap:0;text-decoration:none;max-width:90vw}
.cover-photo{display:block;height:var(--h);width:calc(var(--h)*var(--ar))}
.cover-photo .photo{width:100%;height:100%;aspect-ratio:auto}
.cover-name{margin-top:14px;font-weight:500;font-size:24px;line-height:1.2}
.cover-meta{margin-top:4px;font:400 12px var(--font-mono);color:var(--muted)}
.cover:hover .cover-name{text-decoration:underline;text-underline-offset:6px}

/* Collection page: strip top 92, height 590 */
.coll{position:absolute;inset:0}
.coll-strip{position:absolute;top:92px;left:0;right:0;height:590px;gap:56px;padding:0 var(--edge);align-items:center}
.logo-crumb{font-weight:300;color:var(--muted)}

.c-panel{flex:none}
.c-statement{width:400px;display:flex;flex-direction:column;gap:22px}
.c-name{margin:0;font-weight:700;font-size:120px;line-height:.85;letter-spacing:-.04em;overflow-wrap:anywhere}
.c-text{margin:0;font-weight:300;font-size:22px;line-height:1.45}
.c-count{margin:0;font:400 13px var(--font-mono);color:var(--muted)}

.c-frame{flex:none;margin:0;display:flex;flex-direction:column;gap:10px;cursor:e-resize;position:relative}
.c-num{font:400 12px var(--font-mono);color:var(--accent-text)}
.c-photo .photo{width:calc(540px*var(--ar));height:540px;aspect-ratio:var(--ar)}
.c-note{position:absolute;left:calc(100% + 24px);bottom:0;width:240px;font-weight:300;font-size:18px;line-height:1.5}
.c-frame:has(.c-note){margin-right:264px}

.c-end{width:420px;align-self:stretch;margin:24px 0;background:var(--accent);color:#fff;padding:36px;display:flex;flex-direction:column;justify-content:space-between}
.c-end a{color:inherit;text-decoration:none}
.c-end-top{margin:0;font:400 12px var(--font-mono)}
.c-end-next{display:flex;flex-direction:column;gap:18px}
.c-end-cover{display:block;height:220px;width:calc(220px*var(--ar));max-width:100%}
.c-end-cover .photo{width:100%;height:100%;aspect-ratio:auto}
.c-end-name{font-weight:700;font-size:96px;line-height:.9;letter-spacing:-.04em;overflow-wrap:anywhere}
.c-end-related{margin:0;font:400 12px var(--font-mono)}
.c-end-related a{text-decoration:underline;text-underline-offset:4px}

.c-bar{position:absolute;left:var(--edge);right:var(--edge);bottom:36px;display:grid;grid-template-columns:1fr auto 1fr;gap:40px;align-items:center;font:400 13px var(--font-mono)}
.c-bar a{text-decoration:none}
.c-bar a:hover{text-decoration:underline;text-underline-offset:4px}
.c-next{justify-self:end;text-align:right}
.c-mid{display:flex;align-items:center;gap:18px;color:var(--muted)}
.c-pos b{font-weight:400;color:var(--ink)}
.c-progress{position:relative;display:block;width:260px;height:6px;border:1px solid var(--progress-border)}
.c-progress i{position:absolute;inset:0 auto 0 0;width:var(--p,0%);background:var(--progress);transition:width 150ms ease}
.c-segments{display:none}

@media (max-width:767px){
	.hfoot{left:var(--edge-phone);right:var(--edge-phone);font-size:11px;gap:12px}
	.hfoot span:last-child{white-space:nowrap}
	/* Index: a vertical list, 72 x 72 thumbnail, name and count */
	.coll-index{position:static;padding:96px var(--edge-phone) 40px}
	.coll-index .hscroll{position:static;display:flex;flex-direction:column;height:auto;gap:14px;padding:0;overflow:visible;align-items:stretch}
	.cover{display:grid;grid-template-columns:72px 1fr;grid-template-rows:auto auto;column-gap:14px;align-items:center;max-width:none}
	.cover-photo{grid-row:1 / span 2;width:72px;height:72px;display:flex;align-items:center;justify-content:center}
	.cover-photo .photo{width:min(72px,calc(72px*var(--ar)));height:auto;aspect-ratio:var(--ar)}
	.cover-name{margin:0;font-size:20px;align-self:end}
	.cover-meta{margin:0;font-size:11px;align-self:start}
	.coll-index .hfoot{position:static;margin-top:28px}
	.coll-index .hfoot span:last-child{display:none} /* "scroll →" makes no sense for a vertical list */

	/* Collection: one panel per screen, native swipe; frame number at top, segmented progress at the bottom */
	.coll-strip{top:76px;bottom:120px;height:auto;gap:0;padding:0;scroll-snap-type:x mandatory;align-items:stretch}
	.c-panel,.c-frame{flex:0 0 100%;scroll-snap-align:center;width:100%;padding:0 16px}
	.c-statement{justify-content:center;padding:0 22px}
	.c-name{font-size:46px}
	.c-text{font-size:18px}
	.c-frame{cursor:default;gap:8px;padding:0 16px 8px;justify-content:flex-start}
	.c-num{padding-left:6px}
	.c-photo{flex:1;min-height:0;container-type:size;display:flex;align-items:center;justify-content:center}
	.c-photo .photo{width:min(100cqw,calc(100cqh*var(--ar)));height:auto}
	.c-note{position:static;width:auto;font-size:15px}
	.c-frame:has(.c-note){margin-right:0}
	.c-end{margin:0;width:100%;padding:36px 22px}
	.c-end-name{font-size:56px}
	.c-bar{left:var(--edge-phone);right:var(--edge-phone);bottom:40px;grid-template-columns:1fr;gap:12px}
	.c-prev,.c-next,.c-progress,.c-pos{display:none}
	.c-mid{flex-direction:column;align-items:stretch;gap:12px}
	.c-segments{display:flex;gap:4px}
	.c-segments i{flex:1;height:6px;border:1px solid var(--progress-border);box-sizing:border-box}
	.c-segments i.seen{background:var(--progress-border)}
	.c-segments i.now{background:var(--progress);border-color:var(--progress)}
	.c-mid .copy-link{align-self:flex-end;font-size:12px;order:-1}
}

.coll .toast{position:fixed;bottom:84px}
