/* =========================================================================
   MinecraftDHN – main.css
   Phong cách: "block" – góc vuông, viền 2px, bóng đổ cứng, bảng màu cỏ/đất/đá.
   Không dùng framework. Dark mode theo hệ thống + nút chuyển.
   ========================================================================= */

:root {
	--bg: #f4f7ef;
	--surface: #ffffff;
	--surface-2: #e9eedf;
	--ink: #1b2a1b;
	--muted: #5a6b58;
	--line: #cfd8c4;
	--grass: #3f8f3f;
	--grass-dark: #2f6f2f;
	--dirt: #8b5a2b;
	--stone: #8a8f8a;
	--stone-light: #c9ccc9;
	--java: #d9822b;
	--bedrock: #2b7bd9;
	--warn-bg: #fff4d6;
	--warn-line: #e0b84a;
	--tip-bg: #e9f5e9;
	--shadow: 4px 4px 0 var(--ink);
	--radius: 2px;
	--font-body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-pixel: "Pixelify Sans", "Be Vietnam Pro", monospace;
	--content: 760px;
	--wide: 1180px;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #121a12;
		--surface: #1b261b;
		--surface-2: #233023;
		--ink: #e7efe3;
		--muted: #a3b3a0;
		--line: #34453a;
		--grass: #5cb85c;
		--grass-dark: #3f8f3f;
		--stone-light: #4a524a;
		--warn-bg: #3a3014;
		--warn-line: #b8963a;
		--tip-bg: #1f2f1f;
		--shadow: 4px 4px 0 #000;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: #121a12;
	--surface: #1b261b;
	--surface-2: #233023;
	--ink: #e7efe3;
	--muted: #a3b3a0;
	--line: #34453a;
	--grass: #5cb85c;
	--grass-dark: #3f8f3f;
	--stone-light: #4a524a;
	--warn-bg: #3a3014;
	--warn-line: #b8963a;
	--tip-bg: #1f2f1f;
	--shadow: 4px 4px 0 #000;
	color-scheme: dark;
}

/* ------------------------------ Base ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; }
a { color: var(--grass-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--grass); }
h1, h2, h3, h4 { line-height: 1.25; margin: 1.6em 0 .6em; font-weight: 700; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); margin-top: 0; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p, ul, ol, figure, table, pre, blockquote { margin: 0 0 1.2em; }
code, pre, kbd { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .92em; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: var(--radius); }
pre { background: var(--surface-2); padding: 1rem; overflow: auto; border-left: 4px solid var(--stone); }
pre code { background: none; padding: 0; }
blockquote { border-left: 4px solid var(--grass); padding: .2em 1em; color: var(--muted); }
table { border-collapse: collapse; width: 100%; font-size: .95em; }
th, td { border: 1px solid var(--line); padding: .55em .7em; text-align: left; vertical-align: top; }
th { background: var(--surface-2); }
hr { border: 0; border-top: 2px solid var(--line); margin: 2em 0; }
button, input { font: inherit; }
.container { max-width: var(--wide); margin: 0 auto; padding: 0 16px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; background: var(--ink); color: var(--bg); padding: .5em 1em; z-index: 1000; }

.badge {
	display: inline-block;
	font-family: var(--font-pixel);
	font-size: .78rem;
	line-height: 1;
	padding: .35em .55em;
	border: 2px solid currentColor;
	border-radius: var(--radius);
	text-decoration: none;
	letter-spacing: .02em;
	vertical-align: middle;
}
.badge--java { color: var(--java); }
.badge--bedrock { color: var(--bedrock); }
.badge--ca-hai { color: var(--grass-dark); }
.btn, .hero__search button, .site-search button, .search-form button, .comment-form .submit {
	display: inline-block;
	background: var(--grass);
	color: #fff;
	border: 2px solid var(--ink);
	box-shadow: var(--shadow);
	padding: .55em 1.1em;
	font-weight: 600;
	cursor: pointer;
	border-radius: var(--radius);
	transition: transform .08s, box-shadow .08s;
}
.btn:hover, .hero__search button:hover, .comment-form .submit:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: none; }

/* ------------------------------ Header -------------------------------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--surface);
	border-bottom: 3px solid var(--ink);
}
.site-header__inner { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.site-brand { flex: 0 0 auto; }
.site-brand img { max-height: 44px; width: auto; display: block; }
.site-brand__text {
	display: inline-flex; align-items: center; gap: .5rem;
	font-family: var(--font-pixel); font-size: 1.35rem; font-weight: 700;
	color: var(--ink); text-decoration: none; letter-spacing: .01em;
}
.site-brand__block {
	width: 22px; height: 22px; display: inline-block;
	background: linear-gradient(to bottom, var(--grass) 0 40%, var(--dirt) 40% 100%);
	border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
}
.site-nav { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.site-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; }
.site-nav__list li { position: relative; }
.site-nav__list a {
	display: block; padding: .45em .55em; color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; font-size: .95rem;
	border-bottom: 3px solid transparent;
}
.site-nav__list a:hover, .site-nav__list .current-menu-item > a, .site-nav__list .current-menu-ancestor > a { border-bottom-color: var(--grass); color: var(--ink); }
.site-nav__list .sub-menu {
	list-style: none; margin: 0; padding: .3rem 0; position: absolute; top: 100%; left: 0;
	background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--shadow);
	min-width: 220px; display: none; z-index: 60;
}
.site-nav__list li:hover > .sub-menu, .site-nav__list li:focus-within > .sub-menu { display: block; }
.site-nav__list .sub-menu a { border: 0; padding: .4em .9em; }
.site-nav__list .sub-menu a:hover { background: var(--surface-2); }
.site-search { display: flex; }
.site-search input {
	width: 170px; padding: .4em .6em; border: 2px solid var(--ink); border-right: 0; background: var(--bg); color: var(--ink);
	border-radius: var(--radius) 0 0 var(--radius);
}
.site-search button { box-shadow: none; padding: .35em .6em; border-radius: 0 var(--radius) var(--radius) 0; }
.theme-toggle { background: none; border: 2px solid var(--line); color: var(--ink); width: 36px; height: 36px; cursor: pointer; border-radius: var(--radius); font-size: 1.1rem; line-height: 1; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 2px solid var(--ink); width: 42px; height: 38px; padding: 6px 8px; cursor: pointer; flex-direction: column; justify-content: space-between; border-radius: var(--radius); }
.nav-toggle span { display: block; height: 3px; background: var(--ink); }

@media (max-width: 1180px) {
	.nav-toggle { display: flex; }
	.site-nav {
		display: none; position: absolute; top: 100%; left: 0; right: 0;
		flex-direction: column; align-items: stretch; gap: .5rem;
		background: var(--surface); border-bottom: 3px solid var(--ink); padding: .75rem 16px 1rem;
		max-height: calc(100vh - 64px); overflow: auto;
	}
	.site-nav.is-open { display: flex; }
	.site-nav__list { flex-direction: column; }
	.site-nav__list .sub-menu { position: static; display: block; border: 0; box-shadow: none; padding-left: 1rem; background: none; }
	.site-search input { width: 100%; }
	.site-search { width: 100%; }
	.theme-toggle { align-self: flex-start; }
}

/* ------------------------------ Hero ---------------------------------- */
.hero {
	background:
		linear-gradient(180deg, rgba(63,143,63,.12), transparent 70%),
		repeating-linear-gradient(90deg, transparent 0 31px, var(--line) 31px 32px),
		repeating-linear-gradient(0deg, transparent 0 31px, var(--line) 31px 32px);
	border-bottom: 3px solid var(--ink);
	padding: 3rem 0 2.5rem;
}
.hero__inner { max-width: 820px; }
.hero__kicker, .section-title, .mc-faq__title, .widget-title, .archive-title, .mc-howto__title {
	font-family: var(--font-pixel); letter-spacing: .01em;
}
.hero__kicker { color: var(--grass-dark); margin: 0 0 .4rem; font-size: 1rem; }
.hero__title { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem); margin: 0 0 .6rem; }
.hero__sub { font-size: 1.1rem; color: var(--muted); max-width: 640px; }
.hero__search { display: flex; max-width: 640px; margin: 1.2rem 0; }
.hero__search input {
	flex: 1; padding: .7em 1em; border: 2px solid var(--ink); border-right: 0; background: var(--surface); color: var(--ink);
	font-size: 1rem; border-radius: var(--radius) 0 0 var(--radius);
}
.hero__search button { border-radius: 0 var(--radius) var(--radius) 0; }
.hero__chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.hero__chips a { font-size: .85rem; padding: .25em .7em; border: 2px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; border-radius: 999px; }
.hero__chips a:hover { border-color: var(--grass); color: var(--grass-dark); }
.hero__version { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; color: var(--muted); font-size: .95rem; margin: 0; }

/* ----------------------------- Layout --------------------------------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.5rem; padding-top: 1.5rem; padding-bottom: 3rem; }
.layout--single { grid-template-columns: minmax(0, var(--content)); justify-content: center; }
.layout__main { min-width: 0; }
.sidebar-sticky { position: sticky; top: 84px; }
@media (max-width: 1000px) {
	.layout { grid-template-columns: 1fr; gap: 2rem; }
	.layout__sidebar { border-top: 3px solid var(--ink); padding-top: 1.5rem; }
	.sidebar-sticky { position: static; }
}

.home-section { padding: 2.5rem 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-title { font-size: 1.35rem; margin: 0 0 1rem; display: inline-flex; align-items: center; gap: .55rem; }
.section-title::before { content: ""; width: 12px; height: 12px; background: var(--grass); border: 2px solid var(--ink); display: inline-block; }
.section-more { font-weight: 600; text-decoration: none; }
.home-about { max-width: var(--content); }

.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.topic {
	display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .75rem;
	background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--shadow);
	padding: 1rem; text-decoration: none; color: var(--ink); transition: transform .08s, box-shadow .08s;
}
.topic:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); color: var(--ink); }
.topic__icon { grid-row: 1 / 3; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: 2px solid var(--ink); color: var(--ink); }
.topic__icon .pix { width: 28px; height: 28px; }
.archive-icon { display: inline-flex; vertical-align: -6px; margin-right: .5rem; color: var(--grass-dark); }
.archive-icon .pix { width: 36px; height: 36px; }
.topic__name { font-weight: 700; font-size: 1.05rem; }
.topic__count { color: var(--muted); font-size: .9rem; }
.topic__desc { grid-column: 1 / 3; color: var(--muted); font-size: .9rem; margin-top: .5rem; line-height: 1.5; }

/* ------------------------------ Cards --------------------------------- */
.card-grid { display: grid; gap: 1.25rem; }
.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .card-grid--3, .card-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .card-grid--2, .card-grid--3, .card-grid--4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; transition: transform .12s, box-shadow .12s; }
.card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.card-grid--featured .card { border-color: var(--grass); }
.card-grid--featured .card__title { font-size: 1.2rem; }
.card__media { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); border-bottom: 2px solid var(--ink); }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(to bottom, var(--grass) 0 45%, var(--dirt) 45% 100%); opacity: .6; }
.card__body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card__tags { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.card__cat { font-family: var(--font-pixel); font-size: .8rem; color: var(--grass-dark); text-decoration: none; text-transform: uppercase; }
.card__title { font-size: 1.08rem; margin: 0; line-height: 1.35; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--grass-dark); }
.card__excerpt { color: var(--muted); font-size: .93rem; margin: 0; line-height: 1.55; }
.card__meta { color: var(--muted); font-size: .82rem; margin: auto 0 0; padding-top: .4rem; }

/* --------------------------- Breadcrumb ------------------------------- */
.breadcrumbs { font-size: .88rem; color: var(--muted); margin: 0 0 1rem; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.breadcrumbs li + li::before { content: "›"; margin-right: .3rem; color: var(--stone); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--grass-dark); }
.breadcrumbs [aria-current] { color: var(--ink); }

/* ----------------------------- Entry ---------------------------------- */
.entry { max-width: var(--content); }
.entry__cat { font-family: var(--font-pixel); color: var(--grass-dark); text-decoration: none; text-transform: uppercase; font-size: .9rem; }
.entry__title { margin: .3rem 0 .6rem; }
.entry__lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 1rem; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }
.post-meta__author { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; font-weight: 600; }
.post-meta__author img { border-radius: var(--radius); border: 2px solid var(--ink); }
.tested-box {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem 1rem;
	margin: 0 0 1.5rem; padding: .8rem 1rem; background: var(--surface); border: 2px solid var(--ink); border-left: 8px solid var(--grass);
	font-size: .92rem;
}
.tested-box dt { font-family: var(--font-pixel); color: var(--muted); font-size: .8rem; }
.tested-box dd { margin: 0; font-weight: 600; }
.entry__thumb { margin: 0 0 1.5rem; }
.entry__thumb img { display: block; width: 100%; border: 2px solid var(--ink); box-shadow: var(--shadow); }
.entry__thumb figcaption { font-size: .85rem; color: var(--muted); margin-top: .5rem; }
.entry__content > :first-child { margin-top: 0; }
.entry__content h2 { padding: .2em 0 .3em .7em; border-left: 6px solid var(--grass); border-bottom: 2px solid var(--line); margin-top: 2em; }
.entry__content h3 { margin-top: 1.6em; }
.entry__content h3::before { content: "■ "; color: var(--grass); font-size: .6em; vertical-align: .25em; }
.entry__content > p:first-of-type { font-size: 1.05em; }
.entry__content a:not(.mc-dl__btn):not(.mc-server__link) { text-decoration-color: var(--grass); text-decoration-thickness: 2px; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border: 2px solid var(--line); }
.table-wrap table { margin: 0; min-width: 480px; }
.entry__content img { border: 2px solid var(--line); }
.entry__content figure img, .entry__content .wp-block-image img { border: 2px solid var(--ink); }
.entry__content .wp-caption-text, .entry__content figcaption { font-size: .85rem; color: var(--muted); text-align: center; }
.entry__content ul, .entry__content ol { padding-left: 1.4em; }
.entry__content li { margin-bottom: .35em; }
.entry__content iframe { max-width: 100%; }
.entry__footer { margin-top: 2rem; padding-top: 1rem; border-top: 2px solid var(--line); font-size: .92rem; color: var(--muted); }
.entry__tags a, .entry__versions a {
	display: inline-block; margin: 0 .35rem .35rem 0; padding: .15em .55em; background: var(--surface-2); color: var(--ink);
	text-decoration: none; border-radius: var(--radius); font-size: .88rem;
}
.entry__tags a::before { content: "#"; color: var(--muted); }
.page-links { margin: 1.5rem 0; }

/* ------------------------------- TOC ---------------------------------- */
@media (min-width: 1001px) { .has-sidebar .entry__content .toc { display: none; } }
.toc--side { margin: 0; border: 0; box-shadow: none; background: none; font-size: .9rem; max-height: calc(100vh - 220px); overflow: auto; }
.toc--side ol { padding: 0 0 0 1.2rem; }
.toc--side ol ol { padding-left: .9rem; }
.toc--side a { color: var(--muted); }
.toc--side a.is-active { color: var(--grass-dark); font-weight: 600; }
.widget-toc .widget-title { border-color: var(--grass); }
.toc { margin: 0 0 1.8rem; background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--shadow); font-size: .95rem; }
.toc summary { cursor: pointer; padding: .7rem 1rem; font-family: var(--font-pixel); font-size: 1rem; list-style: none; display: flex; justify-content: space-between; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "−"; }
.toc details:not([open]) summary::after { content: "+"; }
.toc ol { margin: 0; padding: 0 1rem 1rem 2rem; counter-reset: toc; }
.toc ol ol { padding: .2rem 0 0 1.2rem; }
.toc li { margin: .25em 0; }
.toc a { text-decoration: none; color: var(--ink); }
.toc a:hover, .toc a.is-active { color: var(--grass-dark); text-decoration: underline; }

/* --------------------------- Shortcodes ------------------------------- */
.mc-box { border: 2px solid var(--ink); border-left-width: 8px; padding: .8rem 1rem .2rem; margin: 1.5rem 0; background: var(--tip-bg); }
.mc-box__title { font-family: var(--font-pixel); margin: 0 0 .3rem; font-size: .95rem; }
.mc-box--warning { background: var(--warn-bg); border-left-color: var(--warn-line); }
.mc-box--java { border-left-color: var(--java); background: var(--surface); }
.mc-box--java .mc-box__title { color: var(--java); }
.mc-box--bedrock { border-left-color: var(--bedrock); background: var(--surface); }
.mc-box--bedrock .mc-box__title { color: var(--bedrock); }
.mc-box--info { background: var(--surface-2); border-left-color: var(--stone); }

.mc-howto { margin: 1.5rem 0; }
.mc-howto__title { margin-top: 0; }
.mc-howto__meta { color: var(--muted); font-size: .9rem; }
.mc-howto__list { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.mc-step { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 0 1rem; padding: 1rem 0; border-top: 2px solid var(--line); }
.mc-step::before {
	content: counter(step); grid-row: 1 / 3; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
	background: var(--grass); color: #fff; font-family: var(--font-pixel); font-size: 1.3rem; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.mc-step__title { margin: .2em 0 .4em; }
.mc-step__body > p:last-child { margin-bottom: 0; }
.mc-step__img { grid-column: 2; margin: .8rem 0 0; }
.mc-step__img img { border: 2px solid var(--ink); display: block; }

.mc-faq { margin: 2rem 0; }
.mc-faq__item { border: 2px solid var(--ink); margin-bottom: .6rem; background: var(--surface); }
.mc-faq__item summary { cursor: pointer; padding: .8rem 1rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.mc-faq__item summary::-webkit-details-marker { display: none; }
.mc-faq__item summary h3 { margin: 0; font-size: 1.02rem; }
.mc-faq__item summary::after { content: "+"; font-family: var(--font-pixel); font-size: 1.3rem; line-height: 1; }
.mc-faq__item[open] summary::after { content: "−"; }
.mc-faq__answer { padding: 0 1rem .2rem; border-top: 2px solid var(--line); }
.mc-faq__answer > p:first-child { margin-top: .8rem; }

.mc-recipe { margin: 1.5rem 0; display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 1rem; justify-content: start; }
.mc-recipe__grid { display: grid; gap: 4px; padding: 8px; background: var(--stone-light); border: 3px solid var(--ink); box-shadow: var(--shadow); }
.mc-recipe__grid--3 { grid-template-columns: repeat(3, 66px); }
.mc-recipe__grid--2 { grid-template-columns: repeat(2, 66px); }
.mc-recipe__cell {
	width: 66px; height: 66px; display: flex; align-items: center; justify-content: center; text-align: center;
	background: var(--surface-2); border: 2px solid var(--stone); box-shadow: inset 2px 2px 0 rgba(0,0,0,.18), inset -2px -2px 0 rgba(255,255,255,.35);
	font-size: .68rem; line-height: 1.15; font-weight: 600; padding: 3px; position: relative;
}
.mc-recipe__cell.is-empty { background: var(--stone-light); }
.mc-recipe__cell b { position: absolute; right: 3px; bottom: 1px; font-size: .8rem; }
.mc-recipe__arrow { font-size: 2rem; font-weight: 700; }
.mc-recipe__result { padding: 8px; background: var(--stone-light); border: 3px solid var(--ink); box-shadow: var(--shadow); }
.mc-recipe__cell.is-result { border-color: var(--grass); }
.mc-recipe figcaption { grid-column: 1 / -1; font-size: .88rem; color: var(--muted); }
@media (max-width: 480px) { .mc-recipe { grid-template-columns: 1fr; justify-items: start; } .mc-recipe__arrow { transform: rotate(90deg); } }

.mc-cmd { margin: 1.5rem 0; border: 2px solid var(--ink); background: var(--surface); }
.mc-cmd__row { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border-bottom: 2px solid var(--line); }
.mc-cmd__row:last-of-type { border-bottom: 0; }
.mc-cmd__label { font-family: var(--font-pixel); font-size: .8rem; min-width: 64px; }
.mc-cmd__label--java { color: var(--java); }
.mc-cmd__label--bedrock { color: var(--bedrock); }
.mc-cmd__code { flex: 1; background: var(--surface-2); padding: .35em .6em; overflow-x: auto; white-space: nowrap; }
.mc-copy { background: var(--surface-2); border: 2px solid var(--ink); padding: .25em .6em; font-size: .8rem; cursor: pointer; font-family: var(--font-pixel); color: var(--ink); }
.mc-copy.is-done { background: var(--grass); color: #fff; }
.mc-copy--sm { padding: .1em .45em; font-size: .72rem; }
.mc-cmd__note { padding: .4rem .8rem; margin: 0; font-size: .88rem; color: var(--muted); border-top: 2px solid var(--line); }

.mc-servers { display: grid; gap: 1rem; margin: 1.5rem 0; }
.mc-server { border: 2px solid var(--ink); box-shadow: var(--shadow); background: var(--surface); padding: 1rem 1.2rem; }
.mc-server__name { margin: 0 0 .6rem; }
.mc-server__meta { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; margin: 0 0 .6rem; font-size: .95rem; }
.mc-server__meta dt { color: var(--muted); }
.mc-server__meta dd { margin: 0; }
.mc-server__desc > p:last-child { margin-bottom: .5rem; }
.mc-server__link { font-weight: 600; text-decoration: none; }

/* --------------------------- Author / Related ------------------------- */
.author-box {
	display: flex; gap: 1.2rem; align-items: flex-start; margin: 2.5rem 0; padding: 1.2rem;
	background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--shadow); max-width: var(--content);
}
.author-box img { border: 2px solid var(--ink); flex: 0 0 auto; }
.author-box__label { font-family: var(--font-pixel); color: var(--muted); font-size: .8rem; margin: 0; }
.author-box__name { margin: .1rem 0 .2rem; font-size: 1.2rem; }
.author-box__name a { color: var(--ink); text-decoration: none; }
.author-box__job { color: var(--grass-dark); font-weight: 600; font-size: .92rem; margin: 0 0 .4rem; }
.author-box__bio { color: var(--muted); font-size: .95rem; margin: 0 0 .5rem; }
.author-box__social a { display: inline-block; margin-right: .8rem; font-weight: 600; text-decoration: none; }
.archive-author { display: flex; gap: 1.2rem; align-items: flex-start; }
.archive-author img { border: 2px solid var(--ink); }
.related { margin: 2.5rem 0; }

/* ----------------------------- Archive -------------------------------- */
.archive-header { margin-bottom: 1.5rem; }
.archive-title { margin: 0 0 .5rem; font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem); }
.archive-desc { color: var(--muted); max-width: var(--content); }
.sub-cats { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.sub-cats a { display: inline-block; padding: .3em .7em; border: 2px solid var(--ink); background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 500; }
.sub-cats a:hover { background: var(--surface-2); }
.pagination { margin: 2rem 0 0; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; }
.pagination .page-numbers { display: inline-block; padding: .4em .8em; border: 2px solid var(--ink); background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 600; }
.pagination .page-numbers.current { background: var(--grass); color: #fff; }
.pagination .page-numbers.dots { border: 0; }
.nothing-found { max-width: var(--content); }
.search-form { display: flex; max-width: 520px; margin: 1rem 0 2rem; }
.search-form input { flex: 1; padding: .6em .9em; border: 2px solid var(--ink); border-right: 0; background: var(--surface); color: var(--ink); }
.search-form button { box-shadow: none; }

/* ----------------------------- Sidebar -------------------------------- */
.widget { margin-bottom: 1.8rem; }
.widget-title { font-size: 1rem; margin: 0 0 .7rem; padding-bottom: .4rem; border-bottom: 3px solid var(--ink); }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: .35em 0; border-bottom: 1px solid var(--line); }
.widget a { text-decoration: none; color: var(--ink); }
.widget a:hover { color: var(--grass-dark); }
.widget_categories li { display: flex; justify-content: space-between; }
.version-box { background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--shadow); padding: .9rem 1rem; margin-bottom: 1.8rem; }
.version-box__title { font-family: var(--font-pixel); margin: 0 0 .5rem; }
.version-box ul { list-style: none; margin: 0 0 .5rem; padding: 0; display: grid; gap: .35rem; }
.version-box__link { font-weight: 600; text-decoration: none; }
.mini-list li { line-height: 1.4; }

/* ----------------------------- Comments ------------------------------- */
.comments { max-width: var(--content); margin-top: 2.5rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 2rem; }
.comment-body { border: 2px solid var(--line); background: var(--surface); padding: 1rem; margin-bottom: 1rem; }
.comment-author .avatar { border: 2px solid var(--ink); vertical-align: middle; margin-right: .5rem; }
.comment-metadata { font-size: .82rem; color: var(--muted); }
.comment-metadata a { color: inherit; }
.comment-content p:last-child { margin-bottom: 0; }
.reply a { font-size: .85rem; font-weight: 600; text-decoration: none; }
.comment-form label { display: block; font-weight: 600; margin-bottom: .2rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: .6em .8em; border: 2px solid var(--ink); background: var(--surface); color: var(--ink);
}
.comment-form .comment-form-cookies-consent { display: flex; gap: .5rem; align-items: center; }
.comment-form .comment-form-cookies-consent label { font-weight: 400; margin: 0; }
.comment-form .submit { margin-top: .5rem; }

/* ------------------------------ Footer -------------------------------- */
.site-footer { background: #1b2a1b; color: #e7efe3; margin-top: 3rem; padding: 2.5rem 0 1.5rem; border-top: 6px solid var(--grass); }
.site-footer a { color: inherit; }
.site-footer__widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.site-footer .widget-title { border-color: var(--grass); }
.site-footer .widget li { border-color: rgba(255,255,255,.12); }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; align-items: flex-start; }
.site-footer__brand strong { font-family: var(--font-pixel); font-size: 1.3rem; }
.site-footer__brand p { margin: .2rem 0; opacity: .85; }
.site-footer__social a { margin-right: 1rem; font-weight: 600; text-decoration: none; }
.site-footer__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.site-footer__menu a { text-decoration: none; }
.site-footer__disclaimer { font-size: .82rem; opacity: .7; max-width: 820px; margin: 2rem 0 .5rem; line-height: 1.5; }
.site-footer__copy { font-size: .85rem; opacity: .8; margin: 0; }

/* ------------------------- WP block polish ---------------------------- */
.wp-block-table table { margin: 0; }
.wp-block-image { margin: 1.5rem 0; }
.alignwide { margin-left: -2rem; margin-right: -2rem; }
@media (max-width: 1000px) { .alignwide { margin-left: 0; margin-right: 0; } }
.entry__content .wp-block-embed__wrapper { border: 2px solid var(--ink); }
@media print {
	.site-header, .layout__sidebar, .site-footer, .related, .comments, .mc-copy, .theme-toggle { display: none !important; }
	body { background: #fff; color: #000; }
}

/* --------------------------- Progress / to-top ------------------------ */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 60; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--grass); transition: width .1s linear; }
.to-top { position: fixed; right: 16px; bottom: 16px; width: 44px; height: 44px; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); font-size: 1.2rem; cursor: pointer; box-shadow: var(--shadow); z-index: 40; }
.to-top[hidden] { display: none; }

/* ---------------------------- Share / nav ----------------------------- */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1.2rem 0; }
.share__label { font-family: var(--font-pixel); color: var(--muted); font-size: .85rem; }
.share__btn { font: inherit; font-size: .85rem; font-weight: 600; padding: .35em .8em; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; }
.share__btn:hover { background: var(--surface-2); color: var(--ink); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: var(--content); margin: 2rem 0; }
.post-nav__item { display: block; padding: .8rem 1rem; border: 2px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); }
.post-nav__item:hover { border-color: var(--grass); color: var(--ink); }
.post-nav__item span { display: block; font-size: .8rem; color: var(--muted); font-family: var(--font-pixel); }
.post-nav__item--next { text-align: right; }
@media (max-width: 560px) { .post-nav { grid-template-columns: 1fr; } }

/* ----------------------------- Đọc thêm ------------------------------- */
.read-more { margin: 1.8rem 0; padding: .9rem 1.1rem; background: var(--surface-2); border-left: 6px solid var(--dirt); }
.read-more__title { font-family: var(--font-pixel); margin: 0 0 .4rem; font-size: .9rem; color: var(--muted); }
.read-more ul { margin: 0; padding-left: 1.2rem; }
.read-more li { margin: .2em 0; }
.read-more a { font-weight: 600; }

/* --------------------------- Hộp tải chính chủ ------------------------ */
.mc-dl { margin: 1.8rem 0; border: 3px solid var(--ink); box-shadow: var(--shadow); background: var(--surface); }
.mc-dl__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .8rem 1.1rem; background: var(--grass); color: #fff; }
.mc-dl__title { font-family: var(--font-pixel); font-size: 1.15rem; margin: 0; }
.mc-dl__safe { margin: 0; font-size: .8rem; opacity: .95; }
.mc-dl__safe::before { content: "✓ "; }
.mc-dl__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem 1rem; margin: 0; padding: .8rem 1.1rem; border-bottom: 2px solid var(--line); font-size: .92rem; }
.mc-dl__meta dt { font-family: var(--font-pixel); color: var(--muted); font-size: .78rem; }
.mc-dl__meta dd { margin: 0; font-weight: 600; }
.mc-dl__list { list-style: none; margin: 0; padding: 1rem 1.1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .7rem; }
.mc-dl__btn { display: flex; flex-direction: column; padding: .7rem .9rem; border: 2px solid var(--ink); background: var(--surface-2); color: var(--ink); text-decoration: none; border-left-width: 8px; transition: transform .08s; }
.mc-dl__btn:hover { transform: translate(2px, 2px); color: var(--ink); background: var(--surface); }
.mc-dl__os { font-weight: 700; }
.mc-dl__store { font-size: .85rem; color: var(--muted); }
.mc-dl__btn--play { border-left-color: #34a853; }
.mc-dl__btn--apple { border-left-color: #555; }
.mc-dl__btn--pc { border-left-color: var(--grass); }
.mc-dl__btn--xbox { border-left-color: #107c10; }
.mc-dl__btn--ps { border-left-color: #0070d1; }
.mc-dl__btn--switch { border-left-color: #e60012; }
.mc-dl__btn--trial { border-left-color: var(--java); }
.mc-dl__note { margin: 0; padding: .6rem 1.1rem .9rem; font-size: .88rem; color: var(--muted); }
