:root {
  color-scheme: dark;
  --bg: #17181c;
  --bg-raised: #22262e;
  --bg-header: #1c2028;
  --text: #f4f1ea;
  --muted: #d5cfc2;
  --gold: #ffd56a;
  --gold-deep: #e0a52a;
  --emerald: #8fbf9a;
  --emerald-ink: #d7f3e2;
  --emerald-line: #3d6b4e;
  --link: #9ae6b4;
  --line: #3a3424;
  --slot: #8b8b8b;
  --slot-dark: #373737;
  --slot-light: #ffffff;
  --gui: #c6c6c6;
  --gui-ink: #2c2c2c;
  --toast: #2b2b2b;
  --toast-title: #fff14a;
}

* { box-sizing: border-box; }

html {
  font-size: 16px;
  background: #121318;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: Inter, "Noto Sans", "Segoe UI", "Liberation Sans", sans-serif;
  color: var(--text);
  background: #121318;
  line-height: 1.45;
}

img { border: 0; }

.pixel {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

a { color: var(--link); }

a:hover { text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

::selection {
  background: var(--gold);
  color: #1a1408;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: #fff;
  color: #111;
  padding: 6px 10px;
  z-index: 40;
}

.skip:focus { top: 8px; }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  min-height: 64px;
  padding: 8px 18px;
  background: var(--bg-header);
  border-bottom: 3px solid var(--gold-deep);
  box-shadow: 0 2px 0 #0c0d10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.wordmark {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 2px 0 0 #2c2416, 0 2px 0 #2c2416, 2px 2px 0 #2c2416;
}

.badge {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
  color: var(--emerald-ink);
  background: #17211c;
  border: 1px solid var(--emerald-line);
  padding: 4px 8px;
  box-shadow: inset 1px 1px 0 #24382c;
}

.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: auto;
}

.quick a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  padding: 8px 10px;
}

.quick a:hover,
.quick a[aria-current="page"] { color: var(--gold); }

.nav-btn,
.copy-btn {
  align-items: center;
  justify-content: center;
  background: #2a2e36;
  color: var(--text);
  border: 2px solid #101216;
  box-shadow: inset 1px 1px 0 #5a6270;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}

.nav-btn {
  display: none;
  min-height: 40px;
  padding: 6px 12px;
}

.nav-shut { display: none; }

.nav-toggle:checked ~ .top .nav-open { display: none; }

.nav-toggle:checked ~ .top .nav-shut { display: inline; }

.copy-btn {
  display: inline-flex;
  flex: none;
  min-height: 32px;
  padding: 4px 10px;
  font-size: 13px;
}

.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  flex: none;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 22px 0;
  align-items: start;
}

.shell.has-sidebar { grid-template-columns: 252px minmax(0, 1fr); }

.sidebar,
main { min-width: 0; }

.sidebar {
  position: sticky;
  top: 80px;
  background: #1e222a;
  border: 2px solid #101216;
  box-shadow: inset 1px 1px 0 #46505e, inset -1px -1px 0 #101217;
  padding: 8px 8px 12px;
}

.nav-label {
  margin: 12px 8px 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.nav-group:first-child .nav-label { margin-top: 4px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  border-left: 2px solid transparent;
}

.nav-link:hover { background: #2c313b; }

.nav-link[aria-current="page"] {
  background: #2c313b;
  border-left-color: var(--gold);
  color: var(--gold);
}

.nav-ico {
  width: 24px;
  height: 24px;
  flex: none;
}

.nav-ico img,
.nav-ico svg {
  display: block;
  width: 24px;
  height: 24px;
}

main { padding-top: 2px; }

h1 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 2px 0 0 #2c2416, 0 2px 0 #2c2416, 2px 2px 0 #2c2416;
}

h2 {
  margin: 14px 0 8px;
  font-size: 22px;
  color: var(--gold);
  border-bottom: 2px solid var(--line);
  padding-bottom: 4px;
}

.lede {
  margin: 0;
  font-size: 17px;
  max-width: 62ch;
}

.crumbs {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.crumbs a {
  font-weight: 800;
  text-decoration: none;
}

.lead + .card-grid { margin-top: 16px; }

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #343b48 0%, #232830 100%);
  border: 2px solid #101216;
  box-shadow: inset 1px 1px 0 #667084, inset -1px -1px 0 #12141a;
}

.hero h1 { margin-bottom: 4px; }

.hero .lede { color: var(--text); max-width: 46ch; }

.hero-stats {
  margin: 0;
  flex: none;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.toast-grid,
.toast-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  background: var(--bg-raised);
  border: 2px solid #101216;
  box-shadow: inset 1px 1px 0 #525a68, inset -1px -1px 0 #101217;
  padding: 12px 10px 14px;
}

.icon-card:hover { border-color: var(--gold-deep); }

.icon-card .name { font-weight: 800; color: #fff; }

.role {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recipe-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  min-height: 22px;
}

.install {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
}

.install li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 12px;
  background: var(--bg-raised);
  border: 2px solid #101216;
  box-shadow: inset 1px 1px 0 #525a68, inset -1px -1px 0 #101217;
  font-weight: 800;
}

.step {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
  background: #17211c;
  color: var(--emerald-ink);
  border: 1px solid var(--emerald-line);
  font-weight: 800;
  box-shadow: inset 1px 1px 0 #24382c;
}

.article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas:
    "lead infobox"
    "details infobox";
  column-gap: 16px;
  row-gap: 12px;
  grid-template-rows: max-content 1fr;
  align-items: start;
}

.lead { grid-area: lead; }

.details { grid-area: details; min-width: 0; }

.infobox {
  grid-area: infobox;
  background: #242830;
  border: 2px solid #101216;
  box-shadow: inset 1px 1px 0 #525a68, inset -1px -1px 0 #101217;
}

.infobox-title {
  padding: 8px 10px;
  text-align: center;
  font-weight: 800;
  color: var(--gold);
  background: linear-gradient(180deg, #3d3628, #2a261e);
  border-bottom: 2px solid #101216;
}

.preview {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 10px 0 6px;
}

.preview:has(.portrait) {
  position: relative;
  padding: 16px 0 28px;
  background: #22262e;
}

.preview .portrait {
  position: relative;
  z-index: 1;
  width: 70%;
  height: auto;
  background: transparent;
}

.preview:has(.portrait)::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 22%;
  right: 22%;
  bottom: 20px;
  height: 18px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  filter: blur(6px);
}

.infobox dl { margin: 0; }

.infobox dl > div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 7px 10px;
  border-top: 1px solid #3a404b;
}

.infobox dt { color: var(--muted); }

.infobox dl > div.multi { align-items: start; }

.infobox dl > div.multi dt { padding-top: 2px; }

.infobox dd {
  margin: 0;
  min-width: 0;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.egg-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.egg-link img,
.egg-link svg {
  width: 24px;
  height: 24px;
  flex: none;
}

.effect-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.effect-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 4px 8px;
  max-width: 100%;
}

.effect-time {
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.return-chip {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  max-width: 100%;
}

.return-name { min-width: 0; }

.infobox code {
  font-family: "JetBrains Mono", "DejaVu Sans Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 500;
  color: #d8f5e4;
  white-space: nowrap;
}

.slot {
  position: relative;
  display: grid;
  place-items: center;
  background: var(--slot);
  box-shadow: inset 2px 2px 0 var(--slot-dark), inset -2px -2px 0 var(--slot-light);
  flex: none;
}

.slot.xs { width: 22px; height: 22px; box-shadow: inset 1px 1px 0 var(--slot-dark), inset -1px -1px 0 var(--slot-light); }

.slot.sm { width: 36px; height: 36px; }

.slot.md { width: 72px; height: 72px; }

.slot.lg {
  width: 160px;
  height: 160px;
  box-shadow: inset 3px 3px 0 var(--slot-dark), inset -3px -3px 0 var(--slot-light);
}

.slot.xs > img,
.slot.xs > svg { width: 16px; height: 16px; }

.slot.sm > img,
.slot.sm > svg { width: 32px; height: 32px; }

.slot.md > img,
.slot.md > svg { width: 48px; height: 48px; }

.slot.lg > img,
.slot.lg > svg { width: 128px; height: 128px; }

.slot img,
.slot svg,
.icon-frame img,
.icon-frame svg,
.adv-pill img,
.adv-pill svg {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.vanilla-icon,
.slot .vanilla-icon,
.icon-frame .vanilla-icon,
.nav-ico .vanilla-icon,
.adv-pill .vanilla-icon {
  object-fit: contain;
  image-rendering: auto;
}

.count {
  position: absolute;
  right: 2px;
  bottom: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 1px 1px 0 #3f3f3f;
  pointer-events: none;
}

.slot[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  z-index: 8;
  padding: 3px 6px;
  background: #100010;
  color: #fff;
  border: 2px solid #5c0080;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}

.stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.gui {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  padding: 8px 12px 12px;
  background: var(--gui);
  color: var(--gui-ink);
  border: 2px solid #2a2a2a;
  box-shadow: inset 2px 2px 0 #fff, inset -2px -2px 0 #555, 3px 3px 0 #0c0d10;
}

.gui h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #3f3f3f;
}

.gui-row,
.furnace {
  display: flex;
  align-items: center;
  gap: 10px;
}

.furnace-col,
.craft-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.craft-grid {
  display: grid;
  grid-template-columns: repeat(3, 36px);
  gap: 2px;
}

.gui-note {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #2a2a2a;
}

.stat,
.use-line {
  margin: 0;
  font-size: 16px;
}

.callout {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--bg-raised);
  border: 2px solid #101216;
  box-shadow: inset 1px 1px 0 #525a68, inset -1px -1px 0 #101217;
}

.callout p { margin: 0; }

.callout-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.flow-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.flow-arrow {
  display: flex;
  flex: none;
}

.op {
  color: var(--gold);
  font-size: 20px;
  font-weight: 800;
}

.adv-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  max-width: none;
  padding: 3px 8px 3px 4px;
  white-space: nowrap;
  background: var(--toast);
  border: 2px solid #6f6f6f;
  color: var(--toast-title);
  text-decoration: none;
  font-weight: 800;
  text-shadow: 1px 1px 0 #3d3510;
}

.adv-pill:hover { border-color: var(--gold); }

.adv-pill img,
.adv-pill svg { width: 16px; height: 16px; }

.toast {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 8px;
  align-items: center;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 42%),
    var(--toast);
  border: 3px solid #6f6f6f;
  box-shadow: inset 0 0 0 2px #1a1a1a, 0 0 0 1px #111;
}

.toast:hover { border-color: var(--gold-deep); }

.toast.goal {
  border-radius: 12px;
  border-color: #b3b083;
}

.toast.challenge {
  border-color: #c08cff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 42%),
    #291a36;
  box-shadow: inset 0 0 0 2px #3a2150, 0 0 0 1px #140818;
}

.toast h3 {
  margin: 0 0 2px;
  font-size: 18px;
  color: var(--toast-title);
  text-shadow: 1px 1px 0 #3d3510;
  white-space: nowrap;
}

.toast.challenge h3 {
  color: #f3c6ff;
  text-shadow: 1px 1px 0 #2a1038;
}

.toast-copy { position: relative; min-width: 0; }

.toast p { margin: 0; font-size: 15px; color: #f3f0e8; }

.toast-note { color: #e4ddd0 !important; }

.icon-frame {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: #141414;
  border: 2px solid #8d8d8d;
  box-shadow: inset 2px 2px 0 #000, inset -1px -1px 0 #5a5a5a;
}

.icon-frame img,
.icon-frame svg { width: 32px; height: 32px; }

.toast.goal .icon-frame { border-radius: 8px; }

.toast.challenge .icon-frame { border-color: #c08cff; }

.trigger-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 148px;
}

.trigger-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 4px;
}

.frame-tag {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #eeeae2;
}

.toast.challenge .frame-tag { color: #f3c6ff; }

.download-hero {
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.download-hero .lede { max-width: 62ch; }

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 52px;
  padding: 12px 18px;
  background: linear-gradient(180deg, #ffe7a0 0%, var(--gold) 42%, var(--gold-deep) 100%);
  color: #1a1408;
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-align: center;
  border: 2px solid #101216;
  box-shadow: inset 1px 1px 0 #fff6d4, inset -2px -2px 0 #a87412, 3px 3px 0 #0c0d10;
}

.download-btn:hover {
  color: #1a1408;
  text-decoration: none;
  filter: brightness(1.06);
}

.download-facts {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  border: 2px solid #101216;
  background: #242830;
  box-shadow: inset 1px 1px 0 #525a68, inset -1px -1px 0 #101217;
}

.download-facts > div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 8px 10px;
  border-top: 1px solid #3a404b;
}

.download-facts > div:has(.copy-btn) { align-items: center; }

.download-facts > div:first-child { border-top: 0; }

.download-facts dt {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.download-facts dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.download-facts code,
.install code {
  font-family: "JetBrains Mono", "DejaVu Sans Mono", ui-monospace, monospace;
  font-size: 13px;
}

.download-facts code {
  font-weight: 500;
  color: #d8f5e4;
}

.install code { color: #d8f5e4; }

.download-facts .sha-row { grid-template-columns: minmax(0, 1fr); }

.download-facts .sha-row dd { text-align: left; }

.copy-line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.download-facts code.sha {
  display: block;
  min-width: 0;
  max-width: 100%;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  user-select: all;
}

.sha-row .copy-line,
#server .copy-line {
  align-items: center;
}

.sha-row .copy-line { justify-content: flex-start; }

.download-fallback {
  margin: 0;
  max-width: 62ch;
}

.dep-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
}

.dep-grid li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 72px;
  padding: 10px 12px;
  background: var(--bg-raised);
  border: 2px solid #101216;
  box-shadow: inset 1px 1px 0 #525a68, inset -1px -1px 0 #101217;
}

.dep-label {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dep-value {
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  overflow-wrap: anywhere;
}

.dep-grid a { margin-top: auto; }

#server-host { user-select: all; }

.install.stack-steps { grid-template-columns: minmax(0, 1fr); }

.foot {
  flex: none;
  width: 100%;
  max-width: 1200px;
  margin: 48px auto 0;
  padding: 12px 22px;
  color: var(--muted);
  font-size: 14px;
  background: transparent;
  border-top: 2px solid var(--line);
}

@media (min-width: 860px) {
  .toast {
    grid-template-columns: auto minmax(0, 1fr) 148px;
  }

  .trigger-col { grid-column: 3; grid-row: 1; }
}

@media (max-width: 820px) {
  .top { padding: 8px 10px; }

  .brand { flex: 1 1 auto; min-width: 0; }

  .wordmark { font-size: 17px; white-space: nowrap; }

  .nav-btn { display: inline-flex; margin-left: auto; }

  .badge { order: 4; }

  .quick {
    order: 5;
    flex: 1 1 160px;
    width: auto;
    margin-left: 0;
  }

  .shell,
  .shell.has-sidebar { grid-template-columns: minmax(0, 1fr); padding: 14px 14px 0; }

  .sidebar { display: none; position: static; }

  .nav-toggle:checked ~ .shell .sidebar { display: block; }

  .hero { flex-direction: column; align-items: flex-start; }

  .download-btn { align-self: stretch; }

  .dep-grid { grid-template-columns: minmax(0, 1fr); }

  .article {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
      "lead"
      "infobox"
      "details";
    row-gap: 14px;
  }

  .callout-row {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .flow-arrow { transform: rotate(90deg); }

  .hero-stats { white-space: normal; }

  .toast h3 { white-space: normal; }

  .trigger-col {
    grid-column: 1 / -1;
    width: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .install { grid-template-columns: minmax(0, 1fr); }

  .gui { width: 100%; }

  h1 { font-size: 28px; }
}

@media (max-width: 640px) {
  .top { flex-wrap: nowrap; }

  .badge,
  .quick { display: none; }

  .nav-toggle:checked ~ .top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "brand search menu"
      "nav nav nav"
      "chip chip chip";
    align-items: center;
    row-gap: 8px;
  }

  .nav-toggle:checked ~ .top .brand { grid-area: brand; }

  .nav-toggle:checked ~ .top .search { grid-area: search; margin-left: 0; }

  .nav-toggle:checked ~ .top .nav-btn { grid-area: menu; }

  .nav-toggle:checked ~ .top .badge {
    display: block;
    grid-area: chip;
    justify-self: start;
    width: auto;
    max-width: 100%;
    margin: 4px 2px 2px;
    padding: 0;
    color: var(--muted);
    background: none;
    border: 0;
    box-shadow: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
  }

  .nav-toggle:checked ~ .top .quick {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    grid-area: nav;
    width: 100%;
    margin: 0;
    gap: 0;
  }

  .nav-toggle:checked ~ .top .quick a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 2px;
  }

  .copy-btn {
    min-height: 44px;
    padding: 8px 12px;
  }

  .sha-row .copy-line {
    flex-direction: column;
    align-items: flex-start;
  }

  .sha-row .sha {
    width: 100%;
    word-break: break-all;
  }

  #server .download-facts > div { grid-template-columns: minmax(0, 1fr); }

  #server .copy-line { justify-content: flex-start; }

  .brand { flex: 0 0 auto; }
  .search { flex: 1 1 auto; min-width: 0; margin-left: 8px; }
  #site-search { width: 100%; min-width: 0; }
  .nav-btn { flex: none; margin-left: 8px; }

  .top.search-open .brand {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .top.search-open .search { margin-left: 0; }
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto;
}

.quick { margin-left: 0; }

.search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

#site-search {
  width: 11rem;
  min-height: 32px;
  color: var(--text);
  background: #121318;
  border: 2px solid var(--line);
  padding: 4px 8px;
}

#search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: 320px;
  min-width: 320px;
  background: var(--bg-header);
  border: 2px solid var(--line);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

#search-results[hidden],
[data-search][hidden] {
  display: none !important;
}

#search-results a {
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  height: 40px;
  padding: 0 10px;
  text-decoration: none;
}

#search-results .hit-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
}

#search-results .hit-icon img,
#search-results .hit-icon svg {
  width: 24px;
  height: 24px;
}

#search-results .hit-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#search-results .hit-name b { font-weight: 800; }

#search-results .tag { flex: none; margin-left: auto; }

#search-results .hit-empty {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  height: 40px;
  padding: 0 10px;
  color: var(--muted);
}

#search-results a:hover,
#search-results a[aria-selected="true"] { background: #2a3140; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  width: 100%;
}

.browse-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.entry-card,
.category-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  color: inherit;
  text-decoration: none;
  background: var(--bg-raised);
  border: 2px solid #101216;
  box-shadow: inset 1px 1px 0 #525a68, inset -1px -1px 0 #101217;
}

.entry-card .name,
.category-card .name {
  font-weight: 800;
  color: #fff;
}

.entry-card .hook,
.category-card .hook {
  width: 100%;
  color: var(--muted);
}

.entry-card .hook {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  background: #22262e;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e6e1d6;
  background: #2a2c33;
  border: 2px solid #101216;
}

.tag-fuel,
.tag-items { color: #ffd56a; background: #3a2a12; }

.tag-food { color: #ffb087; background: #3a2418; }

.tag-drink,
.tag-goal { color: #8fd4ff; background: #12303a; }

.tag-storage,
.tag-blocks { color: #9ec1ff; background: #1e2a3a; }

.tag-weapon,
.tag-hostile,
.tag-mobs { color: #ff8b8b; background: #3a1418; }

.tag-block,
.tag-structures,
.tag-passive { color: #b7e0c2; background: #163226; }

.tag-neutral { color: #ffd56a; background: #3a3012; }

.tag-item,
.tag-paintings,
.tag-signs { color: #e6e1d6; background: #2a2c33; }

.tag-sound,
.tag-sounds { color: #d2b4ff; background: #2a2040; }

.tag-task,
.tag-advancements { color: #fff14a; background: #2c2c2c; }

.tag-challenge { color: #ffb087; background: #3a2418; }

.card-icon .portrait { background: transparent; }

.wiki-section { margin-top: 8px; }

.wiki-section ul:not(.drop-list) { margin: 8px 0 0; padding-left: 1.2em; }

.wiki-section ul:not(.drop-list) li + li { margin-top: 4px; }

.drop-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drop-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; gap: 8px; }

  .card-grid .category-card,
  .card-grid .entry-card {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
  }

  .card-grid .card-icon {
    width: 36px;
    height: 36px;
    flex: none;
  }

  .card-grid .card-icon img,
  .card-grid .card-icon svg {
    width: 28px;
    height: 28px;
  }

  .card-grid .hook { display: none; }

  .card-grid .name {
    flex: 1;
    min-width: 0;
  }

  .card-grid .tag { margin-left: auto; flex: none; }
}
