/**
 * JunAI blog shell only. Keep specificity low outside .entry-content
 * so REST/Warehouse HTML + inline <style> inside posts win.
 */

:root {
	--junai-navy: #0a1628;
	--junai-navy-2: #0f2137;
	--junai-navy-3: #142a44;
	--junai-teal: #00d4a8;
	--junai-teal-2: #00b594;
	--junai-text: #e8eef5;
	--junai-muted: #9aa8bc;
	--junai-line: rgba(255, 255, 255, 0.08);
	--junai-glow: rgba(0, 212, 168, 0.18);
	--junai-header-height: 9rem;
	--junai-header-gap: 1.25rem;
	--junai-frame-gap: 0.8rem; /* menu ↔ content frame (all pages) */
	--junai-toc-width: 220px;
	--junai-toc-gap: 0.75rem;
	--junai-shell-max: 1024px; /* header + main shell outer width — keep in sync (was 1024px) */
	--junai-shell-gutter: 1rem; /* outer inset — header + #container share this */
	--junai-shell-w: min(var(--junai-shell-max), calc(100vw - 2 * var(--junai-shell-gutter)));
	--junai-content-max: var(--junai-shell-max);
	--junai-side-pad: clamp(1rem, 3vw, 2rem); /* inset inside #header only */
	--junai-col-w: var(--junai-shell-w); /* full-bleed cards align with header border */
	--junai-shell-radius: 14px;
	--junai-shell-offset-top: calc(
		var(--junai-header-height) + var(--junai-header-gap) + var(--junai-frame-gap)
	);
}

html {
	font-family: Pretendard, system-ui, -apple-system, "Segoe UI", sans-serif;
}

body {
	background:
		radial-gradient(1200px 600px at 80% -10%, rgba(0, 212, 168, 0.08), transparent 60%),
		radial-gradient(900px 500px at -10% 10%, rgba(56, 132, 255, 0.06), transparent 60%),
		var(--junai-navy);
	color: var(--junai-text);
	line-height: 1.6;
}

#wrapper.hfeed {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

/* ===================== Header (nav shell — scrolls with page, separate from #container) ===================== */

#header {
	position: relative;
	z-index: 200;
	width: 100%;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem 2rem;
	padding: 0.7rem clamp(1rem, 4vw, 2.25rem);
	background: #0a1628; /* solid navy — keep header consistent across light/dark pages */
	border: 1px solid var(--junai-line);
	box-shadow: 0 1px 0 var(--junai-glow), 0 8px 24px rgba(0, 0, 0, 0.25);
}

#branding {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-shrink: 0;
}

#site-title {
	margin: 0;
	font-size: 0;
}

#site-title h1 {
	margin: 0;
	font-size: 0;
	line-height: 1;
}

#site-title a {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	font-size: clamp(1.1rem, 2vw, 1.35rem);
	font-weight: 800;
	letter-spacing: -0.025em;
	color: var(--junai-text);
	text-decoration: none;
	line-height: 1;
	white-space: nowrap;
	flex-shrink: 0;
}

#site-title a::before {
	content: "J";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	flex-shrink: 0;
	border-radius: 8px;
	background:
		linear-gradient(135deg, var(--junai-teal) 0%, var(--junai-teal-2) 60%, #0a8c75 100%);
	box-shadow:
		0 6px 16px rgba(0, 212, 168, 0.35),
		inset 0 1px 0 rgba(255, 255, 255, 0.25);
	color: var(--junai-navy);
	font-weight: 900;
	font-size: 0.95rem;
	line-height: 1;
	letter-spacing: -0.05em;
}

#site-title a:hover {
	color: var(--junai-teal);
}

#site-description {
	display: inline-flex;
	align-items: center;
	padding: 0.3rem 0.7rem;
	border: 1px solid rgba(0, 212, 168, 0.28);
	border-radius: 999px;
	background: rgba(0, 212, 168, 0.06);
	color: var(--junai-teal);
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

/* ===================== Primary Nav ===================== */

#menu {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
}

#menu > div:first-child {
	flex: 1;
	display: flex;
	justify-content: flex-end;
	min-width: 0;
}

#menu ul.menu,
#menu ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.15rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

#menu li {
	list-style: none;
	margin: 0;
	padding: 0;
}

#menu li::marker {
	content: "";
}

#menu a {
	text-decoration: none;
	color: inherit;
	display: inline-flex;
}

/* ----- Primary nav buttons (vibrant pill + colored icon tile) ----- */
.junai-nav-item {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.4rem 0.85rem 0.4rem 0.45rem;
	border-radius: 999px;
	color: var(--junai-text);
	font-size: 0.9rem;
	font-weight: 600;
	white-space: nowrap;
	background: rgba(255, 255, 255, 0.035);
	border: 1px solid rgba(255, 255, 255, 0.06);
	transition:
		color 0.18s ease,
		background-color 0.18s ease,
		border-color 0.18s ease,
		box-shadow 0.18s ease,
		transform 0.18s ease;
}

.junai-nav-item__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	flex-shrink: 0;
	border-radius: 8px;
	background: linear-gradient(135deg, rgba(0, 212, 168, 0.22), rgba(0, 212, 168, 0.08));
	color: var(--junai-teal);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
	transition:
		background 0.2s ease,
		color 0.2s ease,
		box-shadow 0.2s ease,
		transform 0.2s ease;
}

.junai-nav-item__icon svg {
	width: 16px;
	height: 16px;
	display: block;
	fill: currentColor;
}

.junai-nav-item__text {
	line-height: 1;
	letter-spacing: -0.005em;
}

#menu a:hover .junai-nav-item {
	color: #ffffff;
	background: rgba(0, 212, 168, 0.10);
	border-color: rgba(0, 212, 168, 0.45);
	box-shadow: 0 8px 22px -10px rgba(0, 212, 168, 0.6);
	transform: translateY(-1px);
}

#menu a:hover .junai-nav-item__icon {
	background: linear-gradient(135deg, var(--junai-teal), var(--junai-teal-2));
	color: var(--junai-navy);
	box-shadow: 0 6px 14px -4px rgba(0, 212, 168, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
	transform: scale(1.04);
}

#menu .current-menu-item > a .junai-nav-item,
#menu .current_page_item > a .junai-nav-item,
#menu .current-menu-ancestor > a .junai-nav-item {
	color: #ffffff;
	background: rgba(0, 212, 168, 0.16);
	border-color: rgba(0, 212, 168, 0.55);
	box-shadow: inset 0 0 0 1px rgba(0, 212, 168, 0.20), 0 6px 18px -10px rgba(0, 212, 168, 0.55);
}

#menu .current-menu-item > a .junai-nav-item__icon,
#menu .current_page_item > a .junai-nav-item__icon,
#menu .current-menu-ancestor > a .junai-nav-item__icon {
	background: linear-gradient(135deg, var(--junai-teal), var(--junai-teal-2));
	color: var(--junai-navy);
	box-shadow: 0 6px 14px -4px rgba(0, 212, 168, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

@media (prefers-reduced-motion: reduce) {
	.junai-nav-item,
	.junai-nav-item__icon {
		transition: none;
	}
	#menu a:hover .junai-nav-item {
		transform: none;
	}
	#menu a:hover .junai-nav-item__icon {
		transform: none;
	}
}

/* ===================== Search ===================== */

#search {
	flex-shrink: 0;
}

#search .search-form {
	display: inline-flex;
	align-items: center;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 999px;
	padding: 0.18rem 0.18rem 0.18rem 0.55rem;
	transition:
		border-color 0.18s ease,
		box-shadow 0.18s ease,
		background-color 0.18s ease;
}

#search .search-form:focus-within {
	border-color: var(--junai-teal);
	background: rgba(0, 212, 168, 0.06);
	box-shadow: 0 0 0 3px rgba(0, 212, 168, 0.18);
}

#search label {
	display: inline-flex;
	align-items: center;
	flex: 1;
	margin: 0;
}

#search .search-field {
	background: transparent;
	border: 0;
	color: var(--junai-text);
	padding: 0.45rem 0.6rem;
	font-size: 0.875rem;
	width: 11rem;
	outline: 0;
	font-family: inherit;
}

#search .search-field::placeholder {
	color: var(--junai-muted);
	opacity: 0.85;
}

#search .search-submit {
	background: linear-gradient(135deg, var(--junai-teal), var(--junai-teal-2));
	color: var(--junai-navy);
	border: 0;
	padding: 0.45rem 1rem;
	font-weight: 700;
	font-size: 0.825rem;
	cursor: pointer;
	border-radius: 999px;
	transition:
		filter 0.15s ease,
		transform 0.15s ease;
	font-family: inherit;
	box-shadow: 0 2px 8px rgba(0, 212, 168, 0.3);
}

#search .search-submit:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

#search .search-submit:active {
	transform: translateY(0);
}

/* ===================== Container / Main ===================== */

#container {
	flex: 1;
	padding: 0 var(--junai-side-pad) clamp(1rem, 3vw, 2rem);
	max-width: var(--junai-shell-max);
	margin: 0 auto;
	width: 100%;
	box-sizing: border-box;
	position: relative;
	z-index: 1;
}

main#content {
	background: rgba(255, 255, 255, 0.02);
	border-radius: 12px;
	padding: clamp(1rem, 3vw, 2rem);
	border: 1px solid var(--junai-line);
}

/* ===================== Home / front-page ===================== */

body.junai-page-home main#content {
	background: transparent;
	border: 0;
	padding: 0;
}

/* Hero / post cards share the same outer box as #header (no extra horizontal inset). */
body.junai-page-home #container,
body.junai-page-archive #container,
body.junai-page-branded #container,
body.junai-page-raw #container,
body.junai-page-raw-post #container {
	padding-left: 0;
	padding-right: 0;
}

.junai-hero {
	text-align: center;
	padding: clamp(2.25rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem);
	background:
		radial-gradient(900px 350px at 50% 0%, rgba(0, 212, 168, 0.18), transparent 70%),
		radial-gradient(700px 400px at 90% 60%, rgba(56, 132, 255, 0.08), transparent 70%);
	border: 1px solid var(--junai-line);
	border-radius: 18px;
	margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
	position: relative;
	overflow: hidden;
}

.junai-hero__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 14px;
	background: linear-gradient(135deg, var(--junai-teal), var(--junai-teal-2), #0a8c75);
	color: var(--junai-navy);
	font-weight: 900;
	font-size: 1.75rem;
	letter-spacing: -0.05em;
	box-shadow:
		0 12px 32px rgba(0, 212, 168, 0.4),
		inset 0 1px 0 rgba(255, 255, 255, 0.3);
	margin-bottom: 1.25rem;
}

.junai-hero__title {
	font-size: clamp(1.85rem, 4vw, 2.6rem);
	font-weight: 800;
	margin: 0 0 0.45rem;
	letter-spacing: -0.03em;
	color: var(--junai-text);
	line-height: 1.15;
}

.junai-hero__subtitle {
	font-size: clamp(0.95rem, 1.5vw, 1.05rem);
	color: var(--junai-teal);
	font-weight: 600;
	margin: 0 0 0.85rem;
	letter-spacing: 0.01em;
}

.junai-hero__lead {
	font-size: 1rem;
	color: var(--junai-muted);
	margin: 0 auto 1.5rem;
	max-width: 36rem;
	line-height: 1.65;
}

.junai-hero__cta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.65rem;
}

.junai-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.65rem 1.3rem;
	border-radius: 10px;
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
	transition:
		transform 0.15s ease,
		filter 0.15s ease,
		background-color 0.15s ease,
		color 0.15s ease;
	white-space: nowrap;
}

.junai-btn--primary {
	background: linear-gradient(135deg, var(--junai-teal), var(--junai-teal-2));
	color: var(--junai-navy);
	box-shadow: 0 4px 14px rgba(0, 212, 168, 0.3);
}

.junai-btn--primary:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

.junai-btn--ghost {
	background: rgba(255, 255, 255, 0.05);
	color: var(--junai-text);
	border: 1px solid var(--junai-line);
}

.junai-btn--ghost:hover {
	background: rgba(0, 212, 168, 0.08);
	color: var(--junai-teal);
	border-color: rgba(0, 212, 168, 0.3);
}

/* Section heading */

.junai-section-title {
	font-size: clamp(1.2rem, 2vw, 1.45rem);
	font-weight: 700;
	margin: 0 0 1rem;
	color: var(--junai-text);
	letter-spacing: -0.02em;
}

.junai-section-title::before {
	content: "";
	display: inline-block;
	width: 3px;
	height: 1em;
	vertical-align: -0.18em;
	background: var(--junai-teal);
	border-radius: 2px;
	margin-right: 0.55rem;
}

/* Card grid */

.junai-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
	gap: 1rem;
}

.junai-card {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--junai-line);
	border-radius: 14px;
	overflow: hidden;
	transition:
		transform 0.18s ease,
		border-color 0.18s ease,
		background-color 0.18s ease;
}

.junai-card:hover {
	transform: translateY(-3px);
	border-color: rgba(0, 212, 168, 0.4);
	background: rgba(255, 255, 255, 0.05);
}

.junai-card__link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.junai-card__media {
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, var(--junai-navy-2), var(--junai-navy-3));
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

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

.junai-card__media--placeholder span {
	font-size: 4rem;
	font-weight: 900;
	background: linear-gradient(135deg, var(--junai-teal), var(--junai-teal-2));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	letter-spacing: -0.05em;
	opacity: 0.55;
}

.junai-card__body {
	padding: 1rem 1.1rem 1.15rem;
}

.junai-card__cat {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	background: rgba(0, 212, 168, 0.1);
	color: var(--junai-teal);
	font-size: 0.72rem;
	font-weight: 600;
	margin-bottom: 0.55rem;
	letter-spacing: 0.01em;
}

.junai-card__title {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4;
	margin: 0 0 0.5rem;
	color: var(--junai-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.junai-card__excerpt {
	font-size: 0.85rem;
	color: var(--junai-muted);
	line-height: 1.55;
	margin: 0 0 0.75rem;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.junai-card__date {
	font-size: 0.75rem;
	color: var(--junai-muted);
	opacity: 0.7;
}

.junai-empty {
	text-align: center;
	color: var(--junai-muted);
	padding: 2rem;
	grid-column: 1 / -1;
}

/* ===================== Branded pages (owned: about / contact / policy) =====================
   Light card on light page background. Dark sticky header above, dark footer below. */

/* Outer surround stays dark; white card on top for policy/about readability. */
body.junai-page-branded {
	background: transparent;
	color: var(--junai-text);
}

body.junai-page-branded #container {
	max-width: var(--junai-shell-max);
}

body.junai-page-branded main#content {
	background: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 14px;
	padding: clamp(1.75rem, 4vw, 2.75rem);
	box-shadow:
		0 14px 44px -16px rgba(0, 0, 0, 0.55),
		0 2px 8px rgba(0, 0, 0, 0.3);
	color: #1a1a1a;
}

body.junai-page-branded .entry-title {
	font-size: clamp(1.6rem, 3vw, 2.15rem);
	font-weight: 800;
	letter-spacing: -0.025em;
	margin: 0 0 0.85rem;
	line-height: 1.2;
	color: #0f1c2e;
}

body.junai-page-branded .entry-title::before {
	content: "";
	display: block;
	width: 32px;
	height: 4px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--junai-teal), var(--junai-teal-2));
	margin-bottom: 0.85rem;
}

body.junai-page-branded .entry-meta {
	display: none;
}

body.junai-page-branded .entry-content {
	font-size: 1rem;
	line-height: 1.8;
	color: #1a1a1a;
}

body.junai-page-branded .entry-content h2 {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 2.25rem 0 0.85rem;
	color: #0f1c2e;
	letter-spacing: -0.01em;
	scroll-margin-top: 88px;
	display: flex;
	align-items: center;
	gap: 0.55rem;
}

body.junai-page-branded .entry-content h2:first-child {
	margin-top: 0;
}

body.junai-page-branded .entry-content h2::before {
	content: "";
	flex-shrink: 0;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--junai-teal);
	box-shadow: 0 0 0 3px rgba(0, 212, 168, 0.16);
}

body.junai-page-branded .entry-content h3 {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 1.6rem 0 0.55rem;
	color: #1a1a1a;
}

body.junai-page-branded .entry-content p {
	margin: 0 0 1em;
}

body.junai-page-branded .entry-content ul,
body.junai-page-branded .entry-content ol {
	margin: 0 0 1.2em 1.5em;
	padding: 0;
}

body.junai-page-branded .entry-content li {
	margin: 0.35em 0;
}

body.junai-page-branded .entry-content a {
	color: var(--junai-teal-2);
	text-decoration: underline;
	text-decoration-color: rgba(0, 212, 168, 0.4);
	text-underline-offset: 2px;
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

body.junai-page-branded .entry-content a:hover {
	color: #008874;
	text-decoration-color: var(--junai-teal-2);
}

body.junai-page-branded .entry-content strong {
	color: #0f1c2e;
	font-weight: 700;
}

body.junai-page-branded .entry-content code {
	background: rgba(10, 22, 40, 0.06);
	border-radius: 4px;
	padding: 0.12em 0.4em;
	font-size: 0.9em;
	color: #0f1c2e;
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

body.junai-page-branded .entry-content blockquote {
	margin: 1.25em 0;
	padding: 0.75em 1em;
	border-left: 3px solid var(--junai-teal);
	background: rgba(0, 212, 168, 0.05);
	color: #4b5563;
	border-radius: 0 8px 8px 0;
}

body.junai-page-branded .entry-content hr {
	border: 0;
	border-top: 1px solid rgba(10, 22, 40, 0.1);
	margin: 2rem 0;
}

/* ----- Policy meta badge (.junai-policy-meta) ----- */

body.junai-page-branded .junai-policy-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.85rem;
	align-items: center;
	font-size: 0.825rem;
	color: #4b5563;
	background: rgba(0, 212, 168, 0.06);
	border: 1px solid rgba(0, 212, 168, 0.18);
	border-left: 3px solid var(--junai-teal);
	border-radius: 8px;
	padding: 0.7rem 1rem;
	margin: 0 0 1.5rem;
}

body.junai-page-branded .junai-policy-meta::before {
	content: "📌";
	font-size: 0.95rem;
}

body.junai-page-branded .junai-policy-meta strong {
	color: var(--junai-teal-2);
	font-weight: 700;
	margin-right: 0.15rem;
}

/* ----- Inline TOC card (.junai-policy-toc) ----- */

body.junai-page-branded .junai-policy-toc {
	background: linear-gradient(180deg, #f8fafc, #f1f5f9);
	border: 1px solid rgba(10, 22, 40, 0.08);
	border-radius: 12px;
	padding: 1rem 1.25rem 1.1rem;
	margin: 0 0 2rem;
}

body.junai-page-branded .junai-policy-toc strong {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.92rem;
	font-weight: 700;
	color: #0f1c2e;
	margin-bottom: 0.6rem;
	padding-bottom: 0.55rem;
	border-bottom: 1px solid rgba(10, 22, 40, 0.08);
	letter-spacing: -0.01em;
}

body.junai-page-branded .junai-policy-toc strong::before {
	content: "";
	display: inline-block;
	width: 3px;
	height: 14px;
	background: var(--junai-teal);
	border-radius: 2px;
}

body.junai-page-branded .junai-policy-toc ol {
	margin: 0;
	padding: 0 0 0 1.5em;
	list-style: decimal;
	color: #4b5563;
}

body.junai-page-branded .junai-policy-toc li {
	margin: 0.25em 0;
	font-size: 0.875rem;
}

body.junai-page-branded .junai-policy-toc a {
	color: #4b5563;
	text-decoration: none;
	transition: color 0.15s ease;
}

body.junai-page-branded .junai-policy-toc a:hover {
	color: var(--junai-teal-2);
}

/* ----- About page (junai-about-head / junai-about-avatar) ----- */

body.junai-page-branded .junai-about-head {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	align-items: flex-start;
	margin: 0 0 2rem;
	padding: 1.25rem;
	background: linear-gradient(135deg, rgba(0, 212, 168, 0.05), rgba(56, 132, 255, 0.03));
	border: 1px solid rgba(10, 22, 40, 0.08);
	border-radius: 14px;
}

body.junai-page-branded .junai-about-head h2 {
	margin-top: 0 !important;
}

body.junai-page-branded .junai-about-avatar {
	flex-shrink: 0;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	background: linear-gradient(145deg, var(--junai-navy), var(--junai-teal));
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.5rem;
	font-weight: 800;
	color: #fff;
	box-shadow: 0 8px 24px rgba(0, 212, 168, 0.25);
}

/* ===================== Archives (category, search, tag, date, author) ===================== */

body.junai-page-archive main#content {
	background: transparent;
	border: 0;
	padding: 0;
}

body.junai-page-archive #container {
	max-width: var(--junai-shell-max);
}

.junai-archive-header {
	text-align: center;
	padding: clamp(1.75rem, 4.5vw, 2.75rem) clamp(1rem, 4vw, 2rem);
	background:
		radial-gradient(700px 280px at 50% 0%, rgba(0, 212, 168, 0.13), transparent 70%);
	border: 1px solid var(--junai-line);
	border-radius: 18px;
	margin: 0 0 clamp(1.25rem, 3vw, 2rem);
}

.junai-archive-eyebrow {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--junai-teal);
	text-transform: uppercase;
	margin-bottom: 0.65rem;
	padding: 0.18rem 0.65rem;
	border-radius: 999px;
	background: rgba(0, 212, 168, 0.1);
}

.junai-archive-header h1.entry-title {
	font-size: clamp(1.6rem, 3.5vw, 2.25rem);
	font-weight: 800;
	margin: 0 0 0.6rem;
	letter-spacing: -0.025em;
	color: var(--junai-text);
	line-height: 1.2;
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
}

/* Removed teal dot before archive title — eyebrow badge already labels it as 카테고리. */
.junai-archive-header h1.entry-title::before {
	content: none;
}

.junai-archive-header .archive-meta {
	color: var(--junai-muted);
	font-size: 0.95rem;
	line-height: 1.65;
	max-width: 36rem;
	margin: 0 auto;
}

/* ----- Textbook series (category index + single prev/next) ----- */

.junai-series-index {
	margin: 0 0 clamp(1.25rem, 3vw, 1.75rem);
	padding: clamp(1rem, 3vw, 1.35rem);
	border: 1px solid var(--junai-line);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.03);
}

.junai-series-index__head {
	text-align: center;
	margin-bottom: 0.85rem;
}

.junai-series-index__label {
	margin: 0 0 0.35rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--junai-teal);
}

.junai-series-index__meta {
	margin: 0 0 0.85rem;
	font-size: 0.9rem;
	color: var(--junai-muted);
}

.junai-series-index__cta {
	display: inline-flex;
}

.junai-series-index__toc {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	padding-top: 0.75rem;
}

.junai-series-index__toc-summary {
	cursor: pointer;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--junai-text);
	list-style: none;
	user-select: none;
}

.junai-series-index__toc-summary::-webkit-details-marker {
	display: none;
}

.junai-series-index__list {
	list-style: none;
	margin: 0.65rem 0 0;
	padding: 0;
	max-height: min(50vh, 420px);
	overflow-y: auto;
	display: grid;
	gap: 0.35rem;
}

.junai-series-index__item {
	display: grid;
	grid-template-columns: 3.25rem minmax(0, 1fr);
	gap: 0.55rem;
	align-items: start;
	margin: 0;
}

.junai-series-index__part {
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--junai-teal);
	padding-top: 0.15rem;
}

.junai-series-index__item a {
	color: var(--junai-muted);
	text-decoration: none;
	font-size: 0.86rem;
	line-height: 1.45;
	transition: color 0.15s ease;
}

.junai-series-index__item a:hover {
	color: var(--junai-teal);
}

.junai-series-part-badge {
	display: inline-block;
	margin-right: 0.45rem;
	padding: 0.1rem 0.45rem;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--junai-navy);
	background: linear-gradient(135deg, var(--junai-teal), var(--junai-teal-2));
	vertical-align: middle;
}

.junai-series-nav {
	margin: clamp(1.5rem, 3vw, 2rem) 0 0;
	padding: clamp(1rem, 3vw, 1.25rem);
	border: 1px solid rgba(10, 22, 40, 0.1);
	border-radius: 12px;
	background: #f8fafc;
}

.junai-series-nav__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin-bottom: 0.85rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid rgba(10, 22, 40, 0.08);
}

.junai-series-nav__series-link {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--junai-teal-2);
	text-decoration: none;
}

.junai-series-nav__series-link:hover {
	text-decoration: underline;
}

.junai-series-nav__position {
	font-size: 0.8rem;
	font-weight: 600;
	color: #6b7280;
}

.junai-series-nav__links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.65rem;
}

.junai-series-nav__link {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 0.65rem 0.75rem;
	border-radius: 10px;
	border: 1px solid rgba(10, 22, 40, 0.08);
	background: #fff;
	text-decoration: none;
	transition:
		border-color 0.15s ease,
		background-color 0.15s ease;
}

.junai-series-nav__link--next {
	text-align: right;
}

.junai-series-nav__link:hover {
	border-color: rgba(0, 212, 168, 0.35);
	background: rgba(0, 212, 168, 0.05);
}

.junai-series-nav__link--empty {
	visibility: hidden;
	pointer-events: none;
	border: 0;
	background: transparent;
	min-height: 3.5rem;
}

.junai-series-nav__dir {
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--junai-teal-2);
}

.junai-series-nav__title {
	font-size: 0.82rem;
	font-weight: 600;
	color: #0f1c2e;
	line-height: 1.4;
}

@media (max-width: 640px) {
	.junai-series-nav__links {
		grid-template-columns: 1fr;
	}

	.junai-series-nav__link--next {
		text-align: left;
	}
}

.junai-archive-list {
	display: grid;
	gap: 0.85rem;
}

body.junai-page-archive article {
	margin: 0;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--junai-line);
	border-radius: 14px;
	padding: 1.1rem 1.4rem 1.25rem;
	transition:
		border-color 0.15s ease,
		background-color 0.15s ease,
		transform 0.15s ease;
}

body.junai-page-archive article:hover {
	border-color: rgba(0, 212, 168, 0.35);
	background: rgba(255, 255, 255, 0.05);
	transform: translateY(-1px);
}

body.junai-page-archive article > header {
	margin: 0 0 0.4rem;
}

body.junai-page-archive article .entry-title {
	margin: 0 0 0.4rem;
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.45;
}

body.junai-page-archive article .entry-title a {
	color: var(--junai-text);
	text-decoration: none;
}

body.junai-page-archive article .entry-title a:hover {
	color: var(--junai-teal);
}

body.junai-page-archive article .entry-meta {
	font-size: 0.78rem;
	color: var(--junai-muted);
	opacity: 0.8;
}

body.junai-page-archive article .entry-meta a {
	color: var(--junai-muted);
}

body.junai-page-archive article .entry-summary {
	margin-top: 0.5rem;
	font-size: 0.9rem;
	color: var(--junai-muted);
	line-height: 1.65;
}

body.junai-page-archive article .entry-summary p {
	margin: 0;
}

body.junai-page-archive article .entry-summary > a {
	display: block;
	margin: 0.65rem 0 0.5rem;
	border-radius: 10px;
	overflow: hidden;
	max-height: 220px;
}

body.junai-page-archive article .entry-summary img {
	width: 100%;
	height: auto;
	display: block;
	max-height: 220px;
	object-fit: cover;
}

/* Pagination (nav-below / posts-navigation) */

.nav-below,
.nav-below-single,
.posts-navigation {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: clamp(1rem, 2.5vw, 1.75rem) 0 0;
}

.nav-below .nav-previous,
.nav-below .nav-next,
.posts-navigation .nav-previous,
.posts-navigation .nav-next {
	flex: 1 1 auto;
	min-width: 0;
}

.nav-below .nav-next,
.posts-navigation .nav-next {
	text-align: right;
}

.nav-below a,
.nav-below-single a,
.posts-navigation a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.6rem 1rem;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--junai-line);
	color: var(--junai-muted);
	font-size: 0.875rem;
	text-decoration: none;
	transition:
		border-color 0.15s ease,
		color 0.15s ease,
		background-color 0.15s ease;
}

.nav-below a:hover,
.nav-below-single a:hover,
.posts-navigation a:hover {
	border-color: rgba(0, 212, 168, 0.4);
	color: var(--junai-teal);
	background: rgba(0, 212, 168, 0.08);
}

.posts-navigation .screen-reader-text {
	display: none;
}

/* Empty state */

.junai-empty-state {
	text-align: center;
	padding: clamp(2rem, 5vw, 3rem) 1.5rem;
	background: rgba(255, 255, 255, 0.02);
	border: 1px dashed var(--junai-line);
	border-radius: 14px;
	margin: 0 0 1.5rem;
}

.junai-empty-icon {
	font-size: 2.5rem;
	display: inline-block;
	margin-bottom: 0.85rem;
	filter: grayscale(0.2) opacity(0.9);
}

.junai-empty-state h2 {
	font-size: 1.15rem;
	font-weight: 700;
	margin: 0 0 0.5rem;
	color: var(--junai-text);
	letter-spacing: -0.01em;
}

.junai-empty-state p {
	color: var(--junai-muted);
	margin: 0 0 1.25rem;
	font-size: 0.9rem;
	line-height: 1.65;
	max-width: 28rem;
	margin-left: auto;
	margin-right: auto;
}

/* Sidebar — we don't use BlankSlate's primary widget area in this design.
   Hide globally; the header search + footer policy nav cover everything we need. */

#sidebar,
#primary.widget-area,
ul.xoxo {
	display: none !important;
}

/* ===================== Raw pass-through (Warehouse posts + policy pages) =====================
   Light card on light bg. Reset every dark-theme override we added under .entry-content
   so inline <style> + style="" inside the warehouse HTML wins cleanly. */

/* Outer surround stays dark (inherits body's navy + radial glow); white card on top. */
body.junai-page-raw {
	background: transparent;
	color: var(--junai-text);
}

body.junai-page-raw #container {
	max-width: var(--junai-shell-max);
}

body.junai-page-raw main#content {
	background: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 14px;
	padding: clamp(1.25rem, 3vw, 2rem);
	color: #1a1a1a;
	box-shadow:
		0 14px 44px -16px rgba(0, 0, 0, 0.55),
		0 2px 8px rgba(0, 0, 0, 0.3);
}

body.junai-page-raw .entry-title,
body.junai-page-raw .entry-title a {
	color: #0f1c2e;
}

body.junai-page-raw .entry-title a:hover {
	color: var(--junai-teal-2);
}

body.junai-page-raw .entry-meta,
body.junai-page-raw .entry-meta a,
body.junai-page-raw .entry-footer,
body.junai-page-raw .entry-footer a,
body.junai-page-raw .nav-below,
body.junai-page-raw .nav-below a,
body.junai-page-raw .nav-below-single,
body.junai-page-raw .nav-below-single a {
	color: #6b7280;
}

body.junai-page-raw .nav-below a:hover,
body.junai-page-raw .nav-below-single a:hover {
	color: var(--junai-teal-2);
}

/* Roll back our :where() entry-content theming so warehouse markup is untouched. */
/* font-family: revert — do NOT inherit Pretendard into warehouse content; the post brings its own. */
body.junai-page-raw .entry-content {
	color: #1a1a1a;
	font-family: revert;
	font-size: revert;
	line-height: revert;
	overflow-x: auto;
}

/* Revert typography on text blocks only — do NOT revert img/video max-width,
   or large hero images overflow the card (was max-width: revert on img). */
body.junai-page-raw .entry-content :where(p, ul, ol, li, blockquote, table, th, td) {
	margin: revert;
	padding: revert;
	border: revert;
	border-collapse: revert;
	border-left: revert;
	list-style: revert;
	color: revert;
	max-width: revert;
}

/* Responsive media: caps width to the card; inline colors unchanged. */
body.junai-page-raw .entry-content img,
body.junai-page-raw .entry-content video,
body.junai-page-raw .entry-content svg {
	max-width: 100%;
	height: auto;
}

/* Warehouse single: navy shell outside; white reading card on .entry-content only. */
body.junai-page-raw-post #container {
	max-width: var(--junai-shell-max);
	padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

body.junai-page-raw-post main#content {
	padding: 0;
	overflow: visible;
	background: transparent;
	border: 0;
	box-shadow: none;
}

body.junai-page-raw-post .junai-raw-article {
	margin: 0;
	background: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 14px;
	overflow: hidden;
	color: #1a1a1a;
	box-shadow:
		0 14px 44px -16px rgba(0, 0, 0, 0.55),
		0 2px 8px rgba(0, 0, 0, 0.3);
}

/* One white reading card: body + series nav + share + credit (navy only outside) */
body.junai-page-raw-post .entry-content {
	margin: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	overflow: hidden;
	color: #1a1a1a;
	box-shadow: none;
}

/* Inline warehouse styles win; never inherit shell light text into the card */
body.junai-page-raw-post .entry-content :where(p, ul, ol, li, blockquote, table, th, td, h1, h2, h3, h4, h5, h6) {
	color: revert;
}

/* Warehouse single: navy surround like category archives; reading card stays in .entry-content. */
body.junai-page-raw-post.junai-page-raw {
	background:
		radial-gradient(1200px 600px at 80% -10%, rgba(0, 212, 168, 0.08), transparent 60%),
		radial-gradient(900px 500px at -10% 10%, rgba(56, 132, 255, 0.06), transparent 60%),
		var(--junai-navy);
	color: var(--junai-text);
}

body.junai-page-raw-post.junai-page-raw #wrapper,
body.junai-page-raw-post.junai-page-raw #container {
	background: transparent;
}

body.junai-page-raw-post .junai-series-nav {
	margin: 0;
	padding: clamp(1rem, 3vw, 1.25rem);
	border: 0;
	border-top: 1px solid rgba(10, 22, 40, 0.08);
	border-radius: 0;
	background: #ffffff;
	color: #1a1a1a;
}

body.junai-page-raw-post .junai-series-nav__series-link,
body.junai-page-raw-post .junai-series-nav__dir {
	color: var(--junai-teal-2);
}

body.junai-page-raw-post .junai-series-nav__position {
	color: #6b7280;
}

body.junai-page-raw-post .junai-series-nav__title {
	color: #0f1c2e;
}

body.junai-page-raw-post .junai-share {
	margin: 0;
	padding: clamp(1.25rem, 3vw, 1.75rem);
	background: #ffffff;
	border: 0;
	border-top: 1px solid rgba(10, 22, 40, 0.08);
	border-radius: 0;
	color: #1a1a1a;
}

body.junai-page-raw-post .junai-share__title {
	color: #0f1c2e;
}

body.junai-page-raw-post .junai-article-credit {
	margin: 0;
	padding: clamp(1rem, 3vw, 1.25rem);
	border-top: 1px solid rgba(10, 22, 40, 0.08);
	background: #ffffff;
	color: #6b7280;
}

body.junai-page-raw-post .junai-article-credit a {
	color: #0f1c2e;
}

body.junai-page-raw-post .junai-article-credit a:hover {
	color: var(--junai-teal-2);
}

/* Defensive: hide WP comments + sidebar widgets in any raw-mode pass-through. */
body.junai-page-raw .commentlist,
body.junai-page-raw #comments,
body.junai-page-raw #respond,
body.junai-page-raw .comments-area,
body.junai-page-raw .comments-title,
body.junai-page-raw .post-comments {
	display: none !important;
}

.entry-title a {
	color: var(--junai-text);
	text-decoration: none;
}

.entry-title a:hover {
	color: var(--junai-teal);
}

.entry-meta,
.entry-footer,
.nav-below,
.nav-below-single {
	color: var(--junai-muted);
	font-size: 0.875rem;
}

.entry-meta a,
.entry-footer a,
.nav-below a {
	color: var(--junai-teal);
}

/* ===================== Post body (low specificity, no !important)
   so inline styles + <style> inside REST content keep winning.
===================== */

.entry-content {
	color: var(--junai-text);
	font-size: 1rem;
	line-height: 1.75;
}

.entry-content :where(p) {
	margin: 0 0 1em;
}

.entry-content :where(ul, ol) {
	margin: 0 0 1em 1.25em;
	padding-left: 1.25em;
	list-style: revert;
}

.entry-content :where(li) {
	margin: 0.25em 0;
}

.entry-content :where(blockquote) {
	margin: 1em 0;
	padding-left: 1rem;
	border-left: 3px solid var(--junai-teal);
	color: var(--junai-muted);
}

.entry-content :where(img, video) {
	max-width: 100%;
	height: auto;
}

.entry-content :where(table) {
	width: 100%;
	border-collapse: collapse;
	margin: 1em 0;
}

.entry-content :where(th, td) {
	border: 1px solid var(--junai-line);
	padding: 0.5rem 0.65rem;
}

/* ===================== Footer ===================== */

#footer {
	margin-top: auto;
	padding: clamp(2rem, 5vw, 3.25rem) clamp(1rem, 4vw, 2rem) clamp(1.5rem, 4vw, 2.25rem);
	background:
		radial-gradient(800px 300px at 50% 0%, rgba(0, 212, 168, 0.07), transparent 70%),
		linear-gradient(180deg, var(--junai-navy-2) 0%, #0b1a2e 100%);
	border-top: 1px solid rgba(0, 212, 168, 0.18);
	font-size: 0.875rem;
	color: var(--junai-muted);
	text-align: center;
}

#footer a {
	color: var(--junai-muted);
	text-decoration: none;
	transition: color 0.18s ease;
}

#footer a:hover {
	color: var(--junai-teal);
}

.junai-footer-inner {
	max-width: 720px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.85rem;
}

.junai-footer-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	font-weight: 800;
	font-size: 1.05rem;
	letter-spacing: -0.02em;
	color: var(--junai-text);
}

.junai-footer-brand:hover {
	color: var(--junai-teal);
}

.junai-footer-mark {
	width: 22px;
	height: 22px;
	border-radius: 7px;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background:
		linear-gradient(135deg, var(--junai-teal) 0%, var(--junai-teal-2) 60%, #0a8c75 100%);
	box-shadow:
		0 4px 12px rgba(0, 212, 168, 0.3),
		inset 0 1px 0 rgba(255, 255, 255, 0.25);
	color: var(--junai-navy);
	font-weight: 900;
	font-size: 0.78rem;
	letter-spacing: -0.05em;
}

.junai-footer-mark::before {
	content: "J";
	line-height: 1;
}

.junai-footer-tagline {
	margin: 0;
	font-size: 0.85rem;
	color: var(--junai-muted);
	letter-spacing: 0.01em;
}

.junai-footer-nav {
	width: 100%;
}

.junai-footer-nav ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem 0;
	list-style: none;
	margin: 0;
	padding: 0;
}

.junai-footer-nav li {
	position: relative;
	margin: 0;
	padding: 0 1rem;
	list-style: none;
}

.junai-footer-nav li::marker {
	content: "";
}

.junai-footer-nav li + li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 1px;
	height: 12px;
	background: rgba(255, 255, 255, 0.15);
}

.junai-footer-nav a {
	color: var(--junai-muted);
	font-size: 0.85rem;
	font-weight: 500;
	white-space: nowrap;
}

.junai-footer-nav a:hover {
	color: var(--junai-teal);
}

.junai-footer-divider {
	width: 100%;
	max-width: 280px;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(0, 212, 168, 0.35), transparent);
	margin: 0.25rem 0 0.1rem;
}

.junai-footer-copy {
	margin: 0;
	font-size: 0.78rem;
	color: var(--junai-muted);
	letter-spacing: 0.02em;
	opacity: 0.85;
}

.junai-footer-sep {
	margin: 0 0.45rem;
	color: rgba(255, 255, 255, 0.25);
}

.junai-footer-tag {
	color: var(--junai-muted);
	opacity: 0.8;
}

.junai-footer-legal {
	color: var(--junai-text);
	font-weight: 600;
	text-decoration: none;
	transition: color 0.18s ease;
}

.junai-footer-legal:hover {
	color: var(--junai-teal);
}

.junai-article-credit {
	margin: clamp(1.5rem, 3vw, 2rem) 0 0;
	padding-top: 1rem;
	border-top: 1px solid rgba(10, 22, 40, 0.08);
	font-size: 0.8rem;
	color: #6b7280;
	text-align: center;
	line-height: 1.5;
}

.junai-article-credit a {
	color: #0f1c2e;
	font-weight: 600;
	text-decoration: none;
}

.junai-article-credit a:hover {
	color: var(--junai-teal-2);
}

.junai-article-credit__sep {
	margin: 0 0.4rem;
	opacity: 0.5;
}

.junai-article-credit__aliases {
	color: #9ca3af;
	font-size: 0.75rem;
}

.skip-link:focus {
	background: var(--junai-teal);
	color: var(--junai-navy);
}

/* ===================== Mobile hamburger toggle ===================== */

.junai-nav-toggle {
	display: none;
	position: relative;
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	border: 1px solid var(--junai-line);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.04);
	cursor: pointer;
	padding: 0;
	margin-left: auto;
	transition:
		background-color 0.15s ease,
		border-color 0.15s ease;
}

.junai-nav-toggle:hover {
	border-color: rgba(0, 212, 168, 0.35);
	background: rgba(0, 212, 168, 0.08);
}

.junai-nav-toggle:focus-visible {
	outline: 2px solid var(--junai-teal);
	outline-offset: 2px;
}

.junai-nav-toggle__bar {
	position: absolute;
	left: 9px;
	right: 9px;
	height: 2px;
	border-radius: 2px;
	background: var(--junai-text);
	transition: transform 0.22s ease, opacity 0.18s ease, top 0.22s ease;
}

.junai-nav-toggle__bar:nth-child(1) {
	top: 13px;
}

.junai-nav-toggle__bar:nth-child(2) {
	top: 19px;
}

.junai-nav-toggle__bar:nth-child(3) {
	top: 25px;
}

.junai-nav-toggle.is-open .junai-nav-toggle__bar {
	background: var(--junai-teal);
}

.junai-nav-toggle.is-open .junai-nav-toggle__bar:nth-child(1) {
	top: 19px;
	transform: rotate(45deg);
}

.junai-nav-toggle.is-open .junai-nav-toggle__bar:nth-child(2) {
	opacity: 0;
}

.junai-nav-toggle.is-open .junai-nav-toggle__bar:nth-child(3) {
	top: 19px;
	transform: rotate(-45deg);
}

/* Backdrop: JS injects .junai-nav-backdrop; hidden on desktop */
.junai-nav-backdrop {
	display: none;
}

@media (max-width: 900px) {
	/* Mobile: full-width bar in document flow (scrolls away with content) */
	#header {
		display: flex !important;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: flex-start;
		gap: 0.65rem 1rem;
		width: 100%;
		max-width: none;
		margin: 0 0 var(--junai-frame-gap);
		border-radius: 0;
		grid-template-columns: unset;
		grid-template-rows: unset;
		grid-template-areas: unset;
		box-shadow: 0 1px 0 var(--junai-glow), 0 8px 24px rgba(0, 0, 0, 0.25);
	}

	#branding {
		flex: 1 1 auto;
		min-width: 0;
		flex-direction: row;
		align-items: center;
		order: 1;
		position: relative;
		z-index: 280;
		border-right: none;
		margin-right: 0;
		padding-right: 0;
		grid-area: unset;
		justify-self: auto;
	}

	.junai-nav-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 250;
		background: rgba(10, 22, 40, 0.55);
		opacity: 0;
		visibility: hidden;
		transition:
			opacity 0.28s ease,
			visibility 0.28s ease;
		pointer-events: none;
		-webkit-tap-highlight-color: transparent;
	}

	.junai-nav-backdrop.is-visible {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	body.junai-nav-open #header {
		z-index: 290;
	}

	.junai-nav-toggle {
		display: inline-block;
		order: 2;
		flex-shrink: 0;
		margin-left: auto;
		position: relative;
		z-index: 310;
	}

	#menu {
		order: 3;
		display: flex !important;
		grid-area: unset;
		position: fixed;
		top: 0;
		left: 0;
		width: min(88vw, 320px);
		max-width: 100%;
		height: 100vh;
		height: 100dvh;
		max-height: 100dvh;
		margin: 0;
		/* Clear sticky header so "홈" does not sit under JunAI Blog */
		padding: calc(env(safe-area-inset-top, 0px) + 3.85rem) 0.85rem 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: linear-gradient(180deg, var(--junai-navy-2) 0%, var(--junai-navy) 100%);
		border-right: 1px solid rgba(0, 212, 168, 0.22);
		box-shadow: 8px 0 40px rgba(0, 0, 0, 0.45);
		overflow: hidden;
		overscroll-behavior: contain;
		z-index: 300;
		transform: translate3d(-100%, 0, 0);
		transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
		pointer-events: none;
		border-top: none;
	}

	#menu.is-open {
		transform: translate3d(0, 0, 0);
		pointer-events: auto;
	}

	/* Drawer open: hide header title in drawer column (toggle stays on top) */
	body.junai-nav-open #branding {
		visibility: hidden;
		pointer-events: none;
	}

	/* Menu list scrolls; search stays pinned at bottom */
	#menu > .junai-nav-scroll,
	#menu > div:first-child {
		flex: 1 1 0;
		min-height: 0;
		display: block;
		min-width: 0;
		width: 100%;
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-y: contain;
		touch-action: pan-y;
		padding: 0 0.1rem 0.35rem 0;
		margin-top: 0;
		border-top: none;
		grid-area: unset;
	}

	#menu ul.menu,
	#menu ul {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		gap: 0.15rem;
	}

	#menu li {
		width: 100%;
	}

	#menu a {
		width: 100%;
	}

	#menu .junai-nav-item {
		padding: 0.7rem 0.85rem;
		width: 100%;
		justify-content: flex-start;
		border-radius: 10px;
		font-size: 0.95rem;
	}

	#search {
		flex-shrink: 0;
		width: 100%;
		min-width: 0;
		margin-top: 0;
		padding: 0.85rem 0 calc(env(safe-area-inset-bottom, 0px) + 0.85rem);
		border-top: 1px solid rgba(255, 255, 255, 0.06);
		border-right: none;
		grid-area: unset;
		justify-self: auto;
	}

	#search .search-form {
		width: 100%;
	}

	#search .search-field {
		flex: 1;
		width: auto;
		min-width: 0;
	}
}

@media (min-width: 901px) {
	.junai-nav-backdrop {
		display: none !important;
	}

	.junai-nav-toggle {
		display: none !important;
	}

	/* Nav shell: framed card in flow — scrolls up with the page */
	#header {
		display: grid;
		grid-template-columns: auto auto 1fr; /* auto brand — never squeeze logo/title */
		grid-template-rows: auto auto;
		grid-template-areas:
			"brand search ."
			"nav nav nav";
		align-items: center;
		column-gap: 0;
		row-gap: 0;
		width: var(--junai-shell-w);
		max-width: none;
		margin: var(--junai-header-gap) auto var(--junai-frame-gap);
		box-sizing: border-box;
		padding: 0.55rem var(--junai-side-pad) 0.65rem;
		border-radius: var(--junai-shell-radius);
		box-shadow:
			0 14px 40px -12px rgba(0, 0, 0, 0.55),
			0 1px 0 var(--junai-glow);
	}

	/* Same outer column as #header (menu ↔ hero / archive cards align like home). */
	#container {
		width: var(--junai-shell-w);
		max-width: none;
	}

	#branding {
		grid-area: brand;
		justify-self: start;
		flex-wrap: nowrap;
		flex-shrink: 0;
		min-width: min-content;
		padding-right: 1rem;
		margin-right: 1rem;
		border-right: 1px solid rgba(255, 255, 255, 0.1);
	}

	#site-title {
		flex-shrink: 0;
	}

	#menu {
		display: contents;
	}

	#menu > .junai-nav-scroll,
	#menu > div:first-child {
		grid-area: nav;
		flex: none;
		width: 100%;
		min-height: auto;
		overflow: visible;
		padding: 0.55rem 0 0.05rem;
		margin-top: 0.55rem;
		border-top: 1px solid rgba(255, 255, 255, 0.1);
		touch-action: auto;
		justify-content: flex-start;
	}

	#menu ul.menu,
	#menu ul {
		justify-content: flex-start;
		gap: 0.2rem 0.28rem;
	}

	.junai-nav-item {
		font-size: 0.84rem;
		padding: 0.34rem 0.68rem 0.34rem 0.38rem;
	}

	.junai-nav-item__icon {
		width: 23px;
		height: 23px;
	}

	.junai-nav-item__icon svg {
		width: 14px;
		height: 14px;
	}

	#search {
		grid-area: search;
		justify-self: center;
		align-self: center;
		flex-shrink: 0;
		width: auto;
		min-width: min(220px, 30vw);
		margin: 0;
		padding: 0 1rem;
		border-right: 1px solid rgba(255, 255, 255, 0.1);
		border-top: none;
		background: none;
	}

	#search .search-form {
		width: 100%;
	}

	#search .search-field {
		width: min(150px, 20vw);
		min-width: 5.5rem;
	}
}

@media (min-width: 1200px) {
	#search .search-field {
		width: min(180px, 16vw);
	}
}

@media (max-width: 560px) {
	#site-description {
		display: none;
	}
}

/* ===================== Table of contents (raw posts — rail | inline | drawer) ===================== */

.junai-toc--rail,
.junai-toc-inline,
.junai-toc-fab,
.junai-toc-drawer-backdrop,
.junai-toc--drawer {
	display: none;
}

/* Shared list styles (rail + drawer) */
.junai-toc__title {
	font-weight: 700;
	font-size: 0.85rem;
	color: var(--junai-text);
	margin: 0 0 0.55rem;
	padding-bottom: 0.55rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	letter-spacing: -0.01em;
}

.junai-toc__title::before {
	content: "";
	display: inline-block;
	width: 3px;
	height: 12px;
	vertical-align: -0.1em;
	background: var(--junai-teal);
	border-radius: 2px;
	margin-right: 0.45rem;
}

.junai-toc__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.junai-toc__item {
	margin: 0;
	list-style: none;
}

.junai-toc__item--h3 {
	padding-left: 0.85rem;
}

.junai-toc a {
	display: block;
	color: var(--junai-muted);
	text-decoration: none;
	padding: 0.28rem 0 0.28rem 0.6rem;
	margin-left: -0.1rem;
	border-left: 2px solid transparent;
	transition:
		color 0.15s ease,
		border-color 0.15s ease,
		background-color 0.15s ease;
}

.junai-toc a:hover {
	color: var(--junai-teal);
}

.junai-toc a.is-active {
	color: var(--junai-teal);
	border-left-color: var(--junai-teal);
	font-weight: 600;
	background: rgba(0, 212, 168, 0.08);
}

/* Mode: fixed rail beside white card (only when JS detects enough side margin) */
body.junai-page-raw-post.junai-toc-mode-rail .junai-toc--rail {
	display: block;
	position: fixed;
	top: var(--junai-shell-offset-top);
		left: calc((100vw + var(--junai-shell-w)) / 2 + var(--junai-toc-gap));
	right: auto;
	width: var(--junai-toc-width);
	max-height: calc(100vh - var(--junai-header-gap) - var(--junai-frame-gap) - 1.5rem);
	overflow-y: auto;
	padding: 1rem 1.1rem 1.15rem;
	font-size: 0.82rem;
	line-height: 1.55;
	color: var(--junai-text);
	background: rgba(15, 33, 55, 0.85);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.55);
	backdrop-filter: saturate(140%) blur(12px);
	-webkit-backdrop-filter: saturate(140%) blur(12px);
	z-index: 110;
}

body.junai-page-raw-post.junai-toc-mode-rail .junai-toc--rail a {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Mode: collapsible card at top of article (zoom / tight desktop) */
body.junai-page-raw-post.junai-toc-mode-inline .junai-toc-inline {
	display: block;
	margin: 0 0 1.15rem;
	border: 1px solid rgba(10, 22, 40, 0.1);
	border-radius: 12px;
	background: linear-gradient(180deg, #f8fafc, #f1f5f9);
	overflow: hidden;
}

body.junai-page-raw-post .junai-toc-inline__summary {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.8rem 1rem;
	font-size: 0.9rem;
	font-weight: 700;
	color: #0f1c2e;
	cursor: pointer;
	list-style: none;
	user-select: none;
}

body.junai-page-raw-post .junai-toc-inline__summary::-webkit-details-marker {
	display: none;
}

body.junai-page-raw-post .junai-toc-inline__summary::before {
	content: "";
	display: inline-block;
	width: 3px;
	height: 14px;
	background: var(--junai-teal);
	border-radius: 2px;
	flex-shrink: 0;
}

body.junai-page-raw-post .junai-toc-inline .junai-toc__list {
	padding: 0 1rem 0.95rem;
}

body.junai-page-raw-post .junai-toc-inline .junai-toc a {
	color: #4b5563;
	white-space: normal;
	line-height: 1.45;
}

body.junai-page-raw-post .junai-toc-inline .junai-toc a:hover,
body.junai-page-raw-post .junai-toc-inline .junai-toc a.is-active {
	color: var(--junai-teal-2);
	background: rgba(0, 212, 168, 0.08);
}

/* Mode: FAB + right drawer (mobile) */
body.junai-page-raw-post.junai-toc-mode-drawer .junai-toc-fab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: fixed;
	right: 1rem;
	bottom: 1.15rem;
	z-index: 120;
	padding: 0.6rem 1rem;
	border: 0;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 700;
	font-family: inherit;
	color: var(--junai-navy);
	background: linear-gradient(135deg, var(--junai-teal), var(--junai-teal-2));
	box-shadow: 0 6px 20px rgba(0, 212, 168, 0.35);
	cursor: pointer;
	transition:
		transform 0.15s ease,
		filter 0.15s ease;
}

body.junai-page-raw-post.junai-toc-mode-drawer .junai-toc-fab:hover {
	filter: brightness(1.06);
	transform: translateY(-1px);
}

body.junai-page-raw-post.junai-toc-mode-drawer .junai-toc-drawer-backdrop {
	display: block;
	position: fixed;
	inset: 0;
	z-index: 250;
	background: rgba(10, 22, 40, 0.55);
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.28s ease,
		visibility 0.28s ease;
	pointer-events: none;
}

body.junai-page-raw-post.junai-toc-mode-drawer.junai-toc-drawer-open .junai-toc-drawer-backdrop {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

body.junai-page-raw-post.junai-toc-mode-drawer .junai-toc--drawer {
	display: block;
	position: fixed;
	top: 0;
	right: 0;
	width: min(88vw, 320px);
	max-width: 100%;
	height: 100vh;
	height: 100dvh;
	max-height: 100dvh;
	margin: 0;
	padding: clamp(4.5rem, 12vw, 5.5rem) 1rem 1.25rem;
	box-sizing: border-box;
	overflow-y: auto;
	font-size: 0.85rem;
	line-height: 1.55;
	color: var(--junai-text);
	background: #0f2137;
	border-left: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
	z-index: 260;
	transform: translateX(100%);
	transition: transform 0.28s ease;
	-webkit-overflow-scrolling: touch;
}

body.junai-page-raw-post.junai-toc-mode-drawer.junai-toc-drawer-open .junai-toc--drawer {
	transform: translateX(0);
}

body.junai-page-raw-post.junai-toc-mode-drawer.junai-toc-drawer-open {
	overflow: hidden;
}

body.junai-page-raw-post.junai-toc-mode-drawer .junai-toc--drawer a {
	white-space: normal;
	line-height: 1.45;
}

/* Smooth scroll to TOC anchor — offset for in-flow header at top of page. */
html {
	scroll-padding-top: var(--junai-shell-offset-top);
}

.junai-toc-anchor {
	scroll-margin-top: calc(var(--junai-shell-offset-top) + 0.5rem);
}

@media (max-width: 900px) {
	html {
		scroll-padding-top: 5rem;
	}

	.junai-toc-anchor {
		scroll-margin-top: 5rem;
	}
}

/* ===================== Share buttons (raw single posts) ===================== */

.junai-share {
	margin: clamp(2rem, 4vw, 2.75rem) 0 0;
	padding: clamp(1.25rem, 3vw, 1.75rem);
	background: linear-gradient(135deg, rgba(0, 212, 168, 0.06), rgba(56, 132, 255, 0.04));
	border: 1px solid rgba(10, 22, 40, 0.08);
	border-radius: 14px;
	text-align: center;
}

.junai-share__title {
	font-size: 0.95rem;
	font-weight: 700;
	color: #0f1c2e;
	margin-bottom: 1rem;
	letter-spacing: -0.01em;
}

.junai-share__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.junai-share__list li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.junai-share__list li::marker {
	content: "";
}

.junai-share__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.55rem 1rem;
	border-radius: 10px;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid rgba(10, 22, 40, 0.08);
	background: #ffffff;
	color: #1a1a1a;
	cursor: pointer;
	font-family: inherit;
	transition:
		transform 0.15s ease,
		border-color 0.15s ease,
		color 0.15s ease,
		background-color 0.15s ease;
}

.junai-share__btn:hover {
	transform: translateY(-1px);
	border-color: rgba(0, 212, 168, 0.4);
	color: var(--junai-teal-2);
}

.junai-share__btn > span[aria-hidden] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 6px;
	font-weight: 800;
	font-size: 0.78rem;
}

.junai-share__btn--naver > span[aria-hidden] {
	background: #03c75a;
	color: #fff;
}

.junai-share__btn--kakao > span[aria-hidden] {
	background: #fee500;
	color: #181600;
}

.junai-share__btn--x > span[aria-hidden] {
	background: #000;
	color: #fff;
}

.junai-share__btn--copy > span[aria-hidden] {
	background: rgba(0, 212, 168, 0.15);
	color: var(--junai-teal-2);
}

.junai-share__btn--copy.is-copied {
	color: var(--junai-teal-2);
	border-color: rgba(0, 212, 168, 0.5);
	background: rgba(0, 212, 168, 0.08);
}

@media (max-width: 480px) {
	.junai-share__btn {
		font-size: 0.8rem;
		padding: 0.5rem 0.75rem;
	}
}
