:root {
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #25332f;
	background: #f7f8fa;
	font-synthesis: none;
	--border: #e7eae9;
	--branch: #dce4de;
}
* { box-sizing: border-box; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
input, select { font: inherit; }
a, summary, input, select { -webkit-tap-highlight-color: transparent; }
a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #64ac8c; outline-offset: 3px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.main { max-width: 1188px; margin: 0 auto; padding: 24px 30px; }
.library-panel { background: #fff; border: 1px solid #e3e7e5; border-radius: 11px; overflow: hidden; box-shadow: 0 3px 5px #2b493603; }
.library-controls { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.search-control { display: flex; align-items: center; position: relative; flex: 1; min-width: 0; }
.search-control > svg { position: absolute; left: 12px; width: 17px; height: 17px; color: #85938b; pointer-events: none; }
.search-control input { width: 100%; min-width: 0; height: 40px; padding: 0 12px 0 38px; border: 1px solid #dfe5e1; border-radius: 6px; color: #25332f; background: #fff; font-size: 14px; }
.search-control input::placeholder { color: #87928c; opacity: 1; }
.sort-control { display: flex; align-items: center; gap: 8px; }
.sort-control label { color: #78817e; font-size: 12px; white-space: nowrap; }
.sort-control select { max-width: 240px; height: 40px; padding: 0 10px; border: 1px solid #dfe5e1; border-radius: 6px; color: #48594e; background: #fff; font-size: 13px; cursor: pointer; }
.video-tree, .video-branches { list-style: none; margin: 0; padding: 0; }
.streamer-node + .streamer-node { border-top: 1px solid var(--border); }
.streamer-heading {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 54px;
	padding: 14px 20px;
	list-style: none;
	cursor: pointer;
	background: #fafbfa;
}
.streamer-heading::-webkit-details-marker { display: none; }
.streamer-heading:hover { background: #f2f6f2; }
.streamer-heading:focus-visible { outline-offset: -3px; }
.streamer-chevron { width: 16px; height: 16px; color: #738378; transform: rotate(-90deg); transition: transform .15s; }
details[open] > .streamer-heading .streamer-chevron { transform: rotate(0); }
.streamer-name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.5; min-width: 0; }
.streamer-count { flex-shrink: 0; margin-left: auto; color: #87918a; font-size: 11px; font-variant-numeric: tabular-nums; }
.video-branches { margin: 0 20px 14px 28px; }
.video-branch { position: relative; padding-left: 28px; }
.video-branch::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; border-left: 1px solid var(--branch); }
.video-branch::after { content: ""; position: absolute; top: 50%; left: 0; width: 18px; border-top: 1px solid var(--branch); }
.video-branch:last-child::before { bottom: 50%; }
.video-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto 160px;
	align-items: center;
	gap: 18px;
	min-height: 56px;
	padding: 10px 12px;
	border-bottom: 1px solid #edf0ee;
	border-radius: 5px;
	transition: background .15s;
}
.video-branch:last-child .video-row { border-bottom: 0; }
a.video-row:hover { background: #edf5ec; }
.video-row.is-watched { background: #eff0f1; }
a.video-row.is-watched:hover { background: #e4e7e9; }
.video-row.is-watched .duration { background: #e7eaeb; border-color: #dfe4e5; }
.video-row[aria-disabled="true"] { opacity: .6; }
.video-name { font-size: 13px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; min-width: 0; }
.created-at { font-size: 11px; font-variant-numeric: tabular-nums; color: #78817e; line-height: 1.5; }
.duration {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
	font-size: 11px;
	font-variant-numeric: tabular-nums;
	color: #738078;
	background: #f6f8f6;
	border: 1px solid #eff2ef;
	padding: 5px 8px;
	border-radius: 4px;
	white-space: nowrap;
	justify-self: end;
}
.duration svg { width: 12px; height: 12px; opacity: .65; }
.tree-message { margin: 0; padding: 35px 20px; text-align: center; font-size: 13px; color: #78817e; line-height: 1.6; }
.tree-message.error { color: #956340; }
@media (max-width: 700px) {
	.main { padding: 16px 12px; }
	.library-controls { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; }
	.sort-control select { flex: 1; max-width: none; min-width: 0; }
	.search-control input, .sort-control select { font-size: 16px; }
	.streamer-heading { padding: 13px 14px; gap: 8px; }
	.streamer-name { font-size: 13px; }
	.streamer-count { font-size: 10px; }
	.video-branches { margin: 0 14px 10px 22px; }
	.video-branch { padding-left: 18px; }
	.video-branch::after { width: 11px; }
	.video-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title created" "duration created"; gap: 5px 10px; padding: 10px 8px; }
	.video-name { grid-area: title; font-size: 12px; }
	.created-at { grid-area: created; font-size: 10px; }
	.duration { grid-area: duration; justify-self: start; font-size: 10px; padding: 4px 6px; }
	.duration svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; }
}
