.note-tabs {
	display: flex;
	align-items: end;
	gap: 4px;
	flex: 0 0 auto;
	padding: 8px 12px 0;
	border-bottom: 1px solid var(--line);
	overflow-x: auto;
}

.note-tab {
	padding: 8px 12px;
	border: 1px solid transparent;
	border-bottom: none;
	border-radius: 8px 8px 0 0;
	background: transparent;
	color: var(--muted);
	font: inherit;
	font-size: 14px;
	cursor: pointer;
	white-space: nowrap;
}

.note-tab[aria-selected="true"] {
	background: var(--surface);
	color: var(--fg);
	border-color: var(--line);
}

.note-tab-add {
	margin-left: 4px;
	min-width: 2.2rem;
	background: var(--accent);
	color: var(--bg);
	border-color: var(--accent);
	font-weight: 700;
}

.note-windows {
	--note-card: 9rem;
	flex: 1;
	min-height: 0;
	display: flex;
	gap: 12px;
	padding: 0 12px 12px;
}

.note-window {
	display: flex;
	flex-direction: column;
	flex: 1 1 0;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	border: 1px solid var(--line);
	border-top: 0;
	border-radius: 0 0 10px 10px;
	background: var(--surface);
	color: var(--fg);
}

.note-windows:has(> .note-window ~ .note-window) > .note-list {
	flex: 0 0 calc(var(--note-card) + 26px);
	width: calc(var(--note-card) + 26px);
}

.note-window-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	padding: 8px 12px;
	border-bottom: 1px solid var(--line);
}

.note-window-title {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.note-window-close,
.note-window-save {
	padding: 4px 8px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--bg);
	color: var(--fg);
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}

.note-window-save {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--bg);
}

.note-window-save:disabled {
	cursor: wait;
	opacity: 0.7;
}

.note-window-body {
	flex: 1;
	min-height: 0;
	overflow: auto;
	padding: 12px;
}

.note-blocks {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	align-content: flex-start;
	gap: 8px;
}

.note-block,
.note-add {
	flex: 0 0 auto;
	width: var(--note-card);
	height: 7.5rem;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--bg);
	color: var(--fg);
	font: inherit;
	overflow: hidden;
	cursor: pointer;
}

.note-block {
	display: flex;
	flex-direction: column;
	text-align: left;
}

.note-shot {
	display: block;
	width: 100%;
	aspect-ratio: 12 / 7;
	height: auto;
	flex: 0 0 auto;
	object-fit: cover;
	object-position: top;
	background: var(--surface);
}

.note-name {
	flex: 1;
	min-width: 0;
	padding: 4px 8px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 12px;
	line-height: 2rem;
}

.note-add {
	display: grid;
	place-items: center;
	border-style: dashed;
	border-color: var(--accent);
	background: var(--surface);
	color: var(--accent);
	font-size: 18px;
	font-weight: 700;
}

.note-add:disabled {
	cursor: wait;
	opacity: 0.7;
}

.note-menu {
	position: fixed;
	z-index: 5;
	display: flex;
	flex-direction: column;
	min-width: 9rem;
	padding: 4px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	box-shadow: 0 8px 24px var(--shadow);
}

.note-menu[hidden] {
	display: none;
}

.note-menu button {
	padding: 8px 10px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--fg);
	font: inherit;
	font-size: 14px;
	text-align: left;
	cursor: pointer;
}

.note-menu button:hover {
	background: var(--bg);
}

.note-body {
	margin: 0;
	white-space: pre-wrap;
}
