/*
Theme Name: Firefly WP
Theme URI: https://github.com/CuteLeaf/Firefly
Author: admin
Description: Firefly-inspired dynamic WordPress theme for 世間的美好.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
License: CC BY-NC-SA 4.0
License URI: https://creativecommons.org/licenses/by-nc-sa/4.0/
Text Domain: firefly-wp
*/

:root {
	--hue: var(--configHue, 165);
	--primary: oklch(0.62 0.16 var(--hue));
	--primary-soft: hsl(var(--hue) 70% 92%);
	--primary-strong: hsl(var(--hue) 72% 36%);
	--page-bg: oklch(0.96 0.02 var(--hue));
	--card-bg: rgb(255 255 255 / 0.72);
	--card-bg-transparent: rgb(255 255 255 / var(--overlay-card-opacity, 0.5));
	--card-border: rgb(15 23 42 / 0.10);
	--text: oklch(0.24 0.02 var(--hue));
	--text-muted: oklch(0.46 0.03 var(--hue));
	--text-faint: oklch(0.62 0.03 var(--hue));
	--shadow: 0 8px 28px rgb(15 23 42 / 0.10);
	--shadow-navbar: 0 8px 28px rgb(15 23 42 / 0.12);
	--shadow-navbar-dark: 0 8px 32px rgb(0 0 0 / 0.28);
	--shadow-button: 0 8px 24px hsl(var(--hue) 68% 42% / 0.18);
	--radius-large: 1rem;
	--radius-medium: .75rem;
	--nav-height: 4.5rem;
	--content-width: min(var(--page-width, 100rem), calc(100vw - 2rem));
	--font-main: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
	--font-ui: var(--font-main);
	--font-code: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
	--color-selection-bar: linear-gradient(90deg, oklch(0.80 0.10 0), oklch(0.80 0.10 60), oklch(0.80 0.10 120), oklch(0.80 0.10 180), oklch(0.80 0.10 240), oklch(0.80 0.10 300), oklch(0.80 0.10 360));
}

html.dark {
	--page-bg: oklch(0.18 0.02 var(--hue));
	--card-bg: rgb(24 24 27 / 0.72);
	--card-bg-transparent: rgb(24 24 27 / var(--overlay-card-opacity, 0.5));
	--card-border: rgb(255 255 255 / 0.10);
	--text: oklch(0.92 0.02 var(--hue));
	--text-muted: oklch(0.74 0.03 var(--hue));
	--text-faint: oklch(0.58 0.03 var(--hue));
	--shadow: 0 10px 36px rgb(0 0 0 / 0.32);
	--primary-soft: hsl(var(--hue) 58% 18%);
}

* {
	box-sizing: border-box;
}

html {
	min-height: 100%;
	background: var(--page-bg);
	color: var(--text);
	scroll-behavior: smooth;
}

body {
	min-height: 100%;
	margin: 0;
	font-family: var(--font-main);
	background: var(--page-bg);
	color: var(--text);
	line-height: 1.75;
}

body.admin-bar .ff-navbar {
	top: 32px;
}

a {
	color: inherit;
	text-decoration: none;
}

img {
	max-width: 100%;
	height: auto;
}

button,
input,
textarea {
	font: inherit;
}

::selection {
	background: var(--primary);
	color: white;
}

.screen-reader-text,
.skip-link {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: 1rem;
	left: 1rem;
	z-index: 1000;
	width: auto;
	height: auto;
	padding: .65rem 1rem;
	clip: auto;
	border-radius: .75rem;
	background: var(--text);
	color: var(--page-bg);
}

.ff-icon {
	width: 1.18em;
	height: 1.18em;
	display: inline-block;
	fill: currentColor;
	vertical-align: -0.18em;
	flex: 0 0 auto;
}

.top-gradient-highlight {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 20;
	height: 180px;
	pointer-events: none;
	background: linear-gradient(to bottom, rgb(255 255 255 / .5) 0%, rgb(255 255 255 / .3) 30%, rgb(255 255 255 / .15) 60%, rgb(255 255 255 / .05) 80%, transparent 100%);
	transition: all .3s ease;
}

.dark .top-gradient-highlight {
	background: linear-gradient(to bottom, rgb(0 0 0 / .5) 0%, rgb(0 0 0 / .3) 30%, rgb(0 0 0 / .15) 60%, rgb(0 0 0 / .05) 80%, transparent 100%);
}

.ff-navbar {
	position: sticky;
	top: 0;
	z-index: 60;
	backdrop-filter: blur(var(--navbar-glass-blur, 5px));
	background: rgb(255 255 255 / .55);
	border: 1px solid transparent;
	border-radius: 0 0 .75rem .75rem;
	box-shadow: var(--shadow-navbar);
	font-family: var(--font-ui);
	transition: background-color .36s cubic-bezier(.22, 1, .36, 1), box-shadow .36s cubic-bezier(.22, 1, .36, 1), backdrop-filter .36s cubic-bezier(.22, 1, .36, 1), border-radius .36s cubic-bezier(.22, 1, .36, 1);
}

.dark .ff-navbar {
	background: rgb(0 0 0 / .55);
	box-shadow: var(--shadow-navbar-dark);
}

.ff-navbar[data-enable-blur="false"] {
	backdrop-filter: blur(0);
}

html[data-wallpaper-mode="none"] .ff-navbar {
	background: var(--card-bg);
}

html[data-wallpaper-mode="overlay"] .ff-navbar {
	background: var(--card-bg-transparent);
}

@media (min-width: 1024px) {
	.ff-navbar[data-transparent-mode="full"] {
		background: transparent;
		backdrop-filter: blur(0);
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}

	.ff-navbar[data-transparent-mode="semifull"]:not(.scrolled) {
		background: transparent;
		backdrop-filter: blur(0);
		border: 0;
		box-shadow: none;
	}
}

.ff-navbar-inner {
	width: var(--content-width);
	height: var(--nav-height);
	margin: 0 auto;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 1rem;
}

.ff-brand {
	display: inline-flex;
	align-items: center;
	gap: .65rem;
	height: 3.2rem;
	padding: 0 1rem;
	border-radius: .95rem;
	font-weight: 800;
	letter-spacing: .02em;
	transition: transform .18s ease, background .18s ease;
}

.ff-brand:hover,
.ff-nav-links a:hover,
.ff-icon-button:hover,
.ff-mobile-menu a:hover {
	background: rgb(255 255 255 / 0.45);
	transform: translateY(-1px);
}

.dark .ff-brand:hover,
.dark .ff-nav-links a:hover,
.dark .ff-icon-button:hover,
.dark .ff-mobile-menu a:hover {
	background: rgb(255 255 255 / 0.08);
}

.ff-brand img,
.ff-brand .custom-logo {
	width: 1.8rem;
	height: 1.8rem;
	object-fit: contain;
	border-radius: .5rem;
}

.ff-nav-links {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: .35rem;
}

.ff-nav-links a,
.ff-mobile-menu a {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	height: 2.7rem;
	padding: 0 .85rem;
	border-radius: .85rem;
	color: var(--text-muted);
	font-size: .94rem;
	transition: color .18s ease, background .18s ease, transform .18s ease;
}

.ff-nav-links a:hover {
	color: var(--primary);
}

.ff-navbar-actions {
	display: inline-flex;
	align-items: center;
	gap: .25rem;
}

.ff-search-bar {
	position: relative;
	display: flex;
	align-items: center;
	height: 2.75rem;
	margin-right: .5rem;
	border-radius: .75rem;
	background: rgb(0 0 0 / .04);
	color: var(--text-faint);
	transition: background-color .18s ease, width .2s ease;
}

html.dark .ff-search-bar {
	background: rgb(255 255 255 / .05);
}

.ff-search-bar:hover,
.ff-search-bar:focus-within {
	background: rgb(0 0 0 / .06);
}

html.dark .ff-search-bar:hover,
html.dark .ff-search-bar:focus-within {
	background: rgb(255 255 255 / .10);
}

.ff-search-bar .ff-icon {
	position: absolute;
	left: .75rem;
	width: 1.25rem;
	height: 1.25rem;
	pointer-events: none;
	opacity: .55;
}

.ff-search-bar input {
	width: 10rem;
	height: 100%;
	border: 0;
	outline: 0;
	padding: 0 .8rem 0 2.5rem;
	background: transparent;
	color: var(--text-muted);
	font-size: .875rem;
	transition: width .2s ease, color .18s ease;
}

.ff-search-bar input:focus {
	width: 15rem;
	color: var(--text);
}

#search-switch {
	display: none;
}

.ff-theme-mode-wrap {
	position: relative;
	z-index: 80;
}

#scheme-switch {
	position: relative;
}

.ff-scheme-icon {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity .18s ease, transform .18s ease;
}

html.dark .ff-scheme-light,
html:not(.dark) .ff-scheme-dark {
	opacity: 0;
	transform: scale(.88);
}

.ff-theme-mode-panel {
	position: absolute;
	top: 3rem;
	right: -.5rem;
	z-index: 90;
	width: 12rem;
	padding: .5rem;
	border-radius: 1rem;
}

.ff-dropdown-item {
	display: flex;
	align-items: center;
	gap: .75rem;
	width: 100%;
	min-height: 2.5rem;
	border: 0;
	border-radius: .75rem;
	padding: .45rem .7rem;
	background: transparent;
	color: var(--text-muted);
	cursor: pointer;
	font-family: var(--font-ui);
	font-weight: 700;
	text-align: left;
	transition: background-color .18s ease, color .18s ease;
}

.ff-dropdown-item .ff-icon {
	width: 1.25rem;
	height: 1.25rem;
}

.ff-dropdown-item:hover,
.ff-dropdown-item.is-active {
	background: var(--btn-regular-bg-hover);
	color: var(--primary);
}

.ff-icon-button,
.ff-mini-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: .85rem;
	background: transparent;
	color: var(--text-muted);
	cursor: pointer;
	transition: transform .18s ease, background .18s ease, color .18s ease;
}

.ff-icon-button {
	width: 2.75rem;
	height: 2.75rem;
}

.ff-icon-button:hover {
	color: var(--primary);
}

.ff-mini-button {
	padding: .55rem .85rem;
	background: var(--primary-soft);
	color: var(--primary-strong);
	font-weight: 700;
}

.ff-mobile-menu-button {
	display: none;
}

.ff-mobile-menu,
.ff-floating-panel {
	width: min(32rem, calc(100vw - 2rem));
	position: fixed;
	right: 1rem;
	top: calc(var(--nav-height) + 1rem);
	z-index: 80;
	padding: .75rem;
	border: 1px solid var(--card-border);
	border-radius: var(--radius-medium);
	background: var(--card-bg);
	box-shadow: var(--shadow);
	backdrop-filter: blur(24px) saturate(150%);
}

body.admin-bar .ff-mobile-menu,
body.admin-bar .ff-floating-panel {
	top: calc(var(--nav-height) + 33px + 1rem);
}

.ff-mobile-menu {
	display: grid;
	gap: .2rem;
}

.ff-search-panel,
.ff-theme-panel {
	display: grid;
	gap: .8rem;
}

.ff-theme-panel label {
	font-family: var(--font-ui);
	font-weight: 700;
	color: var(--text-muted);
}

.ff-theme-panel input[type="range"] {
	width: 100%;
	accent-color: var(--primary);
}

.ff-theme-panel {
	width: min(20rem, calc(100vw - 2rem));
	padding: .9rem 1rem;
}

.ff-setting-section {
	display: grid;
	gap: .55rem;
	padding: .35rem 0 .7rem;
	border-bottom: 1px solid var(--card-border);
}

.ff-setting-section:last-child {
	border-bottom: 0;
	padding-bottom: .25rem;
}

.ff-setting-heading {
	display: flex;
	align-items: center;
	gap: .5rem;
	position: relative;
	padding-left: .75rem;
	font-family: var(--font-ui);
}

.ff-setting-heading::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: .24rem;
	height: 1rem;
	border-radius: 999px;
	background: var(--primary);
	transform: translateY(-50%);
}

.ff-setting-heading strong {
	margin-right: auto;
	font-size: 1.02rem;
	color: var(--text);
}

.ff-setting-heading span,
.ff-reset-button {
	min-width: 2.35rem;
	height: 1.75rem;
	border: 0;
	border-radius: .45rem;
	background: rgb(127 127 127 / .12);
	color: var(--text-muted);
	font-size: .78rem;
	font-weight: 700;
}

.ff-reset-button {
	cursor: pointer;
}

.ff-color-slider {
	height: 1.5rem;
	border-radius: 999px;
	background-image: var(--color-selection-bar);
}

.ff-theme-panel input[type="range"] {
	appearance: none;
	height: .9rem;
	border-radius: 999px;
	background-image: linear-gradient(90deg, var(--primary) 0 var(--range-progress, 50%), rgb(127 127 127 / .18) var(--range-progress, 50%) 100%);
}

.ff-theme-panel input[type="range"]::-webkit-slider-thumb {
	appearance: none;
	width: .5rem;
	height: 1rem;
	border-radius: .15rem;
	background: rgb(255 255 255 / .72);
}

.ff-theme-panel input[type="range"]::-moz-range-thumb {
	width: .5rem;
	height: 1rem;
	border: 0;
	border-radius: .15rem;
	background: rgb(255 255 255 / .72);
}

.ff-setting-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: .45rem;
}

.ff-setting-grid button,
.ff-toggle-list button {
	border: 0;
	border-radius: .55rem;
	padding: .58rem .68rem;
	background: rgb(127 127 127 / .10);
	color: var(--text-muted);
	cursor: pointer;
	font-family: var(--font-ui);
	font-size: .82rem;
	font-weight: 700;
	transition: transform .18s ease, background .18s ease, color .18s ease;
}

.ff-setting-grid button.is-active,
.ff-toggle-list button.is-active {
	background: var(--primary);
	color: white;
}

.ff-setting-grid button:hover,
.ff-toggle-list button:hover {
	transform: translateY(-1px);
	color: var(--primary);
	background: color-mix(in srgb, var(--primary) 12%, transparent);
}

.ff-toggle-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: .45rem;
}

.ff-overlay-settings label {
	display: flex;
	justify-content: space-between;
	font-size: .82rem;
	color: var(--text-muted);
}

.ff-hero {
	position: relative;
	min-height: var(--banner-height, 35vh);
	display: grid;
	place-items: center;
	overflow: hidden;
	color: var(--page-bg);
	background: transparent;
	transition: min-height .3s ease, opacity .3s ease;
}

.ff-hero-home {
	min-height: var(--banner-height-home, 65vh);
}

.ff-banner-images {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--ff-hero-image);
	background-size: cover;
	background-position: 0% 20%;
	transform: scale(1.04);
	filter: saturate(110%);
	transition: opacity .35s ease, filter .35s ease, transform .35s ease;
}

@media (max-width: 680px) {
	.ff-banner-images {
		background-image: var(--ff-mobile-hero-image);
	}
}

.ff-hero-overlay {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgb(0 0 0 / var(--wallpaper-dim-opacity, .2)), rgb(0 0 0 / var(--wallpaper-dim-opacity, .2))),
		radial-gradient(circle at center, transparent 0, rgb(0 0 0 / .24) 75%);
}

.ff-wallpaper-overlay {
	position: absolute;
	inset: 0;
	opacity: 0;
	background-image: var(--ff-hero-image);
	background-size: cover;
	background-position: center;
	filter: blur(var(--overlay-blur, 10px));
	transform: scale(1.04);
	pointer-events: none;
	transition: opacity .3s ease, filter .3s ease;
}

.ff-hero-content {
	position: relative;
	z-index: 2;
	width: min(56rem, calc(100vw - 2rem));
	padding: 7rem 1rem 5rem;
	text-align: center;
	color: white;
	text-shadow: 0 8px 30px rgb(0 0 0 / .38);
	animation: ff-rise .55s ease both;
}

.ff-hero-content h1 {
	margin: 0;
	font-size: clamp(2.4rem, 7vw, 3.8rem);
	line-height: 1.05;
	letter-spacing: .05em;
	font-weight: 900;
}

.ff-hero-content p {
	margin: 1rem auto 0;
	max-width: 44rem;
	font-family: var(--font-ui);
	font-size: clamp(1rem, 2vw, 1.25rem);
	color: rgb(255 255 255 / .88);
}

.ff-typewriter::after {
	content: "|";
	margin-left: 2px;
	animation: ff-blink 1s infinite;
}

#wallpaper-gradient {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 12;
	height: 10%;
	background: linear-gradient(to bottom, transparent, var(--page-bg));
	transition: opacity .3s ease;
}

#header-waves {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	z-index: 15;
	height: 5.25rem;
	color: var(--page-bg);
	isolation: isolate;
	contain: layout style;
	pointer-events: none;
}

#header-waves svg {
	width: 100%;
	height: 100%;
	display: block;
}

#header-waves .parallax use {
	animation: wave 25s cubic-bezier(.5, .5, .45, .5) infinite;
}

#header-waves .parallax use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; }
#header-waves .parallax use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
#header-waves .parallax use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; }
#header-waves .parallax use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; }

html[data-waves-enabled="false"] #header-waves,
html[data-gradient-enabled="false"] #wallpaper-gradient,
html[data-wallpaper-mode="none"] #header-waves,
html[data-wallpaper-mode="none"] #wallpaper-gradient,
html[data-wallpaper-mode="overlay"] #header-waves,
html[data-wallpaper-mode="overlay"] #wallpaper-gradient,
html[data-waves-enabled="true"] #wallpaper-gradient {
	display: none !important;
}

html[data-banner-title-enabled="false"] .banner-home-text-overlay {
	display: none;
}

html[data-wallpaper-mode="fullscreen"] #wallpaper-wrapper {
	min-height: 100vh;
}

html[data-wallpaper-mode="fullscreen"] .ff-page-shell,
html[data-wallpaper-mode="overlay"] .ff-page-shell,
html[data-wallpaper-mode="none"] .ff-page-shell {
	margin-top: 1.25rem;
}

html[data-wallpaper-mode="overlay"] #wallpaper-wrapper {
	position: fixed;
	inset: 0;
	z-index: -1;
	min-height: 100vh;
	pointer-events: none;
}

html[data-wallpaper-mode="overlay"] .ff-banner-images,
html[data-wallpaper-mode="overlay"] .ff-hero-overlay,
html[data-wallpaper-mode="overlay"] .ff-hero-content {
	opacity: 0;
}

html[data-wallpaper-mode="overlay"] .ff-wallpaper-overlay {
	opacity: var(--overlay-opacity, .8);
}

html[data-wallpaper-mode="overlay"] .ff-card,
html[data-wallpaper-mode="overlay"] .ff-floating-panel,
html[data-wallpaper-mode="overlay"] .ff-mobile-menu {
	background: var(--card-bg-transparent);
}

html[data-wallpaper-mode="none"] #wallpaper-wrapper {
	display: none;
}

.ff-page-shell {
	width: var(--content-width);
	margin: -3.5rem auto 0;
	position: relative;
	z-index: 10;
	padding-bottom: 4rem;
}

.ff-main {
	min-height: 50vh;
}

.ff-content-grid {
	display: grid;
	grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr) minmax(14rem, 17rem);
	gap: 1.25rem;
	align-items: start;
}

.ff-post-list-wrap,
.ff-archive-panel,
.ff-taxonomy-overview,
.ff-article-card,
.ff-comments-wrap,
.ff-standalone-card {
	grid-column: 2 / 3;
}

.ff-rightbar,
.ff-toc {
	grid-column: 3 / 4;
	position: sticky;
	top: calc(var(--nav-height) + 1rem);
}

.ff-rightbar {
	display: grid;
	gap: 1rem;
}

.ff-card {
	border: 1px solid var(--card-border);
	border-radius: var(--radius-large);
	background: var(--card-bg);
	box-shadow: var(--shadow);
	backdrop-filter: blur(22px) saturate(150%);
}

.ff-category-bar {
	display: flex;
	gap: .55rem;
	align-items: center;
	margin-bottom: 1rem;
	padding: .75rem;
	overflow-x: auto;
	scrollbar-width: none;
}

.ff-category-bar::-webkit-scrollbar {
	display: none;
}

.ff-category-bar a,
.ff-chip-list a,
.ff-post-card-tags a,
.ff-post-meta a,
.ff-post-meta span {
	display: inline-flex;
	align-items: center;
	gap: .28rem;
	border-radius: .65rem;
	font-family: var(--font-ui);
	white-space: nowrap;
}

.ff-category-bar a {
	padding: .55rem .75rem;
	color: var(--text-muted);
	background: rgb(255 255 255 / .28);
	transition: color .18s ease, background .18s ease, transform .18s ease;
}

.ff-category-bar a:hover {
	color: var(--primary);
	background: var(--primary-soft);
	transform: translateY(-1px);
}

.category-bar {
	margin-bottom: 1rem;
	padding: .75rem;
}

.category-bar-inner {
	display: flex;
	align-items: center;
	gap: .5rem;
	min-width: 0;
}

.category-divider {
	align-self: stretch;
	width: 1px;
	min-height: 1.8rem;
	background: var(--line-divider);
	opacity: .5;
	flex: 0 0 auto;
}

.more-divider {
	opacity: .35;
}

.scroll-area {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

.category-scroll {
	display: flex;
	gap: .5rem;
	overflow-x: auto;
	scrollbar-width: none;
	scroll-behavior: smooth;
}

.category-scroll::-webkit-scrollbar {
	display: none;
}

.scroll-fade {
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 1;
	width: 2.5rem;
	pointer-events: none;
	opacity: .75;
	transition: opacity .3s ease;
}

.scroll-fade-left {
	left: 0;
	background: linear-gradient(to left, transparent, var(--card-bg));
}

.scroll-fade-right {
	right: 0;
	background: linear-gradient(to right, transparent, var(--card-bg));
}

html[data-wallpaper-mode="overlay"] .scroll-fade {
	display: none;
}

.category-pill,
.ff-category-bar .category-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	gap: .375rem;
	min-height: 2.125rem;
	padding: .375rem .875rem;
	border: 0;
	border-radius: .75rem;
	background: color-mix(in srgb, var(--btn-content) 6%, transparent);
	color: var(--btn-content);
	font-family: var(--font-ui);
	font-size: .875rem;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	transition: color .15s ease, background-color .15s ease, transform .15s ease;
}

.category-pill .ff-icon {
	width: 1.1rem;
	height: 1.1rem;
}

.category-pill .pill-count {
	min-width: auto;
	padding: .05rem .35rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--btn-content) 8%, transparent);
	opacity: .5;
	font-size: .7rem;
	font-weight: 600;
	line-height: 1.25;
}

.category-pill[data-category-name=""] {
	color: var(--primary);
	background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.category-pill:hover,
.ff-category-bar .category-pill:hover {
	color: var(--primary);
	background: color-mix(in srgb, var(--primary) 10%, transparent);
	transform: translateY(-1px);
}

.category-pill[data-active],
.category-pill.current {
	background: var(--primary);
	color: white;
}

.category-pill[data-active] .pill-count,
.category-pill.current .pill-count {
	background: rgb(255 255 255 / .20);
	opacity: .9;
}

.ff-post-list {
	display: grid;
	gap: 1rem;
}

.ff-post-list.grid-mode {
	grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
}

.ff-post-list.grid-mode .ff-post-card {
	display: flex;
	min-height: 28rem;
	flex-direction: column-reverse;
}

.ff-post-list.grid-mode .ff-post-card-content {
	width: 100%;
	min-height: auto;
}

.ff-post-list.grid-mode .ff-post-card-image {
	position: relative;
	inset: auto;
	width: 100%;
	height: 13rem;
	border-radius: var(--radius-large) var(--radius-large) 0 0;
}

.ff-post-card {
	position: relative;
	display: flex;
	flex-direction: row;
	min-height: 14.5rem;
	overflow: hidden;
	animation: ff-rise .5s ease both;
}

.ff-post-card:nth-child(2) { animation-delay: .04s; }
.ff-post-card:nth-child(3) { animation-delay: .08s; }
.ff-post-card:nth-child(4) { animation-delay: .12s; }
.ff-post-card:nth-child(5) { animation-delay: .16s; }

.ff-post-card-content {
	width: calc(70% - .75rem);
	min-height: 100%;
	padding: 1.75rem 1.2rem 1.65rem 2.15rem;
	display: flex;
	flex-direction: column;
	gap: .75rem;
}

.ff-post-card-title {
	position: relative;
	display: block;
	font-size: clamp(1.45rem, 2.6vw, 2.15rem);
	line-height: 1.25;
	font-weight: 900;
	letter-spacing: .01em;
	transition: color .18s ease;
}

.ff-post-card-title::before {
	content: "";
	position: absolute;
	left: -1rem;
	top: .35rem;
	width: .28rem;
	height: 1.35rem;
	border-radius: 999px;
	background: var(--primary);
}

.ff-post-card-title:hover {
	color: var(--primary);
}

.ff-post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: .45rem .7rem;
	color: var(--text-faint);
	font-size: .88rem;
}

.post-meta-root {
	align-items: center;
	gap: 1rem;
	row-gap: .5rem;
	color: var(--text-faint);
}

.ff-meta-item {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	color: var(--text-faint);
	font-family: var(--font-ui);
	font-size: .875rem;
	font-weight: 500;
	white-space: nowrap;
	transition: color .18s ease;
}

.meta-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--primary);
}

.meta-icon .ff-icon {
	width: 1.25rem;
	height: 1.25rem;
}

.ff-post-meta a:hover {
	color: var(--primary);
}

.ff-post-card-excerpt {
	color: var(--text-muted);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	flex: 1;
}

.ff-post-card-tags {
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
}

.ff-post-card-tags a,
.ff-chip-list a {
	padding: .25rem .55rem;
	background: rgb(255 255 255 / .32);
	color: var(--text-faint);
	font-size: .78rem;
	transition: transform .18s ease, color .18s ease, background .18s ease;
}

.ff-post-card-tags a:hover,
.ff-chip-list a:hover {
	color: var(--primary);
	background: var(--primary-soft);
	transform: translateY(-1px);
}

.ff-post-card-image {
	position: absolute;
	right: 1rem;
	top: 1rem;
	bottom: 1rem;
	width: 30%;
	overflow: hidden;
	border-radius: 1rem;
	background: var(--primary-soft);
}

.ff-post-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .34s ease, filter .34s ease;
}

.ff-card-image-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: grid;
	place-items: center;
	color: white;
	background: rgb(0 0 0 / 0);
	opacity: 0;
	transition: background .25s ease, opacity .25s ease;
}

.ff-post-card-image:hover img {
	transform: scale(1.08);
	filter: saturate(1.08);
}

.ff-post-card-image:hover .ff-card-image-overlay {
	background: rgb(0 0 0 / .34);
	opacity: 1;
}

.ff-sidebar {
	grid-column: 1 / 2;
	display: grid;
	gap: 1rem;
}

.ff-sidebar .ff-card {
	padding: 1rem;
}

.ff-profile-card {
	text-align: center;
}

.ff-profile-avatar {
	display: block;
	position: relative;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 1 / 1;
	margin: 0 auto 1rem;
	border-radius: 1rem;
	background: var(--primary-soft);
	transition: transform .18s ease;
}

.ff-profile-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
}

.ff-profile-avatar-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: grid;
	place-items: center;
	color: white;
	background: rgb(0 0 0 / 0);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease, background-color .2s ease, transform .2s ease;
}

.ff-profile-avatar-overlay .ff-icon {
	width: 3rem;
	height: 3rem;
	transform: scale(.9);
	transition: transform .2s ease;
}

.ff-profile-avatar:hover img {
	transform: scale(1.05);
}

.ff-profile-avatar:hover .ff-profile-avatar-overlay {
	background: rgb(0 0 0 / .30);
	opacity: 1;
}

.ff-profile-avatar:hover .ff-profile-avatar-overlay .ff-icon {
	transform: scale(1);
}

.ff-profile-avatar:active {
	transform: scale(.95);
}

.ff-profile-card h2 {
	margin: 0;
	font-size: 1.35rem;
	line-height: 1.25;
}

.ff-accent-line {
	display: block;
	width: 2rem;
	height: .28rem;
	margin: .65rem auto;
	border-radius: 999px;
	background: var(--primary);
}

.ff-profile-card p,
.ff-announcement-card p {
	margin: .35rem 0 .8rem;
	color: var(--text-muted);
	font-size: .95rem;
}

.ff-profile-links {
	display: flex;
	justify-content: center;
	gap: .5rem;
}

.ff-profile-links a {
	display: grid;
	place-items: center;
	width: 2.55rem;
	height: 2.55rem;
	border-radius: .75rem;
	background: var(--btn-regular-bg);
	color: var(--btn-content);
}

.ff-widget-title {
	margin: 0 0 .8rem;
	font-family: var(--font-ui);
	font-size: 1rem;
	color: var(--text);
}

widget-layout,
.ff-widget-layout {
	display: block;
	overflow: hidden;
	padding-bottom: 1rem;
}

.p-3 {
	padding: .75rem;
}

.pb-4 {
	padding-bottom: 1rem;
}

.hidden {
	display: none !important;
}

widget-layout .widget-title,
.ff-widget-layout .widget-title,
.ff-widget-title.widget-title {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 1rem 1rem .6rem 2rem;
	color: var(--text);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.35;
}

widget-layout .widget-title::before,
.ff-widget-layout .widget-title::before,
.ff-widget-title.widget-title::before {
	content: "";
	position: absolute;
	left: -1rem;
	top: .28rem;
	width: .25rem;
	height: 1rem;
	border-radius: .375rem;
	background: var(--primary);
}

.collapse-wrapper {
	overflow: hidden;
	padding-inline: 1rem;
}

.collapse-wrapper.collapsed {
	height: var(--collapsed-height, 0);
}

.expand-btn {
	padding: .5rem 1rem 0;
}

widget-layout[data-is-collapsed="true"][data-expanded="true"][data-use-expanded-button-spacing="true"] .expand-btn {
	padding-top: .5rem;
}

.expand-btn .btn-plain {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	width: 100%;
	min-height: 2.25rem;
	border: 0;
	border-radius: .65rem;
	color: var(--primary);
	font-weight: 700;
	cursor: pointer;
}

.toggle-icon-more,
.toggle-icon-less {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.75rem;
	font-size: 1.4rem;
	line-height: 1;
	color: var(--primary);
}

.ff-stats-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: .6rem;
}

.ff-stats-grid span {
	display: grid;
	place-items: center;
	min-height: 4.2rem;
	border-radius: .85rem;
	background: rgb(255 255 255 / .32);
	color: var(--text-muted);
	font-family: var(--font-ui);
	font-size: .82rem;
}

.ff-stats-grid strong {
	display: block;
	color: var(--primary);
	font-size: 1.35rem;
	line-height: 1.2;
}

.ff-stats-list {
	display: flex;
	flex-direction: column;
	gap: .5rem;
}

.ff-stat-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	min-height: 2.25rem;
	padding: .35rem .75rem;
	border-radius: .75rem;
	color: var(--text-muted);
	font-family: var(--font-ui);
	background: transparent;
	transition: background-color .18s ease, color .18s ease;
}

.ff-stat-row:hover {
	background: var(--btn-regular-bg);
	color: var(--text);
}

.ff-stat-row span {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	font-size: .9rem;
	font-weight: 500;
}

.ff-stat-row span .ff-icon {
	color: var(--primary);
	font-size: 1.25rem;
}

.ff-stat-row strong {
	color: var(--text);
	font-size: 1rem;
	line-height: 1;
}

.ff-chip-list {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

.ff-chip-list a span {
	min-width: 1.25rem;
	padding: 0 .35rem;
	border-radius: 999px;
	background: rgb(0 0 0 / .06);
	text-align: center;
}

.dark .ff-chip-list a span {
	background: rgb(255 255 255 / .08);
}

.ff-article-card {
	padding: clamp(1.2rem, 3vw, 2.35rem);
}

.ff-article-header {
	margin-bottom: 1.8rem;
	padding-bottom: 1.3rem;
	border-bottom: 1px solid var(--card-border);
}

.ff-article-header h1 {
	margin: 0 0 .85rem;
	font-size: clamp(2rem, 4vw, 3.7rem);
	line-height: 1.15;
	letter-spacing: .02em;
}

.ff-markdown {
	font-size: 1.03rem;
	color: var(--text);
}

.ff-markdown > *:first-child {
	margin-top: 0;
}

.ff-markdown h1,
.ff-markdown h2,
.ff-markdown h3,
.ff-markdown h4 {
	line-height: 1.25;
	margin: 2rem 0 .8rem;
	letter-spacing: .01em;
}

.ff-markdown h2 {
	position: relative;
	padding-left: .85rem;
}

.ff-markdown h2::before {
	content: "";
	position: absolute;
	left: 0;
	top: .2em;
	width: .24rem;
	height: 1.05em;
	border-radius: 999px;
	background: var(--primary);
}

.ff-markdown p {
	margin: 1rem 0;
}

.ff-markdown a {
	color: var(--primary-strong);
	border-bottom: 1px solid hsl(var(--hue) 70% 60% / .35);
}

.dark .ff-markdown a {
	color: hsl(var(--hue) 76% 68%);
}

.ff-markdown img {
	display: block;
	margin: 1.3rem auto;
	border-radius: 1rem;
	box-shadow: 0 12px 40px rgb(0 0 0 / .12);
}

.ff-markdown blockquote {
	margin: 1.4rem 0;
	padding: .9rem 1rem;
	border-left: .25rem solid var(--primary);
	border-radius: .8rem;
	background: var(--primary-soft);
	color: var(--text-muted);
}

.ff-markdown pre,
.ff-markdown code {
	font-family: var(--font-code);
}

.ff-markdown code {
	padding: .15rem .38rem;
	border-radius: .4rem;
	background: rgb(15 23 42 / .08);
	font-size: .92em;
}

.dark .ff-markdown code {
	background: rgb(255 255 255 / .10);
}

.ff-markdown pre {
	overflow: auto;
	padding: 1rem;
	border-radius: 1rem;
	background: rgb(15 23 42);
	color: rgb(235 240 247);
}

.ff-markdown pre code {
	padding: 0;
	background: transparent;
	color: inherit;
}

.ff-markdown table {
	width: 100%;
	border-collapse: collapse;
	overflow: hidden;
	border-radius: 1rem;
}

.ff-markdown th,
.ff-markdown td {
	padding: .75rem;
	border: 1px solid var(--card-border);
}

.ff-license {
	margin-top: 2rem;
	padding: 1rem;
	background: linear-gradient(135deg, var(--primary-soft), var(--card-bg));
	box-shadow: none;
}

.ff-license p {
	margin: .35rem 0 0;
	color: var(--text-muted);
	font-size: .9rem;
}

.ff-post-nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin-top: 1rem;
}

.ff-post-nav a {
	display: block;
	padding: .85rem 1rem;
	border-radius: .9rem;
	background: rgb(255 255 255 / .32);
	color: var(--text-muted);
	font-family: var(--font-ui);
	transition: color .18s ease, background .18s ease;
}

.ff-post-nav a:hover {
	color: var(--primary);
	background: var(--primary-soft);
}

.ff-comments-wrap {
	margin-top: 1rem;
}

.ff-comments {
	padding: 1.25rem;
}

.ff-comments-title,
.ff-comment-reply-title {
	margin: 0 0 1rem;
	font-size: 1.35rem;
}

.ff-comment-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ff-comment-list .comment {
	margin: 0 0 1rem;
	padding: 1rem;
	border-radius: 1rem;
	background: rgb(255 255 255 / .32);
}

.ff-comment-form input,
.ff-comment-form textarea,
.ff-search-form input {
	width: 100%;
	border: 1px solid var(--card-border);
	border-radius: .85rem;
	padding: .75rem .9rem;
	background: rgb(255 255 255 / .42);
	color: var(--text);
	outline: none;
}

.dark .ff-comment-form input,
.dark .ff-comment-form textarea,
.dark .ff-search-form input {
	background: rgb(255 255 255 / .06);
}

.ff-comment-form input:focus,
.ff-comment-form textarea:focus,
.ff-search-form input:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 .2rem hsl(var(--hue) 70% 50% / .15);
}

.ff-comment-form .form-submit input,
.ff-search-form button,
.ff-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4rem;
	border: 0;
	border-radius: .85rem;
	padding: .75rem 1rem;
	background: var(--primary);
	color: white;
	font-family: var(--font-ui);
	font-weight: 800;
	cursor: pointer;
	transition: transform .18s ease, filter .18s ease;
}

.ff-comment-form .form-submit input:hover,
.ff-search-form button:hover,
.ff-button:hover {
	transform: translateY(-1px);
	filter: brightness(1.05);
}

.ff-search-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: .65rem;
	align-items: center;
}

#search-panel,
.search-panel {
	width: min(30rem, calc(100vw - 2rem));
	max-height: calc(100vh - 100px);
	overflow-y: auto;
	border-radius: 1rem;
	padding: .75rem;
}

#search-panel .ff-search-form {
	grid-template-columns: minmax(0, 1fr) auto;
}

#search-panel .ff-search-form input {
	min-height: 2.75rem;
	border-radius: .75rem;
	background: rgb(0 0 0 / .04);
}

html.dark #search-panel .ff-search-form input {
	background: rgb(255 255 255 / .05);
}

.ff-search-main,
.ff-empty-card,
.ff-standalone-card {
	padding: 1.5rem;
}

.ff-search-main {
	margin-bottom: 1rem;
}

.ff-section-header {
	margin-bottom: 1.5rem;
}

.ff-section-header h1,
.ff-standalone-card h1 {
	margin: 0 0 .35rem;
	font-size: clamp(2rem, 4vw, 3.2rem);
}

.ff-section-header p,
.ff-empty-card p,
.ff-standalone-card p {
	margin: 0;
	color: var(--text-muted);
}

.ff-archive-panel,
.ff-taxonomy-overview {
	padding: 1.5rem;
}

.ff-timeline {
	display: grid;
	gap: .25rem;
}

.archive-year-group {
	display: grid;
}

.ff-archive-year-btn {
	display: grid;
	grid-template-columns: 15% 15% 1fr;
	align-items: center;
	width: 100%;
	height: 3.75rem;
	border: 0;
	border-radius: .75rem;
	background: transparent;
	color: var(--text-muted);
	cursor: pointer;
	transition: background-color .18s ease, color .18s ease;
}

.ff-archive-year-btn:hover {
	background: var(--btn-plain-bg-hover);
	color: var(--primary);
}

.ff-archive-year-number {
	text-align: right;
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--text-muted);
	transition: color .18s ease;
}

.ff-archive-year-btn:hover .ff-archive-year-number {
	color: var(--primary);
}

.ff-archive-year-dot {
	display: flex;
	justify-content: center;
}

.ff-archive-year-dot span {
	width: .75rem;
	height: .75rem;
	border: 3px solid var(--primary);
	border-radius: 999px;
}

.ff-archive-year-summary {
	display: flex;
	align-items: center;
	gap: .5rem;
	text-align: left;
}

.archive-arrow {
	display: inline-flex;
	width: 1rem;
	height: 1rem;
	transition: transform .2s ease;
}

.archive-arrow svg {
	width: 100%;
	height: 100%;
}

.archive-year-group[data-collapsed="true"] .archive-arrow {
	transform: rotate(-90deg);
}

.archive-year-posts {
	display: grid;
	margin: 0;
	padding: 0;
	list-style: none;
}

.archive-year-group[data-collapsed="true"] .archive-year-posts {
	display: none;
}

.ff-timeline-year li {
	display: block;
}

.ff-archive-post-row {
	display: grid;
	grid-template-columns: 15% 15% minmax(0, 1fr) 15%;
	align-items: center;
	width: 100%;
	min-height: 2.5rem;
	border-radius: .75rem;
	color: var(--text-muted);
	transition: background-color .18s ease, color .18s ease;
}

.ff-archive-post-row:hover {
	background: var(--btn-plain-bg-hover);
	color: var(--primary);
}

.ff-archive-post-row time {
	text-align: right;
	color: var(--text-faint);
	font-family: var(--font-ui);
	font-size: .86rem;
}

.dash-line {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: stretch;
}

.dash-line::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 1px;
	background: var(--line-divider);
	transform: translateX(-50%);
}

.dash-line span {
	position: relative;
	z-index: 1;
	width: .25rem;
	height: .25rem;
	border-radius: .125rem;
	background: oklch(0.5 0.05 var(--hue));
	outline: 4px solid var(--card-bg);
	transition: height .18s ease, background-color .18s ease, outline-color .18s ease;
}

.ff-archive-post-row:hover .dash-line span {
	height: 1.25rem;
	background: var(--primary);
	outline-color: var(--btn-plain-bg-hover);
}

.ff-archive-post-title {
	display: flex;
	align-items: center;
	gap: .5rem;
	min-width: 0;
	padding-right: 2rem;
	font-weight: 800;
	transition: transform .18s ease, color .18s ease;
}

.ff-archive-post-row:hover .ff-archive-post-title {
	transform: translateX(.25rem);
	color: var(--primary);
}

.ff-archive-title-text,
.ff-archive-tags {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ff-archive-category-chip {
	flex: 0 0 auto;
	padding: .125rem .4rem;
	border-radius: .35rem;
	background: var(--btn-regular-bg);
	color: var(--primary);
	font-size: .75rem;
	font-weight: 600;
	transition: background-color .18s ease, color .18s ease;
}

.ff-archive-post-row:hover .ff-archive-category-chip {
	background: var(--primary);
	color: white;
}

.ff-archive-tags {
	color: var(--text-faint);
	font-size: .86rem;
}

@media (min-width: 768px) {
	.ff-archive-year-btn,
	.ff-archive-post-row {
		grid-template-columns: 10% 10% minmax(0, 1fr) 15%;
	}
}

@media (max-width: 767px) {
	.ff-archive-tags {
		display: none;
	}

	.ff-archive-year-btn,
	.ff-archive-post-row {
		grid-template-columns: 15% 15% minmax(0, 1fr);
	}
}

.ff-taxonomy-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
	gap: 1rem;
}

.ff-taxonomy-card {
	display: grid;
	gap: .45rem;
	min-height: 9rem;
	padding: 1rem;
	border-radius: 1rem;
	background: rgb(255 255 255 / .30);
	transition: transform .18s ease, background .18s ease;
}

.ff-taxonomy-card:hover {
	transform: translateY(-2px);
	background: var(--primary-soft);
}

.ff-taxonomy-card span {
	color: var(--primary);
	font-size: 1.75rem;
}

.ff-taxonomy-card strong {
	font-size: 1.25rem;
}

.ff-taxonomy-card em,
.ff-taxonomy-card p {
	color: var(--text-muted);
	font-style: normal;
}

.ff-tag-wall {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
}

.ff-tag-wall a {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .55rem .8rem;
	border-radius: .85rem;
	background: rgb(255 255 255 / .32);
	color: var(--text-muted);
	font-size: var(--tag-size, 1rem);
	transition: color .18s ease, background .18s ease, transform .18s ease;
}

.ff-tag-wall a:hover {
	color: var(--primary);
	background: var(--primary-soft);
	transform: translateY(-1px);
}

.ff-tag-wall span {
	font-size: .75em;
	opacity: .7;
}

.ff-pagination {
	display: flex;
	justify-content: center;
	gap: .5rem;
	margin-top: 1.25rem;
}

.ff-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.55rem;
	height: 2.55rem;
	padding: 0 .8rem;
	border-radius: .8rem;
	background: var(--card-bg);
	border: 1px solid var(--card-border);
	color: var(--text-muted);
	font-family: var(--font-ui);
}

.ff-pagination .current,
.ff-pagination .page-numbers:hover {
	background: var(--primary);
	color: white;
}

.ff-toc {
	padding: 1rem;
}

.ff-toc-list {
	display: grid;
	gap: .35rem;
}

.ff-toc-list a {
	padding: .45rem .55rem;
	border-radius: .65rem;
	color: var(--text-muted);
	font-family: var(--font-ui);
	font-size: .9rem;
}

.ff-toc-list a:hover {
	background: var(--primary-soft);
	color: var(--primary);
}

.ff-right-widget {
	padding: 1rem;
	font-family: var(--font-ui);
}

.ff-mini-stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: .55rem;
}

.ff-mini-stats span {
	display: grid;
	place-items: center;
	min-height: 3.35rem;
	border-radius: .78rem;
	background: rgb(255 255 255 / .30);
	color: var(--text-muted);
	font-size: .78rem;
}

.ff-mini-stats strong {
	color: var(--primary);
	font-size: 1.25rem;
	line-height: 1.1;
}

.ff-site-info,
.ff-site-info .collapse-wrapper {
	display: grid;
	gap: .55rem;
}

site-info-collapse {
	display: grid;
	gap: .35rem;
}

.site-info-detail {
	display: grid;
	gap: .45rem;
	overflow: hidden;
	transition: height .2s ease, opacity .2s ease;
}

.site-info-detail.collapsed {
	height: 0;
	opacity: 0;
}

.site-info-toggle-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .35rem;
	width: 100%;
	min-height: 2rem;
	border: 0;
	border-radius: .65rem;
	color: var(--primary);
	cursor: pointer;
}

.site-info-toggle-icon {
	display: inline-flex;
	transition: transform .2s ease;
}

.ff-site-info p {
	display: flex;
	justify-content: space-between;
	gap: .75rem;
	margin: 0;
	padding: .45rem .55rem;
	border-radius: .65rem;
	background: rgb(255 255 255 / .26);
	color: var(--text-muted);
	font-size: .85rem;
}

.ff-site-info strong {
	color: var(--text);
}

.ff-heatmap {
	display: grid;
	grid-auto-flow: column;
	grid-template-rows: repeat(7, .58rem);
	gap: .22rem;
	overflow-x: auto;
	padding-bottom: .2rem;
	scrollbar-width: thin;
}

.ff-heatmap span {
	width: .58rem;
	height: .58rem;
	border-radius: .18rem;
	background: rgb(15 23 42 / .08);
}

.dark .ff-heatmap span {
	background: rgb(255 255 255 / .08);
}

.ff-heatmap .level-1 { background: hsl(var(--hue) 62% 76%); }
.ff-heatmap .level-2 { background: hsl(var(--hue) 64% 62%); }
.ff-heatmap .level-3 { background: hsl(var(--hue) 68% 48%); }
.ff-heatmap .level-4 { background: hsl(var(--hue) 72% 34%); }

.ff-music-panel {
	width: min(24rem, calc(100vw - 2rem));
}

.ff-music-card {
	overflow: hidden;
}

.ff-music-player {
	display: grid;
	grid-template-columns: 5.25rem minmax(0, 1fr);
	gap: .85rem;
	align-items: center;
	font-family: var(--font-ui);
}

.ff-music-player[data-variant="nav"] {
	grid-template-columns: 4.5rem minmax(0, 1fr);
}

.ff-music-cover {
	position: relative;
	aspect-ratio: 1 / 1;
	border-radius: 1rem;
	overflow: hidden;
	background:
		radial-gradient(circle at 30% 25%, hsl(var(--hue) 85% 76% / .95), transparent 45%),
		linear-gradient(135deg, hsl(var(--hue) 68% 42%), hsl(calc(var(--hue) + 48) 82% 64%));
	box-shadow: inset 0 0 0 1px rgb(255 255 255 / .36), 0 12px 34px hsl(var(--hue) 70% 40% / .16);
	background-size: cover;
	background-position: center;
}

.ff-music-cover::after {
	content: "";
	position: absolute;
	inset: 28%;
	border-radius: 999px;
	background: rgb(255 255 255 / .72);
	box-shadow: 0 0 0 .38rem rgb(0 0 0 / .12);
}

.ff-music-main {
	min-width: 0;
	display: grid;
	gap: .38rem;
}

.ff-music-title,
.ff-music-artist {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ff-music-title {
	color: var(--text);
	font-size: .98rem;
	line-height: 1.35;
}

.ff-music-artist {
	color: var(--text-faint);
	font-size: .82rem;
}

.ff-music-controls {
	display: flex;
	flex-wrap: wrap;
	gap: .38rem;
}

.ff-music-controls .ff-mini-button {
	min-height: 2rem;
	padding: .38rem .62rem;
	border-radius: .65rem;
	font-size: .78rem;
}

.ff-background-video {
	position: fixed;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	pointer-events: none;
	transition: opacity .45s ease, filter .45s ease;
	filter: saturate(1.08) contrast(1.02);
}

body.ff-video-playing {
	background: transparent;
}

body.ff-video-playing::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		linear-gradient(180deg, rgb(0 0 0 / .18), rgb(0 0 0 / .22)),
		radial-gradient(circle at 50% 12%, transparent 0, rgb(0 0 0 / .22) 76%);
}

body.ff-video-playing .ff-background-video {
	opacity: .78;
}

html[data-bg-video-playing="true"] #banner-images-container,
html[data-bg-video-playing="true"] #banner-dim-container,
html[data-bg-video-playing="true"] #banner-overlay-container,
html[data-bg-video-playing="true"] #header-waves,
html[data-bg-video-playing="true"] #wallpaper-gradient {
	opacity: 0 !important;
	transition: opacity .5s;
}

body.ff-video-playing .ff-hero::before {
	opacity: .24;
}

body.ff-video-playing .ff-card,
body.ff-video-playing .ff-navbar,
body.ff-video-playing .ff-floating-panel,
body.ff-video-playing .ff-mobile-menu,
body.ff-video-playing .ff-back-to-top {
	background: color-mix(in srgb, var(--card-bg) 74%, transparent);
}

.footer-divider {
	width: min(60rem, calc(100vw - 4rem));
	margin: 2.5rem auto 2rem;
	border-top: 1px dashed rgb(0 0 0 / .10);
}

html.dark .footer-divider {
	border-top-color: rgb(255 255 255 / .15);
}

.ff-footer {
	width: var(--content-width);
	margin: 0 auto;
	padding: 0 1.5rem 3rem;
	color: var(--text-faint);
	text-align: center;
	font-family: var(--font-ui);
	font-size: .9rem;
}

.ff-footer-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .35rem;
	border: 1px dashed color-mix(in srgb, var(--primary) 14%, var(--card-border));
	border-radius: 1rem;
	padding: 1.25rem 1rem;
}

.ff-footer-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	margin: 0;
}

.ff-footer a {
	color: var(--primary);
	font-weight: 600;
	transition: opacity .18s ease;
}

.ff-footer a:hover {
	opacity: .78;
}

.ff-back-to-top {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 70;
	width: 2.8rem;
	height: 2.8rem;
	border: 1px solid var(--card-border);
	border-radius: 1rem;
	background: var(--card-bg);
	color: var(--primary);
	box-shadow: var(--shadow);
	backdrop-filter: blur(20px);
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transform: translateY(.5rem);
	transition: opacity .18s ease, transform .18s ease;
}

.ff-back-to-top.visible {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

.ff-standalone-card {
	width: min(48rem, 100%);
	margin: 0 auto;
}

.ff-standalone-actions {
	display: grid;
	gap: 1rem;
	margin-top: 1rem;
}

@keyframes ff-rise {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes ff-blink {
	0%, 50% { opacity: 1; }
	51%, 100% { opacity: 0; }
}

@keyframes wave {
	0% { transform: translate3d(-90px, 0, 0); }
	100% { transform: translate3d(85px, 0, 0); }
}

.ff-sakura-canvas {
	position: fixed;
	inset: 0;
	z-index: 100;
	pointer-events: none;
	display: none;
}

html[data-sakura-enabled="true"] .ff-sakura-canvas {
	display: block;
}

@media (max-width: 1280px) {
	.ff-content-grid {
		grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
	}

	.ff-rightbar {
		display: none;
	}
}

@media (max-width: 980px) {
	:root {
		--content-width: min(100% - 1rem, 72rem);
	}

	body.admin-bar .ff-navbar {
		top: 46px;
	}

	.ff-nav-links {
		display: none;
	}

	.ff-search-bar {
		display: none;
	}

	#search-switch {
		display: inline-flex;
	}

	.ff-mobile-menu-button {
		display: inline-flex;
	}

	.ff-navbar-inner {
		grid-template-columns: auto 1fr;
	}

	.ff-navbar-actions {
		justify-self: end;
	}

	.ff-hero-home,
	.ff-hero {
		min-height: 42vh;
	}

	.ff-page-shell {
		margin-top: -2.2rem;
	}

	.ff-content-grid {
		grid-template-columns: 1fr;
	}

	.ff-sidebar,
	.ff-rightbar,
	.ff-post-list-wrap,
	.ff-archive-panel,
	.ff-taxonomy-overview,
	.ff-article-card,
	.ff-comments-wrap,
	.ff-standalone-card {
		grid-column: 1 / -1;
	}

	.ff-sidebar {
		order: 2;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ff-post-list-wrap,
	.ff-article-card,
	.ff-archive-panel,
	.ff-taxonomy-overview {
		order: 1;
	}

	.ff-comments-wrap {
		order: 3;
	}

	.ff-profile-avatar {
		max-width: 12rem;
	}
}

@media (max-width: 680px) {
	.ff-navbar-inner {
		height: 4rem;
	}

	.ff-brand {
		padding: 0 .6rem;
	}

	.ff-brand span {
		max-width: 9rem;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.ff-icon-button {
		width: 2.35rem;
		height: 2.35rem;
	}

	.ff-hero-content {
		padding: 5.5rem 1rem 3.5rem;
	}

	.ff-post-card {
		min-height: 11rem;
	}

	.ff-post-card-content {
		width: calc(100% - 8.5rem);
		padding: .9rem 8.8rem .9rem .95rem;
		gap: .45rem;
	}

	.ff-post-card-title {
		font-size: 1.1rem;
	}

	.ff-post-card-title::before,
	.ff-post-card-tags,
	.ff-post-card .ff-post-meta span:nth-child(2),
	.ff-post-card .ff-post-meta span:nth-child(3) {
		display: none;
	}

	.ff-post-card-excerpt {
		font-size: .9rem;
		-webkit-line-clamp: 2;
		line-clamp: 2;
	}

	.ff-post-card-image {
		top: .6rem;
		right: .6rem;
		bottom: .6rem;
		width: 7.8rem;
		border-radius: .85rem;
	}

	.ff-sidebar {
		grid-template-columns: 1fr;
	}

	.ff-search-form {
		grid-template-columns: 1fr;
	}

	.ff-post-nav,
	.ff-timeline-year li {
		grid-template-columns: 1fr;
	}

	.ff-timeline-year time,
	.ff-timeline-year span {
		font-size: .82rem;
	}

	.ff-floating-panel,
	.ff-mobile-menu {
		left: .5rem;
		right: .5rem;
		width: auto;
	}
}

/* Firefly parity layer: align WP markup with the original Firefly visual states. */
:root {
	--opacity-0: 0;
	--opacity-5: 0.05;
	--opacity-10: 0.1;
	--opacity-20: 0.2;
	--opacity-25: 0.25;
	--opacity-30: 0.3;
	--opacity-40: 0.4;
	--opacity-50: 0.5;
	--opacity-55: .55;
	--opacity-60: 0.6;
	--opacity-70: 0.7;
	--opacity-65: .65;
	--opacity-75: .75;
	--opacity-80: .8;
	--opacity-85: 0.85;
	--opacity-90: 0.9;
	--opacity-95: .95;
	--opacity-100: 1;
	--blur-sm: 4px;
	--blur-md: 8px;
	--blur-lg: 12px;
	--blur-xl: 16px;
	--blur-2xl: 20px;
	--blur-3xl: 24px;
	--primary: oklch(0.70 0.14 var(--hue));
	--page-bg: oklch(0.95 0.01 var(--hue));
	--card-bg: white;
	--card-bg-transparent: rgb(255 255 255 / var(--card-transparent-opacity, 0.6));
	--card-border: var(--line-divider);
	--btn-content: oklch(0.55 0.12 var(--hue));
	--btn-regular-bg: oklch(0.95 0.025 var(--hue));
	--btn-regular-bg-hover: oklch(0.9 0.05 var(--hue));
	--btn-regular-bg-active: oklch(0.85 0.08 var(--hue));
	--btn-plain-bg-hover: oklch(0.95 0.025 var(--hue));
	--btn-plain-bg-active: oklch(0.98 0.01 var(--hue));
	--btn-card-bg-hover: oklch(0.98 0.005 var(--hue));
	--btn-card-bg-active: oklch(0.9 0.03 var(--hue));
	--enter-btn-bg: var(--btn-regular-bg);
	--enter-btn-bg-hover: var(--btn-regular-bg-hover);
	--enter-btn-bg-active: var(--btn-regular-bg-active);
	--deep-text: oklch(0.25 0.02 var(--hue));
	--title-active: oklch(0.6 0.1 var(--hue));
	--line-divider: rgba(0, 0, 0, 0.08);
	--line-color: rgba(0, 0, 0, 0.1);
	--meta-divider: rgba(0, 0, 0, 0.2);
	--content-meta: rgba(0, 0, 0, 0.7);
	--inline-code-bg: var(--btn-regular-bg);
	--inline-code-color: var(--btn-content);
	--muted: oklch(0.93 0.015 var(--hue));
	--selection-bg: oklch(0.90 0.05 var(--hue));
	--codeblock-bg: oklch(0.17 0.015 var(--hue));
	--codeblock-topbar-bg: oklch(0.3 0.02 var(--hue));
	--license-block-bg: rgba(0, 0, 0, 0.03);
	--link-underline: oklch(0.93 0.04 var(--hue));
	--link-hover: oklch(0.95 0.025 var(--hue));
	--link-active: oklch(0.90 0.05 var(--hue));
	--float-panel-bg: white;
	--toc-badge-bg: oklch(0.9 0.045 var(--hue));
	--toc-btn-hover: oklch(0.92 0.05 var(--hue));
	--toc-btn-active: oklch(0.90 0.06 var(--hue));
	--toc-indicator-bg: oklch(0.92 0.015 var(--hue));
	--toc-item-active: oklch(0.70 0.13 var(--hue));
	--l2d-msg-bg: oklch(0.7 0.14 var(--hue));
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
	--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
	--shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
	--shadow-navbar: 0 4px 16px rgba(0, 0, 0, 0.1);
	--shadow-navbar-dark: 0 4px 16px rgba(0, 0, 0, 0.2);
	--shadow-button: 0 4px 12px rgba(0, 0, 0, 0.15);
	--shadow-button-dark: 0 4px 12px rgba(255, 255, 255, 0.1);
	--font-greatvibes: "GreatVibes Regular 2", cursive;
	--font-jetbrains-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
	--font-navbar-title: inherit;
	--font-banner-title: inherit;
	--font-banner-subtitle: inherit;
	--font-code: var(--font-jetbrains-mono);
	--duration-medium: 200ms;
	--ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
}

html.dark {
	--primary: oklch(0.75 0.14 var(--hue));
	--page-bg: oklch(0.16 0.014 var(--hue));
	--card-bg: oklch(0.23 0.015 var(--hue));
	--card-bg-transparent: rgb(23 23 23 / var(--card-transparent-opacity, 0.6));
	--card-border: var(--line-divider);
	--btn-content: oklch(0.75 0.1 var(--hue));
	--btn-regular-bg: oklch(0.33 0.035 var(--hue));
	--btn-regular-bg-hover: oklch(0.38 0.04 var(--hue));
	--btn-regular-bg-active: oklch(0.43 0.045 var(--hue));
	--btn-plain-bg-hover: oklch(0.30 0.035 var(--hue));
	--btn-plain-bg-active: oklch(0.27 0.025 var(--hue));
	--btn-card-bg-hover: oklch(0.3 0.03 var(--hue));
	--btn-card-bg-active: oklch(0.35 0.035 var(--hue));
	--line-divider: rgba(255, 255, 255, 0.08);
	--line-color: rgba(255, 255, 255, 0.1);
	--meta-divider: rgba(255, 255, 255, 0.2);
	--content-meta: rgba(255, 255, 255, 0.6);
	--muted: oklch(0.25 0.015 var(--hue));
	--selection-bg: oklch(0.40 0.08 var(--hue));
	--license-block-bg: var(--codeblock-bg);
	--link-underline: oklch(0.40 0.08 var(--hue));
	--link-hover: oklch(0.40 0.08 var(--hue));
	--link-active: oklch(0.35 0.07 var(--hue));
	--float-panel-bg: oklch(0.19 0.015 var(--hue));
	--toc-badge-bg: var(--btn-regular-bg);
	--toc-btn-hover: oklch(0.28 0.04 var(--hue));
	--toc-btn-active: oklch(0.32 0.05 var(--hue));
	--toc-indicator-bg: oklch(0.28 0.04 var(--hue));
	--toc-item-active: oklch(0.35 0.07 var(--hue));
	--l2d-msg-bg: oklch(0.35 0.08 var(--hue));
}

@font-face {
	font-family: "GreatVibes Regular 2";
	src: url("assets/fonts/GreatVibes-Regular-2.otf") format("opentype");
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}

#progress-bar {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1000;
	width: 0;
	height: 2px;
	background: var(--primary);
	box-shadow: 0 0 12px color-mix(in srgb, var(--primary) 60%, transparent);
	pointer-events: none;
	transition: width .2s ease, opacity .2s ease;
}

#top-row,
.ff-top-row {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 80;
	height: var(--nav-height);
	pointer-events: none;
	transition: opacity .7s ease, transform .7s ease;
}

body.admin-bar #top-row {
	top: 32px;
}

#navbar-wrapper,
.ff-navbar-wrapper {
	width: min(92vw, var(--page-width, 100rem));
	height: 100%;
	margin: 0 auto;
	pointer-events: auto;
	transition: opacity .3s ease, transform .3s ease;
}

#main-grid,
.ff-main-grid {
	width: 100%;
	display: block;
}

.transition {
	transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, transform, box-shadow, backdrop-filter;
	transition-timing-function: cubic-bezier(.4, 0, .2, 1);
	transition-duration: .15s;
}

.scale-animation {
	transition: transform .18s ease, background-color .18s ease, color .18s ease;
}

.scale-animation:hover {
	transform: translateY(-1px);
}

.scale-animation:active {
	transform: scale(.95);
}

.btn-plain {
	position: relative;
	background: transparent;
}

.btn-plain:hover {
	background: var(--btn-plain-bg-hover);
}

.btn-plain:active {
	background: var(--btn-plain-bg-active);
}

.btn-regular {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: var(--btn-regular-bg);
	color: var(--btn-content);
	cursor: pointer;
	transition: transform .18s ease, background-color .18s ease, color .18s ease;
}

.btn-regular:hover {
	background: var(--btn-regular-bg-hover);
	color: var(--primary);
}

.btn-regular:active {
	background: var(--btn-regular-bg-active);
	transform: scale(.95);
}

.card-base,
.card-base-transparent {
	border-radius: var(--radius-large);
	overflow: hidden;
	transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.card-base {
	background: var(--card-bg);
}

.card-base-transparent {
	background: var(--card-bg-transparent);
}

.ff-navbar {
	position: sticky;
	top: 0;
	z-index: 60;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	backdrop-filter: none !important;
}

body.admin-bar .ff-navbar {
	top: 32px;
}

.ff-navbar-surface {
	height: var(--nav-height);
	background: var(--card-bg);
	border: 1px solid transparent;
	border-radius: 0 0 .75rem .75rem;
	backdrop-filter: blur(0);
	transition:
		background-color .36s cubic-bezier(.22, 1, .36, 1),
		border-color .36s cubic-bezier(.22, 1, .36, 1),
		box-shadow .36s cubic-bezier(.22, 1, .36, 1),
		backdrop-filter .36s cubic-bezier(.22, 1, .36, 1),
		border-radius .36s cubic-bezier(.22, 1, .36, 1);
}

.ff-navbar.navbar-sticky-shadow .ff-navbar-surface {
	box-shadow: var(--shadow-navbar);
}

html.dark .ff-navbar.navbar-sticky-shadow .ff-navbar-surface {
	box-shadow: var(--shadow-navbar-dark);
}

.ff-navbar-inner {
	height: 100%;
}

.ff-brand {
	height: 3.25rem;
	padding: 0 1.25rem;
	font-weight: 700;
}

.ff-brand:hover,
.ff-nav-links a:hover,
.ff-icon-button:hover,
.ff-mobile-menu a:hover {
	background: var(--btn-plain-bg-hover);
}

.ff-nav-links a,
.ff-mobile-menu a {
	height: 2.75rem;
	border-radius: .75rem;
}

.ff-icon-button {
	width: 2.75rem;
	height: 2.75rem;
	border-radius: .75rem;
}

@media (min-width: 1024px) {
	html[data-wallpaper-mode="banner"] .ff-navbar[data-transparent-mode="semi"] .ff-navbar-surface {
		backdrop-filter: blur(var(--navbar-glass-blur, 5px));
		background: rgb(255 255 255 / var(--opacity-55));
		box-shadow: var(--shadow-navbar);
	}

	html.dark[data-wallpaper-mode="banner"] .ff-navbar[data-transparent-mode="semi"] .ff-navbar-surface {
		background: rgb(0 0 0 / var(--opacity-55));
		box-shadow: var(--shadow-navbar-dark);
	}

	html[data-wallpaper-mode="banner"] .ff-navbar[data-transparent-mode="full"] .ff-navbar-surface,
	html[data-wallpaper-mode="banner"] .ff-navbar[data-transparent-mode="semifull"]:not(.scrolled) .ff-navbar-surface {
		background: transparent;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		backdrop-filter: blur(0);
	}

	html[data-wallpaper-mode="banner"] .ff-navbar[data-transparent-mode="semifull"].scrolled .ff-navbar-surface {
		backdrop-filter: blur(var(--navbar-glass-blur, 5px));
		background: rgb(255 255 255 / var(--opacity-55));
		box-shadow: var(--shadow-navbar);
	}

	html.dark[data-wallpaper-mode="banner"] .ff-navbar[data-transparent-mode="semifull"].scrolled .ff-navbar-surface {
		background: rgb(0 0 0 / var(--opacity-55));
		box-shadow: var(--shadow-navbar-dark);
	}
}

@media (max-width: 1023px) {
	html[data-wallpaper-mode="banner"] .ff-navbar[data-is-home="true"][data-transparent-mode="semi"] .ff-navbar-surface {
		backdrop-filter: blur(var(--navbar-glass-blur, 5px));
		background: rgb(255 255 255 / var(--opacity-55));
		box-shadow: var(--shadow-navbar);
	}

	html.dark[data-wallpaper-mode="banner"] .ff-navbar[data-is-home="true"][data-transparent-mode="semi"] .ff-navbar-surface {
		background: rgb(0 0 0 / var(--opacity-55));
		box-shadow: var(--shadow-navbar-dark);
	}
}

@media (max-width: 767px) {
	.ff-navbar-surface {
		border-radius: 0 !important;
	}
}

.ff-navbar[data-enable-blur="false"] .ff-navbar-surface {
	backdrop-filter: blur(0) !important;
}

html[data-wallpaper-mode="overlay"] .ff-navbar-surface,
html[data-wallpaper-mode="overlay"] .float-panel,
html[data-wallpaper-mode="overlay"] .ff-mobile-menu {
	background: var(--card-bg-transparent) !important;
}

.float-panel,
.ff-floating-panel,
.ff-mobile-menu {
	background: rgb(255 255 255 / .95) !important;
	border: 1px solid rgb(0 0 0 / .05) !important;
	box-shadow: var(--shadow-md) !important;
	backdrop-filter: blur(24px) saturate(150%);
	transform-origin: top right;
	transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

html.dark .float-panel,
html.dark .ff-floating-panel,
html.dark .ff-mobile-menu {
	background: rgb(23 23 23 / .95) !important;
	border-color: rgb(255 255 255 / .10) !important;
}

.float-panel-closed,
.ff-floating-panel[hidden],
.ff-mobile-menu[hidden] {
	display: block;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-.35rem) scale(.98);
}

.ff-floating-panel:not([hidden]),
.ff-mobile-menu:not([hidden]) {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.ff-theme-panel {
	width: min(20rem, calc(100vw - 2rem));
	right: 1rem;
	top: calc(var(--nav-height) + .75rem);
	padding: .5rem 1rem .75rem;
}

.ff-setting-section {
	padding: .5rem 0 .7rem;
}

.ff-setting-heading {
	margin: .15rem 0 .2rem;
	padding-left: .75rem;
}

.ff-setting-heading strong {
	font-size: 1.125rem;
}

.ff-reset-button {
	opacity: .88;
	transition: opacity .18s ease, background-color .18s ease, color .18s ease;
}

.ff-reset-button:hover {
	background: var(--btn-regular-bg-hover);
	color: var(--primary);
}

.ff-color-slider {
	height: 1.5rem !important;
	padding: 0 .25rem;
	background: var(--color-selection-bar) !important;
}

.ff-theme-panel input[type="range"] {
	cursor: pointer;
}

#colorSlider {
	background-image: var(--color-selection-bar) !important;
}

#colorSlider::-webkit-slider-thumb {
	appearance: none;
	width: .5rem;
	height: 1rem;
	border-radius: .125rem;
	background: rgb(255 255 255 / .70);
	box-shadow: none;
}

#colorSlider::-moz-range-thumb {
	width: .5rem;
	height: 1rem;
	border: 0;
	border-radius: .125rem;
	background: rgb(255 255 255 / .70);
	box-shadow: none;
}

.ff-color-slider-shell {
	width: 100%;
	height: 1.5rem;
	padding: 0 .25rem;
	border-radius: 999px;
	background: var(--color-selection-bar);
}

.ff-hue-value {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

#ff-overlay-settings,
#wallpaperSettings,
#effectsSettings {
	scroll-margin-top: calc(var(--nav-height) + 1rem);
}

#ff-overlay-settings,
#wallpaperSettings {
	display: none;
}

html[data-wallpaper-mode="overlay"] #ff-overlay-settings,
html[data-wallpaper-mode="banner"] #wallpaperSettings,
html[data-wallpaper-mode="fullscreen"] #wallpaperSettings {
	display: grid;
}

.ff-overlay-slider-row {
	display: grid;
	gap: .35rem;
	padding: .5rem;
	border-radius: .5rem;
	background: var(--btn-regular-bg);
}

.ff-theme-panel input[type="range"].overlay-slider {
	height: .85rem;
}

.ff-theme-panel input[type="range"].overlay-slider::-webkit-slider-thumb {
	width: 0;
	height: 0;
	border: 0;
	background: transparent;
}

.ff-theme-panel input[type="range"].overlay-slider::-moz-range-thumb {
	width: 0;
	height: 0;
	border: 0;
	background: transparent;
}

.ff-setting-grid button,
.ff-toggle-list button {
	min-height: 2.5rem;
	border-radius: .5rem;
	background: var(--btn-regular-bg);
	color: var(--btn-content);
}

.ff-setting-grid button.is-active,
.ff-toggle-list button.is-active {
	background: var(--btn-regular-bg-hover);
	color: var(--primary);
}

.ff-switch-row {
	width: 100%;
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	text-align: left;
}

.ff-switch-pill {
	position: relative;
	width: 2.5rem;
	height: 1.25rem;
	flex: 0 0 auto;
	border-radius: 999px;
	background: var(--btn-regular-bg-active);
	transition: background-color .2s ease;
}

.ff-switch-pill span {
	position: absolute;
	top: .125rem;
	left: .125rem;
	width: 1rem;
	height: 1rem;
	border-radius: 999px;
	background: white;
	box-shadow: var(--shadow-sm);
	transition: transform .2s ease;
}

.ff-switch-row.is-active .ff-switch-pill {
	background: var(--primary);
}

.ff-switch-row.is-active .ff-switch-pill span {
	transform: translateX(1.25rem);
}

.ff-layout-buttons {
	display: grid;
	grid-template-columns: 1fr 1fr auto;
	gap: .45rem;
}

.ff-layout-buttons .btn-regular {
	min-height: 2.5rem;
	border-radius: .5rem;
	font-weight: 700;
}

.ff-layout-buttons .btn-regular.is-active {
	background: var(--btn-regular-bg-hover);
	color: var(--primary);
}

#search-panel {
	max-height: calc(100vh - 100px);
	overflow-y: auto;
}

.ff-search-bar-inside {
	position: relative;
	display: flex;
	align-items: center;
	height: 2.75rem;
	border-radius: .75rem;
	background: rgb(0 0 0 / .04);
	color: var(--text-faint);
}

html.dark .ff-search-bar-inside {
	background: rgb(255 255 255 / .05);
}

.ff-search-bar-inside .ff-icon {
	position: absolute;
	left: .75rem;
	width: 1.25rem;
	height: 1.25rem;
	pointer-events: none;
	opacity: .55;
}

.ff-search-bar-inside input {
	width: 100%;
	height: 100%;
	border: 0;
	outline: 0;
	padding: 0 .8rem 0 2.5rem;
	background: transparent;
	color: var(--text-muted);
}

.ff-search-results {
	display: grid;
	gap: .25rem;
	margin-top: .5rem;
}

.ff-search-state,
.ff-search-result-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	min-height: 2.75rem;
	padding: .55rem .75rem;
	border-radius: .75rem;
	color: var(--text-muted);
	font-size: .95rem;
	transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.ff-search-result-item:hover {
	background: var(--btn-plain-bg-hover);
	color: var(--primary);
	transform: translateX(.25rem);
}

.ff-search-more {
	justify-content: center;
	color: var(--primary);
	font-weight: 700;
}

.banner-title {
	margin: 0;
	font-family: var(--font-banner-title, inherit);
	font-size: min(var(--banner-title-size, 3.8rem), 10vw);
	line-height: 1.08;
	font-weight: 700;
	overflow-wrap: break-word;
	word-break: break-word;
	text-shadow: 0 4px 24px rgb(0 0 0 / .60);
	animation: banner-fadeInUp .3s ease-out;
}

.banner-subtitle {
	font-family: var(--font-banner-subtitle, inherit);
	font-size: var(--banner-subtitle-size, 1.5rem);
	text-shadow: 0 2px 16px rgb(0 0 0 / .60);
	animation: banner-fadeInUp .3s ease-out .3s both;
}

.banner-post-title {
	font-size: clamp(2rem, 4vw, 3rem);
	text-shadow: 0 4px 24px rgb(0 0 0 / .65);
}

.banner-page-title {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1.2;
	text-shadow: 0 4px 24px rgb(0 0 0 / .65);
}

@keyframes banner-fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.ff-hero-content h1 {
	font-weight: 700;
	letter-spacing: .01em;
}

.ff-post-card,
.post-card-wrapper {
	min-height: 13.25rem;
	border-color: var(--line-divider);
	box-shadow: 0 1px 3px rgb(15 23 42 / .06);
	backdrop-filter: blur(20px) saturate(150%);
}

.ff-post-card-content,
.post-card-content {
	width: calc(100% - 30% - 1.5rem);
	padding: 1.75rem .5rem 1.75rem 2.25rem;
}

.ff-post-card-title,
.post-card-title {
	margin-bottom: .25rem;
	font-size: clamp(1.65rem, 2.5vw, 1.875rem);
	line-height: 1.18;
	font-weight: 700;
	color: var(--text);
}

.ff-post-card-title::before,
.post-card-title::before {
	left: -1.125rem;
	top: .18rem;
	width: .25rem;
	height: 1.25rem;
	border-radius: .375rem;
}

.ff-post-meta {
	margin-bottom: .15rem;
}

.ff-post-card-image,
.post-card-image {
	top: 1rem;
	right: 1rem;
	bottom: 1rem;
	width: 30%;
	border-radius: .75rem;
}

.ff-post-card-enter-btn,
.post-card-enter-btn {
	position: absolute;
	right: .75rem;
	top: .75rem;
	bottom: .75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.25rem;
	border-radius: .75rem;
	background: var(--enter-btn-bg);
	color: var(--primary);
	transition: transform .18s ease, background-color .18s ease;
}

.ff-post-card-enter-btn:hover,
.post-card-enter-btn:hover {
	background: var(--enter-btn-bg-hover);
}

.ff-post-card-enter-btn:active,
.post-card-enter-btn:active {
	background: var(--enter-btn-bg-active);
	transform: scale(.95);
}

.description-clamped {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

.list-mode .post-card-wrapper,
.list-mode .ff-post-card {
	flex-direction: row !important;
}

.list-mode .has-cover .post-card-content,
.list-mode .has-cover .ff-post-card-content {
	width: calc(100% - 30% - 1.5rem) !important;
	padding: 1.75rem .5rem 1.75rem 2.25rem !important;
}

.list-mode .has-cover .post-card-image,
.list-mode .has-cover .ff-post-card-image {
	position: absolute !important;
	top: 1rem !important;
	right: 1rem !important;
	bottom: 1rem !important;
	width: 30% !important;
	border-radius: .75rem !important;
}

.list-mode .post-card-title,
.list-mode .ff-post-card-title {
	font-size: 1.5rem !important;
	line-height: 2rem !important;
	margin-bottom: .75rem !important;
}

.list-mode .post-card-title::before,
.list-mode .ff-post-card-title::before {
	display: block !important;
	top: .35rem !important;
	height: 1rem !important;
}

.list-mode .description,
.list-mode .ff-post-card-excerpt {
	font-size: inherit !important;
}

.list-mode .stats {
	gap: .25rem !important;
}

.list-mode .stats a {
	height: 1.5rem !important;
	padding: .25rem .5rem !important;
	font-size: .75rem !important;
}

.list-mode .no-cover .post-card-content,
.list-mode .no-cover .ff-post-card-content {
	width: calc(100% - 52px - 12px) !important;
}

.grid-mode .post-card-wrapper,
.grid-mode .ff-post-card {
	height: 100% !important;
	flex-direction: column-reverse !important;
	justify-content: flex-end !important;
}

.grid-mode .post-card-content,
.grid-mode .ff-post-card-content {
	width: 100% !important;
	height: auto !important;
	flex-grow: 1 !important;
}

.grid-mode .post-card-image,
.grid-mode .ff-post-card-image {
	position: relative !important;
	inset: auto !important;
	width: 100% !important;
	margin: 0 !important;
	aspect-ratio: 2 / 1 !important;
	max-height: none !important;
	border-radius: var(--radius-large) var(--radius-large) 0 0 !important;
}

.grid-mode .description,
.grid-mode .ff-post-card-excerpt {
	flex-grow: 0 !important;
}

.grid-mode .stats {
	margin-top: auto !important;
}

.grid-mode .has-cover .post-card-content,
.grid-mode .has-cover .ff-post-card-content {
	padding-top: .8rem !important;
}

.grid-mode .has-cover .post-card-title::before,
.grid-mode .has-cover .ff-post-card-title::before {
	top: 1.3rem !important;
}

.grid-mode .no-cover .post-card-content,
.grid-mode .no-cover .ff-post-card-content {
	width: calc(100% - 52px - 12px) !important;
}

.grid-mode .post-card-enter-btn,
.grid-mode .ff-post-card-enter-btn,
.list-mode .post-card-enter-btn,
.list-mode .ff-post-card-enter-btn {
	display: flex !important;
}

html[data-wallpaper-mode="overlay"] .card-base,
html[data-wallpaper-mode="overlay"] .ff-card,
body.wallpaper-transparent .card-base,
body.wallpaper-transparent .ff-card {
	background: var(--card-bg-transparent) !important;
}

html[data-wallpaper-mode="fullscreen"] .ff-page-shell,
html[data-wallpaper-mode="overlay"] .ff-page-shell,
html[data-wallpaper-mode="none"] .ff-page-shell {
	margin-top: 1.25rem;
}

html[data-wallpaper-mode="fullscreen"] #wallpaper-wrapper {
	min-height: 100vh;
}

html[data-wallpaper-mode="overlay"] #wallpaper-wrapper {
	position: fixed;
	inset: 0;
	z-index: -1;
	min-height: 100vh;
	pointer-events: none;
}

html[data-wallpaper-mode="overlay"] .ff-banner-images,
html[data-wallpaper-mode="overlay"] .ff-hero-overlay,
html[data-wallpaper-mode="overlay"] .ff-hero-content {
	opacity: 0;
}

html[data-wallpaper-mode="overlay"] .ff-wallpaper-overlay {
	opacity: var(--overlay-opacity, .8);
}

html[data-wallpaper-mode="none"] #wallpaper-wrapper {
	display: none;
}

.floating-controls-container {
	position: fixed;
	right: 1rem;
	bottom: 4rem;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	gap: .5rem;
	align-items: flex-end;
	pointer-events: none;
}

.ff-floating-control,
.ff-back-to-top {
	position: static;
	pointer-events: auto;
}

.floating-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	flex-shrink: 0;
	border: 1px solid var(--card-border);
	border-radius: 1rem;
	background: var(--card-bg);
	color: var(--primary);
	box-shadow: var(--shadow);
	backdrop-filter: blur(12px);
	cursor: pointer;
	opacity: 1;
	overflow: hidden;
	pointer-events: auto;
	transition: all .3s cubic-bezier(.4, 0, .2, 1);
}

.floating-btn .ff-icon {
	width: 1.55rem;
	height: 1.55rem;
	opacity: 1;
	transition: opacity .2s ease .1s;
}

.floating-btn:hover {
	background: var(--btn-regular-bg-hover);
	box-shadow: var(--shadow-button);
}

.floating-btn:active {
	transform: scale(.9);
}

.floating-btn.hide {
	width: 0 !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border-width: 0 !important;
	opacity: 0;
	pointer-events: none;
	transform: scale(.5);
}

.floating-btn.hide .ff-icon {
	opacity: 0;
	transition: opacity .1s ease;
}

body.ff-video-playing .ff-navbar-surface,
body.ff-video-playing .float-panel,
body.ff-video-playing .ff-back-to-top {
	background: color-mix(in srgb, var(--card-bg) 74%, transparent) !important;
}

body.enable-banner #wallpaper-wrapper {
	top: -30vh;
	min-height: calc(var(--banner-height, 35vh) + 30vh);
}

body.enable-banner.ff-home-body #wallpaper-wrapper {
	min-height: var(--banner-height-home, 65vh);
	top: 0;
}

body.enable-banner .ff-page-shell {
	margin-top: calc(-1 * 3.5rem);
}

body.no-banner-layout .ff-page-shell,
html[data-wallpaper-mode="none"] .ff-page-shell,
html[data-wallpaper-mode="overlay"] .ff-page-shell,
html[data-wallpaper-mode="fullscreen"] .ff-page-shell {
	margin-top: 5.5rem;
}

html[data-wallpaper-mode="fullscreen"] body:not(.ff-home-body) .ff-page-shell {
	margin-top: calc(-1 * 3.5rem);
}

body.sticky-navbar #top-row {
	height: var(--nav-height);
}

body.sticky-navbar #navbar-wrapper {
	opacity: 1;
	transform: none;
}

.enable-card-border .card-base,
.enable-card-border .ff-card,
.enable-card-border .btn-card {
	border: 1px solid var(--line-divider);
	box-shadow: var(--shadow-sm);
}

body.wallpaper-transparent .card-base,
body.wallpaper-transparent .ff-card,
body.wallpaper-transparent .btn-card {
	background-color: var(--card-bg-transparent) !important;
}

body.wallpaper-transparent #navbar .ff-navbar-surface {
	background-color: var(--card-bg-transparent) !important;
	backdrop-filter: blur(20px) !important;
}

html[data-wallpaper-mode="none"] .waves,
html[data-wallpaper-mode="none"] #header-waves,
#wallpaper-wrapper.wallpaper-overlay .waves,
#wallpaper-wrapper.wallpaper-overlay #header-waves,
#wallpaper-wrapper.wallpaper-overlay #wallpaper-gradient {
	display: none !important;
}

html[data-waves-enabled="true"] #header-waves {
	display: block !important;
}

html[data-waves-enabled="false"] #header-waves,
html[data-gradient-enabled="false"] #wallpaper-gradient,
html[data-waves-enabled="true"] #wallpaper-gradient {
	display: none !important;
}

::-webkit-scrollbar {
	width: .5rem;
	height: .5rem;
}

::-webkit-scrollbar-thumb {
	border-radius: 999px;
	background: var(--scrollbar-bg, rgb(0 0 0 / .4));
}

::-webkit-scrollbar-thumb:hover {
	background: var(--scrollbar-bg-hover, rgb(0 0 0 / .5));
}

.link,
.link-lg {
	position: relative;
	color: var(--primary);
	font-weight: 600;
	text-decoration: none;
}

.link::after,
.link-lg::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -.08em;
	height: .12em;
	border-radius: 999px;
	background: var(--link-underline);
	transform: scaleX(.25);
	transform-origin: left;
	opacity: .75;
	transition: transform .18s ease, background-color .18s ease;
}

.link:hover::after,
.link-lg:hover::after {
	transform: scaleX(1);
	background: var(--primary);
}

.pinned-btn {
	display: inline-flex;
	align-items: center;
	gap: .25rem;
	padding: .35rem .5rem;
	border-radius: .5rem;
	background: var(--btn-regular-bg);
	color: var(--btn-content);
	font-weight: 700;
}

.ff-footer {
	margin-bottom: 3rem;
	padding: 0 1.5rem;
}

.footer-divider {
	width: min(66rem, calc(100vw - 4rem));
	height: 1px;
	margin: 2.5rem auto;
	border-top: 1px dashed color-mix(in srgb, var(--content-meta) 20%, transparent);
}

.ff-footer-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .25rem;
	max-width: var(--content-width);
	margin: 0 auto 3rem;
	padding: 0 1.5rem;
	border: 1px dashed oklch(0.85 0.01 var(--hue));
	border-radius: 1rem;
	color: var(--text-faint);
	font-size: .875rem;
	text-align: center;
}

html.dark .ff-footer-inner {
	border-color: rgb(255 255 255 / .15);
}

.ff-footer-line {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .5rem;
	margin: .125rem 0;
}

.ff-footer-line a {
	color: var(--primary);
	font-weight: 600;
}

.floating-toc-wrapper {
	position: relative;
	pointer-events: auto;
}

.floating-toc-panel {
	position: absolute;
	right: 0;
	bottom: calc(100% + .6rem);
	width: min(20rem, calc(100vw - 2rem));
	max-height: min(24rem, calc(100vh - 8rem));
	overflow: hidden;
	border: 1px solid var(--card-border);
	border-radius: 1rem;
	box-shadow: var(--shadow);
	backdrop-filter: blur(20px) saturate(150%);
	transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.floating-toc-panel.hide {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(.35rem) scale(.98);
}

.floating-toc-panel.show,
.floating-toc-panel:not(.hide) {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.floating-toc-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	padding: .75rem 1rem;
	border-bottom: 1px solid var(--card-border);
	backdrop-filter: blur(8px);
}

.floating-toc-header h3 {
	margin: 0;
	color: var(--primary);
	font-size: 1rem;
}

.floating-toc-close {
	width: 2rem;
	height: 2rem;
	border: 0;
	border-radius: .55rem;
	color: var(--text-muted);
	cursor: pointer;
}

.toc-scroll-container {
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
	max-height: 19rem;
	padding: .75rem;
	padding-right: .125rem;
}

.toc-content {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	position: relative;
	width: 100%;
	max-width: 100%;
	gap: .28rem;
	overflow: visible;
	box-sizing: border-box;
	contain: layout;
	padding: .125rem 0;
}

.toc-item,
.toc-content a {
	display: flex;
	align-items: center;
	gap: .55rem;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	min-height: 2.2rem;
	box-sizing: border-box;
	flex-shrink: 0;
	overflow: hidden;
	position: relative;
	padding: .48rem .62rem;
	border-radius: .875rem;
	color: inherit;
	text-decoration: none;
	transition: background-color .14s ease, transform .14s ease, color .14s ease;
}

.toc-item:hover,
.toc-content a:hover {
	background: color-mix(in oklab, var(--toc-btn-hover), transparent);
	transform: translateX(1px);
}

.toc-item:active,
.toc-content a:active {
	background: color-mix(in oklab, var(--toc-btn-active), transparent);
}

.toc-item.toc-level-1,
.toc-content a.is-h2 {
	padding-left: 1.08rem;
}

.toc-item.toc-level-2,
.toc-content a.is-h3 {
	padding-left: 1.62rem;
}

.toc-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
	flex: 1;
	max-width: calc(100% - 2.4rem);
	box-sizing: border-box;
	font-size: .86rem;
	line-height: 1.3;
	letter-spacing: .01em;
}

.toc-label-primary {
	color: color-mix(in oklab, var(--content-meta) 78%, var(--primary));
}

.toc-label-secondary {
	color: color-mix(in oklab, var(--content-meta) 88%, transparent);
}

.toc-badge {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 1.35rem;
	height: 1.35rem;
	border-radius: .5rem;
	font-size: .68rem;
	font-weight: 700;
	line-height: 1;
}

.toc-badge-index {
	background: var(--toc-badge-bg);
	color: var(--btn-content);
}

.toc-badge-dot {
	width: .48rem;
	height: .48rem;
	border-radius: 999px;
	background: color-mix(in oklab, var(--primary) 26%, var(--line-color));
}

.toc-badge-dot-sm {
	width: .34rem;
	height: .34rem;
	background: color-mix(in oklab, var(--primary) 16%, var(--line-color));
}

.toc-item.visible .toc-label {
	color: color-mix(in oklab, var(--content-meta) 58%, var(--primary));
	opacity: 1;
}

.toc-item.visible .toc-badge-dot,
.toc-item.visible .toc-badge-dot-sm {
	background: var(--primary);
}

.toc-active-indicator {
	position: absolute;
	left: 0;
	right: 0;
	z-index: -1;
	border-radius: .875rem;
	background: color-mix(in oklab, var(--toc-indicator-bg), transparent);
	box-shadow: 0 6px 18px -14px color-mix(in oklab, var(--primary) 55%, transparent);
	transition: top .18s ease, height .18s ease, opacity .14s ease;
}

@media (max-width: 680px) {
	.ff-post-card,
	.post-card-wrapper {
		min-height: 10.25rem;
	}

	.ff-post-card-content,
	.post-card-content {
		width: calc(100% - 8.5rem);
		padding: .85rem 8.7rem .85rem .9rem;
	}

	.ff-post-card-image,
	.post-card-image {
		top: .5rem;
		right: .5rem;
		bottom: .5rem;
		width: 8rem;
		border-radius: .75rem;
	}

	.banner-subtitle {
		font-size: 1rem;
	}

	.floating-controls-container {
		right: .75rem;
		bottom: 4rem;
	}

	.floating-btn {
		width: 2.5rem;
		height: 2.5rem;
		border-radius: .5rem;
		font-size: 1.25rem;
	}

	.floating-btn .ff-icon {
		width: 1.2rem;
		height: 1.2rem;
	}

	body.admin-bar #top-row {
		top: 46px;
	}

	#navbar-wrapper,
	.ff-navbar-wrapper {
		width: 100%;
	}

	body.enable-banner #wallpaper-wrapper,
	body.enable-banner.ff-home-body #wallpaper-wrapper {
		min-height: var(--banner-height-home, 65vh);
		top: 0;
	}

	.floating-toc-panel {
		width: calc(100vw - 1.5rem);
	}

	.list-mode .post-card-wrapper,
	.list-mode .ff-post-card {
		flex-direction: row !important;
	}

	.list-mode .has-cover .post-card-content,
	.list-mode .has-cover .ff-post-card-content {
		width: calc(100% - 9rem - .75rem) !important;
		padding: .75rem .5rem .75rem .75rem !important;
	}

	.list-mode .has-cover .post-card-image,
	.list-mode .has-cover .ff-post-card-image {
		position: absolute !important;
		top: .5rem !important;
		right: .5rem !important;
		bottom: .5rem !important;
		width: 9rem !important;
		aspect-ratio: auto !important;
		border-radius: .75rem !important;
	}

	.list-mode .post-card-title,
	.list-mode .ff-post-card-title {
		margin-bottom: .5rem !important;
		font-size: 1.125rem !important;
		line-height: 1.75rem !important;
	}

	.list-mode .post-card-title::before,
	.list-mode .ff-post-card-title::before {
		display: none !important;
	}

	.list-mode .stats a {
		height: 1.25rem !important;
		padding: .125rem .375rem !important;
		font-size: .65rem !important;
	}
}

/* Firefly detail parity: widgets, markdown, background player, and license block. */
.custom-md,
.ff-markdown {
	max-width: none;
	color: var(--text);
	font-size: 1rem;
	line-height: 1.85;
}

.custom-md h1,
.custom-md h2,
.custom-md h3,
.ff-markdown h1,
.ff-markdown h2,
.ff-markdown h3 {
	color: var(--text);
	font-weight: 700;
	letter-spacing: .01em;
	scroll-margin-top: calc(var(--nav-height) + 1.5rem);
}

.custom-md h2,
.ff-markdown h2 {
	position: relative;
	padding-left: 1rem;
}

.custom-md h2::before,
.ff-markdown h2::before {
	content: "";
	position: absolute;
	top: .25em;
	left: 0;
	width: .25rem;
	height: 1em;
	border-radius: .375rem;
	background: var(--primary);
}

.custom-md a,
.ff-markdown a {
	position: relative;
	color: var(--primary);
	font-weight: 600;
	border: 0;
	text-decoration: none;
}

.custom-md a::after,
.ff-markdown a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -.08em;
	height: .12em;
	border-radius: 999px;
	background: var(--link-underline);
	transform: scaleX(.25);
	transform-origin: left;
	transition: transform .18s ease, background-color .18s ease;
}

.custom-md a:hover::after,
.ff-markdown a:hover::after {
	transform: scaleX(1);
	background: var(--primary);
}

.custom-md blockquote,
.ff-markdown blockquote {
	border-left: .25rem solid var(--primary);
	background: var(--btn-regular-bg);
	color: var(--content-meta);
}

.custom-md code,
.ff-markdown code {
	background: var(--inline-code-bg);
	color: var(--inline-code-color);
}

.custom-md pre,
.ff-markdown pre {
	position: relative;
	border-radius: 1rem;
	background: var(--codeblock-bg);
	box-shadow: var(--shadow-sm);
}

.ff-license {
	position: relative;
	overflow: hidden;
	margin-top: 2rem;
	padding: 1.25rem 1.5rem;
	border-radius: var(--radius-large);
	color: var(--text);
}

.ff-license strong {
	display: block;
	color: color-mix(in srgb, var(--text) 78%, transparent);
	font-weight: 700;
}

.ff-license-url {
	display: inline-block;
	max-width: 100%;
	margin-top: .25rem;
	overflow-wrap: anywhere;
}

.ff-license-meta {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem 1.5rem;
	margin-top: .85rem;
}

.ff-license-meta div {
	min-width: 8rem;
}

.ff-license-meta span {
	display: block;
	color: color-mix(in srgb, var(--content-meta) 42%, transparent);
	font-size: .875rem;
}

.ff-license-cc {
	position: absolute;
	right: 1.25rem;
	top: 50%;
	pointer-events: none;
	color: rgb(0 0 0 / .05);
	font-size: 9rem;
	font-weight: 900;
	line-height: 1;
	transform: translateY(-50%);
}

html.dark .ff-license-cc {
	color: rgb(255 255 255 / .05);
}

.ff-site-stats-list {
	display: flex;
	flex-direction: column;
	gap: .5rem;
}

.ff-site-stat-item,
.site-info-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	min-height: 2.35rem;
	padding: .375rem .75rem;
	border-radius: .75rem;
	color: var(--text-muted);
	font-family: var(--font-ui);
	transition: background-color .18s ease, color .18s ease;
}

.ff-site-stat-item:hover,
.site-info-row:hover {
	background: var(--btn-plain-bg-hover);
	color: var(--text);
}

.ff-site-stat-item span,
.site-info-row span {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	min-width: 0;
	font-size: .875rem;
	font-weight: 500;
}

.ff-site-stat-item .ff-icon,
.site-info-row .ff-icon {
	color: var(--primary);
}

.ff-site-stat-item strong,
.site-info-row strong,
.site-info-row a {
	color: var(--text);
	font-size: .95rem;
	font-weight: 700;
	text-align: right;
}

.ff-site-stat-item em {
	margin-left: -.5rem;
	color: var(--text-faint);
	font-size: .8rem;
	font-style: normal;
}

.site-info-main-list {
	display: flex;
	flex-direction: column;
	gap: .5rem;
}

.site-info-detail-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: .5rem;
	padding-top: .5rem;
}

.site-info-detail-item {
	display: flex;
	min-width: 0;
	flex-direction: column;
	align-items: center;
	gap: .2rem;
	padding: .65rem .4rem;
	border-radius: .75rem;
	background: color-mix(in srgb, var(--btn-regular-bg) 72%, transparent);
	text-align: center;
}

.site-info-detail-item.full-width {
	grid-column: 1 / -1;
}

.site-info-detail-item .ff-icon {
	color: var(--primary);
}

.site-info-detail-item span {
	color: var(--text-faint);
	font-size: .72rem;
}

.site-info-detail-item strong {
	max-width: 100%;
	overflow: hidden;
	color: var(--text);
	font-size: .82rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.calendar-container {
	display: grid;
	gap: .75rem;
	font-family: var(--font-ui);
}

.calendar-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
	margin-bottom: .15rem;
}

.calendar-toolbar .btn-plain {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2rem;
	height: 2rem;
	border: 0;
	border-radius: .65rem;
	color: var(--text-muted);
	cursor: pointer;
	font-weight: 700;
}

#current-month-display {
	min-width: 8rem;
	color: var(--text);
	font-size: 1rem;
}

.calendar-toolbar-actions {
	display: flex;
	gap: .25rem;
}

.weekdays,
.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: .25rem;
}

.weekdays span {
	text-align: center;
	color: var(--text-faint);
	font-size: .72rem;
	font-weight: 600;
}

.calendar-day {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 1;
	border: 0;
	border-radius: .45rem;
	background: transparent;
	color: var(--text-muted);
	cursor: pointer;
	font-size: .82rem;
	transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.calendar-day-empty {
	pointer-events: none;
}

.calendar-day.has-post {
	color: var(--text);
	font-weight: 700;
}

.calendar-day:hover,
.calendar-day-selected,
.calendar-picker-item:hover {
	background: var(--btn-plain-bg-hover);
	color: var(--primary);
}

.calendar-day.is-today {
	box-shadow: inset 0 0 0 2px var(--primary);
}

.calendar-post-dot {
	position: absolute;
	left: 50%;
	bottom: .14rem;
	width: .25rem;
	height: .25rem;
	border-radius: 999px;
	background: var(--primary);
	transform: translateX(-50%);
}

.calendar-day em {
	position: absolute;
	top: .05rem;
	right: .18rem;
	color: var(--primary);
	font-size: .62rem;
	font-style: normal;
}

.calendar-picker-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: .5rem;
}

.calendar-picker-item {
	min-height: 2.2rem;
	border: 0;
	border-radius: .55rem;
	background: transparent;
	color: var(--text-muted);
	cursor: pointer;
}

.ff-calendar-heatmap-wrap {
	display: grid;
	gap: .25rem;
}

.heatmap-months,
.heatmap-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: .125rem;
}

.heatmap-months span {
	color: var(--text-faint);
	font-size: .62rem;
	text-align: center;
}

.heatmap-grid {
	grid-template-rows: repeat(4, .55rem);
}

.heatmap-cell {
	min-width: 0;
	border: 0;
	border-radius: .16rem;
	background: var(--btn-plain-bg-hover);
	cursor: pointer;
}

.heatmap-cell.level-1 { background: color-mix(in srgb, var(--primary) 45%, transparent); }
.heatmap-cell.level-2 { background: color-mix(in srgb, var(--primary) 65%, transparent); }
.heatmap-cell.level-3 { background: color-mix(in srgb, var(--primary) 85%, transparent); }
.heatmap-cell.level-4 { background: var(--primary); }

.calendar-posts {
	margin-top: .25rem;
}

.calendar-posts-divider {
	display: none;
	height: 1px;
	margin-bottom: .45rem;
	background: var(--line-divider);
}

.calendar-posts-list {
	display: flex;
	max-height: 12rem;
	flex-direction: column;
	gap: .15rem;
	overflow-y: auto;
}

.calendar-posts-list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
	padding: .35rem .5rem;
	border-radius: .5rem;
	color: var(--text-muted);
	font-size: .82rem;
	transition: background-color .18s ease, color .18s ease;
}

.calendar-posts-list a:hover {
	background: var(--btn-plain-bg-hover);
	color: var(--primary);
}

.calendar-posts-list span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.calendar-posts-list time {
	flex: 0 0 auto;
	color: var(--text-faint);
	font-size: .75rem;
}

.ff-bg-player,
#bg-player {
	position: fixed;
	inset: 0;
	z-index: -2;
	pointer-events: none;
}

#bg-player-overlay,
.ff-bg-player-overlay {
	position: fixed;
	inset: 0;
	z-index: -2;
	overflow: hidden;
	transition: opacity .5s ease;
}

#bg-player-overlay.opacity-0 {
	opacity: 0;
}

#bg-player-overlay.opacity-100 {
	opacity: 1;
}

#bg-player-video,
.ff-background-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(1.08) contrast(1.02);
}

.ff-bg-player-controls {
	position: fixed;
	left: 1rem;
	bottom: 1rem;
	z-index: 30;
	display: flex;
	gap: .375rem;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease;
}

body.ff-video-playing .ff-bg-player-controls {
	opacity: .5;
	pointer-events: auto;
}

.ff-bg-player-control {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 1px solid rgb(255 255 255 / .30);
	border-radius: 999px;
	background: rgb(0 0 0 / .35);
	color: rgb(255 255 255 / .7);
	backdrop-filter: blur(6px);
	cursor: pointer;
	font-size: 1.5rem;
	pointer-events: auto;
}

#bg-player-toast,
.ff-bg-player-toast {
	position: fixed;
	left: 50%;
	bottom: 5rem;
	z-index: 100;
	padding: .5rem 1rem;
	border-radius: .65rem;
	background: rgb(0 0 0 / .70);
	color: white;
	font-size: .875rem;
	backdrop-filter: blur(6px);
	pointer-events: none;
	transform: translateX(-50%);
	transition: opacity .3s ease;
}

#bg-player-toast.opacity-0 {
	opacity: 0;
}

#bg-player-toast.opacity-100 {
	opacity: 1;
}
