/*
Theme Name: Joyen
Theme URI: https://www.joyen.net/
Author: 快乐英语
Author URI: https://www.joyen.net/
Description: 为「快乐英语」双语阅读站设计的轻量主题。自动区分中英段落、突出文字难度与词汇序号、音频播放器吸顶；零 jQuery、零外部字体与图标库，只有一个样式表和一个脚本。
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: joyen
Tags: blog, one-column, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, accessibility-ready
*/

/* ---------------------------------------------------------------
 * 1. Design tokens
 * ------------------------------------------------------------- */
:root {
	color-scheme: light;
	--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "WenQuanYi Micro Hei", sans-serif;
	--font-serif: "Iowan Old Style", Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, "Noto Serif", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", SimSun, serif;

	--bg: #fbfaf6;
	--surface: #ffffff;
	--surface-2: #f2f0e9;
	--ink: #22252a;
	--ink-2: #4f5560;
	--ink-3: #6a707a;
	--line: #e4e1d8;
	--accent-base: #2f5aae;
	--accent: var(--accent-base);
	--accent-soft: color-mix(in srgb, var(--accent) 10%, var(--bg));
	--on-accent: #ffffff;
	--shadow: 0 10px 30px rgba(20, 24, 32, .1);

	--header-h: 4rem;
	--content-w: 42rem;
	--list-w: 52rem;
	--wide-w: 64rem;
	--gutter: clamp(1rem, 4vw, 2rem);
	--radius: 10px;
	--reading-scale: 1;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--bg: #14161a;
		--surface: #1b1e23;
		--surface-2: #23272e;
		--ink: #e9e7e2;
		--ink-2: #b9bdc5;
		--ink-3: #9097a2;
		--line: #2c3139;
		--accent: color-mix(in srgb, var(--accent-base) 62%, #ffffff);
		--on-accent: #10141c;
		--shadow: 0 10px 30px rgba(0, 0, 0, .45);
	}
}

:root[data-theme="dark"] {
	color-scheme: dark;
	--bg: #14161a;
	--surface: #1b1e23;
	--surface-2: #23272e;
	--ink: #e9e7e2;
	--ink-2: #b9bdc5;
	--ink-3: #9097a2;
	--line: #2c3139;
	--accent: color-mix(in srgb, var(--accent-base) 62%, #ffffff);
	--on-accent: #10141c;
	--shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

/* ---------------------------------------------------------------
 * 2. Base
 * ------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	font-size: calc(100% * var(--reading-scale));
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
	margin: 0;
	overflow-x: clip;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .6em;
	font-weight: 700;
	line-height: 1.3;
	text-wrap: balance;
}

p, ul, ol, figure, blockquote, pre, table {
	margin: 0 0 1.5em;
}

ul, ol {
	padding-left: 1.4em;
}

a {
	color: var(--accent);
	text-decoration-thickness: 1px;
	text-underline-offset: .2em;
}

a:hover {
	text-decoration-thickness: 2px;
}

img, video, iframe, svg {
	max-width: 100%;
}

img, video {
	height: auto;
}

button, input, select, textarea {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 3px;
}

::selection {
	background: var(--accent);
	color: var(--on-accent);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*, *::before, *::after {
		transition-duration: .001ms !important;
		animation-duration: .001ms !important;
	}
}

/* ---------------------------------------------------------------
 * 3. Layout & helpers
 * ------------------------------------------------------------- */
.wrap {
	width: 100%;
	max-width: var(--wide-w);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* The main column carries the side gutters, so the centred blocks inside it
   never touch the screen edge on narrow viewports. */
.site-main {
	width: 100%;
	max-width: var(--wide-w);
	min-height: 60vh;
	margin-inline: auto;
	padding-inline: var(--gutter);
	padding-block: clamp(1.5rem, 4vw, 3rem);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: .5rem;
	left: .5rem;
	z-index: 200;
	padding: .5rem 1rem;
	border-radius: 8px;
	background: var(--accent);
	color: var(--on-accent);
	transform: translateY(-200%);
}

.skip-link:focus {
	transform: none;
}

.btn,
.wp-element-button,
.wp-block-button__link,
.comment-respond .submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .55em 1.2em;
	border: 1px solid transparent;
	border-radius: 8px;
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
}

.btn:hover,
.wp-element-button:hover,
.wp-block-button__link:hover,
.comment-respond .submit:hover {
	filter: brightness(1.1);
}

/* ---------------------------------------------------------------
 * 4. Header & navigation
 * ------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--bg);
	border-bottom: 1px solid var(--line);
}

.admin-bar .site-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.header-inner {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	height: var(--header-h);
}

.branding {
	display: flex;
	align-items: center;
	gap: .75rem;
	min-width: 0;
	margin-right: auto;
}

.custom-logo-link {
	flex: none;
}

.custom-logo {
	display: block;
	max-height: 2.5rem;
	width: auto;
}

.site-title {
	margin: 0;
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: .02em;
	white-space: nowrap;
}

.site-title a {
	color: var(--ink);
	text-decoration: none;
}

.header-tools {
	display: flex;
	flex: none;
	gap: .25rem;
}

.tool-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--ink-2);
	font-size: .9375rem;
	font-weight: 600;
	line-height: 1;
}

.tool-btn:hover {
	background: var(--surface-2);
	color: var(--ink);
}

.tool-btn svg {
	width: 1.25rem;
	height: 1.25rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.i-sun,
.i-close {
	display: none;
}

[data-theme="dark"] .i-moon,
[data-theme="dark"] .i-menu {
	display: none;
}

[data-theme="dark"] .i-sun {
	display: block;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .i-moon,
	:root:not([data-theme="light"]) .i-menu {
		display: none;
	}
	:root:not([data-theme="light"]) .i-sun {
		display: block;
	}
}

.main-nav ul {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.main-nav a {
	display: block;
	padding: .5rem .6rem;
	border-radius: 8px;
	color: var(--ink);
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a,
.main-nav .current-post-ancestor > a {
	color: var(--accent);
}

.main-nav a:hover {
	background: var(--surface-2);
}

.main-nav li {
	position: relative;
	display: flex;
	align-items: center;
}

.sub-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	margin-left: -.35rem;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--ink-3);
}

.sub-toggle:hover {
	background: var(--surface-2);
	color: var(--ink);
}

.sub-toggle svg {
	width: 1rem;
	height: 1rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform .15s ease;
}

.is-open > .sub-toggle svg {
	transform: rotate(180deg);
}

.main-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 10;
	display: block;
	min-width: 9rem;
	padding: .35rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(.25rem);
	transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

.main-nav .sub-menu a {
	padding: .45rem .75rem;
	font-weight: 400;
}

.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu,
.main-nav li.is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.nav-toggle {
	display: none;
}

.nav-open .i-menu {
	display: none;
}

.nav-open .i-close {
	display: block;
}

.search-panel {
	border-top: 1px solid var(--line);
	background: var(--surface-2);
}

.search-panel[hidden] {
	display: none;
}

.search-form {
	display: flex;
	gap: .5rem;
	padding-block: .85rem;
}

.search-field,
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
	width: 100%;
	padding: .55rem .8rem;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	color: var(--ink);
}

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

/* Mobile navigation */
@media (max-width: 899px) {
	:root {
		--header-h: 3.5rem;
	}

	.nav-toggle {
		display: inline-flex;
	}

	.main-nav {
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		display: none;
		max-height: calc(100vh - var(--header-h));
		overflow-y: auto;
		padding: .5rem var(--gutter) 1rem;
		border-bottom: 1px solid var(--line);
		background: var(--surface);
		box-shadow: var(--shadow);
	}

	.nav-open .main-nav {
		display: block;
	}

	.main-nav ul {
		display: block;
	}

	.main-nav li {
		display: flex;
		flex-wrap: wrap;
		border-bottom: 1px solid var(--line);
	}

	.main-nav li:last-child {
		border-bottom: 0;
	}

	.main-nav a {
		flex: 1;
		padding: .8rem .25rem;
	}

	.sub-toggle {
		width: 2.5rem;
		height: 2.5rem;
		margin-left: 0;
	}

	.main-nav .sub-menu {
		position: static;
		display: none;
		width: 100%;
		padding: 0 0 .5rem .75rem;
		border: 0;
		background: none;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.main-nav li:hover > .sub-menu,
	.main-nav li:focus-within > .sub-menu {
		display: none;
	}

	.main-nav li.is-open > .sub-menu {
		display: block;
	}

	/* Without JavaScript the menu stays visible and scrollable. */
	.no-js .nav-toggle,
	.no-js [data-joyen="search"] {
		display: none;
	}

	.no-js .main-nav {
		position: static;
		display: block;
		max-height: none;
		padding: 0 var(--gutter);
		border-top: 1px solid var(--line);
		box-shadow: none;
	}

	.no-js .main-nav > ul {
		display: flex;
		overflow-x: auto;
	}

	.no-js .main-nav li {
		border-bottom: 0;
	}

	.no-js .sub-toggle {
		display: none;
	}

	.no-js .main-nav .sub-menu {
		display: none;
	}
}

/* ---------------------------------------------------------------
 * 5. Home: motto + category hub
 * ------------------------------------------------------------- */
.home-motto {
	max-width: var(--list-w);
	margin: 0 auto 1.75rem;
	color: var(--ink-2);
	font-size: 1.0625rem;
}

.hub {
	max-width: var(--list-w);
	margin: 0 auto 2.5rem;
}

.section-title {
	max-width: var(--list-w);
	margin: 0 auto .75rem;
	color: var(--ink-3);
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .12em;
}

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

.hub-item {
	padding: .75rem .9rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
}

@media (min-width: 40rem) {
	.hub-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.hub-item {
		padding: .9rem 1.1rem;
	}
}

.hub-item h3 {
	margin: 0 0 .35rem;
	font-size: 1.0625rem;
}

.hub-item h3 a {
	color: var(--ink);
	text-decoration: none;
}

.hub-item h3 a:hover {
	color: var(--accent);
}

.hub-item ul {
	display: flex;
	flex-wrap: wrap;
	gap: .2rem .9rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: .9375rem;
}

.hub-item li a {
	color: var(--ink-2);
	text-decoration: none;
}

.hub-item li a:hover {
	color: var(--accent);
	text-decoration: underline;
}

/* ---------------------------------------------------------------
 * 6. Archive header & chips
 * ------------------------------------------------------------- */
.page-header,
.card-list,
.home-motto,
.hub {
	max-width: var(--list-w);
	margin-inline: auto;
}

.page-header {
	margin-bottom: 1rem;
}

.page-title {
	margin-bottom: .35rem;
	font-size: clamp(1.5rem, 3vw, 1.875rem);
}

.page-description {
	color: var(--ink-2);
}

.page-description > :last-child {
	margin-bottom: 0;
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-top: 1rem;
}

.chip {
	display: inline-flex;
	padding: .25rem .85rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink-2);
	font-size: .875rem;
	text-decoration: none;
}

.chip:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.chip[aria-current="true"] {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--on-accent);
}

/* ---------------------------------------------------------------
 * 7. Cards (post list)
 * ------------------------------------------------------------- */
.card {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25rem;
	padding-block: 1.5rem;
	border-bottom: 1px solid var(--line);
}

.card:first-child {
	padding-top: .5rem;
}

.card.has-thumb {
	grid-template-columns: minmax(0, 1fr) 8rem;
}

.card-thumb img {
	display: block;
	width: 100%;
	border-radius: 8px;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .25rem .75rem;
	margin-bottom: .4rem;
	color: var(--ink-3);
	font-size: .8125rem;
}

.card-cat {
	color: var(--accent);
	font-weight: 600;
	text-decoration: none;
}

.card-level {
	color: var(--accent);
	letter-spacing: .08em;
}

.card-title {
	margin-bottom: .45rem;
	font-size: 1.25rem;
	line-height: 1.45;
}

.card-title a {
	color: var(--ink);
	text-decoration: none;
}

.card-title a:hover {
	color: var(--accent);
}

.card-excerpt {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: var(--ink-2);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

@media (max-width: 520px) {
	.card.has-thumb {
		grid-template-columns: minmax(0, 1fr) 5.5rem;
	}

	.card-title {
		font-size: 1.125rem;
	}
}

/* ---------------------------------------------------------------
 * 8. Single post / page
 * ------------------------------------------------------------- */
/* Note: WordPress adds the class "post" to every post element, so the
   article wrapper uses "article" to avoid styling list items by accident. */
.article,
.comments-area,
.post-navigation,
.error-404 {
	max-width: var(--content-w);
	margin-inline: auto;
}

.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
	margin-bottom: 1rem;
	color: var(--ink-3);
	font-size: .875rem;
}

.breadcrumb a {
	color: var(--ink-3);
	text-decoration: none;
}

.breadcrumb a:hover {
	color: var(--accent);
}

.post-title {
	margin-bottom: .75rem;
	font-size: clamp(1.625rem, 3.6vw, 2.125rem);
	line-height: 1.3;
}

.post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem 1rem;
	margin-bottom: 1.75rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--line);
	color: var(--ink-3);
	font-size: .875rem;
}

.post-meta a {
	color: var(--ink-3);
	text-decoration: none;
}

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

.reading-tools {
	display: inline-flex;
	gap: .25rem;
	margin-left: auto;
}

.reading-tools .tool-btn {
	width: 2rem;
	height: 2rem;
	border: 1px solid var(--line);
	background: var(--surface);
	font-size: .8125rem;
}

.post-footer {
	margin-top: 2rem;
}

.tags {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

.tags a {
	font-size: .875rem;
}

.post-navigation {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-top: 3rem;
}

.post-navigation .nav-links {
	display: contents;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
	display: flex;
}

.post-navigation a {
	display: block;
	width: 100%;
	padding: 1rem 1.1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--ink);
	text-decoration: none;
}

.post-navigation a:hover {
	border-color: var(--accent);
}

.post-navigation .nav-next {
	justify-content: flex-end;
}

.post-navigation .nav-next a {
	text-align: right;
}

.nav-label {
	display: block;
	margin-bottom: .25rem;
	color: var(--ink-3);
	font-size: .8125rem;
}

@media (max-width: 600px) {
	.post-navigation {
		grid-template-columns: 1fr;
	}

	.post-navigation .nav-next,
	.post-navigation .nav-next a {
		justify-content: flex-start;
		text-align: left;
	}
}

/* ---------------------------------------------------------------
 * 9. Entry content
 * ------------------------------------------------------------- */
.entry-content {
	font-size: 1.0625rem;
	line-height: 1.9;
	overflow-wrap: break-word;
}

.entry-content > :first-child {
	margin-top: 0;
}

.entry-content > :last-child {
	margin-bottom: 0;
}

.entry-content h2 { font-size: 1.5rem; margin-top: 2em; }
.entry-content h3 { font-size: 1.25rem; margin-top: 1.75em; }
.entry-content h4 { font-size: 1.125rem; margin-top: 1.5em; }

.entry-content blockquote {
	padding: .25rem 0 .25rem 1.25rem;
	border-left: 3px solid var(--accent);
	color: var(--ink-2);
	font-family: var(--font-serif);
}

.entry-content pre {
	padding: 1rem;
	overflow-x: auto;
	border-radius: 8px;
	background: var(--surface-2);
	font-size: .9375rem;
	line-height: 1.6;
}

.entry-content code {
	padding: .1em .35em;
	border-radius: 4px;
	background: var(--surface-2);
	font-size: .9em;
}

.entry-content pre code {
	padding: 0;
	background: none;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
}

.entry-content th,
.entry-content td {
	padding: .5rem .75rem;
	border: 1px solid var(--line);
	text-align: left;
}

.entry-content hr {
	height: 1px;
	margin-block: 2.5em;
	border: 0;
	background: var(--line);
}

.entry-content a {
	text-decoration: underline;
}

/* Media inside the content */
.entry-content img {
	border-radius: 6px;
}

.entry-content .alignleft,
.entry-content img[align="left"] {
	float: left;
	margin: .25rem 1.25rem 1rem 0;
}

.entry-content .alignright,
.entry-content img[align="right"] {
	float: right;
	margin: .25rem 0 1rem 1.25rem;
}

.entry-content .aligncenter {
	display: block;
	margin-inline: auto;
}

.entry-content .wp-caption {
	max-width: 100%;
}

.entry-content .wp-caption-text,
.entry-content figcaption {
	margin-top: .5rem;
	color: var(--ink-3);
	font-size: .875rem;
	text-align: center;
}

.entry-content > .alignwide {
	width: calc(100% + 2 * var(--gutter));
	max-width: none;
	margin-inline: calc(-1 * var(--gutter));
}

.entry-content > .alignfull {
	width: 100vw;
	max-width: none;
	margin-inline: calc(50% - 50vw);
}

/* --- Bilingual paragraphs: English in serif, Chinese translation muted --- */
.entry-content .j-en,
.entry-content .j-zh {
	display: block;
}

.entry-content .j-en {
	color: var(--ink);
	font-family: var(--font-serif);
	font-size: 1.125rem;
	line-height: 1.8;
}

.entry-content .j-zh {
	color: var(--ink-2);
	font-size: 1.0625rem;
	line-height: 1.95;
}

.entry-content p.j-en {
	margin-bottom: .55em;
}

.entry-content p.j-zh {
	margin-bottom: 1.6em;
}

.entry-content span.j-en + span.j-zh {
	margin-top: .55em;
}

.entry-content span.j-zh + span.j-en {
	margin-top: 1.6em;
}

/* --- Numbered vocabulary markers, e.g. "1)outnumber" --- */
.entry-content .j-v {
	border-bottom: 1px dotted var(--ink-3);
}

.entry-content .j-v sup {
	margin-right: .1em;
	color: var(--accent);
	font-family: var(--font-sans);
	font-size: .62em;
	font-weight: 700;
	line-height: 0;
	vertical-align: super;
}

/* --- Difficulty badge: 文字难度：★★★ --- */
.entry-content .j-level {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	margin: 0 0 1.5em;
	padding: .25em .9em;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--ink-2);
	font-size: .875rem;
	line-height: 1.7;
}

.entry-content .j-level-stars {
	color: var(--accent);
	letter-spacing: .1em;
}

/* --- Vocabulary / background notes block --- */
.entry-content .j-notes {
	margin-block: 2em;
	padding: 1em 1.25em;
	border-left: 3px solid var(--accent);
	border-radius: 0 var(--radius) var(--radius) 0;
	background: var(--surface-2);
	color: var(--ink-2);
	font-size: .9375rem;
	line-height: 1.85;
}

/* --- Audio player ([audio] shortcode, MediaElement or native) --- */
.entry-content > .mejs-container,
.entry-content > .wp-audio-shortcode,
.entry-content > p:has(> .mejs-container),
.entry-content > p:has(> .wp-audio-shortcode) {
	margin: 0 0 1.5em;
	border-radius: var(--radius);
}

.has-sticky-audio .entry-content > .mejs-container,
.has-sticky-audio .entry-content > .wp-audio-shortcode,
.has-sticky-audio .entry-content > p:has(> .mejs-container),
.has-sticky-audio .entry-content > p:has(> .wp-audio-shortcode) {
	position: sticky;
	top: calc(var(--header-h) + .5rem);
	z-index: 20;
}

.admin-bar.has-sticky-audio .entry-content > .mejs-container,
.admin-bar.has-sticky-audio .entry-content > .wp-audio-shortcode,
.admin-bar.has-sticky-audio .entry-content > p:has(> .mejs-container),
.admin-bar.has-sticky-audio .entry-content > p:has(> .wp-audio-shortcode) {
	top: calc(var(--wp-admin--admin-bar--height, 32px) + var(--header-h) + .5rem);
}

.entry-content .mejs-container {
	background: var(--surface-2);
}

.entry-content .mejs-controls .mejs-time {
	color: var(--ink-2);
}

.entry-content .mejs-controls .mejs-time-current {
	background: var(--accent);
}

.entry-content .mejs-controls .mejs-time-total {
	background: rgba(128, 128, 128, .25);
}

.entry-content .mejs-controls .mejs-playpause-button button {
	background-color: var(--accent);
	border-radius: 50%;
}

.entry-content audio.wp-audio-shortcode {
	width: 100%;
}

@media (max-width: 600px) {
	.entry-content .j-en {
		font-size: 1.0625rem;
	}

	.entry-content .j-zh {
		font-size: 1rem;
	}
}

/* ---------------------------------------------------------------
 * 10. Comments
 * ------------------------------------------------------------- */
.comments-area {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--line);
}

.comments-title {
	font-size: 1.25rem;
}

.comment-list,
.comment-list .children {
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	margin: 0;
	padding-left: clamp(1rem, 4vw, 2.5rem);
}

.comment-body {
	padding-block: 1rem;
	border-bottom: 1px solid var(--line);
}

.comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .25rem .75rem;
	margin-bottom: .5rem;
	font-size: .875rem;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-weight: 600;
}

.comment-author a {
	color: var(--ink);
	text-decoration: none;
}

.comment-author img {
	border-radius: 50%;
}

.comment-metadata,
.comment-metadata a {
	color: var(--ink-3);
}

.comment-content > :last-child {
	margin-bottom: 0;
}

.comment-reply-link {
	font-size: .875rem;
}

.comment-respond {
	margin-top: 2rem;
}

.comment-reply-title {
	font-size: 1.125rem;
}

.comment-respond label {
	display: block;
	margin-bottom: .25rem;
	font-size: .875rem;
	font-weight: 600;
}

.comment-respond .comment-form-cookies-consent {
	display: flex;
	align-items: center;
	gap: .5rem;
}

.comment-respond .comment-form-cookies-consent label {
	margin: 0;
	font-weight: 400;
}

.comment-respond textarea {
	min-height: 8rem;
	resize: vertical;
}

.no-comments {
	color: var(--ink-3);
}

/* ---------------------------------------------------------------
 * 11. Pagination
 * ------------------------------------------------------------- */
.pagination {
	margin-top: 2.5rem;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .35rem;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4rem;
	height: 2.4rem;
	padding-inline: .65rem;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	color: var(--ink-2);
	text-decoration: none;
}

.pagination .page-numbers:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.pagination .page-numbers.current {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--on-accent);
}

/* ---------------------------------------------------------------
 * 12. Empty states
 * ------------------------------------------------------------- */
.no-results,
.error-404 {
	padding-block: 2rem;
}

.no-results p,
.error-404 p {
	color: var(--ink-2);
}

.error-404 .search-form {
	padding-block: 0;
	margin-bottom: 1.5rem;
}

.attachment-image {
	display: block;
	margin-inline: auto;
}

.attachment-caption {
	margin-top: .75rem;
	color: var(--ink-3);
	text-align: center;
}

/* ---------------------------------------------------------------
 * 13. Footer
 * ------------------------------------------------------------- */
.site-footer {
	margin-top: 3rem;
	padding-block: 2rem;
	border-top: 1px solid var(--line);
	background: var(--surface-2);
	color: var(--ink-2);
	font-size: .9375rem;
}

.footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .5rem 2rem;
}

.footer-brand {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .25rem .75rem;
}

.footer-title {
	color: var(--ink);
	font-weight: 700;
	text-decoration: none;
}

.footer-credit {
	margin: 0;
	color: var(--ink-3);
}

.footer-credit a {
	color: var(--ink-3);
}

.footer-widgets {
	flex: 1 1 100%;
}

.footer-widgets .widget {
	margin-bottom: 1rem;
}

.footer-widgets .widget-title {
	font-size: 1rem;
}
