body[data-page="knowledge"] [hidden] { display:none !important }
body[data-page="knowledge"] .knowledge-layout { display:block; min-width:0; --kb-subnav-width:205px; --kb-subnav-gap:18px }
body[data-page="knowledge"] .knowledge-topnav { display:flex; align-items:flex-start; gap:12px; flex-wrap:wrap; position:static; top:auto; margin:0 0 20px }
body[data-page="knowledge"] #knowledge-category-list { display:flex; flex:1 1 650px; min-width:0; flex-wrap:wrap; gap:6px }
body[data-page="knowledge"] #knowledge-category-list .knowledge-category-button { max-width:100%; min-height:40px; padding:6px 12px; gap:8px }
body[data-page="knowledge"] .knowledge-toolbar { gap:12px; flex-wrap:wrap }
body[data-page="knowledge"] #knowledge-grid.knowledge-player-home { display:block }
.kb-directory { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,255px),1fr)); gap:14px }
.kb-directory-section { min-width:0; padding:17px; border:1px solid var(--line,#584331); background:var(--panel,#251b14); border-radius:var(--radius,6px) }
.kb-directory-section h3 { margin:0 0 5px; font-size:18px }
.kb-directory-section h3 a { color:var(--text,#f3dfcb) }
.kb-directory-section p { margin:0 0 10px; color:var(--sub,#bcab9d); font-size:13px; line-height:1.45 }
.kb-directory-section ul { margin:0; padding:0; list-style:none }
.kb-directory-section li + li { border-top:1px solid var(--line,#584331) }
.kb-directory-section li a { display:block; padding:7px 0; color:var(--text,#f3dfcb); font-size:14px; line-height:1.35 }
.kb-directory-section a:hover,.kb-quick-links a:hover,#im-knowledge-catalog a:hover { color:var(--accent,#e7ae80); text-decoration:underline }
.kb-quick-links { display:flex; flex-wrap:wrap; gap:8px 15px; padding:16px 0 0 }
body[data-page="knowledge"] #im-knowledge-catalog { display:grid; grid-template-columns:1fr; gap:7px }
#im-knowledge-catalog > a { display:grid; gap:4px; padding:10px 14px; border:1px solid var(--line,#584331); color:var(--text,#f3dfcb) }
#im-knowledge-catalog > a span { color:var(--sub,#bcab9d); font-size:13px }
body[data-page="knowledge"] #knowledge-grid .knowledge-items-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(48px,1fr)); gap:7px; width:100%; max-width:none; margin:0; padding:0 }
body[data-page="knowledge"] #knowledge-grid .knowledge-card--icon-only { display:grid; place-items:center; width:100%; min-width:0; height:49px; min-height:0; margin:0; padding:3px; border:1px solid var(--line,#584331); background:var(--panel,#251b14); box-shadow:none; transform:none }
body[data-page="knowledge"] #knowledge-grid .knowledge-card--icon-only::after { display:none }
body[data-page="knowledge"] #knowledge-grid .knowledge-card--icon-only:is(:hover,:focus-visible) { border-color:var(--accent,#e7ae80); outline:1px solid var(--accent,#e7ae80) }
body[data-page="knowledge"] #knowledge-grid .knowledge-card--icon-only .knowledge-icon-box { display:grid; place-items:center; width:36px; height:36px; padding:0; background:none; border:0 }
body[data-page="knowledge"] #knowledge-grid .knowledge-card--icon-only img { position:static; width:34px; height:34px; object-fit:contain; image-rendering:pixelated; transform:none }
body[data-page="knowledge"] .knowledge-content-body:has(#knowledge-subtab-list:not(:empty)) {
  display:grid; grid-template-columns:minmax(155px, var(--kb-subnav-width)) minmax(0,1fr); gap:var(--kb-subnav-gap); align-items:start;
}
body[data-page="knowledge"] #knowledge-subtab-list:empty { display:none }
body[data-page="knowledge"] #knowledge-subtab-list:not(:empty) {
  display:flex; flex-direction:column; gap:3px; position:static; top:auto; width:auto; min-width:0; margin:0; padding:9px;
  border:1px solid var(--line,#584331); background:var(--panel,#251b14); border-radius:var(--radius,6px);
}
body[data-page="knowledge"] #knowledge-subtab-list .knowledge-subtab {
  display:block; margin:0; padding:9px 10px; border:1px solid transparent; border-radius:4px;
  background:transparent !important; box-shadow:none; text-align:left; white-space:normal; color:var(--text,#f3dfcb);
}
body[data-page="knowledge"] #knowledge-subtab-list .knowledge-subtab:is(:hover,.is-active) {
  border-color:#705138; color:#f2bd8c;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-card--icon-only > img.kb-tile-texture {
  display:block !important; visibility:visible; opacity:1; width:34px; height:34px;
  max-width:100%; max-height:100%; margin:0; padding:0; border:0; background:none; box-shadow:none;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-card--icon-only::before { display:none }
body[data-page="knowledge"] #knowledge-modal .knowledge-recipe-layout--crafting-table {
  background-image:url('/assets/img/knowledge/site_crafting_table.png');
}
body[data-page="knowledge"] #knowledge-modal :is(.knowledge-item-profcraft-row,.knowledge-prof-craft-line) {
  background-image:url('/assets/img/knowledge/site_profcrafts.png');
}
body[data-page="knowledge"] #knowledge-modal :is(.knowledge-item-profcraft,.knowledge-recipe-card) { overflow-x:auto }
@media(max-width:740px) {
  body[data-page="knowledge"] .knowledge-content-body:has(#knowledge-subtab-list:not(:empty)) {
    grid-template-columns:minmax(0,1fr); gap:14px;
  }
  body[data-page="knowledge"] #knowledge-subtab-list:not(:empty) { flex-direction:row; flex-wrap:wrap; align-self:start; gap:4px; padding:6px; width:100%; max-width:100% }
  body[data-page="knowledge"] #knowledge-subtab-list .knowledge-subtab { flex:0 1 auto; max-width:100%; min-height:44px; padding:10px 12px; font-size:14px; overflow-wrap:anywhere }
}
/* The interface artwork has transparent holes for individual slots. */
body[data-page="knowledge"] #knowledge-modal :is(
  .knowledge-recipe-grid--crafting-table > .knowledge-recipe-slot,
  .knowledge-recipe-layout--crafting-table .knowledge-recipe-slot--result,
  .knowledge-item-profcraft-inputs > .knowledge-item-profcraft-slot,
  .knowledge-prof-slot-list > :is(.knowledge-prof-ingredient,.knowledge-prof-ingredient--empty),
  .knowledge-item-profcraft-row > .knowledge-item-profcraft-result,
  .knowledge-prof-craft-line > .knowledge-prof-recipe-result
) {
  box-sizing:border-box; display:grid; place-items:center;
  width:54px; min-width:54px; max-width:54px;
  height:54px; min-height:54px; max-height:54px;
  margin:0; padding:0;
  background:#929292;
  border:3px solid;
  border-color:#383838 #f5f5f5 #f5f5f5 #383838;
  border-radius:0; box-shadow:none;
}
body[data-page="knowledge"] #knowledge-modal :is(.knowledge-recipe-grid--crafting-table,.knowledge-item-profcraft-inputs,.knowledge-prof-slot-list) {
  gap:0; padding:0; background:none;
}
body[data-page="knowledge"] #knowledge-modal :is(.knowledge-recipe-layout--crafting-table,.knowledge-item-profcraft-row,.knowledge-prof-craft-line) :is(.knowledge-site-item-icon,.knowledge-prof-recipe-card-icon) {
  display:grid; place-items:center; position:static; width:38px; height:38px;
  min-width:0; min-height:0; max-width:none; max-height:none;
  padding:0; margin:0; border:0; background:none; transform:none;
}
body[data-page="knowledge"] #knowledge-modal :is(.knowledge-recipe-layout--crafting-table,.knowledge-item-profcraft-row,.knowledge-prof-craft-line) img {
  display:block; position:static; width:36px; height:36px; min-width:0; min-height:0;
  max-width:none; max-height:none; margin:0; padding:0; object-fit:contain;
  object-position:center; transform:none; image-rendering:auto;
}
body[data-page="knowledge"] #knowledge-modal :is(.knowledge-recipe-layout--crafting-table,.knowledge-item-profcraft-row,.knowledge-prof-craft-line) :is(.knowledge-prof-count,.knowledge-recipe-count) {
  position:absolute; inset:auto 2px 1px auto; z-index:1; margin:0;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-card--icon-only > img.kb-tile-texture { image-rendering:auto }
/* Keep the item preview and recipes inside one unobstructed card. */
body[data-page="knowledge"] #knowledge-modal .m-modal-header .micro-label,
body[data-page="knowledge"] #knowledge-modal .im-kb-detail-copy > :is(.micro-label,h3) { display:none }
body[data-page="knowledge"] #knowledge-modal .m-knowledge-detail {
  display:grid; grid-template-columns:100px minmax(0,1fr); gap:20px; align-items:start;
}
body[data-page="knowledge"] #knowledge-modal .m-knowledge-detail-art {
  display:grid; place-items:center; min-height:0; height:auto; min-width:0;
  margin:0; padding:0; border:0; background:none; box-shadow:none;
}
body[data-page="knowledge"] #knowledge-modal .m-knowledge-detail-art img {
  width:80px; height:80px; max-width:100%; object-fit:contain; image-rendering:auto;
}
body[data-page="knowledge"] #knowledge-modal .knowledge-recipe-card {
  margin:16px 0 0; padding:0; border:0; background:none; box-shadow:none;
}
body[data-page="knowledge"] #knowledge-modal .m-modal-close {
  border:0; background:none; box-shadow:none; outline:0; min-width:42px; min-height:42px;
}
body[data-page="knowledge"] #knowledge-modal .m-modal-close:is(:hover,:focus-visible) {
  border:0; background:none; box-shadow:none; color:#fff1df;
}
body[data-page="knowledge"] #knowledge-modal .m-modal-close:focus-visible { text-decoration:underline }
body[data-page="knowledge"] #knowledge-modal .m-modal-close::before,
body[data-page="knowledge"] #knowledge-modal .m-modal-close::after { display:none }
body[data-page="knowledge"] #knowledge-modal .knowledge-recipe-grid--crafting-table > .knowledge-recipe-slot {
  border-width:2px; border-top-color:#626262; text-shadow:none; filter:none;
}
body[data-page="knowledge"] #knowledge-modal .knowledge-recipe-grid--crafting-table > .knowledge-recipe-slot::before,
body[data-page="knowledge"] #knowledge-modal .knowledge-recipe-grid--crafting-table > .knowledge-recipe-slot::after { display:none }
@media(max-width:600px) {
  body[data-page="knowledge"] #knowledge-modal .m-knowledge-detail { grid-template-columns:minmax(0,1fr); gap:10px }
  body[data-page="knowledge"] #knowledge-modal .m-knowledge-detail-art { justify-items:start }
  body[data-page="knowledge"] #knowledge-modal .m-knowledge-detail-art img { width:60px; height:60px }
}
body[data-page="knowledge"] #knowledge-modal button[data-knowledge-modal-close] {
  border:0 !important; outline:0 !important; box-shadow:none !important;
  background:transparent !important; text-decoration:none;
}
body[data-page="knowledge"] #knowledge-modal button[data-knowledge-modal-close]:focus-visible {
  color:#fff9ed; text-shadow:0 0 6px #fff9ed;
}
body[data-page="knowledge"] #knowledge-modal .knowledge-recipe-grid--crafting-table > .knowledge-recipe-slot:nth-child(-n+3) {
  border-top-color:#929292 !important; box-shadow:none !important;
}
body[data-page="knowledge"] #knowledge-modal .m-modal-header { --kb-control-inset:2px; --kb-control-size:44px; position:relative; padding-right:108px }
body[data-page="knowledge"] #knowledge-modal .kb-modal-back {
  position:absolute; inset:var(--kb-control-inset) calc(var(--kb-control-inset) + var(--kb-control-size)) auto auto; transform:none;
  display:grid; place-items:center; width:24px; height:var(--kb-control-size); padding:0;
  background:none; border:0; border-radius:0; color:#ebcdb2;
  font-size:0; cursor:pointer;
}
body[data-page="knowledge"] #knowledge-modal .kb-modal-back::before,
body[data-page="knowledge"] #knowledge-modal .kb-modal-back::after {
  content:""; position:absolute; top:50%; pointer-events:none;
}
body[data-page="knowledge"] #knowledge-modal .kb-modal-back::before {
  left:5px; width:14px; height:2px; background:currentColor; transform:translateY(-50%);
}
body[data-page="knowledge"] #knowledge-modal .kb-modal-back::after {
  left:5px; width:6px; height:6px; box-sizing:border-box;
  border-left:2px solid currentColor; border-bottom:2px solid currentColor;
  transform:translateY(-50%) rotate(45deg);
}
body[data-page="knowledge"] #knowledge-modal .kb-modal-back:is(:hover,:focus-visible) { color:#fff1df }
body[data-page="knowledge"] #knowledge-modal .kb-modal-back:focus-visible {
  outline:1px solid currentColor; outline-offset:-4px;
}
body[data-page="knowledge"] #knowledge-modal .m-knowledge-detail:has(:is(.knowledge-recipe-card,.knowledge-recipe-layout,.knowledge-recipe-smoker,.knowledge-item-profcraft,.knowledge-prof-craft-line)) {
  display:block;
}
body[data-page="knowledge"] #knowledge-modal .m-knowledge-detail:has(:is(.knowledge-recipe-card,.knowledge-recipe-layout,.knowledge-recipe-smoker,.knowledge-item-profcraft,.knowledge-prof-craft-line)) > .m-knowledge-detail-art { display:none }
body[data-page="knowledge"] #knowledge-modal .knowledge-modal-dialog:has(.m-knowledge-detail):not(:has(:is(.knowledge-recipe-card,.knowledge-recipe-layout,.knowledge-recipe-smoker,.knowledge-item-profcraft,.knowledge-prof-craft-line))) {
  width:min(580px,100%);
}
body[data-page="knowledge"] #knowledge-modal .m-knowledge-detail:not(:has(:is(.knowledge-recipe-card,.knowledge-recipe-layout,.knowledge-recipe-smoker,.knowledge-item-profcraft,.knowledge-prof-craft-line))) {
  display:grid; grid-template-columns:60px minmax(0,1fr); align-items:center; gap:14px;
}
body[data-page="knowledge"] #knowledge-modal .m-knowledge-detail-art img { width:60px; height:60px }
body[data-page="knowledge"] #knowledge-modal .im-kb-detail-copy > .knowledge-item-description:last-child > p:last-child { margin-bottom:0 }
body[data-page="knowledge"] #knowledge-modal button[data-knowledge-modal-close] {
  position:absolute; inset:var(--kb-control-inset) var(--kb-control-inset) auto auto!important;
  transform:none!important; width:var(--kb-control-size)!important; height:var(--kb-control-size)!important;
  display:grid; place-items:center; margin:0; padding:0; font-size:0!important;
  text-decoration:none !important;
}
body[data-page="knowledge"] #knowledge-modal button[data-knowledge-modal-close]::before,
body[data-page="knowledge"] #knowledge-modal button[data-knowledge-modal-close]::after {
  content:""; display:block; position:absolute; inset:50% auto auto 50%;
  width:13px; height:2px; border:0; border-radius:0; background:currentColor;
}
body[data-page="knowledge"] #knowledge-modal button[data-knowledge-modal-close]::before { transform:translate(-50%,-50%) rotate(45deg) }
body[data-page="knowledge"] #knowledge-modal button[data-knowledge-modal-close]::after { transform:translate(-50%,-50%) rotate(-45deg) }
body[data-page="knowledge"] #knowledge-modal button[data-knowledge-modal-close]:focus-visible::before,
body[data-page="knowledge"] #knowledge-modal button[data-knowledge-modal-close]:focus-visible::after {
  box-shadow:0 0 6px currentColor;
}
/* The furnace PNG already paints all three slots at these coordinates. */
body[data-page="knowledge"] #knowledge-modal .knowledge-recipe-smoker {
  background-image:url('/assets/img/knowledge/smoker.png');
}
body[data-page="knowledge"] #knowledge-modal .knowledge-recipe-smoker > :is(.knowledge-recipe-smoker-slot,.knowledge-recipe-smoker-output) {
  display:grid; place-items:center; width:54px; height:54px; padding:0; margin:0;
  border:0; background:transparent !important; box-shadow:none;
}
body[data-page="knowledge"] #knowledge-modal .knowledge-recipe-smoker-slot--input { left:15px; top:15px }
body[data-page="knowledge"] #knowledge-modal .knowledge-recipe-smoker-slot--fuel { left:15px; top:123px }
body[data-page="knowledge"] #knowledge-modal .knowledge-recipe-smoker-output { left:180px; top:69px }
body[data-page="knowledge"] #knowledge-modal .knowledge-recipe-smoker :is(.knowledge-recipe-ingredient,.knowledge-recipe-slot--result,.knowledge-site-item-icon) {
  position:relative; inset:auto; display:grid; place-items:center; box-sizing:border-box;
  width:46px; height:46px; min-width:0; min-height:0; max-width:none; max-height:none;
  padding:0; margin:0; border:0; background:transparent !important; box-shadow:none;
  transform:none; translate:none;
}
body[data-page="knowledge"] #knowledge-modal .knowledge-recipe-smoker :is(.knowledge-recipe-ingredient,.knowledge-recipe-slot--result) img {
  position:static; width:36px; height:36px; max-width:none; max-height:none;
  margin:0; padding:0; transform:none; object-fit:contain; image-rendering:auto;
}
body[data-page="knowledge"] #knowledge-modal .knowledge-item-labcraft-slot {
  background:#929292 !important;
}
body[data-page="knowledge"] #knowledge-modal .knowledge-item-labcraft-slot :is(.knowledge-recipe-ingredient,.knowledge-item-profcraft-slot--empty,.knowledge-site-item-icon) {
  background:transparent !important; border:0; box-shadow:none;
}
body[data-page="knowledge"] #knowledge-modal .knowledge-item-labcraft-slot img {
  width:36px; height:36px; max-width:none; max-height:none; object-fit:contain; image-rendering:auto;
}
body[data-page="knowledge"] #knowledge-modal .knowledge-item-labcraft-slot {
  box-sizing:border-box; border:3px solid;
  border-color:#383838 #f5f5f5 #f5f5f5 #383838;
}
body[data-page="knowledge"] #knowledge-modal .knowledge-item-labcraft-slot .knowledge-site-item-icon {
  left:calc(50% - 3px);
  display:grid; place-items:center; width:38px !important; height:38px !important;
  min-width:0; min-height:0; max-width:none; max-height:none; padding:0;
}
body[data-page="knowledge"] #knowledge-modal .knowledge-item-labcraft-slot img.knowledge-card-icon {
  display:block; width:36px !important; height:36px !important;
  min-width:0; min-height:0; max-width:none !important; max-height:none !important;
  padding:0; transform:none !important; scale:var(--kb-texture-scale,none) !important;
}
/* Draw slot faces behind the article's transparent ingredient buttons. */
body[data-page="knowledge"] #knowledge-grid .knowledge-prof-craft-line {
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='408' height='84' viewBox='0 0 408 84'%3E%3Cdefs%3E%3Cg id='slot'%3E%3Cpath fill='%23929292' d='M0 0h54v54H0z'/%3E%3Cpath fill='%23383838' d='M0 0h54l-3 3H3v48l-3 3z'/%3E%3Cpath fill='%23f5f5f5' d='M54 0v54H0l3-3h48V3z'/%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23slot' x='15' y='15'/%3E%3Cuse href='%23slot' x='69' y='15'/%3E%3Cuse href='%23slot' x='123' y='15'/%3E%3Cuse href='%23slot' x='177' y='15'/%3E%3Cuse href='%23slot' x='231' y='15'/%3E%3Cuse href='%23slot' x='342' y='15'/%3E%3C/svg%3E"),url('/assets/img/knowledge/site_profcrafts.png');
  background-position:0 0,0 0;
  background-size:408px 84px,408px 84px;
  background-repeat:no-repeat;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-prof-craft-line :is(.knowledge-prof-recipe-card-icon,.knowledge-site-item-icon) {
  display:grid; place-items:center; position:static; width:38px; height:38px;
  min-width:0; min-height:0; max-width:none; max-height:none; transform:none; margin:0; padding:0;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-prof-craft-line img {
  display:block; position:static; width:36px; height:36px; max-width:none; max-height:none;
  padding:0; margin:0; object-fit:contain; image-rendering:auto; transform:none;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-prof-craft-line :is(
  .knowledge-prof-slot-list,.knowledge-prof-ingredient,.knowledge-prof-recipe-result,
  .knowledge-prof-recipe-card-icon,.knowledge-site-item-icon
) { background:transparent !important; box-shadow:none !important }
body[data-page="knowledge"] #knowledge-grid .knowledge-prof-craft-line :is(
  .knowledge-prof-slot-list,.knowledge-prof-ingredient,.knowledge-prof-recipe-result,
  .knowledge-prof-recipe-card-icon,.knowledge-site-item-icon
)::before,
body[data-page="knowledge"] #knowledge-grid .knowledge-prof-craft-line :is(
  .knowledge-prof-slot-list,.knowledge-prof-ingredient,.knowledge-prof-recipe-result,
  .knowledge-prof-recipe-card-icon,.knowledge-site-item-icon
)::after { content:none !important }
body[data-page="knowledge"] .knowledge-page-section { padding-top:24px; margin-top:0 }
body[data-page="knowledge"] .knowledge-toolbar { justify-content:flex-end; margin-bottom:16px; padding-top:0 }
body[data-page="knowledge"] .knowledge-toolbar > div:first-child { display:none }
/* Position recipe icons independently of the quantity and nested wrappers. */
body[data-page="knowledge"] #knowledge-grid .knowledge-prof-craft-line :is(.knowledge-prof-ingredient,.knowledge-prof-recipe-result) img {
  position:absolute !important; inset:0 !important;
  width:32px; height:32px;
  transform:none !important; margin:auto !important;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-prof-craft-line :is(.knowledge-prof-recipe-card-icon,.knowledge-site-item-icon) {
  position:static !important; transform:none !important;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-prof-craft-line .knowledge-prof-count {
  position:absolute; inset:auto 2px 1px auto; z-index:1;
}
body[data-page="knowledge"] #knowledge-subtab-list .knowledge-subtab {
  position:relative; border:0 !important; box-shadow:none !important;
  padding-bottom:12px; color:var(--text,#f3dfcb);
}
body[data-page="knowledge"] #knowledge-subtab-list .knowledge-subtab:is(.is-active,:hover) {
  color:#f2bd8c;
}
body[data-page="knowledge"] #knowledge-subtab-list .knowledge-subtab.is-active::after {
  content:""; display:block; position:absolute; inset:auto 10px 5px;
  width:auto; height:2px; background:#f2bd8c; border:0; border-radius:0;
  transform:none; pointer-events:none;
}
@media(max-width:650px) {
  body[data-page="knowledge"] #knowledge-subtab-list .knowledge-subtab.is-active::after { left:4px; right:4px }
}
body[data-page="knowledge"] #knowledge-grid .knowledge-model-grid {
  display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,160px),1fr)); gap:12px;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-model-card__image,
body[data-page="knowledge"] #knowledge-grid .knowledge-model-card__image img,
body[data-page="knowledge"] #knowledge-modal .knowledge-adventure-mini .knowledge-model-hero,
body[data-page="knowledge"] #knowledge-modal .knowledge-adventure-mini .knowledge-model-hero img {
  background:transparent !important; border:0 !important; box-shadow:none !important;
}
body[data-page="knowledge"] #knowledge-grid button.knowledge-model-card {
  display:flex; flex-direction:column; align-items:center; justify-content:start;
  width:100%; min-width:0; min-height:214px; height:auto; padding:12px; gap:10px; transform:none;
  border:1px solid var(--line,#674631); border-radius:0; background:var(--panel,#241910);
}
body[data-page="knowledge"] #knowledge-grid .knowledge-model-card__image {
  display:grid; place-items:center; flex:0 0 auto; width:100%; height:160px;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-model-card__image img { width:100%; height:100%; min-width:0; min-height:0; max-width:100%; max-height:100%; object-fit:contain; object-position:center bottom; transform:none; margin:0 }
body[data-page="knowledge"] #knowledge-grid .knowledge-model-card > span:last-child {
  height:auto; min-height:0; text-align:center; overflow-wrap:anywhere;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-model-card:is(:hover,:focus-visible) > span:last-child {
  color:#f2bd8c;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-model-card:focus-visible > span:last-child {
  text-decoration:underline;
}
body[data-page="knowledge"] #knowledge-modal .knowledge-adventure-mini .knowledge-model-hero img {
  display:block; height:clamp(140px,32vh,235px); margin:0 auto; object-fit:contain;
}
/* Component-owned article typography and navigation in the current site palette. */
body[data-page="knowledge"] .knowledge-topnav .knowledge-toolbar{flex:0 1 300px; width:300px; min-width:0; margin:0; padding:0}
body[data-page="knowledge"] .knowledge-topnav .search-box{width:100%; min-height:40px; height:40px; padding-block:0}
body[data-page="knowledge"] .knowledge-topnav .search-box input{min-width:0; height:38px; padding-block:0}
body[data-page="knowledge"] .knowledge-article-card :is(ul,ol,li){color:inherit}
body[data-page="knowledge"] .knowledge-article-card .knowledge-article-list{margin:12px 0 22px}
body[data-page="knowledge"] .knowledge-command-row{background:var(--panel,#241910); border-color:var(--line,#674631); color:var(--text,#dfc4aa)}
body[data-page="knowledge"] .knowledge-command-row code{color:var(--accent,#e9955a)}
body[data-page="knowledge"] .knowledge-command-row span{color:inherit}
body[data-page="knowledge"] .knowledge-inline-item-link:is([data-recipe-jump="customcapes:master_cape"],[data-recipe-jump="customcapes:cape"]){text-decoration:none}
body[data-page="knowledge"] .knowledge-race-copy{gap:22px}
body[data-page="knowledge"] .knowledge-race-description{min-height:0; padding:0}
body[data-page="knowledge"] .knowledge-race-description .knowledge-article-lead{margin:0}
body[data-page="knowledge"] .knowledge-race-lists{gap:22px}
body[data-page="knowledge"] .knowledge-race-list h3{margin:0 0 10px}
body[data-page="knowledge"] .knowledge-race-list ul{margin:0}
body[data-page="knowledge"] .knowledge-race-notes{margin-top:24px; gap:22px}
body[data-page="knowledge"] .knowledge-race-note h4{color:var(--text,#dfc4aa)}
body[data-page="knowledge"] .knowledge-race-note p{color:inherit}
body[data-page="knowledge"] .knowledge-operation-tool__tooltip{background:var(--panel,#241910); border-color:var(--line,#674631); border-radius:0; color:var(--text,#dfc4aa)}
body[data-page="knowledge"] img[src*="/assets/minecraft/textures/item/"]{image-rendering:pixelated!important}
body[data-page="knowledge"] #knowledge-grid .knowledge-card--icon-only img[src*="/assets/minecraft/textures/item/"],
body[data-page="knowledge"] #knowledge-modal :is(.knowledge-recipe-card,.knowledge-recipe-smoker,.knowledge-item-profcraft,.knowledge-prof-craft-line,.knowledge-item-labcraft-slot) img[src*="/assets/minecraft/textures/item/"]{width:32px; height:32px}
@media(max-width:740px){
  body[data-page="knowledge"] #knowledge-grid .knowledge-model-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  body[data-page="knowledge"] .knowledge-topnav{gap:12px}
  body[data-page="knowledge"] #knowledge-category-list{flex-basis:100%}
  body[data-page="knowledge"] .knowledge-topnav .knowledge-toolbar{flex:1 1 100%;width:100%}
}

/* Keep navigation geometry stable when articles have different heights. */
html:has(body[data-page="knowledge"]){scrollbar-gutter:stable!important}
body[data-page="knowledge"] .knowledge-layout{overflow-anchor:none}
.knowledge-toolbar{position:relative}
.knowledge-search-dropdown{position:absolute;inset:calc(100% + 8px) 0 auto;z-index:100;max-height:min(440px,60dvh);overflow-y:auto;background:var(--panel,#291d14);border:1px solid var(--line,#67462e);box-shadow:0 12px 28px #0008;padding:6px}
.knowledge-search-dropdown[hidden]{display:none!important}
#im-knowledge-catalog{display:flex;flex-direction:column;gap:0}
#im-knowledge-catalog[hidden]{display:none!important}
#im-knowledge-catalog a{display:flex;flex-direction:column;gap:4px;padding:10px 12px;color:var(--text,#f5dfc5);text-decoration:none;border:0;border-bottom:1px solid var(--line,#67462e);background:transparent}
#im-knowledge-catalog a:last-child{border-bottom:0}
#im-knowledge-catalog a:hover,#im-knowledge-catalog a:focus-visible{background:#eaa26618;outline:1px solid var(--accent,#eaa266);outline-offset:-1px}
#im-knowledge-catalog a span{font-size:12px;line-height:1.5;color:var(--muted,#c8ac91)}
#im-knowledge-empty{margin:0;padding:12px;font-size:13px}


/* Search result labels retain their normal appearance in every interaction state. */
body[data-page="knowledge"] #im-knowledge-catalog a:is(:link,:visited,:hover,:focus,:focus-visible,:active),
body[data-page="knowledge"] #im-knowledge-catalog a:is(:link,:visited,:hover,:focus,:focus-visible,:active) strong{color:var(--text,#f5dfc5)!important;text-decoration:none!important}


body[data-page="knowledge"] #im-knowledge-catalog a .knowledge-search-result-title{font-size:14px;font-weight:400;color:var(--text,#f5dfc5)!important;text-decoration:none!important;line-height:1.5}
body[data-page="knowledge"] #im-knowledge-catalog a .knowledge-search-result-path{font-size:12px;font-weight:400;color:var(--sub,#bda38c)!important;text-decoration:none!important;line-height:1.5}
body[data-page="knowledge"] #knowledge-search-dropdown{scrollbar-width:thin;scrollbar-color:#8c6248 #211812;overscroll-behavior:contain}
body[data-page="knowledge"] #knowledge-search-dropdown::-webkit-scrollbar{width:7px;height:7px}
body[data-page="knowledge"] #knowledge-search-dropdown::-webkit-scrollbar-track{background:#211812;border-radius:0}
body[data-page="knowledge"] #knowledge-search-dropdown::-webkit-scrollbar-thumb{background:#8c6248;border:0;border-radius:8px}
body[data-page="knowledge"] #knowledge-search-dropdown::-webkit-scrollbar-thumb:hover{background:#bb885f}
body[data-page="knowledge"] #knowledge-search-dropdown::-webkit-scrollbar-corner{background:#211812}

/* Native 16px item textures have no renderer padding: keep an integer 2x scale. */
body[data-page="knowledge"] .knowledge-site-item-icon.knowledge-icon-box--native{display:inline-flex;align-items:center;justify-content:center;overflow:visible;border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important}
body[data-page="knowledge"] .knowledge-site-item-icon.knowledge-icon-box--native img.knowledge-card-icon{width:32px!important;height:32px!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;object-fit:contain;image-rendering:pixelated!important}

/* Medicine icons keep the full image area inside the existing tier buttons. */
body[data-page="knowledge"] #knowledge-grid .knowledge-medicine-tier .knowledge-site-item-icon {
  border:0; background:transparent; box-shadow:none; padding:0;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-medicine-tier img.knowledge-card-icon {
  display:block; width:44px; height:44px; min-width:0; min-height:0;
  max-width:none; max-height:none; margin:0; padding:0; object-fit:contain;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-medicine-tier:focus-visible {
  outline:1px solid var(--accent,#e7ae80); outline-offset:2px;
}
/* The medicines index groups each family with its available tiers. */
body[data-page="knowledge"] #knowledge-grid .knowledge-medicines-article {
  container-type:inline-size;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-medicine-list {
  display:grid; grid-template-columns:minmax(0,1fr); column-gap:32px; row-gap:0;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-medicine-row {
  display:grid; grid-template-columns:minmax(0,1fr); justify-items:start;
  gap:4px; padding:12px 0; border-bottom:1px solid var(--line,#584331);
}
body[data-page="knowledge"] #knowledge-grid .knowledge-medicine-row__title {
  min-width:0; color:var(--text,#f3dfcb); font-size:14px; font-weight:600;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-medicine-tiers {
  gap:4px;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-medicine-tier {
  height:57px; align-content:start;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-medicine-tier__level {
  position:static; padding:0; border-radius:0; background:none; color:var(--sub,#bcab9d);
  font-size:11px; font-weight:700; line-height:13px;
}
body[data-page="knowledge"] #knowledge-grid .knowledge-medicine-tier:is(:hover,:focus-visible) .knowledge-medicine-tier__level {
  color:var(--accent,#e7ae80);
}
@container (min-width:620px) {
  body[data-page="knowledge"] #knowledge-grid .knowledge-medicine-list {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

body[data-page="knowledge"] #knowledge-grid .knowledge-medicine-tier:is(:hover,:focus-visible) {
  transform:none;
}

@media (width > 740px) {
  body[data-page="knowledge"] .knowledge-layout:has(#knowledge-subtab-list:not(:empty)) .knowledge-topnav {
    margin-inline-start:calc(var(--kb-subnav-width) + var(--kb-subnav-gap));
  }
  body[data-page="knowledge"] .knowledge-topnav #knowledge-category-list { flex:0 1 auto; max-width:100%; }
  body[data-page="knowledge"] .knowledge-topnav .knowledge-toolbar { margin-inline-start:auto; max-width:100%; }
}

body[data-page="knowledge"] .knowledge-layout > .knowledge-topnav { width:auto; }

/* Use the catalog's item-icon geometry in articles and recipe dialogs. */
body[data-page="knowledge"] :is(#knowledge-grid,#knowledge-modal) img:is(
  [src*="/assets/img/knowledge/rendered/"],[src*="/assets/minecraft/textures/item/"]
):not(.m-knowledge-detail-art img) {
  box-sizing:border-box;
  width:var(--kb-icon-size,34px)!important; height:var(--kb-icon-size,34px)!important;
  min-width:0!important; min-height:0!important; max-width:none!important; max-height:none!important;
  object-fit:contain!important; object-position:center!important;
  image-rendering:var(--kb-icon-rendering,auto)!important;
}
body[data-page="knowledge"] :is(#knowledge-grid,#knowledge-modal) img[src*="/assets/minecraft/textures/item/"] {
  --kb-icon-size:32px;
  --kb-icon-rendering:pixelated;
}
