:root {
    --ink: #2d2926;
    --muted: #756d67;
    --paper: #fffdf9;
    --paper-2: #fff8ef;
    --line: #e9e0d8;
    --rose: #ef6f83;
    --rose-dark: #d84f68;
    --rose-soft: #fff0f2;
    --mint: #54aa91;
    --mint-soft: #eaf8f3;
    --gold: #d99936;
    --cocoa: #4c3329;
    --shadow: 0 18px 55px rgba(74, 51, 41, .09);
    --shadow-sm: 0 10px 30px rgba(74, 51, 41, .07);
    --radius: 24px;
    --content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }
button, input { font: inherit; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(239, 111, 131, .32); outline-offset: 3px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(233, 224, 216, .88);
    background: rgba(255, 253, 249, .9);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(var(--content), calc(100% - 36px));
    height: 72px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 26px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex: 0 0 auto;
    text-decoration: none;
}

.brand-logo {
    width: 45px;
    height: 45px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 6px 18px rgba(239, 111, 131, .2);
}

.brand-name {
    font-size: 17px;
    font-weight: 950;
    line-height: 1.05;
    letter-spacing: .02em;
}

.brand-edition {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .18em;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.desktop-nav a {
    padding: 10px 12px;
    border-radius: 11px;
    color: #605953;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] {
    color: var(--rose-dark);
    background: var(--rose-soft);
}

.header-search-button,
.menu-button,
.search-close,
.copy-button,
.back-to-top {
    border: 0;
    cursor: pointer;
}

.header-search-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
    background: #fff;
    font-size: 13px;
    font-weight: 750;
}

.header-search-button:hover { color: var(--rose-dark); border-color: #efbdc7; }
.key-hint {
    padding: 2px 6px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #faf7f3;
    font-size: 10px;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-size: 20px;
}

.mobile-drawer {
    display: none;
    padding: 8px 18px 20px;
    border-top: 1px solid var(--line);
    background: var(--paper);
}

.mobile-drawer.open { display: grid; }
.mobile-drawer a {
    padding: 12px 10px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
}
.mobile-drawer a:hover { background: var(--rose-soft); color: var(--rose-dark); }

.search-layer {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 13vh 20px 30px;
    background: rgba(45, 41, 38, .58);
    backdrop-filter: blur(8px);
}
.search-layer.open { display: flex; }

.search-dialog {
    width: min(720px, 100%);
    max-height: 74vh;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(0,0,0,.22);
}

.search-field-wrap {
    position: relative;
    display: flex;
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid var(--line);
}
.search-field-wrap::before {
    margin-left: 5px;
    color: var(--muted);
    content: "⌕";
    font-size: 28px;
}
.search-field {
    width: 100%;
    height: 52px;
    padding: 0 14px;
    border: 0;
    color: var(--ink);
    background: transparent;
    font-size: 17px;
}
.search-field:focus { outline: 0; }
.search-close {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 11px;
    color: var(--muted);
    background: #f7f3ef;
    font-size: 22px;
}

.search-results { max-height: calc(74vh - 81px); padding: 9px; overflow: auto; }
.search-result {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    align-items: center;
    gap: 13px;
    padding: 13px;
    border-radius: 15px;
    text-decoration: none;
}
.search-result:hover { background: var(--rose-soft); }
.search-result-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--paper-2);
    font-size: 22px;
}
.search-result strong { display: block; margin-bottom: 4px; font-size: 15px; }
.search-result small { display: block; color: var(--muted); line-height: 1.45; }
.search-result-category { color: var(--rose-dark); font-size: 11px; font-weight: 850; }
.search-empty { padding: 40px 20px; color: var(--muted); text-align: center; line-height: 1.8; }

.home-hero {
    position: relative;
    overflow: hidden;
    padding: 86px 0 72px;
    background:
        radial-gradient(circle at 12% 24%, rgba(239,111,131,.13), transparent 26%),
        radial-gradient(circle at 88% 18%, rgba(84,170,145,.13), transparent 24%),
        linear-gradient(180deg, #fff9f1 0%, var(--paper) 100%);
}
.home-hero::before,
.home-hero::after {
    position: absolute;
    width: 260px;
    height: 260px;
    border: 46px solid rgba(217, 153, 54, .065);
    border-radius: 50%;
    content: "";
}
.home-hero::before { left: -150px; bottom: -110px; }
.home-hero::after { right: -130px; top: -120px; }

.shell { width: min(var(--content), calc(100% - 36px)); margin: auto; }
.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 370px;
    align-items: center;
    gap: 70px;
}

.eyebrow,
.section-kicker,
.article-kicker {
    color: var(--rose-dark);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.home-hero h1 {
    max-width: 730px;
    margin: 18px 0 20px;
    font-size: clamp(43px, 6vw, 72px);
    line-height: 1.08;
    letter-spacing: -.045em;
}
.home-hero h1 em { color: var(--rose); font-style: normal; }
.hero-lead {
    max-width: 650px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.85;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    background: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
    transition: transform .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.button.primary { border-color: var(--rose); color: #fff; background: var(--rose); }
.button.dark { border-color: var(--cocoa); color: #fff; background: var(--cocoa); }

.hero-brand-card {
    position: relative;
    padding: 18px;
    border: 1px solid #f2d8d7;
    border-radius: 32px;
    background: rgba(255,255,255,.72);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}
.hero-brand-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 23px;
    object-fit: cover;
}
.hero-card-label {
    position: absolute;
    right: -18px;
    bottom: 35px;
    padding: 10px 14px;
    border-radius: 12px;
    color: #fff;
    background: var(--cocoa);
    box-shadow: var(--shadow-sm);
    font-size: 12px;
    font-weight: 900;
    transform: rotate(-4deg);
}

.group-strip {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    margin-top: -30px;
    padding: 18px 22px;
    border: 1px solid #f0dec2;
    border-radius: 19px;
    background: #fff8e8;
    box-shadow: var(--shadow-sm);
}
.group-strip-icon { font-size: 26px; }
.group-strip h2 { margin: 0 0 3px; font-size: 16px; }
.group-strip p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.group-number {
    padding: 9px 12px;
    border-radius: 11px;
    color: #a46716;
    background: #ffedc8;
    font-family: Consolas, monospace;
    font-weight: 900;
    white-space: nowrap;
}

.home-section { padding: 76px 0; }
.home-hero + .shell + .home-section { padding-top: 52px; }
.home-section.alt { border-block: 1px solid #f0e9e2; background: #fffaf4; }
.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}
.section-heading h2 { margin: 8px 0 8px; font-size: clamp(28px, 4vw, 38px); letter-spacing: -.03em; }
.section-heading p { max-width: 650px; margin: 0; color: var(--muted); line-height: 1.7; }

.start-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    counter-reset: steps;
}
.start-card {
    position: relative;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.start-card:hover { transform: translateY(-4px); border-color: #efbdc7; box-shadow: var(--shadow); }
.start-card::before {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 28px;
    border-radius: 13px;
    color: var(--rose-dark);
    background: var(--rose-soft);
    content: "0" counter(steps);
    counter-increment: steps;
    font-size: 13px;
    font-weight: 950;
}
.start-card h3 { margin: 0 0 10px; font-size: 19px; }
.start-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.card-arrow { display: block; margin-top: 22px; color: var(--rose-dark); font-weight: 900; }

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.category-card {
    position: relative;
    display: block;
    min-height: 245px;
    padding: 26px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.category-card:hover { transform: translateY(-4px); border-color: #efbdc7; box-shadow: var(--shadow); }
.category-icon {
    display: grid;
    place-items: center;
    width: 53px;
    height: 53px;
    margin-bottom: 23px;
    border-radius: 17px;
    background: var(--rose-soft);
    font-size: 25px;
}
.category-card:nth-child(3n+2) .category-icon { background: var(--mint-soft); }
.category-card:nth-child(3n) .category-icon { background: #fff5dd; }
.category-card h3 { margin: 0 0 9px; font-size: 20px; }
.category-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.category-meta {
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--rose-dark);
    font-size: 12px;
    font-weight: 900;
}

.page-hero {
    padding: 60px 0 46px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 86% 10%, rgba(84,170,145,.1), transparent 25%),
        linear-gradient(180deg, #fff9f2, var(--paper));
}
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: 12px;
}
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--rose-dark); }
.breadcrumbs span::before { margin-right: 8px; color: #c8beb7; content: "/"; }

.page-hero-row {
    display: flex;
    align-items: center;
    gap: 24px;
}
.page-icon {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    flex: 0 0 auto;
    border-radius: 24px;
    background: var(--rose-soft);
    font-size: 38px;
}
.page-hero h1 {
    margin: 7px 0 10px;
    font-size: clamp(34px, 5vw, 50px);
    line-height: 1.15;
    letter-spacing: -.035em;
}
.page-hero p { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.75; }

.category-page { padding: 54px 0 80px; }
.article-card-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.article-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.article-card:hover { transform: translateY(-3px); border-color: #efbdc7; box-shadow: var(--shadow-sm); }
.article-card h2 { margin: 0 0 9px; font-size: 20px; }
.article-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.article-card-subpages {
    display: block;
    margin-top: 13px;
    color: #8f827a;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.7;
}
.article-card-version { display: inline-block; margin-top: 18px; color: var(--rose-dark); font-size: 11px; font-weight: 900; }
.article-card-arrow { color: #b6aaa3; font-size: 24px; }

.article-layout {
    display: grid;
    grid-template-columns: 245px minmax(0, 760px);
    justify-content: center;
    gap: 54px;
    padding: 54px 0 90px;
}
.article-sidebar { position: sticky; top: 100px; align-self: start; }
.sidebar-title { margin-bottom: 10px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.sidebar-links { display: grid; gap: 3px; }
.sidebar-links a {
    padding: 10px 12px;
    border-radius: 10px;
    color: #625a54;
    text-decoration: none;
    font-size: 13px;
    font-weight: 750;
}
.sidebar-links a:hover,
.sidebar-links a[aria-current="page"] { color: var(--rose-dark); background: var(--rose-soft); }
.sidebar-category-link {
    display: inline-flex;
    margin-top: 18px;
    color: var(--rose-dark);
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
}

.article-main { min-width: 0; }
.article-heading { padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.article-heading h1 {
    margin: 10px 0 13px;
    font-size: clamp(34px, 5vw, 50px);
    line-height: 1.18;
    letter-spacing: -.04em;
}
.article-intro { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.8; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag {
    padding: 7px 10px;
    border-radius: 9px;
    color: var(--rose-dark);
    background: var(--rose-soft);
    font-size: 11px;
    font-weight: 850;
}
.tag.version { color: #317e69; background: var(--mint-soft); }

.command-block {
    margin: 32px 0;
    padding: 22px;
    border: 1px solid #eadfd6;
    border-radius: 20px;
    background: #fbf8f5;
}
.command-block h2 { margin: 0 0 14px; font-size: 17px; }
.command-list { display: grid; gap: 9px; }
.command-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 11px 10px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}
.command-row code {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #a74458;
    font-family: Consolas, "Microsoft YaHei", monospace;
    font-size: 13px;
}
.command-label { display: block; margin-bottom: 3px; color: var(--muted); font-family: inherit; font-size: 10px; }
.copy-button {
    min-height: 34px;
    padding: 0 11px;
    border-radius: 9px;
    color: var(--muted);
    background: #f4f0ec;
    font-size: 11px;
    font-weight: 850;
}
.copy-button:hover { color: var(--rose-dark); background: var(--rose-soft); }

.keybind-block {
    margin: 32px 0;
    padding: 24px;
    border: 1px solid #dce9e4;
    border-radius: 20px;
    background: #f4fbf8;
}
.keybind-block h2 { margin: 0 0 8px; font-size: 18px; }
.keybind-block > p { margin: 0 0 17px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.keybind-block code { color: #317e69; font-family: Consolas, "Microsoft YaHei", monospace; }
.keybind-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.keybind-row {
    display: grid;
    grid-template-columns: minmax(72px, auto) 1fr;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid #d9e7e1;
    border-radius: 12px;
    background: #fff;
}
.keybind-row kbd {
    justify-self: start;
    padding: 5px 8px;
    border: 1px solid #b9cec5;
    border-bottom-width: 3px;
    border-radius: 7px;
    color: #286b59;
    background: #f7fffc;
    font-family: Consolas, "Microsoft YaHei", monospace;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}
.keybind-row strong { display: block; color: #393431; font-size: 12px; line-height: 1.45; }
.keybind-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.4; }

.recipes-block { margin: 38px 0 8px; }
.recipes-heading { margin-bottom: 18px; }
.recipes-heading > span {
    color: #9b7150;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .14em;
}
.recipes-heading h2 { margin: 7px 0 7px; font-size: 24px; }
.recipes-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.recipe-card-list { display: grid; gap: 16px; }
.recipe-card {
    padding: 22px;
    border: 1px solid #eadbc8;
    border-radius: 20px;
    background:
        linear-gradient(rgba(255,255,255,.92), rgba(255,255,255,.92)),
        repeating-linear-gradient(45deg, #f4e8d7 0 8px, #f9f2e8 8px 16px);
}
.recipe-card > header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.recipe-card > header span { color: #9b7150; font-size: 9px; font-weight: 950; letter-spacing: .1em; }
.recipe-card > header h3 { margin: 4px 0 0; font-size: 18px; }
.recipe-card > header code {
    max-width: 48%;
    color: #9d8b7d;
    font-family: Consolas, "Microsoft YaHei", monospace;
    font-size: 9px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    text-align: right;
}
.recipe-layout {
    display: grid;
    grid-template-columns: 168px 36px minmax(92px, 1fr);
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(3, 52px);
    grid-template-rows: repeat(3, 52px);
    gap: 5px;
    padding: 6px;
    border: 1px solid #cdbba7;
    border-radius: 13px;
    background: #c9b69f;
    box-shadow: inset 0 2px 5px rgba(75,52,34,.18);
}
.recipe-cell {
    display: grid;
    place-items: center;
    border: 1px solid #a8947d;
    border-radius: 7px;
    background: #e9ddce;
    box-shadow: inset 1px 1px 0 rgba(255,255,255,.62);
}
.recipe-cell.empty { opacity: .54; }
.recipe-arrow { color: #9b7150; font-size: 28px; font-weight: 900; text-align: center; }
.recipe-result {
    display: grid;
    justify-items: center;
    gap: 8px;
    min-width: 92px;
    color: #5c4d42;
    font-size: 12px;
    text-align: center;
}
.recipe-item {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
}
.recipe-item img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(1px 2px 1px rgba(50,35,23,.25));
}
.recipe-item.result {
    width: 68px;
    height: 68px;
    border: 1px solid #bba78f;
    border-radius: 12px;
    background: #eadfce;
    box-shadow: inset 1px 1px 0 rgba(255,255,255,.7);
}
.recipe-item.result img { width: 54px; height: 54px; }
.recipe-item.mini { width: 25px; height: 25px; }
.recipe-item.mini img { width: 23px; height: 23px; }
.recipe-item.missing {
    border: 1px dashed #bd9b81;
    border-radius: 8px;
    color: #9b7150;
    background: #f7eee4;
    font-weight: 900;
}
.recipe-count {
    position: absolute;
    right: 0;
    bottom: 0;
    color: #fff;
    font-family: Consolas, monospace;
    font-size: 11px;
    font-weight: 950;
    text-shadow: 1px 1px 2px #25180f, -1px -1px 2px #25180f;
}
.recipe-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 17px;
    padding-top: 14px;
    border-top: 1px solid #eadbc8;
}
.recipe-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.recipe-legend small { color: var(--muted); font-size: 10px; }
.recipe-card > p { margin: 14px 0 0; color: #6c6057; font-size: 12px; line-height: 1.7; }

.article-section { padding: 31px 0; border-bottom: 1px solid var(--line); }
.article-section h2 { margin: 0 0 13px; font-size: 23px; letter-spacing: -.02em; }
.article-section p { margin: 0; color: #5e5752; line-height: 1.95; }
.article-section ul { margin: 15px 0 0; padding: 0; list-style: none; }
.article-section li {
    position: relative;
    margin-top: 10px;
    padding-left: 24px;
    color: #5e5752;
    line-height: 1.8;
}
.article-section li::before {
    position: absolute;
    left: 1px;
    top: .68em;
    width: 8px;
    height: 8px;
    border-radius: 3px;
    background: var(--rose);
    content: "";
    transform: rotate(12deg);
}

.article-note {
    margin-top: 30px;
    padding: 21px 23px;
    border: 1px solid #f0ddba;
    border-radius: 18px;
    color: #765622;
    background: #fff8e8;
    font-size: 14px;
    line-height: 1.8;
}
.article-note strong { display: block; margin-bottom: 4px; color: #9c6717; }

.next-article {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 18px;
    margin-top: 34px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: #fff;
    text-decoration: none;
}
.next-article:hover { border-color: #efbdc7; box-shadow: var(--shadow-sm); }
.next-article small { display: block; margin-bottom: 5px; color: var(--muted); }
.next-article strong { font-size: 17px; }
.next-article span { color: var(--rose-dark); font-size: 25px; }

.site-footer {
    border-top: 1px solid var(--line);
    background: #302b28;
    color: #d4cbc5;
}
.footer-inner {
    width: min(var(--content), calc(100% - 36px));
    margin: auto;
    padding: 45px 0;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 30px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 52px; height: 52px; border-radius: 15px; object-fit: cover; }
.footer-brand strong { display: block; color: #fff; font-size: 17px; }
.footer-brand span { display: block; margin-top: 5px; font-size: 12px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: end; gap: 17px; }
.footer-links a { color: #d4cbc5; font-size: 12px; text-decoration: none; }
.footer-links a:hover { color: #fff; }

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 40;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #fff;
    background: var(--cocoa);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease;
}
.back-to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

.not-found {
    min-height: calc(100vh - 72px);
    display: grid;
    place-items: center;
    padding: 70px 0;
    text-align: center;
    background:
        radial-gradient(circle at 18% 20%, rgba(239,111,131,.13), transparent 26%),
        radial-gradient(circle at 82% 78%, rgba(84,170,145,.12), transparent 26%),
        var(--paper);
}
.not-found-inner { display: grid; justify-items: center; }
.not-found img {
    width: 150px;
    height: 150px;
    margin-bottom: 28px;
    border-radius: 38px;
    object-fit: cover;
    box-shadow: var(--shadow);
    transform: rotate(-3deg);
}
.not-found h1 {
    margin: 15px 0 12px;
    font-size: clamp(40px, 7vw, 64px);
    letter-spacing: -.045em;
}
.not-found p { max-width: 590px; margin: 0; color: var(--muted); line-height: 1.9; }
.not-found .hero-actions { justify-content: center; }

@media (max-width: 980px) {
    .desktop-nav { display: none; }
    .header-search-button { margin-left: auto; }
    .menu-button { display: block; margin-left: 0; }
    .hero-grid { grid-template-columns: 1fr 300px; gap: 38px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .article-layout { grid-template-columns: 205px minmax(0, 1fr); gap: 35px; }
}

@media (max-width: 760px) {
    .header-inner { height: 66px; }
    .header-search-button span,
    .key-hint { display: none; }
    .header-search-button { width: 42px; padding: 0; justify-content: center; }
    .brand-logo { width: 40px; height: 40px; border-radius: 12px; }
    .brand-name { font-size: 15px; }
    .home-hero { padding: 58px 0 68px; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-lead { margin-inline: auto; }
    .hero-actions { justify-content: center; }
    .hero-brand-card { width: min(300px, 80vw); margin: auto; order: -1; transform: rotate(1deg); }
    .group-strip { grid-template-columns: auto 1fr; }
    .group-number { grid-column: 2; justify-self: start; }
    .home-hero + .shell + .home-section { padding-top: 46px; }
    .start-grid,
    .article-card-list { grid-template-columns: 1fr; }
    .article-layout { display: block; }
    .article-sidebar { position: static; margin-bottom: 30px; }
    .sidebar-links {
        display: flex;
        gap: 7px;
        padding-bottom: 8px;
        overflow-x: auto;
        scrollbar-width: thin;
    }
    .sidebar-links a { flex: 0 0 auto; background: #f8f4f0; }
    .sidebar-category-link { margin-top: 8px; }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-links { justify-content: start; }
}

@media (max-width: 560px) {
    .shell,
    .header-inner,
    .footer-inner { width: min(100% - 28px, var(--content)); }
    .brand-edition { display: none; }
    .home-hero h1 { font-size: 42px; }
    .hero-lead { font-size: 16px; }
    .home-section { padding: 58px 0; }
    .category-grid { grid-template-columns: 1fr; }
    .group-strip { gap: 12px; padding: 17px; }
    .section-heading { display: block; }
    .page-hero { padding: 42px 0 35px; }
    .page-hero-row { align-items: flex-start; }
    .page-icon { width: 60px; height: 60px; border-radius: 18px; font-size: 29px; }
    .page-hero h1 { font-size: 33px; }
    .category-page { padding-top: 36px; }
    .article-layout { padding-top: 36px; }
    .article-heading h1 { font-size: 35px; }
    .command-row { grid-template-columns: 1fr; }
    .keybind-list { grid-template-columns: 1fr; }
    .recipe-card { padding: 17px; }
    .recipe-card > header { display: block; }
    .recipe-card > header code { display: block; max-width: none; margin-top: 8px; text-align: left; }
    .recipe-layout {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        gap: 9px;
    }
    .recipe-grid {
        grid-template-columns: repeat(3, 45px);
        grid-template-rows: repeat(3, 45px);
        gap: 4px;
        padding: 5px;
    }
    .recipe-arrow { transform: rotate(90deg); }
    .recipe-result { width: 100%; min-width: 0; }
    .recipe-item { width: 39px; height: 39px; }
    .recipe-item img { width: 34px; height: 34px; }
    .copy-button { justify-self: start; }
    .search-layer { padding-top: 7vh; }
}

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

@media print {
    .site-header,
    .site-footer,
    .article-sidebar,
    .back-to-top,
    .search-layer,
    .copy-button,
    .next-article { display: none !important; }
    body { color: #000; background: #fff; }
    .page-hero { padding: 18px 0; background: #fff; }
    .article-layout { display: block; padding: 20px 0; }
    .article-main { max-width: none; }
    .article-section,
    .article-heading { break-inside: avoid; }
}
