/* =====================================================
   Play Learning Guide (plg-play) — main.css
   Warm, soft, activity-first: cream surface, coral + amber,
   generous rounded corners and playful hover states.
   ===================================================== */

:root {
	--bg: #fff9f2;
	--surface: #ffffff;
	--ink: #4a3f35;
	--ink-soft: #7a6c5d;
	--accent: #ff7a59;
	--accent-dark: #e85f3e;
	--amber: #ffb84d;
	--mint: #7fc8a9;
	--line: #f2e3d4;
	--header-bg: #ffffff;
	--header-ink: #4a3f35;
	--focus: #e85f3e;
	--radius: 18px;
	--shadow: 0 2px 10px rgba(122, 108, 93, 0.10);
	--wrap: 1160px;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 17px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
	-webkit-text-size-adjust: 100%;
}

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

a { color: var(--accent-dark); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { line-height: 1.35; color: var(--ink); }

/* ---------------- header ---------------- */

.site-header {
	background: var(--header-bg);
	border-bottom: 2px solid var(--line);
	box-shadow: 0 1px 8px rgba(122, 108, 93, 0.06);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 16px;
	padding-bottom: 16px;
	flex-wrap: wrap;
}

.site-branding { display: flex; align-items: center; gap: 14px; }
.branding-text { display: flex; flex-direction: column; }

.site-title {
	font-size: 1.6rem;
	font-weight: 800;
	color: var(--accent-dark);
	letter-spacing: 0.01em;
}
.site-title:hover { color: var(--accent); text-decoration: none; }

.site-description { margin: 0; font-size: 0.85rem; color: var(--ink-soft); }

.site-header .custom-logo { max-height: 60px; width: auto; }

.nav-toggle {
	display: none;
	background: var(--accent);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 10px 18px;
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
	min-height: 44px;
}

/* chip strip */
.chip-strip {
	background: transparent;
	border-bottom: 2px dashed var(--line);
}

.chip-strip .wrap {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	padding-top: 12px;
	padding-bottom: 12px;
}

.chip {
	display: inline-block;
	background: var(--surface);
	border: 1.5px solid var(--line);
	color: var(--ink-soft);
	border-radius: 999px;
	padding: 6px 16px;
	font-size: 0.86rem;
	font-weight: 600;
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
	text-decoration: none;
}

.chip:nth-child(3n) { border-color: rgba(255, 184, 77, 0.7); }
.chip:nth-child(3n+2) { border-color: rgba(127, 200, 169, 0.7); }

/* ---------------- nav ---------------- */

.primary-nav { margin-left: auto; }

.primary-menu {
	display: flex;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
	align-items: center;
}

.primary-menu li { position: relative; }

.primary-menu a {
	display: block;
	padding: 9px 14px;
	color: var(--ink);
	font-weight: 600;
	font-size: 0.95rem;
	border-radius: 999px;
	min-height: 44px;
}
.primary-menu a:hover { background: rgba(255, 122, 89, 0.12); color: var(--accent-dark); text-decoration: none; }

.primary-menu .sub-menu,
.primary-menu ul {
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: 0 10px 24px rgba(122, 108, 93, 0.15);
	list-style: none;
	margin: 0;
	padding: 8px;
	min-width: 210px;
	z-index: 20;
	display: none;
}

.primary-menu li:hover > ul,
.primary-menu li:focus-within > ul { display: block; }

/* ---------------- breadcrumb ---------------- */

.breadcrumb-wrap { padding-top: 12px; }

.breadcrumb ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	font-size: 0.82rem;
	color: var(--ink-soft);
}

.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--amber); }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb [aria-current="page"] { color: var(--accent-dark); font-weight: 700; }

/* ---------------- layout ---------------- */

.site-main { padding: 20px 0 44px; }

.layout.with-sidebar {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 20px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 34px;
}

.layout .content-col { min-width: 0; }

.widget-area .widget,
.site-footer .widget {
	background: var(--surface);
	border: 1.5px solid var(--line);
	border-radius: var(--radius);
	padding: 18px;
	margin-bottom: 18px;
	box-shadow: var(--shadow);
}

.widget-title { margin: 0 0 12px; font-size: 1rem; color: var(--accent-dark); }

.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.plain-list li:last-child { border-bottom: 0; }

/* ---------------- archive header ---------------- */

.archive-header {
	background: linear-gradient(135deg, #fff3e6, #fdeae0);
	border: 1.5px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 24px 28px;
	margin: 6px auto 28px;
	max-width: var(--wrap);
}

.page-title { margin: 0 0 6px; font-size: 1.9rem; font-weight: 800; color: var(--accent-dark); }

.archive-desc { color: var(--ink-soft); font-size: 1rem; }
.archive-desc p { margin: 4px 0 0; }

/* ---------------- cards ---------------- */

.card-grid {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 20px;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: 24px;
}

.card {
	background: var(--surface);
	border: 1.5px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(255, 122, 89, 0.18); }

.card-thumb { display: block; }
.card-thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0; }

.card-body { padding: 18px 20px 20px; }

.card-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.8rem;
	color: var(--ink-soft);
	margin-bottom: 10px;
	flex-wrap: wrap;
}

.card-cat {
	background: rgba(255, 184, 77, 0.25);
	color: #9a6b12;
	padding: 3px 12px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.75rem;
}

.card-title { margin: 0 0 8px; font-size: 1.15rem; line-height: 1.45; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent-dark); }

.card-excerpt { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }

/* ---------------- single / page ---------------- */

.entry {
	max-width: 800px;
	margin: 0 auto;
	background: var(--surface);
	border: 1.5px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 32px 36px;
}

.layout.with-sidebar .entry { margin: 0; max-width: none; }

.entry-header { margin-bottom: 18px; }

.entry-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 0.82rem;
	color: var(--ink-soft);
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.entry-cat {
	background: rgba(255, 184, 77, 0.25);
	color: #9a6b12;
	padding: 3px 12px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.75rem;
}

.entry-title { margin: 0; font-size: 2.05rem; font-weight: 800; color: var(--ink); }

.entry-thumb { margin: 0 0 24px; }
.entry-thumb img { width: 100%; height: auto; border-radius: var(--radius); }

.entry-content { font-size: 1.04rem; }
.entry-content > * { max-width: 70ch; }
.entry-content > img,
.entry-content > figure,
.entry-content > table,
.entry-content > .alignwide,
.entry-content > .alignfull { max-width: 100%; }

.entry-content h2 { font-size: 1.4rem; margin: 1.8em 0 0.6em; color: var(--accent-dark); }
.entry-content h3 { font-size: 1.15rem; margin: 1.5em 0 0.5em; }

.entry-content blockquote {
	margin: 1.5em 0;
	padding: 14px 22px;
	background: #fff3e6;
	border-radius: var(--radius);
	border-left: 5px solid var(--amber);
}

.entry-content table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.entry-content thead th { background: #fff3e6; color: var(--ink); }

.entry-footer { margin-top: 24px; }

.tags a {
	display: inline-block;
	background: var(--bg);
	border: 1.5px solid var(--line);
	border-radius: 999px;
	padding: 4px 14px;
	font-size: 0.82rem;
	margin: 0 6px 6px 0;
	color: var(--ink-soft);
}

/* ---------------- post nav / pagination ---------------- */

.post-nav { max-width: 800px; margin: 24px auto 0; }
.layout.with-sidebar .post-nav { margin: 24px 0 0; max-width: none; }

.post-nav .nav-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.post-nav .nav-previous,
.post-nav .nav-next {
	flex: 1 1 260px;
	background: var(--surface);
	border: 1.5px solid var(--line);
	border-radius: var(--radius);
	padding: 14px 16px;
}
.post-nav .nav-next { text-align: right; }
.post-nav .nav-label { display: block; font-size: 0.75rem; text-transform: uppercase; color: var(--ink-soft); }
.post-nav .nav-title { font-weight: 700; }

.pagination,
.navigation.pagination {
	max-width: var(--wrap);
	margin: 28px auto 0;
	padding: 0 20px;
}

.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }

.pagination .page-numbers,
.navigation.pagination .page-numbers {
	display: inline-block;
	padding: 8px 16px;
	border: 1.5px solid var(--line);
	background: var(--surface);
	border-radius: 999px;
	color: var(--ink);
	text-decoration: none;
	min-height: 40px;
}
.pagination .page-numbers.current,
.navigation.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }

/* ---------------- search / no-results / 404 ---------------- */

.search-form { display: flex; gap: 8px; max-width: 480px; }

.search-field {
	flex: 1;
	padding: 10px 16px;
	border: 1.5px solid var(--line);
	border-radius: 999px;
	font-size: 1rem;
	min-height: 44px;
	background: var(--bg);
}

.search-submit {
	padding: 10px 20px;
	background: var(--accent);
	color: #fff;
	border: 0;
	border-radius: 999px;
	font-weight: 700;
	cursor: pointer;
	min-height: 44px;
}
.search-submit:hover { background: var(--accent-dark); }

.no-results, .error-404 {
	max-width: 800px;
	margin: 0 auto;
	background: var(--surface);
	border: 1.5px solid var(--line);
	border-radius: var(--radius);
	padding: 32px 36px;
}
.no-results h2, .error-404 h2 { margin-top: 1.4em; }

/* ---------------- comments ---------------- */

.comments-area { max-width: 800px; margin: 30px auto 0; }
.layout.with-sidebar .comments-area { margin: 30px 0 0; max-width: none; }

.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment { border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 16px; margin-bottom: 12px; }
.comment-list .children { list-style: none; padding-left: 22px; }

.comment-form textarea, .comment-form input:not([type="submit"]) { width: 100%; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; }

.comment-form .submit {
	background: var(--accent);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 12px 24px;
	font-weight: 700;
	cursor: pointer;
	min-height: 44px;
}

/* ---------------- footer ---------------- */

.site-footer {
	background: var(--surface);
	border-top: 2px solid var(--line);
	color: var(--ink-soft);
	margin-top: 46px;
	padding: 28px 0;
}

.footer-widgets { display: flex; gap: 20px; flex-wrap: wrap; padding-bottom: 18px; }
.footer-widgets .widget { flex: 1 1 240px; }
.footer-widgets .widget a { color: var(--accent-dark); }
.footer-widgets .widget-title { color: var(--accent-dark); }

.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 18px; }

.footer-menu { list-style: none; display: flex; gap: 4px; flex-wrap: wrap; margin: 0; padding: 0; }
.footer-menu a { display: block; padding: 6px 12px; color: var(--ink-soft); font-size: 0.9rem; border-radius: 999px; }
.footer-menu a:hover { color: var(--accent-dark); background: rgba(255, 122, 89, 0.1); text-decoration: none; }

.copyright { margin: 0; font-size: 0.88rem; }
.copyright a { color: var(--accent-dark); font-weight: 700; }

/* ---------------- responsive ---------------- */

@media (max-width: 900px) {
	.layout.with-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
	.nav-toggle { display: inline-block; }

	.primary-nav { display: none; width: 100%; margin: 0; }

	body.nav-open .primary-nav { display: block; }

	.primary-menu { flex-direction: column; gap: 0; align-items: stretch; }

	.primary-menu a { padding: 12px 10px; border-radius: 12px; }

	.primary-menu .sub-menu,
	.primary-menu ul {
		position: static;
		display: block;
		box-shadow: none;
		margin-left: 16px;
	}

	.entry, .no-results, .error-404 { padding: 24px 20px; }
	.entry-title { font-size: 1.6rem; }

	.card-grid { grid-template-columns: 1fr; }
}
