:root {
	--crypt-bg: #f7f8fb;
	--crypt-ink: #20242d;
	--crypt-muted: #667085;
	--crypt-nav: #252b3a;
	--crypt-card: #ffffff;
	--crypt-border: #d9dee8;
	--crypt-accent: #2f6f73;
	--crypt-accent-hover: #3d8589;
	--crypt-accent-shadow: #1f5558;
}

body {
	background: var(--crypt-bg);
	color: var(--crypt-ink);
}

.crypt-nav {
	background: var(--crypt-nav);
}

.crypt-nav-inner {
	align-items: center;
	display: flex;
	gap: 1rem;
	padding: 0.75rem 0;
}

.crypt-brand {
	align-items: center;
	display: inline-flex;
	flex: 0 0 auto;
	text-decoration: none;
}

.crypt-brand img {
	border-radius: 8px;
	display: block;
	height: 2.25rem;
	width: 2.25rem;
}

.crypt-nav .nav-link {
	color: rgba(255, 255, 255, 0.82);
}

.crypt-nav .nav-link.active,
.crypt-nav .nav-link:hover {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

.crypt-page {
	padding-bottom: 3rem;
	padding-top: 2rem;
}

.crypt-header {
	margin-bottom: 1.5rem;
}

.crypt-header h1,
.auth-card h1 {
	font-size: 2rem;
	font-weight: 700;
	margin: 0 0 0.35rem;
}

.crypt-header p {
	color: var(--crypt-muted);
	margin: 0;
}

.crypt-page-heading {
	align-items: center;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
}

.crypt-add-button {
	align-items: center;
	background: var(--crypt-accent);
	border: 0;
	border-radius: 50%;
	box-shadow: 0 0.45rem 0 var(--crypt-accent-shadow);
	color: #fff;
	display: inline-flex;
	flex: 0 0 auto;
	font-size: 1.85rem;
	height: 4.25rem;
	justify-content: center;
	line-height: 1;
	width: 4.25rem;
}

.crypt-add-button:hover,
.crypt-add-button:focus {
	background: var(--crypt-accent-hover);
	color: #fff;
	outline: none;
	transform: translateY(-1px);
}

.crypt-add-button:active {
	box-shadow: 0 0.2rem 0 var(--crypt-accent-shadow);
	transform: translateY(0.25rem);
}

.crypt-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.crypt-card {
	background: var(--crypt-card);
	border: 1px solid var(--crypt-border);
	border-radius: 8px;
	color: inherit;
	display: block;
	padding: 1rem;
	text-decoration: none;
}

.crypt-card:hover {
	border-color: var(--crypt-accent);
	box-shadow: 0 8px 20px rgba(32, 36, 45, 0.08);
}

.crypt-card h2 {
	font-size: 1.15rem;
	margin: 0 0 0.4rem;
}

.crypt-card p {
	color: var(--crypt-muted);
	margin: 0;
}

.auth-page {
	max-width: 460px;
}

.auth-card {
	background: var(--crypt-card);
	border: 1px solid var(--crypt-border);
	border-radius: 8px;
	margin-top: 10vh;
	padding: 1.5rem;
}

.crypt-avatar {
	align-items: center;
	background: var(--crypt-accent);
	border-radius: 50%;
	color: #fff;
	display: inline-flex;
	font-size: 0.75rem;
	justify-content: center;
	margin-right: 0.35rem;
	vertical-align: middle;
}

.crypt-toast-region {
	position: fixed;
	right: 1rem;
	top: 1rem;
	z-index: 1080;
}

.crypt-toast {
	background: #fff;
	border: 1px solid var(--crypt-border);
	border-left: 4px solid var(--crypt-accent);
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(32, 36, 45, 0.14);
	max-width: 360px;
	padding: 0.75rem 1rem;
}

.crypt-panel,
.crypt-empty {
	background: var(--crypt-card);
	border: 1px solid var(--crypt-border);
	border-radius: 8px;
	padding: 1rem;
}

.crypt-panel h2,
.crypt-section h2 {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0 0 1rem;
}

.crypt-stat {
	min-width: 0;
}

.crypt-stat strong {
	display: block;
	font-size: 1.15rem;
	overflow-wrap: anywhere;
}

.crypt-admin-link {
	align-items: flex-start;
	background: var(--crypt-card);
	border: 1px solid var(--crypt-border);
	border-radius: 8px;
	color: inherit;
	display: flex;
	gap: 0.85rem;
	height: 100%;
	padding: 1rem;
	text-decoration: none;
}

.crypt-admin-link:hover,
.crypt-admin-link:focus {
	border-color: var(--crypt-accent);
	color: inherit;
	text-decoration: none;
}

.crypt-admin-link-icon {
	align-items: center;
	background: rgba(47, 111, 115, 0.1);
	border-radius: 6px;
	color: var(--crypt-accent);
	display: inline-flex;
	flex: 0 0 auto;
	height: 2.25rem;
	justify-content: center;
	width: 2.25rem;
}

.crypt-admin-link strong,
.crypt-admin-link small {
	display: block;
}

.crypt-admin-link small {
	color: var(--crypt-muted);
	line-height: 1.4;
	margin-top: 0.2rem;
}

.crypt-section {
	margin-top: 1.5rem;
}

.crypt-section-heading {
	align-items: center;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.crypt-section-heading h2 {
	margin: 0;
}

.crypt-folder-title {
	align-items: center;
	display: inline-flex;
	gap: 0.5rem;
}

.crypt-folder-title .crypt-folder-icon-img {
	height: 1.25rem;
	width: 1.25rem;
}

.crypt-search-form {
	max-width: 420px;
	width: 100%;
}

.crypt-bookmark-search-panel {
	align-items: center;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	margin: -0.5rem 0 1rem;
}

.crypt-bookmark-search-form {
	flex: 1 1 32rem;
	max-width: none;
}

.crypt-search-summary {
	color: var(--crypt-muted);
	margin: -0.25rem 0 1rem;
}

.crypt-saved-searches {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: -0.35rem 0 1rem;
}

.crypt-inline-delete {
	background: transparent;
	border: 0;
	color: var(--crypt-muted);
	line-height: 1;
	padding: 0 0.25rem;
}

.crypt-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: flex-end;
	margin-top: 1rem;
}

.crypt-button-row {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: flex-end;
}

.crypt-button-row .btn {
	white-space: nowrap;
}

.crypt-check-list {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.crypt-icon-button {
	align-items: center;
	display: inline-flex;
	height: 2rem;
	justify-content: center;
	width: 2rem;
}

.crypt-theme-menu-item {
	padding: 0.5rem 0.75rem;
}

.crypt-theme-switcher,
.crypt-view-toggle {
	border: 1px solid var(--crypt-border);
	border-radius: 6px;
	display: flex;
	width: max-content;
}

.crypt-theme-switcher .btn,
.crypt-view-toggle .btn {
	border: 0;
	border-radius: 0;
	line-height: 1;
	padding: 0.35rem 0.5rem;
}

.crypt-theme-switcher .btn:first-child,
.crypt-view-toggle > :first-child .btn,
.crypt-view-toggle > .btn:first-child {
	border-bottom-left-radius: 5px;
	border-top-left-radius: 5px;
}

.crypt-theme-switcher .btn:last-child,
.crypt-view-toggle > :last-child .btn,
.crypt-view-toggle > .btn:last-child {
	border-bottom-right-radius: 5px;
	border-top-right-radius: 5px;
}

.crypt-dictionary {
	display: grid;
	gap: 1.25rem;
}

.crypt-dictionary-entry {
	border-bottom: 1px solid var(--crypt-border);
	padding: 0 0 1.25rem;
}

.crypt-dictionary-entry:last-child {
	border-bottom: 0;
}

.crypt-books {
	display: grid;
	gap: 1.25rem;
}

.crypt-read-later-list {
	display: grid;
	gap: 1.25rem;
}

.crypt-bookmark-shell {
	background: var(--crypt-card);
	border: 1px solid var(--crypt-border);
	border-radius: 8px;
	display: grid;
	grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
	min-height: calc(100vh - 16rem);
	overflow: hidden;
}

.crypt-bookmark-shell.is-sidebar-closed {
	grid-template-columns: minmax(0, 1fr);
}

.crypt-bookmark-shell.is-sidebar-closed .crypt-bookmark-sidebar {
	display: none;
}

.crypt-bookmark-sidebar {
	background: #f2f4f8;
	border-right: 1px solid var(--crypt-border);
	max-height: calc(100vh - 16rem);
	overflow-y: auto;
	padding: 0.75rem;
}

.crypt-bookmark-folder-row {
	align-items: center;
	border-radius: 6px;
	display: flex;
	gap: 0.5rem;
	padding: 0.2rem 0.35rem;
}

.crypt-bookmark-folder {
	align-items: center;
	border-radius: 6px;
	color: inherit;
	display: flex;
	flex: 1 1 auto;
	font-weight: 600;
	gap: 0.5rem;
	justify-content: space-between;
	min-width: 0;
	padding: 0.18rem 0.2rem;
	text-decoration: none;
}

.crypt-bookmark-folder-row:hover,
.crypt-bookmark-folder-row.is-active,
.crypt-bookmark-folder-row.is-drop-target {
	background: rgba(32, 36, 45, 0.1);
}

.crypt-bookmark-folder-row.is-disabled {
	opacity: 0.45;
}

.crypt-bookmark-folder-row.is-drop-target {
	box-shadow: inset 0 0 0 2px var(--crypt-accent);
}

.crypt-bookmark-folder:hover {
	color: inherit;
	text-decoration: none;
}

.crypt-bookmark-folder span:first-child {
	align-items: center;
	display: flex;
	gap: 0.45rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.crypt-folder-picker {
	background: #f2f4f8;
	border: 1px solid var(--crypt-border);
	border-radius: 8px;
	max-height: min(28rem, 62vh);
	overflow-y: auto;
	padding: 0.5rem;
}

.crypt-folder-picker-button {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 6px;
	color: inherit;
	display: flex;
	flex: 1 1 auto;
	font: inherit;
	font-weight: 600;
	gap: 0.5rem;
	justify-content: space-between;
	min-width: 0;
	padding: 0.18rem 0.2rem;
	text-align: left;
}

.crypt-folder-picker-button span:first-child {
	align-items: center;
	display: flex;
	gap: 0.45rem;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.crypt-folder-picker-button:disabled {
	pointer-events: none;
}

.crypt-folder-emoji {
	display: inline-block;
	line-height: 1;
	text-align: center;
	width: 1.1rem;
}

.crypt-folder-icon-img {
	border-radius: 3px;
	height: 1.1rem;
	object-fit: cover;
	width: 1.1rem;
}

.crypt-bookmark-disclosure {
	align-items: center;
	background: transparent;
	border: 0;
	color: var(--crypt-muted);
	display: inline-flex;
	flex: 0 0 auto;
	height: 1.25rem;
	justify-content: center;
	padding: 0;
	width: 1rem;
}

.crypt-bookmark-disclosure.is-placeholder {
	opacity: 0;
	pointer-events: none;
}

.crypt-bookmark-disclosure[aria-expanded="false"] i {
	transform: rotate(-90deg);
}

.crypt-bookmark-count {
	color: var(--crypt-muted);
	font-variant-numeric: tabular-nums;
}

.crypt-context-menu {
	background: var(--crypt-card);
	border: 1px solid var(--crypt-border);
	border-radius: 7px;
	box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.18);
	display: grid;
	min-width: 12rem;
	padding: 0.35rem;
	position: fixed;
	z-index: 1100;
}

.crypt-context-menu[hidden],
.crypt-context-menu [hidden] {
	display: none !important;
}

.crypt-context-menu > button,
.crypt-context-menu > a,
.crypt-context-menu-branch > button {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 5px;
	color: inherit;
	display: flex;
	font: inherit;
	gap: 0.5rem;
	justify-content: flex-start;
	padding: 0.45rem 0.65rem;
	text-align: left;
	text-decoration: none;
	width: 100%;
}

.crypt-context-menu-branch > button > .fa:last-child {
	margin-left: auto;
}

.crypt-context-menu-branch > button > span {
	align-items: center;
	display: inline-flex;
	gap: 0.5rem;
	min-width: 0;
}

.crypt-context-menu > button:hover,
.crypt-context-menu > button:focus,
.crypt-context-menu > a:hover,
.crypt-context-menu > a:focus,
.crypt-context-menu-branch > button:hover,
.crypt-context-menu-branch > button:focus {
	background: rgba(32, 36, 45, 0.1);
	color: inherit;
	outline: none;
	text-decoration: none;
}

.crypt-context-menu > button.is-danger {
	color: #a72828;
}

.crypt-context-menu-branch {
	position: relative;
}

.crypt-context-submenu {
	background: var(--crypt-card);
	border: 1px solid var(--crypt-border);
	border-radius: 7px;
	box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.18);
	display: none;
	left: calc(100% - 0.2rem);
	overflow: visible;
	position: absolute;
	top: 0;
	z-index: 1101;
}

.crypt-context-menu-branch:hover > .crypt-context-submenu,
.crypt-context-menu-branch:focus-within > .crypt-context-submenu {
	display: block;
}

.crypt-bookmark-depth-1 {
	padding-left: 1.4rem;
}

.crypt-bookmark-depth-2 {
	padding-left: 2.2rem;
}

.crypt-bookmark-depth-3 {
	padding-left: 3rem;
}

.crypt-bookmark-depth-4 {
	padding-left: 3.8rem;
}

.crypt-bookmark-depth-5,
.crypt-bookmark-depth-6 {
	padding-left: 4.6rem;
}

.crypt-bookmark-main {
	min-width: 0;
	padding: 1rem;
}

.crypt-bookmark-list {
	display: grid;
	gap: 0;
}

.crypt-bookmark-list.is-card-view {
	gap: 1rem;
	grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.crypt-bookmark-entry {
	border-bottom: 1px solid var(--crypt-border);
	padding: 0.75rem 0;
}

.crypt-bookmark-entry:first-child {
	padding-top: 0;
}

.crypt-bookmark-entry:last-child {
	border-bottom: 0;
}

.crypt-bookmark-entry.is-dragging {
	opacity: 0.45;
}

.crypt-bookmark-row {
	display: block;
}

.crypt-bookmark-body {
	min-width: 0;
}

.crypt-bookmark-body h3 {
	font-size: 1.08rem;
	line-height: 1.3;
	margin: 0;
}

.crypt-bookmark-body h3 a {
	color: inherit;
	text-decoration: none;
}

.crypt-bookmark-body h3 a:hover {
	text-decoration: underline;
}

.crypt-bookmark-description {
	color: var(--crypt-muted);
	line-height: 1.55;
	max-width: 76ch;
}

.crypt-bookmark-folders {
	color: var(--crypt-muted);
	font-size: 0.88rem;
	margin: 0.2rem 0 0.35rem;
}

.crypt-bookmark-site {
	color: var(--crypt-muted);
	font-size: 0.82rem;
	line-height: 1.35;
}

.crypt-bookmark-headline {
	align-items: center;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
}

.crypt-bookmark-headline h3 {
	font-size: 1rem;
	margin: 0;
}

.crypt-bookmark-headline h3 a,
.crypt-bookmark-card h3 a {
	color: inherit;
	text-decoration: none;
}

.crypt-bookmark-headline h3 a:hover,
.crypt-bookmark-card h3 a:hover {
	text-decoration: underline;
}

.crypt-bookmark-card {
	border-radius: 8px;
	overflow: visible;
}

.crypt-bookmark-card-img {
	aspect-ratio: 1.91 / 1;
	background: #edf1f5;
	object-fit: cover;
}

.crypt-bookmark-card .card-title {
	font-size: 1.05rem;
	line-height: 1.3;
	margin-top: 0.25rem;
}

.crypt-bookmark-card .card-text {
	color: var(--crypt-muted);
	font-size: 0.92rem;
	line-height: 1.45;
}

.crypt-view-toggle form {
	display: inline-flex;
	margin: 0;
}

.crypt-search-snippet {
	background: #f6f7f9;
	border-left: 3px solid var(--crypt-accent);
	color: var(--crypt-muted);
	line-height: 1.5;
	margin: 0.45rem 0 0.65rem;
	max-width: 80ch;
	padding: 0.45rem 0.65rem;
}

.crypt-search-snippet mark {
	background: #fff1a8;
	border-radius: 3px;
	padding: 0 0.12rem;
}

.crypt-book-entry {
	border-bottom: 1px solid var(--crypt-border);
	display: grid;
	gap: 1rem;
	grid-template-columns: 7rem minmax(0, 1fr);
	padding: 0 0 1.25rem;
}

.crypt-book-entry:last-child {
	border-bottom: 0;
}

.crypt-read-later-entry {
	border-bottom: 1px solid var(--crypt-border);
	padding: 0 0 1.25rem;
}

.crypt-read-later-entry:last-child {
	border-bottom: 0;
}

.crypt-read-later-entry h3 a {
	color: inherit;
	text-decoration: none;
}

.crypt-read-later-entry h3 a:hover {
	text-decoration: underline;
}

.crypt-book-cover {
	align-items: center;
	aspect-ratio: 2 / 3;
	background: rgba(47, 111, 115, 0.08);
	border: 1px solid var(--crypt-border);
	border-radius: 6px;
	display: flex;
	justify-content: center;
	overflow: hidden;
	width: 100%;
}

.crypt-book-cover img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.crypt-book-body {
	min-width: 0;
}

.crypt-book-body h3 a {
	color: inherit;
	text-decoration: none;
}

.crypt-book-body h3 a:hover,
.crypt-back-link:hover,
.crypt-detail-link:hover {
	text-decoration: underline;
}

.crypt-book-meta {
	color: var(--crypt-muted);
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0.35rem 0 0.65rem;
}

.crypt-scanner {
	background: rgba(47, 111, 115, 0.08);
	border: 1px solid var(--crypt-border);
	border-radius: 8px;
	padding: 0.75rem;
}

.crypt-scanner video {
	background: #000;
	border-radius: 6px;
	display: block;
	max-height: 18rem;
	object-fit: cover;
	width: 100%;
}

.modal-dialog-scrollable {
	height: calc(100vh - 1rem);
	height: calc(100dvh - 1rem);
	max-height: calc(100vh - 1rem);
	max-height: calc(100dvh - 1rem);
}

.modal-dialog-scrollable .modal-content {
	height: 100%;
	max-height: 100%;
	min-height: 0;
	overflow: hidden;
}

.modal-dialog-scrollable .modal-content > form {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
}

.modal-dialog-scrollable .modal-header,
.modal-dialog-scrollable .modal-footer {
	flex: 0 0 auto;
}

.modal-dialog-scrollable .modal-body {
	-webkit-overflow-scrolling: touch;
	flex: 1 1 auto;
	min-height: 0;
	overscroll-behavior: contain;
	overflow-y: auto;
}

.crypt-back-link,
.crypt-detail-link {
	color: var(--crypt-accent);
	font-weight: 600;
	text-decoration: none;
}

.crypt-book-detail {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
	margin-bottom: 1.5rem;
}

.crypt-book-detail-cover {
	max-width: 12rem;
}

.crypt-book-detail-body {
	min-width: 0;
}

.crypt-book-detail-badges {
	justify-content: flex-start;
	margin-bottom: 1rem;
}

.crypt-detail-list {
	display: grid;
	gap: 0.75rem;
	margin: 0 0 1rem;
}

.crypt-detail-list div {
	display: grid;
	gap: 0.15rem;
}

.crypt-detail-list dt {
	color: var(--crypt-muted);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.crypt-detail-list dd {
	margin: 0;
}

.crypt-folder-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0 0 1rem;
}

.crypt-readable-layout {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
}

.crypt-readable-main {
	min-width: 0;
}

.crypt-readable-side {
	border-left: 1px solid var(--crypt-border);
	padding-left: 1.5rem;
}

.crypt-readable-content {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.12rem;
	line-height: 1.75;
	max-width: 74ch;
}

.crypt-readable-content h1,
.crypt-readable-content h2,
.crypt-readable-content h3,
.crypt-readable-content h4 {
	font-family: inherit;
	font-weight: 700;
	line-height: 1.25;
	margin: 1.6rem 0 0.7rem;
}

.crypt-readable-content h1 {
	font-size: 1.8rem;
}

.crypt-readable-content h2 {
	font-size: 1.5rem;
}

.crypt-readable-content h3 {
	font-size: 1.25rem;
}

.crypt-readable-content p,
.crypt-readable-content ul,
.crypt-readable-content ol,
.crypt-readable-content blockquote {
	margin-bottom: 1.1rem;
}

.crypt-readable-content img {
	border-radius: 6px;
	display: block;
	height: auto;
	margin: 1rem 0;
	max-width: 100%;
}

.crypt-readable-content figure {
	margin: 1.25rem 0;
}

.crypt-readable-content figcaption {
	color: var(--crypt-muted);
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 0.9rem;
	line-height: 1.45;
	margin-top: 0.45rem;
}

.crypt-readable-content blockquote {
	border-left: 4px solid var(--crypt-accent);
	color: var(--crypt-muted);
	padding-left: 1rem;
}

.crypt-readable-content pre,
.crypt-readable-content code {
	background: #eef2f6;
	border-radius: 5px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
	font-size: 0.92em;
}

.crypt-readable-content code {
	padding: 0.1rem 0.25rem;
}

.crypt-readable-content pre {
	overflow-x: auto;
	padding: 0.85rem;
}

.crypt-readable-content pre code {
	background: transparent;
	padding: 0;
}

.crypt-readable-content table {
	display: block;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 0.95rem;
	margin: 1rem 0;
	max-width: 100%;
	overflow-x: auto;
}

.crypt-readable-content th,
.crypt-readable-content td {
	border: 1px solid var(--crypt-border);
	padding: 0.45rem 0.6rem;
}

.crypt-readable-excerpt {
	border-left: 4px solid var(--crypt-accent);
	color: var(--crypt-muted);
	font-size: 1.02rem;
	margin: 0 0 1rem;
	max-width: 72ch;
	padding-left: 1rem;
}

.crypt-entry-heading {
	align-items: flex-start;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	margin-bottom: 0.35rem;
}

.crypt-entry-heading h3 {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.75rem;
	font-weight: 700;
	margin: 0;
}

.crypt-bookmark-entry .crypt-entry-heading h3 {
	font-family: inherit;
	font-size: 1.08rem;
	line-height: 1.3;
}

.crypt-entry-heading p {
	color: var(--crypt-muted);
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0.25rem 0 0;
}

.crypt-entry-tools {
	align-items: flex-end;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.crypt-entry-tools form {
	margin: 0;
}

.crypt-bookmark-actions {
	align-items: center;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: flex-start;
	margin-top: 0.65rem;
}

.crypt-folder-dropdown {
	max-height: min(26rem, 70vh);
	min-width: 18rem;
	overflow: visible;
	padding: 0.35rem;
}

.crypt-context-submenu.crypt-folder-dropdown {
	overflow: visible;
}

.crypt-folder-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.crypt-folder-menu .crypt-folder-menu {
	border-left: 1px solid var(--crypt-border);
	margin-left: 0.7rem;
	padding-left: 0.35rem;
}

.crypt-folder-menu form {
	flex: 1 1 auto;
	margin: 0;
	min-width: 0;
}

.crypt-folder-menu-button {
	align-items: center;
	border-radius: 0.3rem;
	display: flex;
	gap: 0.45rem;
	justify-content: flex-start;
	min-height: 2rem;
	text-align: left;
	width: 100%;
}

.crypt-context-menu > button > .fa,
.crypt-context-menu > a > .fa,
.crypt-context-menu-branch > button > span > .fa,
.crypt-folder-menu-button > .fa,
.crypt-folder-menu-button > .crypt-folder-emoji,
.crypt-folder-menu-button > .crypt-folder-icon-img {
	flex: 0 0 1.1rem;
	text-align: center;
}

.crypt-folder-menu-button span:last-child {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-align: left;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.crypt-folder-menu-button.is-active {
	font-weight: 700;
}

.crypt-folder-menu-button.is-disabled,
.crypt-folder-menu-button:disabled {
	color: var(--crypt-muted);
	opacity: 0.55;
	pointer-events: none;
}

.crypt-folder-menu-spacer {
	display: inline-block;
	width: 1rem;
}

.crypt-folder-menu-branch {
	position: relative;
}

.crypt-folder-menu-row {
	align-items: center;
	border-radius: 0.3rem;
	color: var(--crypt-text);
	display: flex;
	gap: 0.5rem;
	min-width: 12rem;
}

.crypt-folder-menu-row > .crypt-folder-menu-button,
.crypt-folder-menu-row > form {
	flex: 1 1 auto;
	min-width: 0;
}

.crypt-folder-menu-caret {
	color: var(--crypt-muted);
	flex: 0 0 auto;
	padding-right: 0.5rem;
}

.crypt-folder-submenu {
	background: var(--crypt-card);
	border: 1px solid var(--crypt-border);
	border-radius: 7px;
	box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.18);
	display: none;
	left: calc(100% - 0.2rem);
	margin: 0;
	min-width: 16rem;
	overflow: visible;
	padding: 0.35rem;
	position: absolute;
	top: 0;
	z-index: 1080;
}

.crypt-folder-menu .crypt-folder-submenu {
	border-left: 1px solid var(--crypt-border);
	margin-left: 0;
	padding-left: 0.35rem;
}

.crypt-folder-menu-branch:hover > .crypt-folder-submenu,
.crypt-folder-menu-branch:focus-within > .crypt-folder-submenu {
	display: block;
}

.crypt-tool-form {
	border-bottom: 1px solid var(--crypt-border);
	display: grid;
	gap: 0.75rem;
	padding: 0 0 1rem;
}

.crypt-tool-form + .crypt-tool-form {
	margin-top: 1rem;
}

.crypt-tool-form:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.crypt-tool-form h3 {
	font-size: 1rem;
	font-weight: 700;
	margin: 0;
}

.crypt-definition {
	font-size: 1.05rem;
	line-height: 1.5;
	max-width: 76ch;
}

.crypt-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0.35rem 0 0.65rem;
}

.crypt-tag-badge {
	text-decoration: none;
}

.crypt-tag-badge:hover,
.crypt-tag-badge:focus {
	filter: brightness(0.92);
	text-decoration: none;
}

.crypt-tag-field {
	align-items: center;
	background: var(--crypt-card);
	border: 1px solid var(--crypt-border);
	border-radius: 6px;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	min-height: 2.4rem;
	padding: 0.35rem;
}

.crypt-tag-field:focus-within {
	border-color: var(--crypt-accent);
	box-shadow: 0 0 0 0.2rem rgba(47, 111, 115, 0.14);
}

.crypt-tag-tokens {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.crypt-tag-token {
	align-items: center;
	display: inline-flex;
	gap: 0.25rem;
}

.crypt-tag-token button {
	background: transparent;
	border: 0;
	color: inherit;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1;
	padding: 0 0.1rem;
}

.crypt-tag-token button:hover,
.crypt-tag-token button:focus {
	opacity: 0.75;
	outline: none;
}

.crypt-tag-input {
	background: transparent;
	border: 0;
	color: var(--crypt-ink);
	flex: 1 1 10rem;
	min-width: 8rem;
	outline: 0;
	padding: 0.15rem 0.25rem;
}

.crypt-tag-suggest {
	background: var(--crypt-card);
	border: 1px solid var(--crypt-border);
	border-radius: 6px;
	box-shadow: 0 0.5rem 1.5rem rgba(32, 36, 45, 0.14);
	max-height: 14rem;
	overflow-y: auto;
	padding: 0.25rem;
	position: absolute;
	z-index: 1100;
}

.crypt-tag-suggest-item {
	background: transparent;
	border: 0;
	border-radius: 4px;
	color: var(--crypt-ink);
	display: block;
	padding: 0.35rem 0.5rem;
	text-align: left;
	width: 100%;
}

.crypt-tag-suggest-item:hover,
.crypt-tag-suggest-item:focus {
	background: rgba(47, 111, 115, 0.12);
	outline: none;
}

.crypt-definition > :last-child,
.crypt-example > :last-child,
.crypt-notes > :last-child {
	margin-bottom: 0;
}

.crypt-example {
	border-left: 3px solid var(--crypt-border);
	color: var(--crypt-muted);
	font-style: italic;
	margin: 0.75rem 0 0;
	max-width: 76ch;
	padding-left: 0.85rem;
}

.crypt-related-words {
	color: var(--crypt-muted);
	font-size: 0.95rem;
	margin-top: 0.75rem;
	max-width: 76ch;
}

.crypt-quote-form {
	margin-bottom: 1rem;
}

.crypt-quotes {
	display: grid;
	gap: 1rem;
}

.crypt-quote {
	background: var(--crypt-card);
	border: 1px solid var(--crypt-border);
	border-radius: 8px;
	padding: 1rem;
}

.crypt-quote blockquote {
	border-left: 3px solid var(--crypt-accent);
	margin: 0;
	max-width: 76ch;
	padding-left: 0.85rem;
}

.crypt-quote blockquote > :last-child {
	margin-bottom: 0;
}

.crypt-quote-meta {
	color: var(--crypt-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 0.9rem;
	gap: 0.75rem;
	margin-top: 0.65rem;
}

.crypt-notes {
	background: #f1f4f8;
	border-radius: 6px;
	margin-top: 0.75rem;
	max-width: 76ch;
	padding: 0.75rem;
	white-space: pre-wrap;
}

.crypt-source {
	display: inline-block;
	font-size: 0.9rem;
	margin-top: 0.75rem;
}

.crypt-star-widget {
	display: inline-flex;
	gap: 0.15rem;
}

.crypt-star-widget [data-star-value] {
	display: none;
}

.crypt-star-button {
	background: transparent;
	border: 0;
	color: #c4c8d0;
	font-size: 1.45rem;
	line-height: 1;
	padding: 0 0.05rem;
}

.crypt-star-button.is-active {
	color: #a46f00;
}

.crypt-star-button:hover,
.crypt-star-button:focus {
	color: #8a5e00;
	outline: none;
}

.crypt-empty {
	color: var(--crypt-muted);
}

@media (max-width: 640px) {
	.crypt-page-heading,
	.crypt-entry-heading {
		align-items: flex-start;
	}

	.crypt-bookmark-search-panel {
		align-items: stretch;
		display: grid;
	}

	.crypt-book-entry {
		grid-template-columns: 5.5rem minmax(0, 1fr);
	}

	.crypt-book-detail {
		grid-template-columns: 1fr;
	}

	.crypt-bookmark-shell {
		grid-template-columns: 1fr;
	}

	.crypt-bookmark-sidebar {
		border-bottom: 1px solid var(--crypt-border);
		border-right: 0;
		max-height: 18rem;
		overflow-y: auto;
	}

	.crypt-readable-layout {
		grid-template-columns: 1fr;
	}

	.crypt-readable-side {
		border-left: 0;
		border-top: 1px solid var(--crypt-border);
		padding-left: 0;
		padding-top: 1rem;
	}

	.crypt-book-detail-cover {
		max-width: 9rem;
	}

	.crypt-entry-tools {
		align-items: flex-start;
		flex-direction: row;
		flex-wrap: wrap;
	}
}

@media (max-width: 575.98px) {
	.modal-dialog {
		margin: 0.5rem;
	}

	.crypt-page-heading {
		align-items: flex-start;
	}

	.crypt-add-button {
		font-size: 1.35rem;
		height: 3.25rem;
		width: 3.25rem;
	}

	.crypt-entry-heading {
		display: block;
	}

	.crypt-entry-tools {
		align-items: flex-start;
		margin-top: 0.5rem;
	}

	.crypt-section-heading {
		align-items: stretch;
		display: block;
	}

	.crypt-search-form {
		margin-top: 0.75rem;
		max-width: none;
	}
}
