.nf-browser {
	--nf-border: #dadce0;
	--nf-hover: #f1f3f4;
	--nf-text: #202124;
	--nf-muted: #5f6368;
	--nf-accent: #1a73e8;
	color: var(--nf-text);
	font-size: 15px;
	line-height: 1.4;
	margin: 1.5em 0;
}

.nf-browser *,
.nf-browser *::before,
.nf-browser *::after {
	box-sizing: border-box;
}

.nf-browser a {
	text-decoration: none;
	box-shadow: none;
}

/* Toolbar */
/* Two fixed rows: breadcrumb (full width) above, search + view toggle below. */
.nf-toolbar {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--nf-border);
}

.nf-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	row-gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 1.1em;
	line-height: 1.35;
}

.nf-breadcrumb li {
	display: inline-flex;
	align-items: baseline;
	margin: 0;
	padding: 0;
}

.nf-breadcrumb li + li::before {
	content: "›";
	flex: 0 0 auto;
	color: var(--nf-muted);
	padding: 0 6px;
}

.nf-breadcrumb a,
.nf-breadcrumb span {
	padding: 2px 6px;
	border-radius: 6px;
	color: var(--nf-muted);
}

/* Align the text of the first crumb with the search box below. */
.nf-breadcrumb li:first-child a {
	margin-left: -6px;
}

.nf-breadcrumb a:hover,
.nf-breadcrumb a:focus-visible {
	background: var(--nf-hover);
	color: var(--nf-text);
}

.nf-breadcrumb [aria-current] {
	color: var(--nf-text);
	font-weight: 600;
}

.nf-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.nf-search {
	display: flex;
	margin: 0;
	min-width: 0;
}

.nf-search input[type="search"] {
	width: 260px;
	max-width: 50vw;
	margin: 0;
	padding: 8px 14px;
	border: 1px solid var(--nf-border);
	border-right: 0;
	border-radius: 20px 0 0 20px;
	background: #f8f9fa;
	font-size: 14px;
}

.nf-search input[type="search"]:focus {
	outline: none;
	background: #fff;
	border-color: var(--nf-accent);
}

.nf-search button {
	margin: 0;
	padding: 8px 16px;
	border: 1px solid var(--nf-accent);
	border-radius: 0 20px 20px 0;
	background: var(--nf-accent);
	color: #fff;
	font-size: 14px;
	cursor: pointer;
}

.nf-view-toggle {
	display: flex;
	border: 1px solid var(--nf-border);
	border-radius: 20px;
	overflow: hidden;
}

.nf-view-toggle button {
	display: flex;
	margin: 0;
	padding: 7px 12px;
	border: 0;
	background: #fff;
	color: var(--nf-muted);
	cursor: pointer;
}

.nf-view-toggle button + button {
	border-left: 1px solid var(--nf-border);
}

.nf-view-toggle button[aria-pressed="true"] {
	background: #e8f0fe;
	color: var(--nf-accent);
}

.nf-view-toggle svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.nf-search-summary,
.nf-empty,
.nf-notice {
	margin: 12px 0;
	color: var(--nf-muted);
}

.nf-notice {
	padding: 10px 14px;
	border: 1px solid #f9dfa0;
	border-radius: 8px;
	background: #fef7e0;
	color: var(--nf-text);
}

.nf-icon {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
}

/* List view */
.nf-view-list .nf-head,
.nf-view-list .nf-link {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 140px 110px;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
}

.nf-view-list .nf-head {
	border-bottom: 1px solid var(--nf-border);
	color: var(--nf-muted);
	font-size: 13px;
	font-weight: 600;
}

.nf-view-list .nf-item {
	border-bottom: 1px solid var(--nf-border);
}

.nf-view-list .nf-link {
	color: var(--nf-text);
}

.nf-view-list .nf-link:hover,
.nf-view-list .nf-link:focus-visible {
	background: var(--nf-hover);
	outline: none;
}

.nf-col-name {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.nf-name {
	overflow-wrap: anywhere;
}

.nf-col-date,
.nf-col-size {
	color: var(--nf-muted);
	font-size: 13px;
}

.nf-location {
	display: block;
	padding: 0 12px 10px 50px;
	color: var(--nf-accent);
	font-size: 12px;
}

/* Grid view */
.nf-view-grid .nf-head {
	display: none;
}

.nf-view-grid .nf-items {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 12px;
	margin-top: 16px;
}

.nf-view-grid .nf-item {
	border: 1px solid var(--nf-border);
	border-radius: 10px;
	background: #fff;
	transition: box-shadow 0.15s;
}

.nf-view-grid .nf-item:hover,
.nf-view-grid .nf-item:focus-within {
	box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3), 0 4px 8px rgba(60, 64, 67, 0.15);
}

.nf-view-grid .nf-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 12px;
	color: var(--nf-text);
}

.nf-view-grid .nf-col-name {
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}

.nf-view-grid .nf-icon {
	width: 44px;
	height: 44px;
}

.nf-view-grid .nf-name {
	font-size: 14px;
	font-weight: 500;
}

.nf-view-grid .nf-col-date {
	display: none;
}

.nf-view-grid .nf-col-size {
	margin-top: auto;
	padding-top: 8px;
}

.nf-view-grid .nf-location {
	padding: 0 12px 10px;
}

@media (max-width: 640px) {
	.nf-actions {
		width: 100%;
	}

	.nf-search {
		flex: 1;
		min-width: 0;
	}

	.nf-search input[type="search"] {
		flex: 1;
		width: auto;
		min-width: 0;
		max-width: none;
	}

	.nf-search button {
		padding: 8px 12px;
	}

	.nf-view-toggle button {
		padding: 7px 9px;
	}

	.nf-view-list .nf-head,
	.nf-view-list .nf-link {
		grid-template-columns: minmax(0, 1fr) 80px;
	}

	.nf-view-list .nf-col-date {
		display: none;
	}

	.nf-view-grid .nf-items {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.nf-view-grid .nf-link {
		padding: 10px;
	}

	.nf-view-grid .nf-icon {
		width: 36px;
		height: 36px;
	}

	.nf-view-grid .nf-name {
		font-size: 13px;
	}
}
