.page-archive .archive{
	max-width: 1080px;
	margin: 12px auto 32px;
	padding: 0 12px;
}

/* toolbar */
.archive-toolbar{
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin: 8px 0 16px;
}
.archive-search{
	flex: 1 1 auto;
	height: 34px;
	padding: 0 10px;
	border-radius: 8px;
	border: 1px solid var(--panel-border);
	background: var(--panel);
	color: var(--fg);
}
.thumbs-toggle{
	font-size: 14px;
	color: var(--muted);
	user-select: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* bookmarks strip just under the toolbar */
.bm-toolbar{
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
}
.bm-label{
	font-size: 14px;
	color: var(--muted);
}
.bm-select{
	flex: 0 0 1080px;       /* similar footprint to your other selects */
	max-width: 100%;
	height: 34px;
	padding: 0 10px;
	border-radius: 8px;
	border: 1px solid var(--panel-border);
	background: var(--panel);
	color: var(--fg);
	font: inherit;
    cursor: pointer;
}

/* book → chapter → episode tree */
.archive-tree{ display: grid; gap: 10px; }

.arc-book{
	border: 1px solid var(--panel-border);
	border-radius: 10px;
	background: var(--panel);
}
.arc-h{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 12px;
	cursor: pointer;
}
.arc-h small{ color: var(--muted); }
.arc-body{ padding: 6px 10px 12px; display: none; }
.arc-body.open{ display: block; }

.arc-ch{
	border: 1px dashed var(--panel-border);
	border-radius: 8px;
	padding: 8px 10px;
	margin: 8px 0;
}
.arc-ch > .arc-h{ padding: 6px 8px; }

/* episodes */
.ep-grid{
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 10px;
	padding: 6px 2px 2px;
}
.ep-card{
	display: grid;
	grid-template-rows: auto auto;
	gap: 6px;
	padding: 8px;
	border: 1px solid var(--panel-border);
	border-radius: 8px;
	background: #00000012;
}
.ep-card a{ text-decoration:none; color: var(--fg); }
.ep-thumb{
	width: 100%;
	aspect-ratio: 16/10;
	object-fit: cover;
	border-radius: 6px;
	background: #0002;
	display: block;
}
.ep-title{ font-size: 14px; font-weight: 600; }
.ep-meta{
	display: flex;
	justify-content: space-between;
	gap: 8px;
	font-size: 13px;
	color: var(--muted);
}

/* no-thumbs mode */
.no-thumbs .ep-thumb{ display: none; }
.no-thumbs .ep-card{ grid-template-rows: auto; }

/* tiny chevron */
.chev{ transition: transform .15s ease; }
.chev.open{ transform: rotate(90deg); }
