/* Shared art direction: warm paper, engraved brass and deep brown ink. */
:root {
  --atelier-ink: #624025;
  --atelier-brass: #956c39;
  --atelier-paper: #fffaf0;
  --atelier-line: #d8c6a6;
  --atelier-shadow: 0 12px 32px #513c2110, 0 2px 5px #513c2108;
  --muted: #6b5c4b;
}
html { scroll-padding-top: 24px; }
body {
  background-color: #f2e8d6;
  background-image: radial-gradient(ellipse at 4% 0, #fff9ec 0, transparent 55%),
    radial-gradient(ellipse at 100% 32%, #e4dac467 0, transparent 50%);
  background-size: 100% 100%;
}
.header { position: relative; min-height: 104px; height: auto; gap: 24px; padding-top: 20px; padding-bottom: 20px; border-bottom-color: #c8b18b; }
.header::after { content: ''; position: absolute; left: 48px; right: 48px; bottom: -5px; height: 1px; background: #c8b18b70; }
.brand { color: var(--atelier-ink); }
.brand > svg { width: 44px; height: 44px; padding: 5px; border: 1px solid #ad9470; border-radius: 12px 12px 4px 12px; background: #fff8ea; }
.brand span { letter-spacing: 2.5px; }
.brand small { margin-top: 6px; letter-spacing: 3.6px; }
.header nav { align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 12px 20px; }
.header nav a:not(.nav-account-link):not(.nav-blueprint-link) { padding: 6px 0; border-bottom: 2px solid transparent; }
.header nav a[aria-current=page]:not(.nav-account-link):not(.nav-blueprint-link) { color: var(--atelier-ink); border-bottom-color: var(--atelier-brass); }
.header nav a:hover { color: var(--atelier-ink); }
.header nav a.nav-blueprint-link { color: #f0f5e7; background: #3f6553; border-color: #3f6553; }
.header nav a.nav-blueprint-link:is(:hover, [aria-current=page]) { color: #fff9e8; background: #2e4d3e; border-color: #2e4d3e; }
.eyebrow { color: var(--atelier-brass); letter-spacing: 2px; }
.button { border-radius: 7px; box-shadow: 0 3px 0 #5c3c2819; transition: background .2s, box-shadow .2s, transform .2s; }
.button:not(.secondary):not(.danger) { background: var(--atelier-ink); border-color: var(--atelier-ink); color: #fff5dd; }
.button:not(.secondary):not(.danger):hover { background: #795235; border-color: #795235; }
.button.secondary { background: #fff9ed; border-color: #cbb594; }
.button.secondary:hover { background: #ece1cb; }
.button:disabled { opacity: .6; cursor: wait; transform: none; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #91602f; outline-offset: 4px; }
.search-box:focus-within { outline: 3px solid #245b78; outline-offset: 3px; }
.search-box input:focus-visible { outline: 2px solid #245b78; outline-offset: 2px; }
.search-box input::placeholder { color: #6b5c4b; opacity: 1; }
body form input[name]::placeholder,body form textarea[name]::placeholder { color: #6b5c4b; opacity: 1; }
.installation-profile { margin: 16px 0; border-top: 1px solid var(--border); padding-top: 16px; }
.installation-profile>summary { cursor: pointer; font-size: 17px; font-weight: 600; min-height: 44px; }
.developer-downloads code { overflow-wrap: anywhere; }
.entry-version-summary { padding: 12px 0; border-block: 1px solid var(--border); margin-bottom: 20px; font-size: 14px; color: var(--muted); }
.entry-version-summary p { margin: 4px 0; }
.entry-source-evidence { margin: 24px 0; overflow-wrap: anywhere; font-size: 13px; }
.entry-source-evidence summary { cursor: pointer; min-height: 44px; padding-block: 10px; }
.bp-environment,.bp-reading-help { padding: 16px 0; margin: 16px 0; border-block: 1px solid var(--border); }
.bp-index-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 24px 0; }
.bp-index-heading h1 { font-size: clamp(30px,4vw,42px); margin: 0; }
.bp-index-heading p { margin: 8px 0; color: var(--muted); font-size: 14px; }
.bp-index-heading>.button { flex: none; }
.bp-about>summary { cursor: pointer; min-height: 44px; padding-block: 10px; font-size: 14px; }
.bp-about .bp-hero h2 { font: 600 30px/1.4 Georgia,"Microsoft Yahei",serif; }
.bp-compatibility { color: #6b5c4b; font-size: 13px; }
.bp-filters { flex-wrap: wrap; }
.search-box select { max-width: 190px; min-width: 0; }
.minecraft-tooltip { pointer-events: auto; max-height: calc(100dvh - 16px); overflow: auto; }
.guide-toc>a { color: #6b5c4b; }
.recipe-material-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 6px 20px; padding-left: 20px; font-size: 13px; }
[data-recipe-copy-text] { display: block; width: 100%; min-height: 180px; margin: 12px 0; padding: 12px; font: 13px/1.7 monospace; color: var(--text); background: #fffcf3; border: 1px solid var(--border); }
.entry-description .wiki-prose { font-size: 16px; line-height: 1.8; }
@media(max-width:700px) {
  body.has-exploration-hints main, body:has([data-exploration-index]:not([open])) main { padding-left: 18px; padding-right: 18px; }
  .exploration-edge-hints { display: none; }
  .search-box { flex-wrap: wrap; }
  .search-box select { width: 100%; max-width: none; }
  .entry-content>.entry-version-summary.entry-version-summary { order: 2; }
  .entry-content>.entry-toc { order: 3; }
  .entry-content>#description { order: 4; }
  .entry-identity { order: 5; }
  .entry-content>:not(.entry-heading):not(.entry-toc):not(.entry-version-summary):not(#description) { order: 6; }
  .entry-page[data-entry-kind=item] .identity-structure img { max-height: 140px; }
  .header nav>a[href="https://github.com/MIAOKATZE"]:not(.nav-account-link):not(.nav-blueprint-link) { display: none; }
  .bp-hero { padding-block: 24px; min-height: 0; }
  .bp-hero h1 { font-size: 32px; }
  .bp-station .bp-hero .bp-drafting { display: none; }
}
.skip-link { position: fixed; z-index: 1001; left: 20px; top: -100px; background: #624025; color: #fff8eb; padding: 12px 20px; border-radius: 6px; }
.skip-link:focus { top: 12px; }

/* The first spread pairs an editorial headline with the actual Mod models. */
.mod-hero { padding: 68px 0 56px; gap: 52px; min-height: 620px; }
.mod-hero h1 { font-family: Georgia, 'Noto Serif CJK SC', 'Source Han Serif SC', SimSun, serif; font-weight: 700; font-size: clamp(40px, 4.6vw, 65px); line-height: 1.3; letter-spacing: -.035em; }
.mod-hero h1 span { color: var(--atelier-ink); position: relative; }
.mod-hero h1 span::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px; border-top: 1px solid #b58f59; border-bottom: 2px solid #b58f59; transform: rotate(-1.5deg); }
.mod-hero .hero-sub { color: #6c5b42; font-size: 20px; margin-top: 30px; }
.mod-hero .intro { color: #6a604e; line-height: 2; }
.mod-hero .hero-meta { border-top: 1px solid #cdbb9b; gap: 24px; padding-top: 20px; }
.mod-hero .hero-meta b { color: var(--atelier-ink); }
.hero-search { box-shadow: 0 5px 18px #7158300d; background: #fffaf0; border-color: #c9b08c; border-radius: 8px; }
.hero-search:focus-within { outline: 2px solid #a57b48; outline-offset: 3px; }
.hero-art { isolation: isolate; border: 1px solid #c4ab80; border-radius: 45% 45% 12px 12px; background: radial-gradient(ellipse at 50% 45%, #cfc9ac75, transparent 62%), #ece3ce; box-shadow: inset 0 0 0 7px #f7efdd, inset 0 0 0 8px #c4ab8060, var(--atelier-shadow); }
.hero-art::after { content: ''; position: absolute; inset: 20px; border: 1px solid #b39b723b; border-radius: inherit; pointer-events: none; z-index: -1; }
.hero-art .art-caption { color: #5b5946; left: 20%; right: 20%; top: 10%; text-align: center; }
.hero-art .art-slide img { top: 21%; height: 55%; }
.hero-art .art-caption b { color: var(--atelier-ink); }
.hero-art .art-tag { bottom: 78px; border-color: #cbb592; background: #fff8eae8; backdrop-filter: blur(8px); }
.hero-art .carousel-controls { background: #faf2e0ed; border: 1px solid #cbb592; border-radius: 20px; padding: 5px 10px; }
.hero-art .orbital { border-color: #9a8c6533; }
.home-blueprint-promo { position: relative; overflow: hidden; background: #624025; border: 1px solid #624025; border-radius: 14px; box-shadow: var(--atelier-shadow); padding: 34px; gap: 40px; }
.home-blueprint-promo::before { content: ''; pointer-events: none; position: absolute; inset: 0; opacity: .15; background-image: linear-gradient(#e8d8aa 1px, transparent 1px), linear-gradient(90deg, #e8d8aa 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(90deg, transparent, #000); }
.home-blueprint-copy, .home-blueprint-cover { position: relative; z-index: 1; }
.home-blueprint-promo .eyebrow { color: #dac48d; }
.home-blueprint-promo h2, .home-blueprint-promo h2 span { color: #fff4d8; }
.home-blueprint-promo p, .home-blueprint-promo strong { color: #e5d6bd; }
.home-blueprint-promo .text-link { color: #e9d3a2; }
.home-blueprint-promo .button:not(.secondary):not(.danger) { background: #624025; border-color: #d9ba86; color: #fff9ed; }
.home-blueprint-promo .button:not(.secondary):not(.danger):hover { background: #795235; border-color: #efd5a6; }
.home-blueprint-notes span { color: #e5d6bd; border-color: #a78b68; background: #3d291c66; }
.home-blueprint-cover { border-radius: 9px; border-color: #bda99770; }
.home-blueprint-cover img { transition: transform .5s; }
.section-heading { align-items: end; padding-bottom: 20px; border-bottom: 1px solid #cdbb9b; }
.section-heading h2 { color: var(--atelier-ink); font-family: Georgia, SimSun, serif; font-size: 30px; }
.section-heading h2 span { color: #a58c66; }
.mod-grid { gap: 24px; }
.mod-card { --mod-accent: #956c39; border: 1px solid #d3c09f; border-radius: 12px; background: #fff9ec; box-shadow: var(--atelier-shadow); position: relative; overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; }
.mod-card.gtit { --mod-accent: #97704a; }
.mod-card.gtswn { --mod-accent: #836952; }
.mod-card.gtsr { --mod-accent: #a26a46; }
.mod-card.gtmb { --mod-accent: #766250; }
.mod-card::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--mod-accent); }
.mod-card h3 { color: var(--atelier-ink); }
.wiki-route-grid > a { background: #fcf7eb; border-radius: 9px; border-color: #d6c4a5; box-shadow: 0 3px 0 #ac8c5920; }
.wiki-route-grid strong { color: var(--atelier-ink); }
.wiki-route-grid .wiki-route-number { color: #bca578; }
.paper-panel, .wiki-document { border-color: var(--atelier-line); box-shadow: var(--atelier-shadow); border-radius: 10px; }
.wiki-document { background: #fffaf0; }
.entry-description h2, .wiki-document h2, .guide-body-section > h2 { color: var(--atelier-ink); }
.wiki-intro { position: relative; padding-bottom: 22px; border-bottom: 1px solid #cdbb9b; }
.wiki-intro h1, .entry-heading h1 { color: var(--atelier-ink); }
.mod-summary { border-radius: 10px; border-color: #d1bc98; background: linear-gradient(105deg, #fff9eb, #ede4cf); }
.wiki-layout > aside { border-right: 1px solid #d5c4a5; padding-right: 20px; }
.side-link.active, .taxonomy-link.active { background: #624025; border-radius: 6px; color: #fff4dc; }
.side-link.active small { color: #ead9bc; }
.filters .selected { background: #624025; border-color: #624025; color: #fff5df; }
.filters a { border-radius: 5px; }
.catalog-toolbar { padding-bottom: 16px; border-bottom: 1px solid #d6c4a5; }
.entry-card { border-radius: 9px; border-color: #d6c4a5; box-shadow: 0 3px 12px #513c2108; }
.wiki-article-card { border-radius: 9px; }
.entry-toc { border-top: 1px solid #d3c09f; border-bottom-color: #d3c09f; background: #f7efdf; padding-left: 16px; padding-right: 16px; border-radius: 7px; }
/* Articles and introductory guides share the same paper-and-ink components. */
.wiki-prose h4, .wiki-prose strong, .wiki-prose b,
.wiki-prose .wiki-rule-heading h3, .wiki-rule-heading :is(h2, h3),
.wiki-prose .wiki-rule-card h4, .wiki-rule-card h4,
.wiki-rule-card strong, .wiki-flow strong,
.gameplay-guide .guide-focus h2 { color: var(--atelier-ink); }
.wiki-prose a.wiki-link, .wiki-document a,
.entry-toc a, .entry-identity a { color: #805329; border-bottom-color: #b99a70; }
.wiki-prose a.wiki-link:hover { color: #56351e; background: #ead7b96b; }
.wiki-prose a:focus-visible, .wiki-document a:focus-visible { outline-color: #91602f; }
.wiki-prose .wiki-value { color: #805329; background: #ead7b96b; }
.wiki-prose .wiki-term, .wiki-prose code { color: #68472e; background: #f0e5d3; border-color: #d6c4a5; }
.wiki-rule-panel { color: #624c36; border-color: #cdb797; background: linear-gradient(145deg, #fcf7ec, #f1e5d0); }
.wiki-rule-card, .wiki-flow > li,
.gameplay-guide .guide-focus > div { background: var(--atelier-paper); border-color: #d6c4a5; border-radius: 9px; }
.wiki-prose .wiki-rule-card p, .wiki-rule-card p,
.wiki-prose .wiki-flow p, .wiki-flow p,
.gameplay-guide .guide-focus p { color: #685644; }
.wiki-eyebrow, .wiki-flow > li::before, .wiki-flow > li:not(:last-child)::after,
.gameplay-guide .guide-step-number, .wiki-route-index { color: #967044; }
.wiki-route-grid p { color: #685644; }
.wiki-route-grid strong > span { color: #967044; }
.wiki-route-grid > a:hover { background: #f2e7d3; border-color: #b99a70; }
.wiki-route-label, .gameplay-guide .guide-related-links a { color: #805329; background: #fff9ed; border-color: #cdb797; }
.wiki-prose .wiki-figure { border-color: #cdb797; background: var(--atelier-paper); }
.wiki-prose .wiki-float-wide { max-width: 760px; }
.wiki-prose .wiki-figure img { max-height: 560px; }
.wiki-prose .wiki-figure figcaption { color: #7c644b; }

dialog { border-color: #bda27b; border-radius: 14px; box-shadow: 0 24px 100px #32231655, inset 0 0 0 4px #fff8eb; }
dialog::backdrop { background: #32231680; backdrop-filter: blur(5px); }
footer { border-top-color: #cbb795; background: linear-gradient(180deg, transparent, #e4d8bf66); }
.footer-brand { color: var(--atelier-ink); letter-spacing: 2px; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .mod-card:hover { transform: translateY(-5px); border-color: var(--mod-accent); box-shadow: 0 18px 35px #513c2120; }
  .home-blueprint-cover:hover img { transform: scale(1.025); }
  .button:hover { transform: translateY(-1px); box-shadow: 0 5px 10px #513c2115; }
}
@media (prefers-reduced-motion: no-preference) {
  .mod-hero .hero-copy { animation: atelier-arrive .6s ease-out both; }
  .mod-hero .hero-art { animation: atelier-arrive .8s ease-out both; }
  @keyframes atelier-arrive { from { opacity: .3; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 1000px) {
  .header { gap: 18px; }
  .header nav { gap: 10px 14px; }
  .mod-hero { gap: 28px; min-height: auto; padding: 44px 0; }
  .home-blueprint-promo { padding: 26px; gap: 26px; }
}
@media (max-width: 650px) {
  .wiki-prose .wiki-figure img { max-height: 420px; }
  .header { padding-top: 18px; padding-bottom: 16px; }
  .header::after { left: 20px; right: 20px; }
  .header nav { justify-content: flex-start; gap: 7px 14px; }
  .brand > svg { width: 37px; height: 37px; }
  .mod-hero { padding: 36px 0; gap: 30px; }
  .mod-hero h1 { font-size: clamp(34px, 9vw, 46px); }
  .mod-hero .hero-sub { font-size: 18px; }
  .mod-hero .hero-meta { gap: 15px; flex-wrap: wrap; }
  .hero-art { border-radius: 36% 36% 10px 10px; }
  .home-blueprint-promo { padding: 22px; border-radius: 10px; gap: 22px; }
  .section-heading h2 { font-size: 25px; }
  .mod-grid { gap: 18px; }
  .wiki-layout > aside { border-right: 0; padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media print {
  body, .wiki-document { background: white; }
  .header, footer, .skip-link { display: none; }
  main { max-width: none; padding: 0; }
  .paper-panel, .wiki-document { box-shadow: none; }
}
