/**
 * Nick Finder — front-end styles (fontgenerator.art).
 * https://www.fontgenerator.art/
 *
 * Every selector is .nkf-* and every custom property is --nkf-*, so this file
 * cannot affect the font or symbol plugins running on the same site.
 */

:root {
	--nkf-primary: #7c5cff;   /* violet   (overridable in Settings) */
	--nkf-accent:  #ff4d94;   /* pink     (overridable in Settings) */
}

/* ---- Theme surfaces ---------------------------------------------------- */

.nkf-app {
	--nkf-ink:    #14121f;
	--nkf-panel:  #1e1b2e;
	--nkf-panel2: #262239;
	--nkf-line:   #37324e;
	--nkf-text:   #f4f2ff;
	--nkf-muted:  #9a94b8;
	--nkf-grad:   linear-gradient(100deg, var(--nkf-primary), var(--nkf-accent));

	/* Shell metrics — the sticky bar reuses these so it lines up exactly. */
	--nkf-pad-x:  20px;
	--nkf-pad-y:  22px;
	--nkf-radius: 20px;
	--nkf-top:    0px;   /* sticky offset, set by JS (admin bar / fixed header) */

	position: relative;
	background: var(--nkf-ink);
	color: var(--nkf-text);
	border: 1px solid var(--nkf-line);
	border-radius: var(--nkf-radius);
	padding: var(--nkf-pad-y) var(--nkf-pad-x) 18px;
	margin: 1.4em 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans",
		"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "Android Emoji", sans-serif;
	font-size: 15px;
	line-height: 1.5;
	box-shadow: 0 18px 50px -22px rgba(10, 6, 30, 0.55);
	/* NOTE: no `overflow` here on purpose. Any overflow other than visible on
	 * an ancestor silently disables position:sticky on everything inside. */
}

/* faint aurora in the top corner — quiet, not a light show */
.nkf-app::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 300px;
	height: 210px;
	max-width: 60%;
	background: radial-gradient(closest-side at 78% 0%, var(--nkf-accent), transparent 72%);
	opacity: 0.14;
	pointer-events: none;
	border-top-right-radius: var(--nkf-radius);
}

.nkf-app[data-nkf-theme="light"] {
	--nkf-ink:    #fdfcff;
	--nkf-panel:  #f4f2fa;
	--nkf-panel2: #ecebf4;
	--nkf-line:   #dcd8ea;
	--nkf-text:   #221e33;
	--nkf-muted:  #6f6a8a;
	box-shadow: 0 14px 40px -24px rgba(60, 40, 120, 0.25);
}

.nkf-app * { box-sizing: border-box; }
.nkf-app button {
	font-family: inherit;
	cursor: pointer;
	background: none;
	border: none;
	color: inherit;
}
.nkf-app button:focus-visible,
.nkf-app input:focus-visible,
.nkf-copy-chip:focus-visible {
	outline: 2px solid var(--nkf-primary, #7c5cff);
	outline-offset: 2px;
}

/* ---- Input console ------------------------------------------------------ */

.nkf-console {
	position: relative;
	display: flex;
	align-items: center;
	background: var(--nkf-panel);
	border: 1px solid var(--nkf-line);
	border-radius: 14px;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.nkf-console:focus-within {
	border-color: transparent;
	box-shadow: 0 0 0 2px var(--nkf-primary), 0 0 24px -6px var(--nkf-accent);
}
.nkf-input {
	flex: 1;
	background: transparent;
	border: none;
	color: var(--nkf-text);
	font-size: 18px;
	font-weight: 600;
	padding: 13px 15px;
	min-width: 0;
	letter-spacing: 0.01em;
}
.nkf-input::placeholder { color: var(--nkf-muted); font-weight: 500; }
.nkf-input:focus { outline: none; }
.nkf-clear {
	font-size: 22px;
	line-height: 1;
	color: var(--nkf-muted);
	padding: 0 14px;
	transition: color 0.15s ease;
}
.nkf-clear:hover { color: var(--nkf-text); }

/* ---- Category slider (the signature) ------------------------------------ */

.nkf-rail {
	display: flex;
	align-items: center;
	gap: 3px;
	margin-top: 9px;
}
.nkf-cat-track {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	padding: 2px;
	flex: 1;
}
.nkf-cat-track::-webkit-scrollbar { display: none; }

.nkf-cat {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
	scroll-snap-align: start;
	background: var(--nkf-panel);
	border: 1px solid var(--nkf-line);
	border-radius: 999px;
	color: var(--nkf-muted);
	font-size: 12.5px;
	font-weight: 600;
	padding: 6px 12px;
	transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.nkf-cat:hover { color: var(--nkf-text); transform: translateY(-1px); }
/* Emoji font named first so a device can never fall back to a monochrome
 * text glyph — that is what made the black nib and black plus disappear. */
.nkf-cat-glyph,
.nkf-group-glyph {
	font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "Android Emoji", sans-serif;
	font-style: normal;
	line-height: 1;
}
.nkf-cat-glyph { font-size: 15px; }

/* active pill: gradient underline glow that reads as a slider position */
.nkf-cat.nkf-active {
	color: var(--nkf-text);
	border-color: transparent;
	background:
		linear-gradient(var(--nkf-panel2), var(--nkf-panel2)) padding-box,
		var(--nkf-grad) border-box;
	border: 1px solid transparent;
}
.nkf-cat.nkf-active::after {
	content: "";
	position: absolute;
	left: 18%;
	right: 18%;
	bottom: -1px;
	height: 2px;
	border-radius: 2px;
	background: var(--nkf-grad);
	box-shadow: 0 0 10px 0 var(--nkf-accent);
}

.nkf-rail-arrow {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 1px solid var(--nkf-line);
	color: var(--nkf-muted);
	font-size: 18px;
	line-height: 1;
	display: none;
	align-items: center;
	justify-content: center;
	transition: color 0.15s ease, border-color 0.15s ease;
}
.nkf-rail-arrow:hover { color: var(--nkf-text); border-color: var(--nkf-muted); }
@media (min-width: 640px) {
	.nkf-rail-arrow { display: inline-flex; }
}

/* ---- Subcategory rail ---------------------------------------------------- */

.nkf-sub-track {
	display: flex;
	gap: 5px;
	overflow-x: auto;
	scrollbar-width: none;
	margin-top: 6px;
	padding: 2px;
}
.nkf-sub-track::-webkit-scrollbar { display: none; }

.nkf-sub {
	white-space: nowrap;
	background: transparent;
	border: 1px dashed var(--nkf-line);
	border-radius: 999px;
	color: var(--nkf-muted);
	font-size: 11.5px;
	font-weight: 600;
	padding: 4.5px 10px;
	opacity: 0;
	transform: translateY(4px);
	animation: nkf-cascade 0.25s ease forwards;
	transition: color 0.15s ease, border-color 0.15s ease;
}
.nkf-sub:hover { color: var(--nkf-text); }
.nkf-sub.nkf-active {
	color: #fff;
	border-style: solid;
	border-color: transparent;
	background: var(--nkf-grad);
}
.nkf-app[data-nkf-theme="light"] .nkf-sub.nkf-active { color: #fff; }

@keyframes nkf-cascade {
	to { opacity: 1; transform: translateY(0); }
}

/* ---- Toolbar -------------------------------------------------------------- */

.nkf-toolbar {
	display: flex;
	flex-wrap: nowrap;
	gap: 5px;
	margin-left: auto;
	flex: 0 0 auto;
}
.nkf-tool {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--nkf-muted);
	background: var(--nkf-panel);
	border: 1px solid var(--nkf-line);
	border-radius: 9px;
	padding: 5px 10px;
	transition: color 0.15s ease, border-color 0.15s ease;
}
.nkf-tool:hover { color: var(--nkf-text); }
.nkf-tool.nkf-active {
	color: var(--nkf-text);
	border-color: var(--nkf-primary);
}
.nkf-tool-fav { margin-left: auto; }
.nkf-fav-count {
	background: var(--nkf-grad);
	color: #fff;
	border-radius: 999px;
	font-size: 10px;
	min-width: 16px;
	height: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 5px;
}

/* ---- Status + results grid ------------------------------------------------ */

.nkf-status {
	margin: 0;
	min-width: 0;
	flex: 1 1 auto;
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--nkf-muted);
	opacity: 0.8;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Status (left) + tools (right) on a single line. */
.nkf-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 9px;
}

.nkf-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 10px;
}
@media (max-width: 480px) {
	.nkf-grid { grid-template-columns: 1fr; }
}

.nkf-card {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	background: var(--nkf-panel);
	border: 1px solid var(--nkf-line);
	border-radius: 13px;
	padding: 14px 12px 14px 16px;
	opacity: 0;
	transform: translateY(6px);
	animation: nkf-cascade 0.3s ease forwards;
	transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.nkf-card:hover {
	border-color: var(--nkf-primary);
	transform: translateY(-2px);
}
.nkf-card.nkf-copied {
	border-color: transparent;
	background:
		linear-gradient(var(--nkf-panel2), var(--nkf-panel2)) padding-box,
		var(--nkf-grad) border-box;
	border: 1px solid transparent;
}
.nkf-card-text {
	font-size: 19px;
	line-height: 1.35;
	word-break: break-word;
	overflow-wrap: anywhere;
}
.nkf-card-actions {
	display: flex;
	align-items: center;
	gap: 4px;
	flex: 0 0 auto;
}
.nkf-heart {
	font-size: 16px;
	color: var(--nkf-muted);
	padding: 5px 6px;
	border-radius: 8px;
	transition: color 0.15s ease, transform 0.15s ease;
}
.nkf-heart:hover { transform: scale(1.15); }
.nkf-heart.nkf-hearted { color: var(--nkf-accent); }
.nkf-pen {
	font-size: 15px;
	color: var(--nkf-muted);
	padding: 5px 6px;
	border-radius: 8px;
	transition: color 0.15s ease, transform 0.15s ease;
}
.nkf-pen:hover {
	color: var(--nkf-primary);
	transform: scale(1.15);
}
.nkf-copy-ico {
	font-size: 15px;
	color: var(--nkf-muted);
	padding: 5px 6px;
}
.nkf-card:hover .nkf-copy-ico { color: var(--nkf-text); }

/* trending (empty-state) chips */
.nkf-trend {
	background: var(--nkf-panel);
	border: 1px dashed var(--nkf-line);
	border-radius: 13px;
	color: var(--nkf-text);
	font-size: 17px;
	padding: 14px 12px;
	text-align: center;
	word-break: break-word;
	opacity: 0;
	transform: translateY(6px);
	animation: nkf-cascade 0.3s ease forwards;
	transition: border-color 0.15s ease, transform 0.15s ease;
}
.nkf-trend:hover {
	border-color: var(--nkf-accent);
	transform: translateY(-2px);
}

/* ---- Load more ------------------------------------------------------------ */

.nkf-more {
	display: block;
	margin: 16px auto 4px;
	background: var(--nkf-grad);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	border-radius: 999px;
	padding: 11px 26px;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nkf-more:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 22px -8px var(--nkf-accent);
}

/* ---- Favorites drawer ------------------------------------------------------ */

.nkf-drawer {
	position: absolute;
	inset: auto 0 0 0;
	max-height: 0;
	overflow: hidden;
	background: var(--nkf-panel2);
	border-top: 1px solid var(--nkf-line);
	transition: max-height 0.3s ease;
	z-index: 5;
}
.nkf-drawer-open { max-height: 320px; }
.nkf-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border-bottom: 1px solid var(--nkf-line);
	font-size: 14px;
}
.nkf-drawer-actions { display: flex; gap: 8px; align-items: center; }
.nkf-drawer-dl,
.nkf-drawer-clear {
	font-size: 12px;
	font-weight: 600;
	color: var(--nkf-muted);
	border: 1px solid var(--nkf-line);
	border-radius: 8px;
	padding: 5px 10px;
	transition: color 0.15s ease;
}
.nkf-drawer-dl:hover,
.nkf-drawer-clear:hover { color: var(--nkf-text); }
.nkf-drawer-close { font-size: 20px; color: var(--nkf-muted); padding: 0 4px; }
.nkf-drawer-body {
	overflow-y: auto;
	max-height: 250px;
	padding: 8px 16px 14px;
}
.nkf-drawer-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
	border-bottom: 1px dashed var(--nkf-line);
}
.nkf-drawer-text { flex: 1; font-size: 16px; word-break: break-word; }
.nkf-drawer-copy,
.nkf-drawer-rm { color: var(--nkf-muted); font-size: 15px; padding: 4px 6px; }
.nkf-drawer-copy:hover,
.nkf-drawer-rm:hover { color: var(--nkf-text); }
.nkf-drawer-empty { color: var(--nkf-muted); font-size: 14px; padding: 10px 0; }

/* ---- Credit ----------------------------------------------------------------- */

.nkf-credit {
	margin-top: 16px;
	text-align: center;
	font-size: 12px;
	color: var(--nkf-muted);
}
.nkf-credit a {
	color: var(--nkf-primary);
	text-decoration: none;
	font-weight: 600;
}
.nkf-credit a:hover { text-decoration: underline; }

/* ---- Toast -------------------------------------------------------------------- */

.nkf-toast {
	position: fixed;
	left: 50%;
	bottom: 26px;
	transform: translate(-50%, 16px);
	background: #17141f;
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "Android Emoji", sans-serif;
	font-size: 14px;
	font-weight: 600;
	padding: 11px 20px;
	border-radius: 999px;
	border: 1px solid #3a3355;
	box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
	z-index: 99999;
}
.nkf-toast-show {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* ==============================================================================
 * Server-rendered lists  [nickfinder_list]  — light, blends with theme content
 * ============================================================================== */

.nkf-list { margin: 1.4em 0; }
.nkf-list-title { margin: 0 0 14px; }
.nkf-list-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 12px;
}
@media (max-width: 480px) {
	.nkf-list-grid { grid-template-columns: 1fr; }
}
.nkf-list-card {
	border: 1px solid rgba(125, 115, 165, 0.28);
	border-radius: 14px;
	padding: 13px 14px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.nkf-list-card:hover {
	border-color: var(--nkf-primary, #7c5cff);
	box-shadow: 0 8px 22px -14px rgba(70, 40, 120, 0.35);
}
.nkf-list-name {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	cursor: pointer;
	color: inherit;
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.55;
	margin-bottom: 8px;
	padding: 0;
	transition: opacity 0.15s ease, color 0.15s ease;
}
.nkf-list-name:hover {
	opacity: 1;
	color: var(--nkf-primary, #7c5cff);
}
.nkf-list-pen { font-size: 13px; }
.nkf-list-variants {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.nkf-copy-chip {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	text-align: left;
	background: rgba(125, 115, 165, 0.08);
	border: 1px solid transparent;
	border-radius: 9px;
	color: inherit;
	font-family: inherit;
	font-size: 16.5px;
	padding: 8px 11px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.nkf-copy-chip:hover {
	border-color: var(--nkf-primary, #7c5cff);
	background: rgba(125, 115, 165, 0.14);
}
.nkf-copy-chip.nkf-copied {
	border-color: var(--nkf-accent, #e23da8);
}
.nkf-chip-text { word-break: break-word; overflow-wrap: anywhere; }
.nkf-chip-ico { flex: 0 0 auto; opacity: 0.45; font-size: 14px; }
.nkf-copy-chip:hover .nkf-chip-ico { opacity: 1; }

.nkf-copy-chip.nkf-inline {
	display: inline-flex;
	width: auto;
	vertical-align: middle;
	margin: 0 2px;
}

/* ==============================================================================
 * Related pages nav  [nickfinder_related] — theme-friendly link chips
 * ============================================================================== */

.nkf-related {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 1em 0 1.4em;
}
.nkf-rel-link {
	display: inline-block;
	border: 1px solid rgba(125, 115, 165, 0.35);
	border-radius: 999px;
	padding: 7px 15px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.nkf-rel-link:hover {
	border-color: var(--nkf-primary, #7c5cff);
	color: var(--nkf-primary, #7c5cff);
	transform: translateY(-1px);
	text-decoration: none;
}
.nkf-rel-home {
	border-color: transparent;
	background: linear-gradient(100deg, var(--nkf-primary, #7c5cff), var(--nkf-accent, #e23da8));
	color: #fff;
}
.nkf-rel-home:hover { color: #fff; }

/* ---- Reduced motion ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.nkf-card,
	.nkf-trend,
	.nkf-sub {
		animation: none;
		opacity: 1;
		transform: none;
	}
	.nkf-app *,
	.nkf-toast { transition: none !important; }
}

/* ---- Group rail (the More tab: God / Bhakti · Symbols) -------------------- */

.nkf-group-track {
	display: none;
	gap: 6px;
	overflow-x: auto;
	scrollbar-width: none;
	margin-top: 6px;
	padding: 2px;
}
.nkf-group-track::-webkit-scrollbar { display: none; }
.nkf-group-track.nkf-group-open { display: flex; }

.nkf-group-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
	background: var(--nkf-panel);
	border: 1px solid var(--nkf-line);
	border-radius: 10px;
	color: var(--nkf-text);
	font-size: 12px;
	font-weight: 700;
	padding: 5.5px 11px;
	cursor: pointer;
	opacity: 0;
	transform: translateY(4px);
	animation: nkf-cascade 0.25s ease forwards;
	transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.nkf-group-chip:hover {
	transform: translateY(-1px);
	border-color: var(--nkf-primary);
}
.nkf-group-chip.nkf-active {
	color: #fff;
	border-color: transparent;
	background: var(--nkf-grad);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}
.nkf-group-glyph { font-size: 13px; }

/* ---- FAQ ------------------------------------------------------------------ */

.nkf-faq {
	display: grid;
	gap: 8px;
	margin: 18px 0;
}
.nkf-faq-item {
	background: var(--nkf-panel);
	border: 1px solid var(--nkf-line);
	border-radius: 12px;
	overflow: hidden;
}
.nkf-faq-q {
	list-style: none;
	cursor: pointer;
	padding: 13px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
}
.nkf-faq-q::-webkit-details-marker { display: none; }
.nkf-faq-q::after {
	content: "+";
	margin-left: auto;
	font-size: 19px;
	line-height: 1;
	color: var(--nkf-muted);
	transition: transform 0.2s ease;
}
.nkf-faq-item[open] .nkf-faq-q::after { transform: rotate(45deg); }
.nkf-faq-q h3 {
	margin: 0;
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.35;
}
.nkf-faq-a {
	padding: 0 16px 14px;
	color: var(--nkf-muted);
}
.nkf-faq-a p { margin: 0; font-size: 14.5px; line-height: 1.6; }

@media (max-width: 480px) {
	.nkf-group-chip { font-size: 12.5px; padding: 7px 12px; }
	.nkf-faq-q h3 { font-size: 14.5px; }
}

/* ===========================================================================
 * FULL-BLEED MODE
 * The tool breaks out of the theme's content container so the tab rail and
 * the card grid can use the whole screen. JS measures the widest box the tool
 * can safely expand into (stopping at any ancestor that would clip it) and
 * writes width + margin-left inline, so this works whether or not the theme
 * container is full width.
 * ======================================================================== */

.nkf-app.nkf-full {
	--nkf-pad-x: clamp(14px, 3.2vw, 48px);
	--nkf-radius: 0px;

	max-width: none;
	border-left: none;
	border-right: none;
	border-radius: 0;
	margin-top: 1.2em;
	margin-bottom: 1.2em;
	box-shadow: 0 1px 0 0 var(--nkf-line) inset, 0 -1px 0 0 var(--nkf-line) inset;
}
.nkf-app.nkf-full::before { border-top-right-radius: 0; }

/* Desktop runs at a percentage of the available width, so it is a floating
 * panel again rather than an edge-to-edge band: give it back its corners,
 * side borders and lift. */
.nkf-app.nkf-full.nkf-inset {
	--nkf-radius: 20px;
	border-left: 1px solid var(--nkf-line);
	border-right: 1px solid var(--nkf-line);
	border-radius: var(--nkf-radius);
	box-shadow: 0 18px 50px -22px rgba(10, 6, 30, 0.55);
}
.nkf-app.nkf-full.nkf-inset::before { border-top-right-radius: var(--nkf-radius); }

/* Wider screens earn more columns rather than wider cards. */
@media (min-width: 1100px) {
	.nkf-app.nkf-full .nkf-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}
@media (min-width: 1700px) {
	.nkf-app.nkf-full .nkf-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* ===========================================================================
 * STICKY CONSOLE
 * Wraps the input, the tab rail, the group / subcategory rails, the toolbar
 * and the status line. It stays pinned for as long as the results grid is on
 * screen, so a visitor can switch category from anywhere on the page.
 * ======================================================================== */

.nkf-sticky {
	position: sticky;
	top: var(--nkf-top, 0px);
	z-index: 30;
	margin: calc(var(--nkf-pad-y) * -1) calc(var(--nkf-pad-x) * -1) 0;
	padding: var(--nkf-pad-y) var(--nkf-pad-x) 10px;
	background: var(--nkf-ink);
	border-radius: var(--nkf-radius) var(--nkf-radius) 0 0;
	transition: box-shadow 0.28s ease, padding 0.2s ease, border-radius 0.28s ease;
}

/* Fallback for themes whose containers clip sticky (overflow != visible).
 * JS switches to this mode and writes left/width inline. */
.nkf-sticky.nkf-fixed {
	position: fixed;
	top: var(--nkf-top, 0px);
	margin: 0;
	z-index: 999;
	border-radius: 0 0 22px 22px;
}

/* --- the premium bit: layered depth once it lifts off the page ----------- */
.nkf-sticky.nkf-stuck {
	border-radius: 0 0 22px 22px;
	background: color-mix(in srgb, var(--nkf-ink) 88%, transparent);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	backdrop-filter: saturate(160%) blur(14px);
	box-shadow:
		0 1px 0 0 color-mix(in srgb, var(--nkf-text) 8%, transparent) inset,
		0 10px 24px -12px rgba(8, 5, 24, 0.55),
		0 28px 60px -28px rgba(8, 5, 24, 0.7);
	padding-top: 12px;
	padding-bottom: 8px;
}

/* Browsers without color-mix still get a solid, correct background. */
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
	.nkf-sticky.nkf-stuck { background: var(--nkf-ink); }
}

/* hairline that fades out at both ends — reads as depth, not as a border */
.nkf-sticky.nkf-stuck::after {
	content: "";
	position: absolute;
	left: var(--nkf-pad-x);
	right: var(--nkf-pad-x);
	bottom: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--nkf-line) 12%, var(--nkf-line) 88%, transparent);
	pointer-events: none;
}

/* Compact the console slightly once pinned so it costs less screen. */
.nkf-sticky.nkf-stuck .nkf-input { padding-top: 11px; padding-bottom: 11px; font-size: 17px; }
.nkf-sticky.nkf-stuck .nkf-meta { margin-top: 7px; }
.nkf-sticky.nkf-stuck ~ .nkf-grid { scroll-margin-top: 40px; }

/* The status line closes the sticky block, so it needs no bottom gap. */
.nkf-sticky .nkf-meta { margin-bottom: 2px; }
.nkf-grid { margin-top: 10px; }

/* Favourites drawer: the shell no longer clips, so round its own corners. */
.nkf-drawer { border-radius: 0 0 var(--nkf-radius) var(--nkf-radius); }

@media (prefers-reduced-motion: reduce) {
	.nkf-sticky { transition: none; }
}

/* Holds the layout open while the console is in fixed-fallback mode. */
.nkf-sticky-spacer { height: 0; }

/* ---- Dense console: small screens ---------------------------------------- */

@media (max-width: 640px) {
	.nkf-app { --nkf-pad-x: 14px; --nkf-pad-y: 16px; }
	.nkf-sticky.nkf-stuck { padding-top: 9px; padding-bottom: 6px; }
	.nkf-sticky.nkf-stuck .nkf-input { padding-top: 10px; padding-bottom: 10px; font-size: 16px; }

	.nkf-cat { font-size: 12px; padding: 5.5px 11px; }
	.nkf-sub { font-size: 11px; padding: 4px 9px; }
	.nkf-meta { gap: 8px; margin-top: 7px; }

	/* On a phone the caption is the least useful thing in the console, and it
	 * was squeezing the controls next to it. Hide it and hand the whole row
	 * to Safe styles / Shuffle / Favourites — three equal buttons, full
	 * labels, comfortable tap targets. */
	.nkf-status { display: none; }

	.nkf-toolbar {
		margin-left: 0;
		width: 100%;
		flex: 1 1 auto;
		gap: 6px;
	}
	.nkf-tool {
		flex: 1 1 0;
		min-width: 0;
		justify-content: center;
		padding: 8px 8px;
		font-size: 12px;
		border-radius: 10px;
	}
	.nkf-tool span {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
}

@media (max-width: 380px) {
	/* Only on the narrowest phones do the labels have to go. */
	.nkf-tool span { display: none; }
	.nkf-tool { padding: 8px 6px; }
}

/* Favourites no longer needs to push itself right — the meta row does that. */
.nkf-meta .nkf-tool-fav { margin-left: 0; }

/* ---- Ad slot -------------------------------------------------------------
 * Spans the full grid width so an ad never sits in a card-shaped hole and
 * gets mistaken for a result — which is both bad UX and an ad-policy risk.  */

.nkf-ad {
	grid-column: 1 / -1;
	margin: 6px 0;
	padding: 4px 0;
	min-height: 90px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.nkf-ad:empty { display: none; }

/* ---- "New" marker --------------------------------------------------------
 * Sits in the top-right corner of a card. Deliberately small and low
 * contrast: it is a hint about what changed, not a call to action, and it
 * must never compete with the name itself for attention.                    */

.nkf-card,
.nkf-list-card {
	position: relative;
}

.nkf-new {
	position: absolute;
	top: 5px;
	right: 5px;
	z-index: 2;
	display: inline-block;
	padding: 1.5px 6px;
	border-radius: 999px;
	background: var(--nkf-grad);
	color: #fff;
	font-size: 8.5px;
	font-weight: 800;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	line-height: 1.5;
	pointer-events: none;
	box-shadow: 0 2px 6px -1px rgba(10, 6, 30, 0.45);
	opacity: 0.92;
}

/* Keep the badge clear of the text on a narrow card. */
.nkf-is-new .nkf-card-text,
.nkf-is-new .nkf-list-name { padding-right: 34px; }

@media (max-width: 480px) {
	.nkf-new { font-size: 8px; padding: 1px 5px; top: 4px; right: 4px; }
	.nkf-is-new .nkf-card-text,
	.nkf-is-new .nkf-list-name { padding-right: 30px; }
}
